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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a44bc4bde1ee8c5cf109a3152c876ccc4d276ee8
4
- data.tar.gz: a8abf775e41e32344864581554cce436f607572e
3
+ metadata.gz: 402bbbef08d298db7505154fcf5ef658d24fbdf5
4
+ data.tar.gz: 310770838115fc5d471c7744313a57917e74986f
5
5
  SHA512:
6
- metadata.gz: edd42033899a2cb395efb22eee879988da13125d9128bd28ce0e78687a26e906850adbb970d53a50d6018165ff5cbd6439d6102203017cd76a2c846fb4255074
7
- data.tar.gz: 49eed99b36cb80112f345d62db8e7b4972af621cc38a831374761f4352c4f9dd1793230561b0064265cdd216aded8910c0601367c2f36770aa29705870581d8b
6
+ metadata.gz: ff3f67b5d58ac4f950f210790af74db499a75fd65f2300c01fd95c8a11f596a276794ef8676de1ca9e10cdaac61e7a069334117762e486192c1f69b8c39d9efb
7
+ data.tar.gz: 71772593cb9f006fb650891215dc8a78108239739b4c16e18f22206a1ef8c9f0d38ec7fb3e6b815f7b39401d521f9029b5d4d7be91b5c55c13b0ba843bdd6dc0
@@ -1,11 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.10
4
- - 2.2.6
5
- - 2.3.3
6
- - 2.4.0
3
+ - 2.2.9
4
+ - 2.3.6
5
+ - 2.4.3
6
+ - 2.5.0
7
7
  - ruby-head
8
8
 
9
+ group: travis_lts
10
+
9
11
  cache: bundler
10
12
 
11
13
  before_install:
@@ -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
@@ -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 "simplecov", require: false
8
- gem "codeclimate-test-reporter", '~> 1.0.0'
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 "debase", "0.2.2.beta10"
13
- gem "ruby-debug-ide", "~> 0.6.0"
12
+ gem 'debase', '0.2.2.beta14'
13
+ gem 'ruby-debug-ide', '~> 0.6.0'
14
14
  end
data/README.md CHANGED
@@ -30,7 +30,7 @@ This gem provides a client for easily accessing [Rakuten Web Service APIs](https
30
30
 
31
31
  ## Prerequisite
32
32
 
33
- * Ruby 2.1.0 or later
33
+ * Ruby 2.2 or later
34
34
 
35
35
  ## Installation
36
36
 
@@ -61,7 +61,7 @@ module RakutenWebService
61
61
  end
62
62
 
63
63
  def initialize(params)
64
- @params = params.dup
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
 
@@ -1,3 +1,3 @@
1
1
  module RakutenWebService
2
- VERSION = "1.7.0".freeze
2
+ VERSION = '1.8.0'.freeze
3
3
  end
@@ -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 = "rakuten_web_service"
6
+ spec.name = 'rakuten_web_service'
7
7
  spec.version = RakutenWebService::VERSION
8
- spec.authors = ["Tatsuya Sato"]
9
- spec.email = ["tatsuya.b.sato@mail.rakuten.com"]
10
- spec.description = %q{Ruby Client for Rakuten Web Service}
11
- spec.summary = %q{Ruby Client for Rakuten Web Service}
12
- spec.homepage = "http://webservice.rakuten.co.jp/"
13
- spec.license = "MIT"
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 = ["lib"]
18
- spec.required_ruby_version = '>= 2.1.0'
17
+ spec.require_paths = ['lib']
18
+ spec.required_ruby_version = '>= 2.2.0'
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.3"
21
- spec.add_development_dependency "rake"
22
- spec.add_development_dependency "webmock", "~> 1.20.4"
23
- spec.add_development_dependency "rspec", '~> 3.5.0'
24
- spec.add_development_dependency "tapp"
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.7.0
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-09-17 00:00:00.000000000 Z
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: '0'
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: '0'
40
+ version: 12.3.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: webmock
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.20.4
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: 1.20.4
54
+ version: 3.7.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: tapp
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 3.5.0
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: 3.5.0
68
+ version: 1.5.1
69
69
  - !ruby/object:Gem::Dependency
70
- name: tapp
70
+ name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
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: '0'
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.1.0
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