enrichment_db 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d2867355cc996bd8f1ceb74ffc2c4a3f47809d0
4
- data.tar.gz: 0028a7798ebd966b3d2cc9ad8bed25d6ccbb8b44
3
+ metadata.gz: a737f15fb5aadd35c06a71fc51b3ef9405263b4f
4
+ data.tar.gz: efa874a6971330e778cbc7208de3570bb9506a77
5
5
  SHA512:
6
- metadata.gz: 56958dfe5e92cfaf4042e2ab2a1d290839258dc25f2835f8072b6d23dc6626f70638a9dd7b02a88520a2d8331ddae1ffb2b705d646bcbec0c2863ae8819afc0a
7
- data.tar.gz: 2bff552fc3de070954a0463cd56e7ff307501b77ff2ccf1f05ff23716430f8be3139dabede9ac841459975c8af81fa33710c5fd5fac348012e1808facc3b3348
6
+ metadata.gz: 3a02a38e45100ecb1384ada2e32378d7f8344a0284f6d3b3487b33044b1db1e6e8b423549082a994d122f7f0f57bbb4df627b88735c6aeb19485d0897fbf6faf
7
+ data.tar.gz: 1d5fa5bc513ff0f9988a7ccd6422ea889154d15d7f9745d7223be2b5db4c7de6eb53cbd6337f0d8d087a5f227cc36c9db63690a2c150ef13148472923891e480
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enrichment_db (0.1.11)
4
+ enrichment_db (0.1.13)
5
5
  multi_json (~> 1.3)
6
6
  pg
7
7
  pr_geohash
@@ -25,6 +25,8 @@ module EnrichmentDb::Helper
25
25
  region_type = result['region_type']
26
26
  region_type = region_type[0..-2]
27
27
  region = EnrichmentDb::Geo.const_get(region_type).by_id(id.to_i)
28
+ return if region.nil?
29
+
28
30
  region = EnrichmentDb::Helper.hash_float_str_to_float(region)
29
31
  result['region'] = region
30
32
  result
@@ -1,3 +1,3 @@
1
1
  module EnrichmentDb
2
- VERSION = '0.1.12'
2
+ VERSION = '0.1.13'
3
3
  end
@@ -7,4 +7,9 @@ describe EnrichmentDb::Census::Datum do
7
7
  assert_equal 'Postcodes', result['region_type']
8
8
  assert_equal 26, result['median_age_of_persons']
9
9
  end
10
+
11
+ it 'should find postcode in census data but not in our database so return nil' do
12
+ result = EnrichmentDb::Census::Datum.by_id('selected_medians_and_averages', '6079')
13
+ assert_nil result
14
+ end
10
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enrichment_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Wallis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -64,7 +64,6 @@ files:
64
64
  - LICENSE
65
65
  - README.md
66
66
  - Rakefile
67
- - enrichment_db-0.1.4.gem
68
67
  - enrichment_db.gemspec
69
68
  - lib/enrichment_db.rb
70
69
  - lib/enrichment_db/.DS_Store
@@ -136,7 +135,6 @@ test_files:
136
135
  - LICENSE
137
136
  - README.md
138
137
  - Rakefile
139
- - enrichment_db-0.1.4.gem
140
138
  - enrichment_db.gemspec
141
139
  - lib/enrichment_db.rb
142
140
  - lib/enrichment_db/.DS_Store
Binary file