maxminddb 0.1.7 → 0.1.8

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: beb223c680e2f098ea125a2b3aaf0ad1158b9bc5
4
- data.tar.gz: 8011de694b097ca90abb15e9773510144e8841de
3
+ metadata.gz: 3b7c0694a1377f0a21ccf0c58ae55d908b5ec8cf
4
+ data.tar.gz: a9e8d1a7061d0f45687bdbf1bf513e2214f02356
5
5
  SHA512:
6
- metadata.gz: 9ee9fe396721f75b615844e682ded0b0bebc49dd82a664791ab993f95c2f2311a50d4fe29484263698c703f1f4d079d96b571a83570fa6c20c12e18b31d27883
7
- data.tar.gz: 5689092de37743722461d434ab24139996d8bd1bf78924c24ec66cc24d4ff7a41a65bf410513cd4f3423395c6f1a65daed3909e05c79d711933e321c16d04acc
6
+ metadata.gz: 7f9de1acf095fda1d3b75ebdd325550515e6b0d25fd0194c53e3c8489ecffcfa12ff2bfbb8cbcd92474b20dd15d0ba22b771b8536b3219c772a4d5a0ae85aa54
7
+ data.tar.gz: a8a41bd7ce01f0e4514a0d58f9b74589c38fc766e3b0c7dbf357e42084aaec3d9c800e25407cdae8439a6f57c9f003c8ca2daa67b3db25b6cbe87b8fb06e396b
@@ -53,6 +53,10 @@ module MaxMindDB
53
53
  @_traits ||= Traits.new(raw['traits'])
54
54
  end
55
55
 
56
+ def connection_type
57
+ @_connection_type ||= raw['connection_type']
58
+ end
59
+
56
60
  def to_hash
57
61
  @_to_hash ||= raw.clone
58
62
  end
@@ -1,3 +1,3 @@
1
1
  module MaxMindDB
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -46,7 +46,8 @@ describe MaxMindDB::Result do
46
46
  "iso_code"=>"CA",
47
47
  "names"=>{"de"=>"Kalifornien", "en"=>"California", "es"=>"California", "fr"=>"Californie", "ja"=>"カリフォルニア州", "pt-BR"=>"Califórnia", "ru"=>"Калифорния", "zh-CN"=>"加利福尼亚州"}
48
48
  }
49
- ]
49
+ ],
50
+ "connection_type"=>"Dialup"
50
51
  } }
51
52
 
52
53
  describe '#[]' do
@@ -274,4 +275,20 @@ describe MaxMindDB::Result do
274
275
  end
275
276
  end
276
277
  end
278
+
279
+ describe '#connection_type' do
280
+ context 'with a result' do
281
+ it 'should return a String representation of connection type' do
282
+ expect(result.connection_type).to eq("Dialup")
283
+ end
284
+ end
285
+
286
+ context "without a result" do
287
+ let(:raw_result) { nil }
288
+
289
+ it 'should be nil' do
290
+ expect(result.connection_type).to be_nil
291
+ end
292
+ end
293
+ end
277
294
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxminddb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - yhirose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler