rakuten_web_service 1.8.0 → 1.9.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 +13 -0
- data/CHANGELOG.md +6 -0
- data/lib/rakuten_web_service/books/book.rb +1 -1
- data/lib/rakuten_web_service/books/cd.rb +2 -2
- data/lib/rakuten_web_service/books/dvd.rb +2 -2
- data/lib/rakuten_web_service/books/foreign_book.rb +2 -2
- data/lib/rakuten_web_service/books/game.rb +1 -1
- data/lib/rakuten_web_service/books/magazine.rb +2 -2
- data/lib/rakuten_web_service/books/software.rb +1 -1
- data/lib/rakuten_web_service/books/total.rb +1 -1
- data/lib/rakuten_web_service/gora/course.rb +1 -1
- data/lib/rakuten_web_service/gora/course_detail.rb +1 -1
- data/lib/rakuten_web_service/gora/plan.rb +1 -1
- data/lib/rakuten_web_service/ichiba/item.rb +14 -14
- data/lib/rakuten_web_service/ichiba/product.rb +1 -1
- data/lib/rakuten_web_service/ichiba/ranking.rb +1 -1
- data/lib/rakuten_web_service/kobo/ebook.rb +1 -1
- data/lib/rakuten_web_service/recipe.rb +1 -1
- data/lib/rakuten_web_service/recipe/category.rb +1 -1
- data/lib/rakuten_web_service/version.rb +1 -1
- data/spec/integration/integration_spec.rb +78 -0
- data/spec/rakuten_web_service/books/book_spec.rb +1 -1
- data/spec/rakuten_web_service/books/cd_spec.rb +1 -1
- data/spec/rakuten_web_service/books/dvd_spec.rb +1 -1
- data/spec/rakuten_web_service/books/foreign_book_spec.rb +1 -1
- data/spec/rakuten_web_service/books/game_spec.rb +1 -1
- data/spec/rakuten_web_service/books/magazine_spec.rb +1 -1
- data/spec/rakuten_web_service/books/software_spec.rb +1 -1
- data/spec/rakuten_web_service/books/total_spec.rb +2 -2
- data/spec/rakuten_web_service/gora/course_detail_spec.rb +1 -1
- data/spec/rakuten_web_service/gora/course_spec.rb +1 -1
- data/spec/rakuten_web_service/gora/plan_spec.rb +1 -1
- data/spec/rakuten_web_service/ichiba/item_spec.rb +1 -1
- data/spec/rakuten_web_service/ichiba/product_search_spec.rb +1 -1
- data/spec/rakuten_web_service/ichiba/ranking_spec.rb +1 -1
- data/spec/rakuten_web_service/ichiba/shop_spec.rb +1 -1
- data/spec/rakuten_web_service/kobo/ebook_spec.rb +1 -1
- data/spec/rakuten_web_service/recipe/category_spec.rb +1 -1
- data/spec/rakuten_web_service/recipe_spec.rb +1 -1
- data/spec/spec_helper.rb +12 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4169e0d70507985294102d0f0db8bed893ba62f
|
4
|
+
data.tar.gz: ba7ef71f07923fc35b68f0dbad9395027604fc6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0207c56e46c0be2d36dcf352d210774cb0e809362b723e6ea974c318477013780efd6d6c00c678bfc522b8a8f7d1151d6235f7590b8eb8f7356a678f5dc8426
|
7
|
+
data.tar.gz: 99c58dea96689887906f615a08d01198c03b5a3ce212d671971d47be0dbea57296d73983724cbd591b4340a99eafe91f328ff57eb519c73c5725aaa0b0f28af5
|
data/.travis.yml
CHANGED
@@ -6,6 +6,10 @@ rvm:
|
|
6
6
|
- 2.5.0
|
7
7
|
- ruby-head
|
8
8
|
|
9
|
+
env:
|
10
|
+
- INTEGRATION=yes
|
11
|
+
- INTEGRATION=no
|
12
|
+
|
9
13
|
group: travis_lts
|
10
14
|
|
11
15
|
cache: bundler
|
@@ -22,6 +26,15 @@ script:
|
|
22
26
|
matrix:
|
23
27
|
allow_failures:
|
24
28
|
- rvm: ruby-head
|
29
|
+
exclude:
|
30
|
+
- rvm: 2.2.9
|
31
|
+
env: INTEGRATION=yes
|
32
|
+
- rvm: 2.3.6
|
33
|
+
env: INTEGRATION=yes
|
34
|
+
- rvm: 2.4.3
|
35
|
+
env: INTEGRATION=yes
|
36
|
+
- rvm: ruby-head
|
37
|
+
env: INTEGRATION=yes
|
25
38
|
|
26
39
|
addons:
|
27
40
|
code_climate:
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class Book < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksBook/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksBook/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :subTitle, :subTitleKana,
|
9
9
|
:seriesName, :seriesNameKana,
|
@@ -3,13 +3,13 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class CD < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksCD/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksCD/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :artistName, :artistNameKana,
|
9
9
|
:label, :jan, :makerCode,
|
10
10
|
:itemCaption, :playList, :salesDate,
|
11
11
|
:itemPrice, :listPrice,
|
12
|
-
:discountRate, :discountPrice,
|
12
|
+
:discountRate, :discountPrice,
|
13
13
|
:itemUrl, :affiliateUrl,
|
14
14
|
:smallImageUrl, :mediumImageUrl, :largeImageUrl,
|
15
15
|
:availability,
|
@@ -3,13 +3,13 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class DVD < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksDVD/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksDVD/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :artistName, :artistNameKana,
|
9
9
|
:label, :jan, :makerCode,
|
10
10
|
:itemCaption, :salesDate,
|
11
11
|
:itemPrice, :listPrice,
|
12
|
-
:discountRate, :discountPrice,
|
12
|
+
:discountRate, :discountPrice,
|
13
13
|
:itemUrl, :affiliateUrl,
|
14
14
|
:smallImageUrl, :mediumImageUrl, :largeImageUrl,
|
15
15
|
:availability,
|
@@ -3,12 +3,12 @@ require 'rakuten_web_service/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class ForeignBook < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :japaneseTitle,
|
9
9
|
:author, :authorKana,
|
10
10
|
:publishName, :isbn, :itemCaption, :salesDate,
|
11
|
-
:itemPrice, :listPrice,
|
11
|
+
:itemPrice, :listPrice,
|
12
12
|
:discountRate, :discountPrice,
|
13
13
|
:itemUrl, :affiliateUrl,
|
14
14
|
:smallImageUrl, :mediumImageUrl, :largeImageUrl,
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class Game < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksGame/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksGame/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :hardware, :jan, :makerCode,
|
9
9
|
:itemCaption,
|
@@ -3,11 +3,11 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class Magazine < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksMagazine/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksMagazine/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :publisherName, :jan,
|
9
9
|
:itemCaption,
|
10
|
-
:salesDate, :cycle,
|
10
|
+
:salesDate, :cycle,
|
11
11
|
:itemPrice, :listPrice, :discountRate, :discountPrice,
|
12
12
|
:itemUrl, :affiliateUrl,
|
13
13
|
:contents, :contentsKana,
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class Software < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksSoftware/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksSoftware/Search/20170404'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :os, :jan, :makerCode,
|
9
9
|
:itemCaption,
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/books/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Books
|
5
5
|
class Total < Books::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/BooksTotal/Search/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/BooksTotal/Search/20170404'
|
7
7
|
|
8
8
|
set_parser do |response|
|
9
9
|
response['Items'].map do |item|
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Gora
|
5
5
|
class Course < Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseSearch/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseSearch/20170623'
|
7
7
|
|
8
8
|
set_parser do |response|
|
9
9
|
response['Items'].map { |item| self.new(item) }
|
@@ -9,7 +9,7 @@ module RakutenWebService
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseDetail/
|
12
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseDetail/20170623'
|
13
13
|
|
14
14
|
set_parser do |response|
|
15
15
|
[self.new(response['Item'])]
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Gora
|
5
5
|
class Plan < Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/20170623'
|
7
7
|
|
8
8
|
set_parser do |response|
|
9
9
|
response['Items'].map { |item| self.new(item) }
|
@@ -13,26 +13,26 @@ module RakutenWebService
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
endpoint 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/
|
16
|
+
endpoint 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/20170706'
|
17
17
|
|
18
18
|
set_parser do |response|
|
19
19
|
response['Items'].map { |item| Item.new(item) }
|
20
20
|
end
|
21
21
|
|
22
22
|
attribute :itemName, :catchcopy, :itemCode, :itemPrice,
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
:itemCaption, :itemUrl, :affiliateUrl, :imageFlag,
|
24
|
+
:smallImageUrls, :mediumImageUrls,
|
25
|
+
:availability, :taxFlag,
|
26
|
+
:postageFlag, :creditCardFlag,
|
27
|
+
:shopOfTheYearFlag,
|
28
|
+
:shipOverseasFlag, :shipOverseasArea,
|
29
|
+
:asurakuFlag, :asurakuClosingTime, :asurakuArea,
|
30
|
+
:affiliateRate,
|
31
|
+
:startTime, :endTime,
|
32
|
+
:reviewCount, :reviewAverage,
|
33
|
+
:pointRate, :pointRateStartTime, :pointRateEndTime,
|
34
|
+
:shopName, :shopCode, :shopUrl, :shopAffiliateUrl,
|
35
|
+
:genreId
|
36
36
|
|
37
37
|
def genre
|
38
38
|
Genre.new(self.genre_id)
|
@@ -4,7 +4,7 @@ require 'rakuten_web_service/ichiba/genre'
|
|
4
4
|
module RakutenWebService
|
5
5
|
module Ichiba
|
6
6
|
class Product < Resource
|
7
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Product/Search/
|
7
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Product/Search/20170426'
|
8
8
|
|
9
9
|
set_parser do |response|
|
10
10
|
(response['Products'] || []).map { |prod| Product.new(prod) }
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/ichiba/item'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Ichiba
|
5
5
|
class RankingItem < RakutenWebService::Ichiba::Item
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/20170628'
|
7
7
|
|
8
8
|
set_parser do |response|
|
9
9
|
response['Items'].map { |item| RankingItem.new(item) }
|
@@ -3,7 +3,7 @@ require 'rakuten_web_service/resource'
|
|
3
3
|
module RakutenWebService
|
4
4
|
module Kobo
|
5
5
|
class Ebook < RakutenWebService::Resource
|
6
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/
|
6
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/20170426'
|
7
7
|
|
8
8
|
attribute :title, :titleKana, :subTitle, :seriesName,
|
9
9
|
:author, :authorKana, :publisherName,
|
@@ -4,7 +4,7 @@ require 'rakuten_web_service/recipe/category'
|
|
4
4
|
|
5
5
|
module RakutenWebService
|
6
6
|
class Recipe < Resource
|
7
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/
|
7
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20170426'
|
8
8
|
|
9
9
|
attribute :recipeId, :recipeTitle, :recipeUrl,
|
10
10
|
:foodImageUrl, :mediumImageUrl, :smallImageUrl,
|
@@ -25,7 +25,7 @@ module RakutenWebService
|
|
25
25
|
end
|
26
26
|
|
27
27
|
class Category < Resource
|
28
|
-
endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/
|
28
|
+
endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20170426'
|
29
29
|
|
30
30
|
attribute :categoryId, :categoryName, :categoryUrl, :parentCategoryId, :categoryType
|
31
31
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Call all APIs', type: 'integration' do
|
4
|
+
describe RakutenWebService::Ichiba do
|
5
|
+
it do
|
6
|
+
expect { RWS::Ichiba::Item.search(keyword: 'Ruby').first }.not_to raise_error
|
7
|
+
end
|
8
|
+
it do
|
9
|
+
expect { RWS::Ichiba::Genre.search(genre_id: 559887).first }.not_to raise_error
|
10
|
+
end
|
11
|
+
it do
|
12
|
+
expect { RWS::Ichiba::Product.search(keyword: 'Ruby').first }.not_to raise_error
|
13
|
+
end
|
14
|
+
it do
|
15
|
+
expect { RWS::Ichiba::RankingItem.search(age: 30, sex: 0).first }.not_to raise_error
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe RakutenWebService::Books do
|
20
|
+
it do
|
21
|
+
expect { RWS::Books::Total.search(keyword: 'Ruby').first }.not_to raise_error
|
22
|
+
end
|
23
|
+
it do
|
24
|
+
expect { RWS::Books::Book.search(title: 'Ruby').first }.not_to raise_error
|
25
|
+
end
|
26
|
+
it do
|
27
|
+
expect { RWS::Books::CD.search(title: 'Ruby').first }.not_to raise_error
|
28
|
+
end
|
29
|
+
it do
|
30
|
+
expect { RWS::Books::DVD.search(title: 'Ruby').first }.not_to raise_error
|
31
|
+
end
|
32
|
+
it do
|
33
|
+
expect { RWS::Books::ForeignBook.search(title: 'Ruby').first }.not_to raise_error
|
34
|
+
end
|
35
|
+
it do
|
36
|
+
expect { RWS::Books::Magazine.search(title: 'Ruby').first }.not_to raise_error
|
37
|
+
end
|
38
|
+
it do
|
39
|
+
expect { RWS::Books::Game.search(title: 'Ruby').first }.not_to raise_error
|
40
|
+
end
|
41
|
+
it do
|
42
|
+
expect { RWS::Books::Software.search(title: 'Ruby').first }.not_to raise_error
|
43
|
+
end
|
44
|
+
it do
|
45
|
+
expect { RWS::Books::Genre.search(books_genre_id: '001005').first }.not_to raise_error
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe RakutenWebService::Recipe do
|
50
|
+
it do
|
51
|
+
expect { RWS::Recipe.categories('large') }.not_to raise_error
|
52
|
+
end
|
53
|
+
it do
|
54
|
+
expect { RWS::Recipe.categories('large').first.ranking.first }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe RakutenWebService::Kobo do
|
59
|
+
it do
|
60
|
+
expect { RWS::Kobo::Ebook.search(keyword: 'Ruby').first }.not_to raise_error
|
61
|
+
end
|
62
|
+
it do
|
63
|
+
expect { RWS::Kobo::Genre.search(kobo_genre_id: 101).first }.not_to raise_error
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe RakutenWebService::Gora do
|
68
|
+
it do
|
69
|
+
expect { RWS::Gora::Course.search(keyword: 'セグウェイ').first }.not_to raise_error
|
70
|
+
end
|
71
|
+
it do
|
72
|
+
expect { RWS::Gora::CourseDetail.search(golf_course_id: 80004).first }.not_to raise_error
|
73
|
+
end
|
74
|
+
xit do
|
75
|
+
expect { RWS::Gora::Plan.search(playDate: '2017-01-11', areaCode: 0).first }.not_to raise_error
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::Book do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksBook/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksBook/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::CD do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksCD/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksCD/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::DVD do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksDVD/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksDVD/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::ForeignBook do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksForeignBook/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::Game do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksGame/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksGame/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::Magazine do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksMagazine/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksMagazine/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::Software do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksSoftware/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksSoftware/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Books::Total do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksTotal/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/BooksTotal/Search/20170404' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -31,7 +31,7 @@ describe RakutenWebService::Books::Total do
|
|
31
31
|
items = RakutenWebService::Books::Total.search(keyword: 'Ruby')
|
32
32
|
expect(@expected_request).to_not have_been_made
|
33
33
|
|
34
|
-
|
34
|
+
items.first
|
35
35
|
expect(@expected_request).to have_been_made.once
|
36
36
|
end
|
37
37
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Gora::CourseDetail do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseDetail/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseDetail/20170623' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Gora::Course do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseSearch/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraGolfCourseSearch/20170623' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Gora::Plan do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/20170623' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Ichiba::Item do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/20170706' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Ichiba::Product do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Product/Search/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Product/Search/20170426' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'rakuten_web_service/ichiba/ranking'
|
3
3
|
|
4
4
|
describe RakutenWebService::Ichiba::RankingItem do
|
5
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/
|
5
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/20170628' }
|
6
6
|
let(:affiliate_id) { 'affiliate_id' }
|
7
7
|
let(:application_id) { 'application_id' }
|
8
8
|
let(:expected_query) do
|
@@ -7,7 +7,7 @@ describe RakutenWebService::Ichiba::Shop do
|
|
7
7
|
'shopUrl' => 'http://www.rakuten.co.jp/hogeshop' }
|
8
8
|
end
|
9
9
|
let(:shop) { RakutenWebService::Ichiba::Shop.new(params) }
|
10
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/
|
10
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/20170706' }
|
11
11
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
12
12
|
let(:application_id) { 'dummy_application_id' }
|
13
13
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Kobo::Ebook do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/20170426' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Recipe::Category do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20170426' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe RakutenWebService::Recipe do
|
4
|
-
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/
|
4
|
+
let(:endpoint) { 'https://app.rakuten.co.jp/services/api/Recipe/CategoryRanking/20170426' }
|
5
5
|
let(:affiliate_id) { 'dummy_affiliate_id' }
|
6
6
|
let(:application_id) { 'dummy_application_id' }
|
7
7
|
let(:expected_query) do
|
data/spec/spec_helper.rb
CHANGED
@@ -13,14 +13,22 @@ require 'tapp'
|
|
13
13
|
|
14
14
|
Dir[File.expand_path(File.join(__dir__, "support/**/*.rb"))].each { |f| require f }
|
15
15
|
|
16
|
-
RSpec.configure do |
|
17
|
-
|
16
|
+
RSpec.configure do |config|
|
17
|
+
config.mock_with :rspec
|
18
|
+
config.filter_run_excluding type: 'integration' if ENV['INTEGRATION'] != 'yes'
|
18
19
|
|
19
|
-
|
20
|
+
config.before :suite do
|
20
21
|
WebMock.disable_net_connect!(allow: "codeclimate.com")
|
21
22
|
end
|
22
23
|
|
23
|
-
|
24
|
+
config.before :all, type: 'integration' do
|
25
|
+
WebMock.allow_net_connect!
|
26
|
+
RakutenWebService.configure do |c|
|
27
|
+
c.application_id = ENV['RWS_APPLICATION_ID']
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
config.after :each do
|
24
32
|
WebMock.reset!
|
25
33
|
end
|
26
34
|
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.9.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:
|
11
|
+
date: 2018-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- spec/fixtures/kobo/genre_search.json
|
165
165
|
- spec/fixtures/recipe/category.json
|
166
166
|
- spec/fixtures/recipe/ranking.json
|
167
|
+
- spec/integration/integration_spec.rb
|
167
168
|
- spec/rakuten_web_service/books/book_spec.rb
|
168
169
|
- spec/rakuten_web_service/books/cd_spec.rb
|
169
170
|
- spec/rakuten_web_service/books/dvd_spec.rb
|
@@ -239,6 +240,7 @@ test_files:
|
|
239
240
|
- spec/fixtures/kobo/genre_search.json
|
240
241
|
- spec/fixtures/recipe/category.json
|
241
242
|
- spec/fixtures/recipe/ranking.json
|
243
|
+
- spec/integration/integration_spec.rb
|
242
244
|
- spec/rakuten_web_service/books/book_spec.rb
|
243
245
|
- spec/rakuten_web_service/books/cd_spec.rb
|
244
246
|
- spec/rakuten_web_service/books/dvd_spec.rb
|