campfire_logic 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/models/locale.rb +1 -3
- data/campfire_logic.gemspec +1 -1
- data/config/initializers/geocoder.rb +3 -3
- data/spec/models/locale_spec.rb +3 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/app/models/locale.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
class Locale
|
2
2
|
require 'mongoid/tree'
|
3
|
-
require 'stringex'
|
4
3
|
|
5
|
-
include LuckySneaks::StringExtensions
|
6
4
|
include Geocoder::Model::Mongoid
|
7
5
|
include Mongoid::Document
|
8
6
|
include Mongoid::Timestamps
|
@@ -53,7 +51,7 @@ class Locale
|
|
53
51
|
|
54
52
|
def post_process
|
55
53
|
self.set_kind
|
56
|
-
|
54
|
+
# self.geocode unless self.skip_geocoding || self.geocoding_address.blank?
|
57
55
|
self.save
|
58
56
|
end
|
59
57
|
|
data/campfire_logic.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
uri = URI.parse ENV['REDISTOGO_URL']
|
2
|
-
REDIS = Redis.new :host => uri.host, :port => uri.port, :password => uri.password
|
3
|
-
Geocoder::Configuration.cache = REDIS
|
1
|
+
uri = URI.parse ENV['REDISTOGO_URL'] if ENV['REDISTOGO_URL']
|
2
|
+
REDIS = Redis.new :host => uri.host, :port => uri.port, :password => uri.password if uri
|
3
|
+
Geocoder::Configuration.cache = REDIS if defined? REDIS
|
4
4
|
Geocoder::Configuration.lookup = :google
|
5
5
|
Geocoder::Configuration.timeout = 15
|
data/spec/models/locale_spec.rb
CHANGED
@@ -33,7 +33,7 @@ describe Locale do
|
|
33
33
|
specify { subject.name.should == 'United States' }
|
34
34
|
specify { subject.should be_country }
|
35
35
|
specify { subject.geocoding_address.should == 'United States' }
|
36
|
-
specify { subject.geocoded?.should
|
36
|
+
specify { subject.geocoded?.should be_false }
|
37
37
|
end
|
38
38
|
|
39
39
|
context 'when state' do
|
@@ -42,7 +42,7 @@ describe Locale do
|
|
42
42
|
specify { subject.should be_state }
|
43
43
|
specify { subject.geocoding_address.should == 'New York' }
|
44
44
|
specify { subject.friendly_name.should == 'New York' }
|
45
|
-
specify { subject.geocoded?.should
|
45
|
+
specify { subject.geocoded?.should be_false }
|
46
46
|
end
|
47
47
|
|
48
48
|
context 'when city' do
|
@@ -51,7 +51,7 @@ describe Locale do
|
|
51
51
|
specify { subject.should be_city }
|
52
52
|
specify { subject.geocoding_address.should == 'Brooklyn New York' }
|
53
53
|
specify { subject.friendly_name.should == 'Brooklyn, New York' }
|
54
|
-
specify { subject.geocoded?.should
|
54
|
+
specify { subject.geocoded?.should be_false }
|
55
55
|
end
|
56
56
|
|
57
57
|
context 'when location' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: campfire_logic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Roderick Monje
|