Commit 1d94b515
Changed files (8)
app
controllers
models
views
admin
photos
profiles
spec
app/controllers/admin/photos_controller.rb
@@ -11,7 +11,6 @@ module Admin
def show
@photo = @photo_repository.find(params[:id])
- @results = Geocoder.search("#{@photo.latitude},#{@photo.longitude}")
end
end
end
app/controllers/profiles_controller.rb
@@ -9,7 +9,6 @@ class ProfilesController < ApplicationController
def show
@user = User.find(params[:id])
@creations = @user.creations.includes([:user, :photos]).page(params[:page]).per(18)
- @nearby_users = @user.nearbys(50) || []
expires_in(1.hour)
end
end
app/models/user.rb
@@ -1,12 +1,4 @@
class User < ActiveRecord::Base
- geocoded_by :current_sign_in_ip, :latitude => :latitude, :longitude => :longitude
- reverse_geocoded_by :latitude, :longitude do |user,results|
- if geo = results.first
- user.full_address = geo.formatted_address
- end
- end
-
- before_save :geocode, :reverse_geocode
before_save :ensure_authentication_token
after_create :send_welcome_email
app/views/admin/photos/show.html.erb
@@ -35,10 +35,5 @@
<%= image_tag @photo.url_for(:original) %>
<%= image_tag @photo.url_for(:large) %>
<%= image_tag @photo.url_for(:thumb) %>
- <ul>
- <% @results.each do |result| %>
- <li><%= result.formatted_address %></li>
- <% end %>
- </ul>
</div>
</div>
app/views/profiles/show.html.erb
@@ -19,16 +19,6 @@
<% end %>
</div>
</div>
- <% if @nearby_users.any? %>
- <div>
- <h4>Other Members Nearby</h4>
- <ul class="unstyled">
- <% @nearby_users.each do |item| %>
- <li><%= link_to item.name, profile_path(item), :class => "mix-link", "data-event" => "click-on-nearby-user" %> <small><%= item.city %></small></li>
- <% end %>
- </ul>
- </div>
- <% end %>
</div>
<div class="span9">
<h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
spec/spec_helper.rb
@@ -43,11 +43,6 @@ RSpec.configure do |config|
config.default_formatter = 'doc'
end
- # Print the 10 slowest examples and example groups at the
- # end of the spec run, to help surface which specs are running
- # particularly slow.
- config.profile_examples = 10
-
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
@@ -68,7 +63,7 @@ RSpec.configure do |config|
# For more details, see:
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
#expectations.syntax = :expect
- expectations.syntax = :should
+ expectations.syntax = [:should, :expect]
end
# rspec-mocks config goes here. You can use an alternate test double
@@ -78,7 +73,7 @@ RSpec.configure do |config|
# For more details, see:
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
#mocks.syntax = :expect
- mocks.syntax = :should
+ mocks.syntax = [:should, :expect]
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended.
Gemfile
@@ -24,10 +24,8 @@ gem 'delayed_job_active_record', "~> 4.0.0"
gem 'daemons', '~> 1.1.9'
gem 'jquery-fileupload-rails', '~> 0.4.1'
gem 'dotenv-rails'
-gem 'geocoder', '~> 1.1.9'
gem 'pg'
gem 'asset_sync', '~> 1.0.0'
-gem 'geoip'
gem 'fog'
gem 'unf'
gem 'exception_notification'
Gemfile.lock
@@ -138,8 +138,6 @@ GEM
dotenv (>= 0.7)
thor (>= 0.13.6)
formatador (0.2.4)
- geocoder (1.1.9)
- geoip (1.4.0)
gibbon (1.1.2)
httparty
multi_json (>= 1.3.4)
@@ -342,8 +340,6 @@ DEPENDENCIES
ffaker
fog
foreman
- geocoder (~> 1.1.9)
- geoip
gibbon
jbuilder (~> 1.2)
jquery-fileupload-rails (~> 0.4.1)