rakuten_web_service 0.4.2 → 0.5.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: 4ef501ec6ecadcd8616fe2f6e09fcbdb80cb1842
4
- data.tar.gz: 35694c209c7ea071414ceb3129b9782b7a70592e
3
+ metadata.gz: 8b1ef244dd1777b0fd61b143a82e7c4a2f781463
4
+ data.tar.gz: 1becda887300663ec9f8df339f334f6d6252ec62
5
5
  SHA512:
6
- metadata.gz: a0b76a733f810b91c33d74de79bdabb7a3419c660d3fdeb463043cbc2320596f66bc7552e5ef4b4eff7a5828c2f2fdfa01fa2f34b9096bd23e684983f1f75c7e
7
- data.tar.gz: a5a7f9064b434355785972b9ab89e1ac8a9cc172fec04123f75e37059e3620b269e540ada241e009f49f054ef2166eac6e0e8568db7f57be5c82df2818106e9b
6
+ metadata.gz: c38cdfad581be36580d5027d51b38036625e7e3a57124ff247f3e345dd4339970aace14fac41d71f2258f69ae4d1381aeede7ffd7b48c1724b005360c78a8e30
7
+ data.tar.gz: dae64b05b389340894eefaf0f271abeccd2985a52730531c6ac26aaa5ff0b418b7b0fd1806114b9fb5a8a12a9bfe363239e1637b6781bd815eddef06a911523c
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Rakuten, Inc
1
+ Copyright (c) 2013 - 2014 Rakuten, Inc
2
2
 
3
3
  MIT License
4
4
 
@@ -8,6 +8,11 @@ module RakutenWebService
8
8
  @client = RakutenWebService::Client.new(@resource_class.endpoint)
9
9
  end
10
10
 
11
+ def fetch_result
12
+ response = query
13
+ @resource_class.parse_response(response.body)
14
+ end
15
+
11
16
  def each
12
17
  params = @params
13
18
  response = query
@@ -1,3 +1,3 @@
1
1
  module RakutenWebService
2
- VERSION = "0.4.2".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "webmock"
28
- spec.add_development_dependency "rspec"
28
+ spec.add_development_dependency "rspec", '~> 2.14.1'
29
29
  spec.add_development_dependency "tapp"
30
30
  end
@@ -75,6 +75,17 @@ describe RakutenWebService::Ichiba::Item do
75
75
  end
76
76
  end
77
77
 
78
+ context 'after that, call fetch_result' do
79
+ before do
80
+ @items.fetch_result
81
+ end
82
+
83
+ specify 'endpoint should be called' do
84
+ expect(@expected_request).to have_been_made.once
85
+ expect(@second_request).to_not have_been_made.once
86
+ end
87
+ end
88
+
78
89
  context 'When TooManyRequest error raised' do
79
90
  let(:client) do
80
91
  c = double('client')
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: 0.4.2
4
+ version: 0.5.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: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 2.14.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 2.14.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: tapp
99
99
  requirement: !ruby/object:Gem::Requirement