rakuten_web_service 1.2.0 → 1.3.0
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 +4 -4
- data/.codeclimate.yml +16 -0
- data/.travis.yml +10 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile +1 -1
- data/README.md +7 -0
- data/lib/rakuten_web_service/configuration.rb +2 -2
- data/lib/rakuten_web_service/version.rb +1 -1
- data/spec/rakuten_web_service/configuration_spec.rb +21 -0
- data/spec/spec_helper.rb +0 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f79961bad825f4fb30452d991970455ea06c3dfe
|
4
|
+
data.tar.gz: 3fe13d653a47429b7a4423f49cfa92a8bc48e41e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417d44418dccbcbb5ba5c7cce48168b9204b2d4fa56790119bcc9864abed6e9dfedd8c7738dca523dbc4e733825063f6fe1116da728b281ca0c64bd98748f738
|
7
|
+
data.tar.gz: 64ac7fb9c11bc7754eae3127ea522234289a3f664e4fa274e3297b0883927dacdcb95c0a7db4c45f6910c1324f3bc28ad18e49ddb0af655e646783ad486fa72f
|
data/.codeclimate.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
2
|
rvm:
|
4
3
|
- 2.1.10
|
5
4
|
- 2.2.5
|
@@ -11,6 +10,10 @@ cache: bundler
|
|
11
10
|
before_install:
|
12
11
|
- gem install bundler
|
13
12
|
|
13
|
+
script:
|
14
|
+
- bundle exec rake
|
15
|
+
- bundle exec codeclimate-test-reporter
|
16
|
+
|
14
17
|
matrix:
|
15
18
|
allow_failures:
|
16
19
|
- rvm: ruby-head
|
@@ -19,3 +22,9 @@ addons:
|
|
19
22
|
code_climate:
|
20
23
|
repo_token:
|
21
24
|
secure: Z23O936LoCDGJ/OyYsLzxTUI+CMWyrfeN1PtQdCNMdF4vxwaCsAHr3ulTdudGhKMrVZGENSEK6fq0Xal3o3oPaH9aGM9sUQ/ibRM+J94Lx6Owu4okTsIHoEy4vFeW+A/62aiwxPcoi7PFrvC8FOfaZg+b+vvYAQcitVe6qwBHiE=
|
25
|
+
|
26
|
+
notifications:
|
27
|
+
email: false
|
28
|
+
hipchat:
|
29
|
+
rooms:
|
30
|
+
secure: RYuIFjh/T6Hlj9nJ0RjmlTlES+9ZWcDNe1o2KRqMdH8cK1epIEgcEzMsFP6wKPRMQqOVw6Tu5gBMltDgu26sAW8HkTnMlzYtF6AVeOgsC6VVO9XzdaoVWWQX5J/Xn21vNV1vcncuOuMByz6dmzWngZv3T0u1mcvPje00EDNo27M=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# v1.3.0 (2016/11/08)
|
2
|
+
|
3
|
+
## Enhancements
|
4
|
+
|
5
|
+
* Loads Application ID and Affiliate ID from environment varaibles `RWS_APPLICATION_ID` and `RWS_AFFILIATE_ID` respectively. [#47](https://github.com/rakuten-ws/rws-ruby-sdk/pull/47)
|
6
|
+
|
7
|
+
## Improvements
|
8
|
+
|
9
|
+
* Upgraded `codeclimate-test-reporter`. [#48](https://github.com/rakuten-ws/rws-ruby-sdk/pull/48)
|
10
|
+
|
1
11
|
# v1.2.0 (2016/10/25)
|
2
12
|
|
3
13
|
## Ehancements
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -59,6 +59,8 @@ If you have not got it, register your application [here](https://webservice.raku
|
|
59
59
|
|
60
60
|
At first, you have to specify your application's key. And you can tell the client your afiiliate id with `RakutenWebService.configuration`.
|
61
61
|
|
62
|
+
#### In Your Code
|
63
|
+
|
62
64
|
```ruby
|
63
65
|
RakutenWebService.configuration do |c|
|
64
66
|
# (Required) Appliction ID for your application.
|
@@ -81,6 +83,11 @@ At first, you have to specify your application's key. And you can tell the clien
|
|
81
83
|
|
82
84
|
Please note that you need to replace `'YOUR_APPLICATION_ID'` and `'YOUR_AFFILIATE_ID'` with actual ones you have.
|
83
85
|
|
86
|
+
#### Environment Variables
|
87
|
+
|
88
|
+
You can configure `application_id` and `affiliate_id` by defining environment variables `RWS_APPLICATION_ID` and `RWS_AFFILIATION_ID`.
|
89
|
+
|
90
|
+
|
84
91
|
### Search Ichiba Items
|
85
92
|
|
86
93
|
```ruby
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'logger'
|
2
|
-
|
3
1
|
module RakutenWebService
|
4
2
|
class Configuration
|
5
3
|
attr_accessor :application_id, :affiliate_id, :max_retries, :debug
|
6
4
|
|
7
5
|
def initialize
|
6
|
+
@application_id = ENV['RWS_APPLICATION_ID']
|
7
|
+
@affiliate_id = ENV['RWS_AFFILIATE_ID']
|
8
8
|
@max_retries = 5
|
9
9
|
end
|
10
10
|
|
@@ -2,6 +2,27 @@ require 'spec_helper'
|
|
2
2
|
require 'rakuten_web_service/configuration'
|
3
3
|
|
4
4
|
describe RakutenWebService::Configuration do
|
5
|
+
describe '#initialize' do
|
6
|
+
context "environment variable RWS_APPLICATION_ID and RWS_AFFILIATE_ID are defined" do
|
7
|
+
before do
|
8
|
+
ENV['RWS_APPLICATION_ID'] = 'env_application_id'
|
9
|
+
ENV['RWS_AFFILIATE_ID'] = 'env_affiliate_id'
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
ENV.delete 'RWS_APPLICATION_ID'
|
14
|
+
ENV.delete 'RWS_AFFILIATE_ID'
|
15
|
+
end
|
16
|
+
|
17
|
+
subject { RakutenWebService::Configuration.new }
|
18
|
+
|
19
|
+
specify "the application id is set by the environment variable" do
|
20
|
+
expect(subject.application_id).to eq 'env_application_id'
|
21
|
+
expect(subject.affiliate_id).to eq 'env_affiliate_id'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
5
26
|
describe '.configure' do
|
6
27
|
context 'given block has one arity' do
|
7
28
|
before do
|
data/spec/spec_helper.rb
CHANGED
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.3.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: 2016-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,6 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".codeclimate.yml"
|
90
91
|
- ".coveralls.yml"
|
91
92
|
- ".gitignore"
|
92
93
|
- ".travis.yml"
|