goodreads 0.3.0 → 0.4.0

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: f5ce5af4765e7a8b7b1a3e44a82d9ddc52c816d0
4
- data.tar.gz: d0dde6c3b9924f2b948464d0d56e5b2cfed08979
3
+ metadata.gz: 8c7a48c34d24aabfd24cf4cb512beddc4a48f5c4
4
+ data.tar.gz: a3051652d8b16e675eb94618dc01f26887ee14b5
5
5
  SHA512:
6
- metadata.gz: 541d71e3c85f82d29b847e8c0271519f6bedda7ecdb471372af390a174c09cf9d36d9be5f1f51244e3c0bc1d8d9e9c6e543523187ed447639206bde325305d39
7
- data.tar.gz: f9ff399475037170e27ed7987f9ab6179b27576a7ed0afeb481669ff7505721900bef56df72bb2ff434e37ba4d9274700227fe27524ed117e81a73575b425193
6
+ metadata.gz: ca8d00b4a6021c8a5b7855177c5fc844b054fcab889291525ccd2695f48ae57978e2cd21726b258a45bb1d73ecf0d96f116fe28b5f9e69d2fb2496df3128e331
7
+ data.tar.gz: 2b8a3fb7ba10ebb056fa74432a248d64718322953154fefd2c2079dd1fbf4a6a7b3ef2c045848e92723669cc935d175130d071588f2b3a9c6d8d59eca4ab2130
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
1
  --color
2
- --format=nested
2
+ --format=documentation
3
3
  --backtrace
@@ -1,3 +1,10 @@
1
+ sudo: false
2
+
1
3
  rvm:
2
4
  - 1.9.3
3
- - 2.0.0
5
+ - 2.0
6
+ - 2.1
7
+ - 2.2
8
+
9
+ script:
10
+ - bundle exec rake test
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2011-2015 Dan Sosedoff <dan.sosedoff@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Ruby wrapper to communicate with Goodreads API.
4
4
 
5
+ ## Requirements
6
+
7
+ - Ruby 1.9.3+
8
+
5
9
  ## Installation
6
10
 
7
11
  Install gem with rubygems:
@@ -204,21 +208,6 @@ You're welcome to submit patches and new features.
204
208
 
205
209
  ## License
206
210
 
207
- Copyright &copy; 2011-2013 Dan Sosedoff.
208
-
209
- Permission is hereby granted, free of charge, to any person obtaining a copy of
210
- this software and associated documentation files (the "Software"), to deal in
211
- the Software without restriction, including without limitation the rights to
212
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
213
- the Software, and to permit persons to whom the Software is furnished to do so,
214
- subject to the following conditions:
215
-
216
- The above copyright notice and this permission notice shall be included in all
217
- copies or substantial portions of the Software.
211
+ The MIT License (MIT)
218
212
 
219
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
220
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
221
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
222
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
223
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
224
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
213
+ Copyright (c) 2011-2015 Dan Sosedoff, <dan.sosedoff@gmail.com>
@@ -11,14 +11,14 @@ Gem::Specification.new do |spec|
11
11
  spec.license = "MIT"
12
12
 
13
13
  spec.add_development_dependency 'webmock', '~> 1.11'
14
- spec.add_development_dependency 'rake', '~> 0.9'
14
+ spec.add_development_dependency 'rake', '~> 10'
15
15
  spec.add_development_dependency 'rspec', '~> 2.12'
16
16
  spec.add_development_dependency 'simplecov', '~> 0.7'
17
17
  spec.add_development_dependency 'yard', '~> 0.6'
18
18
 
19
19
  spec.add_runtime_dependency 'rest-client', '~> 1.6'
20
20
  spec.add_runtime_dependency 'hashie', '~> 2.0'
21
- spec.add_runtime_dependency 'activesupport', '>= 3'
21
+ spec.add_runtime_dependency 'activesupport', '~> 4.0'
22
22
  spec.add_runtime_dependency 'i18n', '~> 0.5'
23
23
  spec.add_runtime_dependency 'oauth', '~> 0.4'
24
24
 
@@ -1,6 +1,7 @@
1
1
  module Goodreads
2
2
  class Error < StandardError; end
3
3
  class ConfigurationError < Error ; end
4
+ class Forbidden < Error ; end
4
5
  class Unauthorized < Error ; end
5
6
  class NotFound < Error ; end
6
7
  end
@@ -1,5 +1,5 @@
1
+ require 'active_support/core_ext/hash'
1
2
  require 'rest-client'
2
- require 'active_support/core_ext'
3
3
  require 'hashie'
4
4
 
5
5
  module Goodreads
@@ -30,6 +30,8 @@ module Goodreads
30
30
  response.return!(request, result, &block)
31
31
  when 401
32
32
  raise Goodreads::Unauthorized
33
+ when 403
34
+ raise Goodreads::Forbidden
33
35
  when 404
34
36
  raise Goodreads::NotFound
35
37
  end
@@ -1,3 +1,3 @@
1
1
  module Goodreads
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,8 +1,10 @@
1
1
  $:.unshift File.expand_path("../..", __FILE__)
2
2
 
3
3
  require 'simplecov'
4
+
4
5
  SimpleCov.start do
5
- add_group 'Goodreads', 'lib/goodreads'
6
+ add_filter "spec/"
7
+ add_filter ".bundle"
6
8
  end
7
9
 
8
10
  require 'goodreads'
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goodreads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Sosedoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-25 00:00:00.000000000 Z
11
+ date: 2015-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webmock
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.11'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.9'
33
+ version: '10'
34
34
  type: :development
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: '0.9'
40
+ version: '10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.12'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.7'
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
68
  version: '0.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.6'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rest-client
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.6'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.6'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: hashie
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: activesupport
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3'
117
+ version: '4.0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3'
124
+ version: '4.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: i18n
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.5'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.5'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: oauth
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0.4'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.4'
153
153
  description: Simple wrapper for the Goodreads API
@@ -157,10 +157,11 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
- - .gitignore
161
- - .rspec
162
- - .travis.yml
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - ".travis.yml"
163
163
  - Gemfile
164
+ - LICENSE
164
165
  - README.md
165
166
  - Rakefile
166
167
  - examples/oauth.md
@@ -206,17 +207,17 @@ require_paths:
206
207
  - lib
207
208
  required_ruby_version: !ruby/object:Gem::Requirement
208
209
  requirements:
209
- - - '>='
210
+ - - ">="
210
211
  - !ruby/object:Gem::Version
211
212
  version: '0'
212
213
  required_rubygems_version: !ruby/object:Gem::Requirement
213
214
  requirements:
214
- - - '>='
215
+ - - ">="
215
216
  - !ruby/object:Gem::Version
216
217
  version: '0'
217
218
  requirements: []
218
219
  rubyforge_project:
219
- rubygems_version: 2.0.5
220
+ rubygems_version: 2.4.3
220
221
  signing_key:
221
222
  specification_version: 4
222
223
  summary: Goodreads API wrapper