gibbon 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gibbon might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -1
- data/README.markdown +1 -1
- data/Rakefile +1 -1
- data/gibbon.gemspec +3 -3
- data/lib/gibbon/export.rb +1 -1
- data/spec/gibbon/gibbon_spec.rb +11 -7
- data/spec/spec_helper.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eedf8f39648b37f49821cf07606f6632218e2b8
|
4
|
+
data.tar.gz: 32c2da7b8ed6edd091d8b762e527de5d5c320e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b240b5939c6c0bfba804bddc57ee2d41c9dc92ed363aa204f2fd47092c08bae8f7b0eb1a83ddf40474ff9227caa863a769cd4de73c53499d5c5b697eed9ebf03
|
7
|
+
data.tar.gz: bcc381f439b1664a8894d7d269b6335ba2f78670ecf4822da31b2bf8444d08208cfd91fe614a95dd22179d0fe9c07202cc1e72c1f903616f652430660b5709e5
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
## [Unreleased][unreleased]
|
2
|
+
-
|
3
|
+
## [1.1.5] - 2015-02-19
|
4
|
+
### Fixed
|
5
|
+
- Update MultiJSON dependency to 1.9.0
|
6
|
+
- Handle single empty space in Export API response
|
7
|
+
|
8
|
+
## [1.1.4] - 2012-11-04
|
9
|
+
### Fixed
|
10
|
+
- Fix JSON::ParserError on export calls that return blank results
|
11
|
+
|
12
|
+
[unreleased]: https://github.com/amro/gibbon/compare/v1.1.5...HEAD
|
13
|
+
[1.1.4]: https://github.com/amro/gibbon/compare/v1.1.3...v1.1.4
|
14
|
+
[1.1.5]: https://github.com/amro/gibbon/compare/v1.1.4...v1.1.5
|
data/Gemfile
CHANGED
data/README.markdown
CHANGED
data/Rakefile
CHANGED
data/gibbon.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "gibbon"
|
6
|
-
s.version = "1.1.
|
6
|
+
s.version = "1.1.5"
|
7
7
|
s.authors = ["Amro Mousa"]
|
8
8
|
s.email = ["amromousa@gmail.com"]
|
9
9
|
s.homepage = "http://github.com/amro/gibbon"
|
@@ -23,9 +23,9 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.require_paths = ["lib"]
|
24
24
|
|
25
25
|
s.add_dependency('httparty')
|
26
|
-
s.add_dependency('multi_json', '>= 1.
|
26
|
+
s.add_dependency('multi_json', '>= 1.9.0')
|
27
27
|
|
28
28
|
s.add_development_dependency 'rake'
|
29
|
-
s.add_development_dependency "rspec", "
|
29
|
+
s.add_development_dependency "rspec", "3.1.0"
|
30
30
|
|
31
31
|
end
|
data/lib/gibbon/export.rb
CHANGED
@@ -24,7 +24,7 @@ module Gibbon
|
|
24
24
|
lines = response.body.lines
|
25
25
|
if @throws_exceptions
|
26
26
|
# ignore blank responses
|
27
|
-
return [] if lines.first.strip.empty?
|
27
|
+
return [] if !lines.first || lines.first.strip.empty?
|
28
28
|
|
29
29
|
first_line = MultiJson.load(lines.first) if lines.first
|
30
30
|
|
data/spec/gibbon/gibbon_spec.rb
CHANGED
@@ -260,9 +260,16 @@ describe Gibbon do
|
|
260
260
|
expect {@gibbon.say_hello(@body)}.to raise_error(Gibbon::MailChimpError)
|
261
261
|
end
|
262
262
|
|
263
|
-
it "should handle a
|
263
|
+
it "should handle a single empty space response without throwing an exception" do
|
264
264
|
@gibbon.throws_exceptions = true
|
265
|
-
allow(Gibbon::Export).to receive(:post).and_return(Struct.new(:body).new(
|
265
|
+
allow(Gibbon::Export).to receive(:post).and_return(Struct.new(:body).new(" "))
|
266
|
+
|
267
|
+
expect(@gibbon.say_hello(@body)).to eq([])
|
268
|
+
end
|
269
|
+
|
270
|
+
it "should handle an empty response without throwing an exception" do
|
271
|
+
@gibbon.throws_exceptions = true
|
272
|
+
allow(Gibbon::Export).to receive(:post).and_return(Struct.new(:body).new(""))
|
266
273
|
|
267
274
|
expect(@gibbon.say_hello(@body)).to eq([])
|
268
275
|
end
|
@@ -272,15 +279,12 @@ describe Gibbon do
|
|
272
279
|
private
|
273
280
|
|
274
281
|
def expect_post(expected_url, expected_body, expected_timeout=30, expected_headers={})
|
275
|
-
expect(Gibbon::APICategory).to receive(:post)
|
282
|
+
expect(Gibbon::APICategory).to receive(:post) { |url, opts|
|
276
283
|
expect(url).to eq expected_url
|
277
284
|
expect(expected_body).to eq MultiJson.load(URI::decode(opts[:body]))
|
278
285
|
expect(opts[:timeout]).to eq expected_timeout
|
279
286
|
expect(opts[:headers]).to eq expected_headers
|
280
287
|
}.and_return(Struct.new(:body).new("[]"))
|
281
288
|
end
|
282
|
-
|
283
|
-
# def expect_post(expected_url, expected_body, expected_timeout=30)
|
284
|
-
# Gibbon::APICategory.should_receive(:post).and_return(Struct.new(:body).new(""))
|
285
|
-
# end
|
286
289
|
end
|
290
|
+
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gibbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amro Mousa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.9.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.1.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 3.1.0
|
69
69
|
description: A wrapper for MailChimp API 2.0 and Export API 1.0
|
70
70
|
email:
|
71
71
|
- amromousa@gmail.com
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- ".document"
|
77
77
|
- ".gitignore"
|
78
78
|
- ".travis.yml"
|
79
|
+
- CHANGELOG.md
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.markdown
|