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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd47e4cef1d60d2b4ed83bd963f175cdf27097e6
4
- data.tar.gz: 09bfb5887509fc5238b345450f8c2d5379d5a374
3
+ metadata.gz: 3eedf8f39648b37f49821cf07606f6632218e2b8
4
+ data.tar.gz: 32c2da7b8ed6edd091d8b762e527de5d5c320e2e
5
5
  SHA512:
6
- metadata.gz: 0a29a979096ab6cffcd3759442e28f6524ab39b4bfa97b2c34af3dd05abc0b05a8cc9b97905b68e87188ace505016beda9d8bb35028455f2e6c0fd9b32ed42ee
7
- data.tar.gz: 9e8da3ca0addf9c322f80e477c124484c88d1d937938ed33e2cceea583165ecfc81ff2e2d268895b339475ff43b30486e40cfdba4568e7000b9c31cb4f50a70a
6
+ metadata.gz: b240b5939c6c0bfba804bddc57ee2d41c9dc92ed363aa204f2fd47092c08bae8f7b0eb1a83ddf40474ff9227caa863a769cd4de73c53499d5c5b697eed9ebf03
7
+ data.tar.gz: bcc381f439b1664a8894d7d269b6335ba2f78670ecf4822da31b2bf8444d08208cfd91fe614a95dd22179d0fe9c07202cc1e72c1f903616f652430660b5709e5
data/.travis.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  language: ruby
2
2
  before_install: gem install bundler -v 1.5.1
3
+ install: bundle install --retry=3
3
4
  rvm:
4
5
  - 1.9.3
5
6
  - 2.0.0
6
- - 2.1.0
7
+ - 2.1.5
8
+ - 2.2.0
7
9
  - jruby-19mode
8
10
  - rbx-2
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
@@ -1,7 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  platforms :rbx do
4
- gem 'rubysl', '~> 2.0'
4
+ gem 'rubysl', '~> 2.1.0'
5
5
  gem 'rubinius-developer_tools'
6
6
  end
7
7
 
data/README.markdown CHANGED
@@ -190,7 +190,7 @@ of JSON objects rather than a single JSON array.
190
190
 
191
191
  For example, dumping list members via the "list" method works like this:
192
192
 
193
- gibbon_export.list({id => list_id})
193
+ gibbon_export.list({:id => list_id})
194
194
 
195
195
  ##Thanks
196
196
 
data/Rakefile CHANGED
@@ -7,5 +7,5 @@ task :default => :spec
7
7
  desc "Run specs"
8
8
  RSpec::Core::RakeTask.new do |t|
9
9
  t.pattern = FileList['spec/**/*_spec.rb']
10
- t.rspec_opts = %w(-fs --color)
10
+ t.rspec_opts = %w(-fd --color)
11
11
  end
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.4"
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.3.4')
26
+ s.add_dependency('multi_json', '>= 1.9.0')
27
27
 
28
28
  s.add_development_dependency 'rake'
29
- s.add_development_dependency "rspec", "2.14.1"
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
 
@@ -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 blank response without throwing an exception" do
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(Struct.new(:lines).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).with { |url, opts|
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
@@ -8,5 +8,5 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
8
8
  require 'gibbon'
9
9
 
10
10
  RSpec.configure do |config|
11
- config.color_enabled = true
11
+ config.color = true
12
12
  end
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
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: 2014-11-04 00:00:00.000000000 Z
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.3.4
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.3.4
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: 2.14.1
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: 2.14.1
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