rakuten_web_service 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -4
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +7 -0
- data/Gemfile +4 -4
- data/README.md +1 -1
- data/lib/rakuten_web_service/resource.rb +5 -1
- data/lib/rakuten_web_service/version.rb +1 -1
- data/rakuten_web_service.gemspec +14 -14
- data/spec/rakuten_web_service/resource_spec.rb +24 -0
- metadata +21 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 402bbbef08d298db7505154fcf5ef658d24fbdf5
|
4
|
+
data.tar.gz: 310770838115fc5d471c7744313a57917e74986f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff3f67b5d58ac4f950f210790af74db499a75fd65f2300c01fd95c8a11f596a276794ef8676de1ca9e10cdaac61e7a069334117762e486192c1f69b8c39d9efb
|
7
|
+
data.tar.gz: 71772593cb9f006fb650891215dc8a78108239739b4c16e18f22206a1ef8c9f0d38ec7fb3e6b815f7b39401d521f9029b5d4d7be91b5c55c13b0ba843bdd6dc0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
# v1.8.0 (2017/12/30)
|
2
|
+
|
3
|
+
## Enhancements
|
4
|
+
|
5
|
+
* Add `RWS::Resource#attributes` method. [#85](https://github.com/rakuten-ws/rws-ruby-sdk/pull/85)
|
6
|
+
|
7
|
+
## Improvements
|
8
|
+
|
9
|
+
* Start supporting Ruby 2.5 and drop 2.1 from supported versions. [#83](https://github.com/rakuten-ws/rws-ruby-sdk/pull/83)
|
10
|
+
* Update outdated gems. [#84](https://github.com/rakuten-ws/rws-ruby-sdk/pull/84)
|
11
|
+
|
1
12
|
# v1.7.0 (2017/09/17)
|
2
13
|
|
3
14
|
## Enhancements
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# How to Contribute to rws-ruby-sdk
|
2
|
+
|
3
|
+
1. Fork it
|
4
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
5
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
6
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
7
|
+
5. Create new Pull Request
|
data/Gemfile
CHANGED
@@ -4,11 +4,11 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :test do
|
7
|
-
gem
|
8
|
-
gem
|
7
|
+
gem 'codeclimate-test-reporter', '~> 1.0.0'
|
8
|
+
gem 'simplecov', '~> 0.15.1', require: false
|
9
9
|
end
|
10
10
|
|
11
11
|
group :vscode do
|
12
|
-
gem
|
13
|
-
gem
|
12
|
+
gem 'debase', '0.2.2.beta14'
|
13
|
+
gem 'ruby-debug-ide', '~> 0.6.0'
|
14
14
|
end
|
data/README.md
CHANGED
@@ -61,7 +61,7 @@ module RakutenWebService
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def initialize(params)
|
64
|
-
@params =
|
64
|
+
@params = {}
|
65
65
|
params.each { |k, v| @params[k.to_s] = v }
|
66
66
|
end
|
67
67
|
|
@@ -74,6 +74,10 @@ module RakutenWebService
|
|
74
74
|
@params[name.to_s]
|
75
75
|
end
|
76
76
|
|
77
|
+
def attributes
|
78
|
+
params.keys
|
79
|
+
end
|
80
|
+
|
77
81
|
def ==(genre)
|
78
82
|
raise ArgumentError unless genre.is_a?(RakutenWebService::Resource)
|
79
83
|
|
data/rakuten_web_service.gemspec
CHANGED
@@ -3,23 +3,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
require 'rakuten_web_service/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
6
|
+
spec.name = 'rakuten_web_service'
|
7
7
|
spec.version = RakutenWebService::VERSION
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
10
|
-
spec.description =
|
11
|
-
spec.summary =
|
12
|
-
spec.homepage =
|
13
|
-
spec.license =
|
8
|
+
spec.authors = ['Tatsuya Sato']
|
9
|
+
spec.email = ['tatsuya.b.sato@mail.rakuten.com']
|
10
|
+
spec.description = 'Ruby Client for Rakuten Web Service'
|
11
|
+
spec.summary = 'Ruby Client for Rakuten Web Service'
|
12
|
+
spec.homepage = 'http://webservice.rakuten.co.jp/'
|
13
|
+
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
-
spec.require_paths = [
|
18
|
-
spec.required_ruby_version = '>= 2.
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
spec.required_ruby_version = '>= 2.2.0'
|
19
19
|
|
20
|
-
spec.add_development_dependency
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
+
spec.add_development_dependency 'rake', '~> 12.3.0'
|
22
|
+
spec.add_development_dependency 'rspec', '~> 3.7.0'
|
23
|
+
spec.add_development_dependency 'tapp', '~> 1.5.1'
|
24
|
+
spec.add_development_dependency 'webmock', '~> 3.1.1'
|
25
25
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RakutenWebService::Resource do
|
4
|
+
let(:resource_class) do
|
5
|
+
Class.new(RakutenWebService::Resource) do
|
6
|
+
set_resource_name 'Dummy'
|
7
|
+
|
8
|
+
attribute :name, :dummySampleAttribute
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#attributes' do
|
13
|
+
let(:params) do
|
14
|
+
{
|
15
|
+
name: 'hoge',
|
16
|
+
dummySampleAttribute: 'fuga'
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
subject { resource_class.new(params).attributes }
|
21
|
+
|
22
|
+
it { is_expected.to match_array(params.keys.map(&:to_s)) }
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakuten_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuya Sato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,58 +28,58 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.0
|
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:
|
40
|
+
version: 12.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.7.0
|
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
|
-
version:
|
54
|
+
version: 3.7.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: tapp
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.5.1
|
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: 1.5.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: webmock
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.1.1
|
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
|
-
version:
|
82
|
+
version: 3.1.1
|
83
83
|
description: Ruby Client for Rakuten Web Service
|
84
84
|
email:
|
85
85
|
- tatsuya.b.sato@mail.rakuten.com
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- ".vscode/tasks.json"
|
95
95
|
- CHANGELOG.md
|
96
96
|
- CODE_OF_CONDUCT.md
|
97
|
+
- CONTRIBUTING.md
|
97
98
|
- Gemfile
|
98
99
|
- LICENSE.txt
|
99
100
|
- README.ja.md
|
@@ -188,6 +189,7 @@ files:
|
|
188
189
|
- spec/rakuten_web_service/kobo/genre_spec.rb
|
189
190
|
- spec/rakuten_web_service/recipe/category_spec.rb
|
190
191
|
- spec/rakuten_web_service/recipe_spec.rb
|
192
|
+
- spec/rakuten_web_service/resource_spec.rb
|
191
193
|
- spec/rakuten_web_service/response_spec.rb
|
192
194
|
- spec/spec_helper.rb
|
193
195
|
- spec/support/fixture_suppot.rb
|
@@ -203,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
205
|
requirements:
|
204
206
|
- - ">="
|
205
207
|
- !ruby/object:Gem::Version
|
206
|
-
version: 2.
|
208
|
+
version: 2.2.0
|
207
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
210
|
requirements:
|
209
211
|
- - ">="
|
@@ -262,6 +264,7 @@ test_files:
|
|
262
264
|
- spec/rakuten_web_service/kobo/genre_spec.rb
|
263
265
|
- spec/rakuten_web_service/recipe/category_spec.rb
|
264
266
|
- spec/rakuten_web_service/recipe_spec.rb
|
267
|
+
- spec/rakuten_web_service/resource_spec.rb
|
265
268
|
- spec/rakuten_web_service/response_spec.rb
|
266
269
|
- spec/spec_helper.rb
|
267
270
|
- spec/support/fixture_suppot.rb
|