rakuten_web_service 1.8.0 → 1.9.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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +13 -0
  3. data/CHANGELOG.md +6 -0
  4. data/lib/rakuten_web_service/books/book.rb +1 -1
  5. data/lib/rakuten_web_service/books/cd.rb +2 -2
  6. data/lib/rakuten_web_service/books/dvd.rb +2 -2
  7. data/lib/rakuten_web_service/books/foreign_book.rb +2 -2
  8. data/lib/rakuten_web_service/books/game.rb +1 -1
  9. data/lib/rakuten_web_service/books/magazine.rb +2 -2
  10. data/lib/rakuten_web_service/books/software.rb +1 -1
  11. data/lib/rakuten_web_service/books/total.rb +1 -1
  12. data/lib/rakuten_web_service/gora/course.rb +1 -1
  13. data/lib/rakuten_web_service/gora/course_detail.rb +1 -1
  14. data/lib/rakuten_web_service/gora/plan.rb +1 -1
  15. data/lib/rakuten_web_service/ichiba/item.rb +14 -14
  16. data/lib/rakuten_web_service/ichiba/product.rb +1 -1
  17. data/lib/rakuten_web_service/ichiba/ranking.rb +1 -1
  18. data/lib/rakuten_web_service/kobo/ebook.rb +1 -1
  19. data/lib/rakuten_web_service/recipe.rb +1 -1
  20. data/lib/rakuten_web_service/recipe/category.rb +1 -1
  21. data/lib/rakuten_web_service/version.rb +1 -1
  22. data/spec/integration/integration_spec.rb +78 -0
  23. data/spec/rakuten_web_service/books/book_spec.rb +1 -1
  24. data/spec/rakuten_web_service/books/cd_spec.rb +1 -1
  25. data/spec/rakuten_web_service/books/dvd_spec.rb +1 -1
  26. data/spec/rakuten_web_service/books/foreign_book_spec.rb +1 -1
  27. data/spec/rakuten_web_service/books/game_spec.rb +1 -1
  28. data/spec/rakuten_web_service/books/magazine_spec.rb +1 -1
  29. data/spec/rakuten_web_service/books/software_spec.rb +1 -1
  30. data/spec/rakuten_web_service/books/total_spec.rb +2 -2
  31. data/spec/rakuten_web_service/gora/course_detail_spec.rb +1 -1
  32. data/spec/rakuten_web_service/gora/course_spec.rb +1 -1
  33. data/spec/rakuten_web_service/gora/plan_spec.rb +1 -1
  34. data/spec/rakuten_web_service/ichiba/item_spec.rb +1 -1
  35. data/spec/rakuten_web_service/ichiba/product_search_spec.rb +1 -1
  36. data/spec/rakuten_web_service/ichiba/ranking_spec.rb +1 -1
  37. data/spec/rakuten_web_service/ichiba/shop_spec.rb +1 -1
  38. data/spec/rakuten_web_service/kobo/ebook_spec.rb +1 -1
  39. data/spec/rakuten_web_service/recipe/category_spec.rb +1 -1
  40. data/spec/rakuten_web_service/recipe_spec.rb +1 -1
  41. data/spec/spec_helper.rb +12 -4
  42. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 402bbbef08d298db7505154fcf5ef658d24fbdf5
4
- data.tar.gz: 310770838115fc5d471c7744313a57917e74986f
3
+ metadata.gz: c4169e0d70507985294102d0f0db8bed893ba62f
4
+ data.tar.gz: ba7ef71f07923fc35b68f0dbad9395027604fc6b
5
5
  SHA512:
6
- metadata.gz: ff3f67b5d58ac4f950f210790af74db499a75fd65f2300c01fd95c8a11f596a276794ef8676de1ca9e10cdaac61e7a069334117762e486192c1f69b8c39d9efb
7
- data.tar.gz: 71772593cb9f006fb650891215dc8a78108239739b4c16e18f22206a1ef8c9f0d38ec7fb3e6b815f7b39401d521f9029b5d4d7be91b5c55c13b0ba843bdd6dc0
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
@@ -1,3 +1,9 @@
1
+ # v1.9.0 (2018/01/04)
2
+
3
+ ## Enhancements
4
+
5
+ * Update supported API versions. [#87](https://github.com/rakuten-ws/rws-ruby-sdk/pull/87)
6
+
1
7
  # v1.8.0 (2017/12/30)
2
8
 
3
9
  ## Enhancements
@@ -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/20130522'
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/20130522'
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/20130522'
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/20130522'
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/20130522'
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/20130522'
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/20130522'
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/20130522'
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/20131113'
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/20140410'
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/20150706'
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/20140222'
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
- :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
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/20140305'
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/20120927'
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/20140811'
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/20121121'
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/20121121'
28
+ endpoint 'https://app.rakuten.co.jp/services/api/Recipe/CategoryList/20170426'
29
29
 
30
30
  attribute :categoryId, :categoryName, :categoryUrl, :parentCategoryId, :categoryType
31
31
 
@@ -1,3 +1,3 @@
1
1
  module RakutenWebService
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.9.0'.freeze
3
3
  end
@@ -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/20130522' }
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/20130522' }
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/20130522' }
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/20130522' }
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/20130522' }
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/20130522' }
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/20130522' }
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/20130522' }
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
- item = items.first
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/20140410' }
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/20131113' }
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/20150706' }
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/20140222' }
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/20140305' }
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/20120927' }
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/20140222' }
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/20140811' }
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/20121121' }
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/20121121' }
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 |c|
17
- c.mock_with :rspec
16
+ RSpec.configure do |config|
17
+ config.mock_with :rspec
18
+ config.filter_run_excluding type: 'integration' if ENV['INTEGRATION'] != 'yes'
18
19
 
19
- c.before :suite do
20
+ config.before :suite do
20
21
  WebMock.disable_net_connect!(allow: "codeclimate.com")
21
22
  end
22
23
 
23
- c.after :each do
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.8.0
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: 2017-12-30 00:00:00.000000000 Z
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