datarank 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b31e337c2234caf42968195570fad50f2fef25a4
4
- data.tar.gz: 8d215aeb471a134afa189af6fb8e46ec5f5be1c9
3
+ metadata.gz: fd65fbe72e29b8c0b9317e0753f9b223293dd0c5
4
+ data.tar.gz: 5269424d32eb86cf075b882b42ad5a6edc6ce446
5
5
  SHA512:
6
- metadata.gz: 67d49533c92cdd422ed13fea3d3e412496c97cc908abae067163a8bf108a0197d6dab387815767e2220c040c470002dc144eaec98e77f957cb153ca7cd282c19
7
- data.tar.gz: 148efcf158a19f342c806eb51054332c9bb8ff865ef7b670828cc94ef71aed6de6d8d41579f41ada6625178941a1b39babdba70c6e5b2f0345cfffaac7547a5a
6
+ metadata.gz: ce42317acd89412f738be34d001409a5aad92a882244805dcecdd23218863ac3923a6aaa719d1bc860e386e19b727c7562a51a963422ef9a22e1fcf3935c0f4a
7
+ data.tar.gz: a9b6ffa9640fb72b0c0d3519be9b4a42a18a5a279e184fc76a6acef78e2572c0b455993d72972d559eefc3310fcae0bf3762a992c931cf855893406a01c3d774
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ group :development do
5
5
  gem 'guard-yard'
6
6
  gem 'pry'
7
7
  gem 'yard'
8
+ gem 'rb-readline'
8
9
  end
9
10
 
10
11
  group :test do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- datarank (1.1.0)
4
+ datarank (1.1.1)
5
5
  hashie (>= 1.2.0)
6
6
  httparty (>= 0.8.3)
7
7
  multi_json (>= 1.3.4)
@@ -37,7 +37,7 @@ GEM
37
37
  httparty (0.13.3)
38
38
  json (~> 1.8)
39
39
  multi_xml (>= 0.5.2)
40
- json (1.8.1)
40
+ json (1.8.2)
41
41
  listen (2.8.3)
42
42
  celluloid (>= 0.15.2)
43
43
  rb-fsevent (>= 0.9.3)
@@ -54,6 +54,7 @@ GEM
54
54
  rb-fsevent (0.9.4)
55
55
  rb-inotify (0.9.5)
56
56
  ffi (>= 0.5.0)
57
+ rb-readline (0.5.2)
57
58
  rspec (2.99.0)
58
59
  rspec-core (~> 2.99.0)
59
60
  rspec-expectations (~> 2.99.0)
@@ -87,6 +88,7 @@ DEPENDENCIES
87
88
  guard-yard
88
89
  pry
89
90
  rake
91
+ rb-readline
90
92
  rspec
91
93
  simplecov
92
94
  vcr (~> 2.9.0)
@@ -87,7 +87,12 @@ module Datarank
87
87
 
88
88
  r = self.class.send(verb, path, request_options)
89
89
  # FIXME: raise errors on actual error packages
90
- hash = Hashie::Mash.new(JSON.parse(r.body))
90
+ parsed_json = JSON.parse(r.body)
91
+ if parsed_json.is_a? Array
92
+ parsed_json = {objects: parsed_json}
93
+ end
94
+
95
+ hash = Hashie::Mash.new(parsed_json)
91
96
  raise Error.new(hash.error) if hash.error
92
97
  raise Error.new(hash.errors.join(", ")) if hash.errors
93
98
  hash
@@ -3,7 +3,7 @@ module Datarank
3
3
  class Version
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- PATCH = 1
6
+ PATCH = 2
7
7
 
8
8
  class << self
9
9
  def to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datarank
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Addam Hardy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-21 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -120,10 +120,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.2.2
123
+ rubygems_version: 2.4.5
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: '[""]'
127
127
  test_files:
128
128
  - spec/datarank_spec.rb
129
129
  - spec/spec_helper.rb
130
+ has_rdoc: