diff --git a/Gemfile b/Gemfile index 7764763..fa40e6b 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,8 @@ gem 'rails', '3.2.2' gem 'sqlite3' +gem 'devise' + # Gems used only for assets and not required # in production environments by default. @@ -22,6 +24,8 @@ end gem 'jquery-rails' +gem 'cleditor_rails' + # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 81a3ba7..151e186 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,10 @@ GEM i18n (~> 0.6) multi_json (~> 1.0) arel (3.0.2) + bcrypt-ruby (3.0.1) + bcrypt-ruby (3.0.1-x86-mingw32) builder (3.0.0) + cleditor_rails (0.0.3) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) @@ -37,6 +40,11 @@ GEM coffee-script-source execjs coffee-script-source (1.2.0) + devise (2.0.4) + bcrypt-ruby (~> 3.0) + orm_adapter (~> 0.0.3) + railties (~> 3.1) + warden (~> 1.1.1) erubis (2.7.0) execjs (1.3.0) multi_json (~> 1.0) @@ -53,6 +61,7 @@ GEM treetop (~> 1.4.8) mime-types (1.17.2) multi_json (1.1.0) + orm_adapter (0.0.7) polyglot (0.3.3) rack (1.4.1) rack-cache (1.2) @@ -89,6 +98,7 @@ GEM rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.5) + sqlite3 (1.3.5-x86-mingw32) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) @@ -98,12 +108,17 @@ GEM uglifier (1.2.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) + warden (1.1.1) + rack (>= 1.0) PLATFORMS ruby + x86-mingw32 DEPENDENCIES + cleditor_rails coffee-rails (~> 3.2.1) + devise jquery-rails rails (= 3.2.2) sass-rails (~> 3.2.3) diff --git a/app/assets/images/danielrubio.jpg b/app/assets/images/danielrubio.jpg new file mode 100644 index 0000000..334d220 Binary files /dev/null and b/app/assets/images/danielrubio.jpg differ diff --git a/app/assets/images/email.jpg b/app/assets/images/email.jpg new file mode 100644 index 0000000..e115615 Binary files /dev/null and b/app/assets/images/email.jpg differ diff --git a/app/assets/images/juanquemada.jpg b/app/assets/images/juanquemada.jpg new file mode 100644 index 0000000..2dceac4 Binary files /dev/null and b/app/assets/images/juanquemada.jpg differ diff --git a/app/assets/images/juanquemada2.jpg b/app/assets/images/juanquemada2.jpg new file mode 100644 index 0000000..df19bf0 Binary files /dev/null and b/app/assets/images/juanquemada2.jpg differ diff --git a/app/assets/images/telefono.jpg b/app/assets/images/telefono.jpg new file mode 100644 index 0000000..ad63180 Binary files /dev/null and b/app/assets/images/telefono.jpg differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 9097d83..84d87a2 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -11,5 +11,6 @@ // GO AFTER THE REQUIRES BELOW. // //= require jquery +//= require cleditor //= require jquery_ujs //= require_tree . diff --git a/app/assets/javascripts/comments.js.coffee b/app/assets/javascripts/comments.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/comments.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/trips.js.coffee b/app/assets/javascripts/trips.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/trips.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/visits.js.coffee b/app/assets/javascripts/visits.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/visits.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3b5cc66..50d53e3 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -9,5 +9,6 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self + *= require cleditor *= require_tree . */ diff --git a/app/assets/stylesheets/comments.css.scss b/app/assets/stylesheets/comments.css.scss new file mode 100644 index 0000000..3722c12 --- /dev/null +++ b/app/assets/stylesheets/comments.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the comments controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/planet.css b/app/assets/stylesheets/planet.css index 28c4fcc..213dfbf 100644 --- a/app/assets/stylesheets/planet.css +++ b/app/assets/stylesheets/planet.css @@ -16,6 +16,19 @@ border-bottom: 3px dotted #77d; } +/* Estilos para el resto de cabeceras definidas en author*/ +#planet h2 { + font: 135% sans-serif; + font-weight: bold; + color: #226; +} + +#planet h3 { + font: 110% sans-serif; + font-weight: bold; + color: #226; +} + /* Styles for products/index */ #site_list table { @@ -78,6 +91,13 @@ text-align: center; } +/* Estilo para el banner de registro de usuarios */ +#banner .user { + float: right; + color: #bfb; + font-size: small; +} + #banner img { float: left; padding-left: 10px; @@ -91,6 +111,7 @@ margin-left: 9em; /* Ajuste de borde izquierdo */ padding-top: 4ex; padding-left: 2em; + padding-bottom: 4ex; background: white; } @@ -107,6 +128,24 @@ color: #bfb; font-size: small; } + +#header_links { /* Estilos para los hiperenlaces superiores e inferiores*/ + position: top; + background: #bfb; + border: 1px solid; + font: small-caps 16px/16px "Times New Roman", serif; + text-align: left; +} + +#footer_links { + position: bottom; + background: #bfb; + border: 1px solid; + font: small-caps 16px/16px "Times New Roman", serif; + text-align: left; +} + + /* END:mainlayout */ /* An entry in the store catalog (no utilizados de momento) */ diff --git a/app/assets/stylesheets/trips.css.scss b/app/assets/stylesheets/trips.css.scss new file mode 100644 index 0000000..473cbc3 --- /dev/null +++ b/app/assets/stylesheets/trips.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the trips controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/visits.css.scss b/app/assets/stylesheets/visits.css.scss new file mode 100644 index 0000000..99b00b9 --- /dev/null +++ b/app/assets/stylesheets/visits.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the visits controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb new file mode 100644 index 0000000..715bc25 --- /dev/null +++ b/app/controllers/comments_controller.rb @@ -0,0 +1,91 @@ +class CommentsController < ApplicationController + + # authenticate_user! ejecuta acción sólo si sesión existe + before_filter :authenticate_user!,:except=> [:index,:show] + + # GET /comments + # GET /comments.json + def index + if params[:site_id].nil? or params[:site_id].empty? + @comments = Comment.all + else + @comments = Site.find(params[:site_id]).comments + end + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @comments } + end + end + + # GET /comments/1 + # GET /comments/1.json + def show + @comment = Comment.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @comment } + end + end + + # GET /comments/new + # GET /comments/new.json + def new + @comment = current_user.comments.build #cambio comment por current_user.comments.build -- crea comentario vacio asociado a current_user + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @comment } + end + end + + # GET /comments/1/edit + def edit + @comment = current_user.comments.find(params[:id]) #cambio Comment por current_user.comments -- busca solo en comentarios asociados a current_user + end + + # POST /comments + # POST /comments.json + def create + @comment = current_user.comments.build(params[:comment]) #cambio Comment.new por current_user.comments.build -- asigna solo si comentario asociado a current_user + + respond_to do |format| + if @comment.save + format.html { redirect_to @comment, notice: 'Comment was successfully created.' } + format.json { render json: @comment, status: :created, location: @comment } + else + format.html { render action: "new" } + format.json { render json: @comment.errors, status: :unprocessable_entity } + end + end + end + + # PUT /comments/1 + # PUT /comments/1.json + def update + @comment = current_user.comments.find(params[:id]) #cambio Comment por current_user.comments.-- busca solo en comentarios asociados a current_user + + respond_to do |format| + if @comment.update_attributes(params[:comment]) + format.html { redirect_to @comment, notice: 'Comment was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @comment.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /comments/1 + # DELETE /comments/1.json + def destroy + @comment = current_user.comments.find(params[:id]) #cambiar Comment por current_user.comments -- busca solo en comentarios asociados a current_user + @comment.destroy + + respond_to do |format| + format.html { redirect_to sites_url } #cambiar por sites_comments_url¿?¿? + format.json { head :no_content } + end + end +end diff --git a/app/controllers/planet_controller.rb b/app/controllers/planet_controller.rb index be7ac0a..759b28a 100644 --- a/app/controllers/planet_controller.rb +++ b/app/controllers/planet_controller.rb @@ -7,5 +7,9 @@ def contact def ejemplo end + + # GET /planet/author + def author + end end diff --git a/app/controllers/sites_controller.rb b/app/controllers/sites_controller.rb index f3ae9ad..c61e3f9 100644 --- a/app/controllers/sites_controller.rb +++ b/app/controllers/sites_controller.rb @@ -1,4 +1,23 @@ class SitesController < ApplicationController + + # authenticate_user! ejecuta acción sólo si sesión existe + before_filter :authenticate_user!, :except => [:index, :show, :search] + + #filtro para contador de visitas + after_filter :count_visit, :only => :show + + # Función de búsqueda en sitios y comentarios + # GET /sites/search + # GET /sites/search.json + def search + #@sites = Site.where("name like ? OR description like ?", "%#{params[:q]}%", "%#{params[:q]}%") + + #respond_to do |format| + # format.html # search.html.erb + # format.json { render json: @sites } + #end + end + # GET /sites # GET /sites.json def index @@ -7,6 +26,7 @@ def index else @sites = Type.find(params[:type_id]).sites # path: /types/id/sites end + respond_to do |format| format.html # index.html.erb format.json { render json: @sites } @@ -27,7 +47,7 @@ def show # GET /sites/new # GET /sites/new.json def new - @site = Site.new + @site = current_user.sites.build #cambio Site por current_user.sites.build -- crea sitio vacio asociado a current_user respond_to do |format| format.html # new.html.erb @@ -37,13 +57,13 @@ def new # GET /sites/1/edit def edit - @site = Site.find(params[:id]) + @site = current_user.sites.find(params[:id]) #cambio Site por current_user.sites -- busca solo en sitios asociados a current_user end # POST /sites # POST /sites.json def create - @site = Site.new(params[:site]) + @site = current_user.sites.build(params[:site]) #cambio Site.new por current_user.sites.build -- asigna solo si sitio asociado a current_user respond_to do |format| if @site.save @@ -59,7 +79,7 @@ def create # PUT /sites/1 # PUT /sites/1.json def update - @site = Site.find(params[:id]) + @site = current_user.sites.find(params[:id]) #cambio Site por current_user.sites.-- busca solo en sitios asociados a current_user respond_to do |format| if @site.update_attributes(params[:site]) @@ -75,7 +95,7 @@ def update # DELETE /sites/1 # DELETE /sites/1.json def destroy - @site = Site.find(params[:id]) + @site = current_user.sites.find(params[:id]) #cambiar Site por current_user.sites -- busca solo en sitios asociados a current_user @site.destroy respond_to do |format| @@ -83,4 +103,10 @@ def destroy format.json { head :no_content } end end -end + + private + #definicion de la funcion contadora de visitas + def count_visit + @site.increment(:visits) + end +end \ No newline at end of file diff --git a/app/controllers/trips_controller.rb b/app/controllers/trips_controller.rb new file mode 100644 index 0000000..2a931a1 --- /dev/null +++ b/app/controllers/trips_controller.rb @@ -0,0 +1,88 @@ +class TripsController < ApplicationController + + # authenticate_user! ejecuta acción sólo si sesión existe + before_filter :authenticate_user!, :except => [ :index, :show ] + + # GET /trips + # GET /trips.json + def index + @trips = Trip.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @trips } + end + end + + # GET /trips/1 + # GET /trips/1.json + def show + @trip = Trip.find(params[:id]) + @visit = @trip.visits.build + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @trip } + end + end + + # GET /trips/new + # GET /trips/new.json + def new + @trip = current_user.trips.build # cambiar Trip.new por current_user.trips.build -- crea viaje vacio asociado a current user + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @trip } + end + end + + # GET /trips/1/edit + def edit + @trip = current_user.trips.find(params[:id]) # cambiar Trip por current_user.trips -- busca solo en sitios asociados a current_user + end + + # POST /trips + # POST /trips.json + def create + @trip = current_user.trips.build(params[:trip]) # cambiar Trip.new por current_user.trips.build -- Asigna solo si sitio asociado a current_user + + respond_to do |format| + if @trip.save + format.html { redirect_to @trip, notice: 'Trip was successfully created.' } + format.json { render json: @trip, status: :created, location: @trip } + else + format.html { render action: "new" } + format.json { render json: @trip.errors, status: :unprocessable_entity } + end + end + end + + # PUT /trips/1 + # PUT /trips/1.json + def update + @trip = current_user.trips.find(params[:id]) # cambiar Trip por current_user.trips -- busca solo en sitios asociados a current_user + + respond_to do |format| + if @trip.update_attributes(params[:trip]) + format.html { redirect_to @trip, notice: 'Trip was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @trip.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /trips/1 + # DELETE /trips/1.json + def destroy + @trip = current_user.trips.find(params[:id]) # cambiar Trip por current_user.trips -- busca solo en sitios asociados a current_user + @trip.destroy + + respond_to do |format| + format.html { redirect_to trips_url } + format.json { head :no_content } + end + end +end \ No newline at end of file diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb index da826f4..0b29f48 100644 --- a/app/controllers/types_controller.rb +++ b/app/controllers/types_controller.rb @@ -10,6 +10,17 @@ def index end end + # GET /types/ordered_index + # GET /types/ordered_index.json + def ordered_index + @types = Type.find(:all, :order=>:name) + + respond_to do |format| + format.html #ordered_index.html.erb + format.json { render json: @type } + end + end + # GET /types/1 # GET /types/1.json def show @@ -80,4 +91,4 @@ def destroy format.json { head :no_content } end end -end +end \ No newline at end of file diff --git a/app/controllers/visits_controller.rb b/app/controllers/visits_controller.rb new file mode 100644 index 0000000..6cd2e6d --- /dev/null +++ b/app/controllers/visits_controller.rb @@ -0,0 +1,84 @@ +class VisitsController < ApplicationController + # GET /visits + # GET /visits.json + def index + @visits = Visit.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @visits } + end + end + + # GET /visits/1 + # GET /visits/1.json + def show + @visit = Visit.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @visit } + end + end + + # GET /visits/new + # GET /visits/new.json + def new + @visit = Visit.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @visit } + end + end + + # GET /visits/1/edit + def edit + @visit = Visit.find(params[:id]) + end + + # POST /visits + # POST /visits.json + def create + @visit = Visit.new(params[:visit]) + + respond_to do |format| + if @visit.save + format.html { redirect_to @visit.trip, notice: 'Visit was successfully created.' } + format.js #se añade formato Javascript para transacción AJAX -- app/views/visits/create.js.erb + format.json { render json: @visit, status: :created, location: @visit } + else + format.html { render action: "new" } + format.json { render json: @visit.errors, status: :unprocessable_entity } + end + end + end + + # PUT /visits/1 + # PUT /visits/1.json + def update + @visit = Visit.find(params[:id]) + + respond_to do |format| + if @visit.update_attributes(params[:visit]) + format.html { redirect_to @visit.trip, notice: 'Visit was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @visit.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /visits/1 + # DELETE /visits/1.json + def destroy + @visit = Visit.find(params[:id]) + @visit.destroy + + respond_to do |format| + format.html { redirect_to @visit.trip } + format.json { head :no_content } + end + end +end diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb new file mode 100644 index 0000000..0ec9ca5 --- /dev/null +++ b/app/helpers/comments_helper.rb @@ -0,0 +1,2 @@ +module CommentsHelper +end diff --git a/app/helpers/trips_helper.rb b/app/helpers/trips_helper.rb new file mode 100644 index 0000000..04f333d --- /dev/null +++ b/app/helpers/trips_helper.rb @@ -0,0 +1,2 @@ +module TripsHelper +end diff --git a/app/helpers/visits_helper.rb b/app/helpers/visits_helper.rb new file mode 100644 index 0000000..8ce5f83 --- /dev/null +++ b/app/helpers/visits_helper.rb @@ -0,0 +1,2 @@ +module VisitsHelper +end diff --git a/app/models/comment.rb b/app/models/comment.rb new file mode 100644 index 0000000..a2735e3 --- /dev/null +++ b/app/models/comment.rb @@ -0,0 +1,9 @@ +class Comment < ActiveRecord::Base + belongs_to :site + belongs_to :user + + #validaciones para evitar código malicioso -- longitud máxima 240 caracteres + validates :comment, :presence => true, :length => {:maximum => 240} + + attr_protected :user_id +end \ No newline at end of file diff --git a/app/models/site.rb b/app/models/site.rb index 3eb288d..a2552cc 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -1,3 +1,17 @@ class Site < ActiveRecord::Base belongs_to :type + belongs_to :user + + has_many :comments + has_many :visits + has_many :trips, :through => :visits + + #has_attached_file :image + + #relativos a las coordenadas GPS ¿?¿? + #validates :name, :type_id, :latitude, :longitude, :zoom, :image_url, :presence => true + #validates :zoom, :numericality => {:greater_than_or_equal_to => 0.1} + validates :name, :uniqueness => true #campo único (no repetido) + + attr_protected :user_id end diff --git a/app/models/trip.rb b/app/models/trip.rb new file mode 100644 index 0000000..d8f757c --- /dev/null +++ b/app/models/trip.rb @@ -0,0 +1,8 @@ +class Trip < ActiveRecord::Base + belongs_to :user + + has_many :visits + has_many :sites, :through => :visits + + attr_protected :user_id +end diff --git a/app/models/type.rb b/app/models/type.rb index 7c3d2ac..10ea770 100644 --- a/app/models/type.rb +++ b/app/models/type.rb @@ -1,3 +1,7 @@ class Type < ActiveRecord::Base has_many :sites + + # validaciones para evitar código malicioso + validates :name, :description, :presence => true #campos obligatorios + validates :name, :uniqueness => true #campo único (no repetido) end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..af96417 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,16 @@ +class User < ActiveRecord::Base + # Include default devise modules. Others available are: + # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable + devise :database_authenticatable, :registerable, + :recoverable, :rememberable, :trackable, :validatable + + has_many :sites + has_many :comments + has_many :trips + + #validaciones para evitar código malicioso + validates :name, :presence => true + + # Setup accessible (or protected) attributes for your model + attr_accessible :name, :email, :password, :password_confirmation, :remember_me +end diff --git a/app/models/visit.rb b/app/models/visit.rb new file mode 100644 index 0000000..ca23b73 --- /dev/null +++ b/app/models/visit.rb @@ -0,0 +1,4 @@ +class Visit < ActiveRecord::Base + belongs_to :trip + belongs_to :site +end diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb new file mode 100644 index 0000000..d5857a7 --- /dev/null +++ b/app/views/comments/_form.html.erb @@ -0,0 +1,26 @@ +<%= form_for(@comment) do |f| %> + <% if @comment.errors.any? %> +
+
|
+
+
+ <%= link_to 'Show', com %> + <% if com.user == current_user %> + <%= link_to 'Edit', edit_comment_path(com) %> + <%= link_to 'Destroy', com, + :confirm => 'Are you sure?', + :method => :delete %> + <% end %> + |
+
<%= notice %>
+ ++ User: + <%= @comment.user.name %> +
+ ++ Comment: + <%= @comment.comment %> +
+ ++ Site: + <%= @comment.site_id %> +
+ + +<% if @comment.user == current_user %> + <%= link_to 'Edit comment', edit_site_comment_path(@comment) %> | +<% end %> +<%= link_to 'Back to site', site_path(@comment.site) %> \ No newline at end of file diff --git a/app/views/devise/_links.erb b/app/views/devise/_links.erb new file mode 100644 index 0000000..eab783a --- /dev/null +++ b/app/views/devise/_links.erb @@ -0,0 +1,25 @@ +<%- if controller_name != 'sessions' %> + <%= link_to "Sign in", new_session_path(resource_name) %>Welcome <%= @resource.email %>!
+ +You can confirm your account email through the link below:
+ +<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb new file mode 100644 index 0000000..ae9e888 --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -0,0 +1,8 @@ +Hello <%= @resource.email %>!
+ +Someone has requested a link to change your password, and you can do this through the link below.
+ +<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>
+ +If you didn't request this, please ignore this email.
+Your password won't change until you access the link above and create a new one.
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb new file mode 100644 index 0000000..2263c21 --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -0,0 +1,7 @@ +Hello <%= @resource.email %>!
+ +Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
+ +Click the link below to unlock your account:
+ +<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb new file mode 100644 index 0000000..5f7bcf8 --- /dev/null +++ b/app/views/devise/passwords/edit.html.erb @@ -0,0 +1,16 @@ +<%= f.label :name %> + <%= f.text_field :name %>
+ +Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.
+ +<%= link_to "Back", :back %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb new file mode 100644 index 0000000..ba81cb3 --- /dev/null +++ b/app/views/devise/registrations/new.html.erb @@ -0,0 +1,21 @@ +<%= f.label :name %> + <%= f.text_field :name %>
+ +| + <%= link_to image_tag(site.image_url, :class => 'list_image'), site %> + | + +
+
|
+
+
+ <%= link_to 'Show', site %> + <% if site.user == current_user %> + <%= link_to 'Edit', edit_site_path(site) %> + <%= link_to 'Destroy', site, + :confirm => 'Are you sure?', + :method => :delete %> + <% end %> + <% if !site.comments.empty? %> + <%= link_to 'Comments', site_comments_path(params[:site_id] = site.id) if site.comments %> + <% end %> + |
+
<%=sanitize @site.description %>
+Autor: + <%= @site.user.name if @site.user %>
+ +Visitas: + <%= @site.visits.length %>
| + <%= link_to image_tag(visit.site.image_url, :class => 'list_image'), visit.site %> + | + +
+
|
+
+
+ <%= link_to 'Show', visit.site %> + <%= link_to 'Destroy', visit, + :confirm => 'Are you sure?', + :method => :delete if @trip.user == current_user %> + + |
+
+
|
+
+
+
+
+ <%= link_to 'Show', trip %> + <% if trip.user == current_user %> + <%= link_to 'Edit', edit_trip_path(trip) %> + <%= link_to 'Destroy', trip, + :confirm => 'Are you sure?', + :method => :delete %> + <% end %> + |
+
+ Name: + <%= @trip.name %> +
+ ++ Date: + <%= @trip.date %> +
+ ++ Autor: + <%= @trip.user.name if @trip.user %> +
+ ++ Description: + <%= simple_format @trip.description %> +
+ +
+
|
+
+
+ <%= link_to 'Show', type %> + <%= link_to 'Edit', edit_type_path(type) %> + <%= link_to 'Destroy', type, + :confirm => 'Are you sure?', + :method => :delete %> + |
+
+ Last modified: + <%= @type.updated_at %> +
<%= link_to 'Edit', edit_type_path(@type) %> | <%= link_to 'Back', types_path %> diff --git a/app/views/visits/_form.html.erb b/app/views/visits/_form.html.erb new file mode 100644 index 0000000..12ab912 --- /dev/null +++ b/app/views/visits/_form.html.erb @@ -0,0 +1,29 @@ +<%= form_for(@visit) do |f| %> + <% if @visit.errors.any? %> +| Trip | +Site | +Hour | ++ | + | + |
|---|---|---|---|---|---|
| <%= visit.trip_id %> | +<%= visit.site_id %> | +<%= visit.hour %> | +<%= link_to 'Show', visit %> | +<%= link_to 'Edit', edit_visit_path(visit) %> | +<%= link_to 'Destroy', visit, confirm: 'Are you sure?', method: :delete %> | +
<%= notice %>
+ ++ Trip: + <%= @visit.trip_id %> +
+ ++ Site: + <%= @visit.site_id %> +
+ ++ Hour: + <%= @visit.hour %> +
+ + +<%= link_to 'Edit', edit_visit_path(@visit) %> | +<%= link_to 'Back', visits_path %> diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb new file mode 100644 index 0000000..62146ea --- /dev/null +++ b/config/initializers/devise.rb @@ -0,0 +1,223 @@ +# Use this hook to configure devise mailer, warden hooks and so forth. +# Many of these configuration options can be set straight in your model. +Devise.setup do |config| + # ==> Mailer Configuration + # Configure the e-mail address which will be shown in Devise::Mailer, + # note that it will be overwritten if you use your own mailer class with default "from" parameter. + config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com" + + # Configure the class responsible to send e-mails. + # config.mailer = "Devise::Mailer" + + # Automatically apply schema changes in tableless databases + config.apply_schema = false + + # ==> ORM configuration + # Load and configure the ORM. Supports :active_record (default) and + # :mongoid (bson_ext recommended) by default. Other ORMs may be + # available as additional gems. + require 'devise/orm/active_record' + + # ==> Configuration for any authentication mechanism + # Configure which keys are used when authenticating a user. The default is + # just :email. You can configure it to use [:username, :subdomain], so for + # authenticating a user, both parameters are required. Remember that those + # parameters are used only when authenticating and not when retrieving from + # session. If you need permissions, you should implement that in a before filter. + # You can also supply a hash where the value is a boolean determining whether + # or not authentication should be aborted when the value is not present. + # config.authentication_keys = [ :email ] + + # Configure parameters from the request object used for authentication. Each entry + # given should be a request method and it will automatically be passed to the + # find_for_authentication method and considered in your model lookup. For instance, + # if you set :request_keys to [:subdomain], :subdomain will be used on authentication. + # The same considerations mentioned for authentication_keys also apply to request_keys. + # config.request_keys = [] + + # Configure which authentication keys should be case-insensitive. + # These keys will be downcased upon creating or modifying a user and when used + # to authenticate or find a user. Default is :email. + config.case_insensitive_keys = [ :email ] + + # Configure which authentication keys should have whitespace stripped. + # These keys will have whitespace before and after removed upon creating or + # modifying a user and when used to authenticate or find a user. Default is :email. + config.strip_whitespace_keys = [ :email ] + + # Tell if authentication through request.params is enabled. True by default. + # It can be set to an array that will enable params authentication only for the + # given strategies, for example, `config.params_authenticatable = [:database]` will + # enable it only for database (email + password) authentication. + # config.params_authenticatable = true + + # Tell if authentication through HTTP Basic Auth is enabled. False by default. + # It can be set to an array that will enable http authentication only for the + # given strategies, for example, `config.http_authenticatable = [:token]` will + # enable it only for token authentication. + # config.http_authenticatable = false + + # If http headers should be returned for AJAX requests. True by default. + # config.http_authenticatable_on_xhr = true + + # The realm used in Http Basic Authentication. "Application" by default. + # config.http_authentication_realm = "Application" + + # It will change confirmation, password recovery and other workflows + # to behave the same regardless if the e-mail provided was right or wrong. + # Does not affect registerable. + # config.paranoid = true + + # By default Devise will store the user in session. You can skip storage for + # :http_auth and :token_auth by adding those symbols to the array below. + # Notice that if you are skipping storage for all authentication paths, you + # may want to disable generating routes to Devise's sessions controller by + # passing :skip => :sessions to `devise_for` in your config/routes.rb + config.skip_session_storage = [:http_auth] + + # ==> Configuration for :database_authenticatable + # For bcrypt, this is the cost for hashing the password and defaults to 10. If + # using other encryptors, it sets how many times you want the password re-encrypted. + # + # Limiting the stretches to just one in testing will increase the performance of + # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use + # a value less than 10 in other environments. + config.stretches = Rails.env.test? ? 1 : 10 + + # Setup a pepper to generate the encrypted password. + # config.pepper = "fc2b132b907808e63a027e4947cc470c1dad8d17f556b9bbc1af44a17a7d026437c11619006bb843ccde92c04161176b3aeee299e21eee60a00b0167594060b6" + + # ==> Configuration for :confirmable + # A period that the user is allowed to access the website even without + # confirming his account. For instance, if set to 2.days, the user will be + # able to access the website for two days without confirming his account, + # access will be blocked just in the third day. Default is 0.days, meaning + # the user cannot access the website without confirming his account. + # config.allow_unconfirmed_access_for = 2.days + + # If true, requires any email changes to be confirmed (exctly the same way as + # initial account confirmation) to be applied. Requires additional unconfirmed_email + # db field (see migrations). Until confirmed new email is stored in + # unconfirmed email column, and copied to email column on successful confirmation. + config.reconfirmable = true + + # Defines which key will be used when confirming an account + # config.confirmation_keys = [ :email ] + + # ==> Configuration for :rememberable + # The time the user will be remembered without asking for credentials again. + # config.remember_for = 2.weeks + + # If true, extends the user's remember period when remembered via cookie. + # config.extend_remember_period = false + + # If true, uses the password salt as remember token. This should be turned + # to false if you are not using database authenticatable. + config.use_salt_as_remember_token = true + + # Options to be passed to the created cookie. For instance, you can set + # :secure => true in order to force SSL only cookies. + # config.cookie_options = {} + + # ==> Configuration for :validatable + # Range for password length. Default is 6..128. + # config.password_length = 6..128 + + # Email regex used to validate email formats. It simply asserts that + # an one (and only one) @ exists in the given string. This is mainly + # to give user feedback and not to assert the e-mail validity. + # config.email_regexp = /\A[^@]+@[^@]+\z/ + + # ==> Configuration for :timeoutable + # The time you want to timeout the user session without activity. After this + # time the user will be asked for credentials again. Default is 30 minutes. + # config.timeout_in = 30.minutes + + # ==> Configuration for :lockable + # Defines which strategy will be used to lock an account. + # :failed_attempts = Locks an account after a number of failed attempts to sign in. + # :none = No lock strategy. You should handle locking by yourself. + # config.lock_strategy = :failed_attempts + + # Defines which key will be used when locking and unlocking an account + # config.unlock_keys = [ :email ] + + # Defines which strategy will be used to unlock an account. + # :email = Sends an unlock link to the user email + # :time = Re-enables login after a certain amount of time (see :unlock_in below) + # :both = Enables both strategies + # :none = No unlock strategy. You should handle unlocking by yourself. + # config.unlock_strategy = :both + + # Number of authentication tries before locking an account if lock_strategy + # is failed attempts. + # config.maximum_attempts = 20 + + # Time interval to unlock the account if :time is enabled as unlock_strategy. + # config.unlock_in = 1.hour + + # ==> Configuration for :recoverable + # + # Defines which key will be used when recovering the password for an account + # config.reset_password_keys = [ :email ] + + # Time interval you can reset your password with a reset password key. + # Don't put a too small interval or your users won't have the time to + # change their passwords. + config.reset_password_within = 6.hours + + # ==> Configuration for :encryptable + # Allow you to use another encryption algorithm besides bcrypt (default). You can use + # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1, + # :authlogic_sha512 (then you should set stretches above to 20 for default behavior) + # and :restful_authentication_sha1 (then you should set stretches to 10, and copy + # REST_AUTH_SITE_KEY to pepper) + # config.encryptor = :sha512 + + # ==> Configuration for :token_authenticatable + # Defines name of the authentication token params key + # config.token_authentication_key = :auth_token + + # ==> Scopes configuration + # Turn scoped views on. Before rendering "sessions/new", it will first check for + # "users/sessions/new". It's turned off by default because it's slower if you + # are using only default views. + # config.scoped_views = false + + # Configure the default scope given to Warden. By default it's the first + # devise role declared in your routes (usually :user). + # config.default_scope = :user + + # Configure sign_out behavior. + # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope). + # The default is true, which means any logout action will sign out all active scopes. + # config.sign_out_all_scopes = true + + # ==> Navigation configuration + # Lists the formats that should be treated as navigational. Formats like + # :html, should redirect to the sign in page when the user does not have + # access, but formats like :xml or :json, should return 401. + # + # If you have any extra navigational formats, like :iphone or :mobile, you + # should add them to the navigational formats lists. + # + # The "*/*" below is required to match Internet Explorer requests. + # config.navigational_formats = ["*/*", :html] + + # The default HTTP method used to sign out a resource. Default is :delete. + config.sign_out_via = :delete + + # ==> OmniAuth + # Add a new OmniAuth provider. Check the wiki for more information on setting + # up on your models and hooks. + # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo' + + # ==> Warden configuration + # If you want to use other strategies, that are not supported by Devise, or + # change the failure app, you can configure them inside the config.warden block. + # + # config.warden do |manager| + # manager.intercept_401 = false + # manager.default_strategies(:scope => :user).unshift :some_external_strategy + # end +end diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml new file mode 100644 index 0000000..73df488 --- /dev/null +++ b/config/locales/devise.en.yml @@ -0,0 +1,57 @@ +# Additional translations at https://github.com/plataformatec/devise/wiki/I18n + +en: + errors: + messages: + expired: "has expired, please request a new one" + not_found: "not found" + already_confirmed: "was already confirmed, please try signing in" + not_locked: "was not locked" + not_saved: + one: "1 error prohibited this %{resource} from being saved:" + other: "%{count} errors prohibited this %{resource} from being saved:" + + devise: + failure: + already_authenticated: 'You are already signed in.' + unauthenticated: 'You need to sign in or sign up before continuing.' + unconfirmed: 'You have to confirm your account before continuing.' + locked: 'Your account is locked.' + invalid: 'Invalid email or password.' + invalid_token: 'Invalid authentication token.' + timeout: 'Your session expired, please sign in again to continue.' + inactive: 'Your account was not activated yet.' + sessions: + signed_in: 'Signed in successfully.' + signed_out: 'Signed out successfully.' + passwords: + send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' + updated: 'Your password was changed successfully. You are now signed in.' + updated_not_active: 'Your password was changed successfully.' + send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" + confirmations: + send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' + send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' + confirmed: 'Your account was successfully confirmed. You are now signed in.' + registrations: + signed_up: 'Welcome! You have signed up successfully.' + signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' + signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.' + signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' + updated: 'You updated your account successfully.' + update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address." + destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' + unlocks: + send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' + unlocked: 'Your account has been unlocked successfully. Please sign in to continue.' + send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' + omniauth_callbacks: + success: 'Successfully authorized from %{kind} account.' + failure: 'Could not authorize you from %{kind} because "%{reason}".' + mailer: + confirmation_instructions: + subject: 'Confirmation instructions' + reset_password_instructions: + subject: 'Reset password instructions' + unlock_instructions: + subject: 'Unlock Instructions' diff --git a/config/routes.rb b/config/routes.rb index 716dc7e..a9ef522 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,27 @@ Planet::Application.routes.draw do - resources :sites + + resources :visits + + resources :trips + + resources :comments + + devise_for :users + resources :users + + get "types/ordered_index" # se añade una nueva ruta a la acción "ordered_index" resources :types do # Rutas anidadas /types/id/sites..., resources :sites, :only => [ :index ] # Restringe a acción “index” end + + resources :sites do + resources :comments + end + + resources :sites do + get 'search', :on => :collection + end get "planet/index" @@ -11,6 +29,9 @@ get "planet/ejemplo" + get "planet/author" # se añade una nueva ruta a la acción "author" + + # The priority is based upon order of creation: # first created -> highest priority. diff --git a/db/migrate/20120320100145_create_sites.rb b/db/migrate/20120320100145_create_sites.rb index 823209a..a6420df 100644 --- a/db/migrate/20120320100145_create_sites.rb +++ b/db/migrate/20120320100145_create_sites.rb @@ -4,6 +4,9 @@ def change t.string :name t.text :description t.integer :type_id + t.decimal :latitude, :precision => 8, :scale =>6 + t.decimal :longitude, :precision => 8, :scale =>6 + t.decimal :zoom, :precision => 8, :scale =>6 t.string :image_url t.timestamps diff --git a/db/migrate/20120415165600_devise_create_users.rb b/db/migrate/20120415165600_devise_create_users.rb new file mode 100644 index 0000000..540333c --- /dev/null +++ b/db/migrate/20120415165600_devise_create_users.rb @@ -0,0 +1,49 @@ +class DeviseCreateUsers < ActiveRecord::Migration + def change + create_table(:users) do |t| + ## Database authenticatable + t.string :email, :null => false, :default => "" + t.string :encrypted_password, :null => false, :default => "" + + ## Recoverable + t.string :reset_password_token + t.datetime :reset_password_sent_at + + ## Rememberable + t.datetime :remember_created_at + + ## Trackable + t.integer :sign_in_count, :default => 0 + t.datetime :current_sign_in_at + t.datetime :last_sign_in_at + t.string :current_sign_in_ip + t.string :last_sign_in_ip + + ## Encryptable + # t.string :password_salt + + ## Confirmable + # t.string :confirmation_token + # t.datetime :confirmed_at + # t.datetime :confirmation_sent_at + # t.string :unconfirmed_email # Only if using reconfirmable + + ## Lockable + # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts + # t.string :unlock_token # Only if unlock strategy is :email or :both + # t.datetime :locked_at + + ## Token authenticatable + # t.string :authentication_token + + + t.timestamps + end + + add_index :users, :email, :unique => true + add_index :users, :reset_password_token, :unique => true + # add_index :users, :confirmation_token, :unique => true + # add_index :users, :unlock_token, :unique => true + # add_index :users, :authentication_token, :unique => true + end +end diff --git a/db/migrate/20120415170814_user_name.rb b/db/migrate/20120415170814_user_name.rb new file mode 100644 index 0000000..dfb5874 --- /dev/null +++ b/db/migrate/20120415170814_user_name.rb @@ -0,0 +1,13 @@ +class UserName < ActiveRecord::Migration + def up + change_table :users do |t| #añade la columna name a la tabla sites + t.column :name,:string + end + end + + def down + change_table :users do |t| + t.remove :name + end + end +end diff --git a/db/migrate/20120415175047_user_sites.rb b/db/migrate/20120415175047_user_sites.rb new file mode 100644 index 0000000..c0b05f3 --- /dev/null +++ b/db/migrate/20120415175047_user_sites.rb @@ -0,0 +1,13 @@ +class UserSites < ActiveRecord::Migration + def up + change_table :sites do |t| #añade la columna user_id a la tabla sites + t.column :user_id, :integer + end + end + + def down + change_table :sites do |t| + t.remove :user_id + end + end +end diff --git a/db/migrate/20120415184215_create_comments.rb b/db/migrate/20120415184215_create_comments.rb new file mode 100644 index 0000000..36d0b14 --- /dev/null +++ b/db/migrate/20120415184215_create_comments.rb @@ -0,0 +1,11 @@ +class CreateComments < ActiveRecord::Migration + def change + create_table :comments do |t| + t.string :comment + t.integer :user_id + t.integer :site_id + + t.timestamps + end + end +end diff --git a/db/migrate/20120418172937_create_trips.rb b/db/migrate/20120418172937_create_trips.rb new file mode 100644 index 0000000..9acf33c --- /dev/null +++ b/db/migrate/20120418172937_create_trips.rb @@ -0,0 +1,12 @@ +class CreateTrips < ActiveRecord::Migration + def change + create_table :trips do |t| + t.string :name + t.text :description + t.date :date + t.integer :user_id + + t.timestamps + end + end +end diff --git a/db/migrate/20120418182142_create_visits.rb b/db/migrate/20120418182142_create_visits.rb new file mode 100644 index 0000000..248b6be --- /dev/null +++ b/db/migrate/20120418182142_create_visits.rb @@ -0,0 +1,11 @@ +class CreateVisits < ActiveRecord::Migration + def change + create_table :visits do |t| + t.integer :trip_id + t.integer :site_id + t.integer :hour + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index de057ba..f9ff41b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,15 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120320100145) do +ActiveRecord::Schema.define(:version => 20120418182142) do + + create_table "comments", :force => true do |t| + t.string "comment" + t.integer "user_id" + t.integer "site_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end create_table "sites", :force => true do |t| t.string "name" @@ -20,6 +28,16 @@ t.string "image_url" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "trips", :force => true do |t| + t.string "name" + t.text "description" + t.date "date" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "types", :force => true do |t| @@ -29,4 +47,31 @@ t.datetime "updated_at", :null => false end + create_table "users", :force => true do |t| + t.string "email", :default => "", :null => false + t.string "encrypted_password", :default => "", :null => false + t.string "reset_password_token" + t.datetime "reset_password_sent_at" + t.datetime "remember_created_at" + t.integer "sign_in_count", :default => 0 + t.datetime "current_sign_in_at" + t.datetime "last_sign_in_at" + t.string "current_sign_in_ip" + t.string "last_sign_in_ip" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "name" + end + + add_index "users", ["email"], :name => "index_users_on_email", :unique => true + add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true + + create_table "visits", :force => true do |t| + t.integer "trip_id" + t.integer "site_id" + t.integer "hour" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + end diff --git a/db/seeds.rb b/db/seeds.rb index 99c1f6a..7e9ebfe 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -23,30 +23,45 @@ name: 'Pedriza', description: 'Magnifico valle al norte de Madrid en el Macizo Central', type_id: 2, - image_url: 'pedriza.png') + image_url: 'pedriza.png' + latitude: 40.751244, + longitude: -3.893069, + zoom: 1) Site.create( name: 'Catedral de Florencia', description: 'Catedral de la ciudad de Florencia con la que se inicia el Renacimiento', type_id: 1, - image_url: 'florencia.png') + image_url: 'florencia.png' + latitude: 43.783333, + longitude: 11.25, + zoom: 1) Site.create( name: 'Jardin de Lineo', description: 'Jardin de la ciudad sueca de Uppsala donde el famoso naturalista enia su coleccion de plantas', type_id: 2, - image_url: 'arbol1.png') + image_url: 'arbol1.png' + latitude: 59.862222, + longitude: 17.633889, + zoom: 1) Site.create( name: 'Reichstag', description: 'Parlamento aleman en la ciudad de Berlin', type_id: 1, - image_url: 'reichstag.png') + image_url: 'reichstag.png' + latitude: 52.5186, + longitude: 13.376, + zoom: 1) Site.create( name: 'Pergamo', description: 'Puerta del mercado de la antigua ciudad griega de Pergamo del museo arquelogico de Berlin', type_id: 3, - image_url: 'pergamo.png') + image_url: 'pergamo.png' + latitude: 52.521111, + longitude: 13.396667, + zoom: 1) diff --git a/exi b/exi new file mode 100644 index 0000000..45a05fc --- /dev/null +++ b/exi @@ -0,0 +1,47 @@ +[33mcommit 540af5c8954cebdb1705a99a8624ab03d59aff5c[m +Author: danirubio