telize 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/telize/client.rb +1 -1
- data/lib/telize/version.rb +1 -1
- data/spec/telize_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e67d6f4f0c7c6a834e2f66aec41a285022d0478
|
4
|
+
data.tar.gz: aed6eadcfa98461743c2b7bfa496cd35f5fd3155
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55dd32d489ab0efaae87e7d05ab3880ab7d699be22ab7f62e288407e8516a7ccd2b4625c7070cd064583b75e450e07bdb420eb99f9f29f29e09107322e1e5288
|
7
|
+
data.tar.gz: 531f9a78cfa59320aaa7d6cb9ebf128bcf685ca8bcbd59116d98ec9aaded7fd86956a12dd85d35e00fb9ffc1c8f280301cbfb65fca9413d5c610990e52f105f4
|
data/lib/telize/client.rb
CHANGED
data/lib/telize/version.rb
CHANGED
data/spec/telize_spec.rb
CHANGED
@@ -120,5 +120,18 @@ RSpec.describe Telize do
|
|
120
120
|
|
121
121
|
it { is_expected.to eq({}) }
|
122
122
|
end
|
123
|
+
|
124
|
+
context 'when bad json is given' do
|
125
|
+
let(:response) { '{":"bla bla bla"' }
|
126
|
+
|
127
|
+
subject { Telize.geoip }
|
128
|
+
|
129
|
+
before do
|
130
|
+
stub_request(:get, 'http://www.telize.com/geoip').
|
131
|
+
to_return(status: 200, body: response, headers: { 'Content-Type' => 'application/json' })
|
132
|
+
end
|
133
|
+
|
134
|
+
it { is_expected.to eq({}) }
|
135
|
+
end
|
123
136
|
end
|
124
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- undr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|