ygoprodeck 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14d034f0f06c886b756da31cb9bad549a70dcac3322a37158c231fa15ec71a82
4
- data.tar.gz: b456c111cf498f34460d9760d5c5c38e4c8c0d5c0c40d651a78f4d3c555d9eef
3
+ metadata.gz: d9d2aed86131b65d23328bbaca154cb75ae21c6ebfae7960d470e909fd6ea3f7
4
+ data.tar.gz: 7b4c78d3026713a6c65b69d4ac6e7b53cedd99df28b6e99901e59024e6889c34
5
5
  SHA512:
6
- metadata.gz: 00e945661277143e1ac49f39b5f9aa1849678780c73c3c7528aa8cc6c867918fdf1335f4dd32bff25a0cec6330afb312fe66d789c233500089fa30aef4cba491
7
- data.tar.gz: 79bf45a6ca5ba49248851095a4ab4cd0958fb437d6d12b6fbc831d420349e90f95474f1bdb75582a372ba19efb21945ae3f3646107b33e0c753ce908ee0bfbfe
6
+ metadata.gz: b8c066b763d9ebe05dd787f713bb04abc204ab24a96eae5becc104e9b2c957fe382acf4445506e3e61a29d27bfd2c1ebe800750bd0175b8c8a1fa730c7226104
7
+ data.tar.gz: a9b6bab84547966e8a25b8b8d17cbc8a6d2d583797a2b2d3a2e8490901aa86c31bc636ff8e1a973d1b280c96b497e8244565aa84acbc0600f107a0777ee88aa9
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Ygoprodeck
2
2
 
3
3
  ![Lang](https://img.shields.io/badge/Language-Ruby-red)
4
+ [![Gem](https://img.shields.io/gem/v/ygoprodeck.svg)](https://rubygems.org/gems/ygoprodeck)
5
+ [![Gem](https://img.shields.io/gem/dt/ygoprodeck.svg)](https://rubygems.org/gems/ygoprodeck)
4
6
  [![Build Status](https://travis-ci.com/rokhimin/ygoprodeck.svg?branch=master)](https://travis-ci.com/rokhimin/ygoprodeck)
5
7
 
6
8
  API wrapper for search yugioh card
@@ -27,7 +29,7 @@ first you need :
27
29
  require 'ygoprodeck'
28
30
  ```
29
31
 
30
- Fuzzy search : (RECOMMENDED use fuzzy)
32
+ Fuzzy search : (RECOMMENDED)
31
33
  ```ruby
32
34
  Ygoprodeck::Fname.is('dark magician')
33
35
  ```
@@ -15,5 +15,4 @@ require 'ygoprodeck/search/archetype'
15
15
  require 'ygoprodeck/search/banlist'
16
16
 
17
17
  module Ygoprodeck
18
-
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module Ygoprodeck
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -0,0 +1,19 @@
1
+ RSpec.describe Ygoprodeck do
2
+
3
+ test_spec = Ygoprodeck::Archetype.is('blue-eyes')
4
+
5
+ it "check Archetype search by name" do
6
+ expect(test_spec).not_to be nil
7
+ end
8
+
9
+ it "check Archetype search by name (index 0)" do
10
+ expect(test_spec[0]).not_to be nil
11
+ end
12
+ it "check Archetype search by name (index 1)" do
13
+ expect(test_spec[1]).not_to be nil
14
+ end
15
+ it "check Archetype search by name (index 2)" do
16
+ expect(test_spec[2]).not_to be nil
17
+ end
18
+
19
+ end
@@ -0,0 +1,13 @@
1
+ RSpec.describe Ygoprodeck do
2
+
3
+ it "check Banlist TCG" do
4
+ expect(Ygoprodeck::Banlist.tcg).not_to be nil
5
+ end
6
+ it "check Banlist OCG" do
7
+ expect(Ygoprodeck::Banlist.ocg).not_to be nil
8
+ end
9
+ it "check Banlist GOAT" do
10
+ expect(Ygoprodeck::Banlist.goat).not_to be nil
11
+ end
12
+
13
+ end
@@ -0,0 +1,7 @@
1
+
2
+ RSpec.describe Ygoprodeck do
3
+ it "Check Card sets" do
4
+ expect(Ygoprodeck::Card.sets).not_to be nil
5
+ end
6
+
7
+ end
@@ -0,0 +1,10 @@
1
+ RSpec.describe Ygoprodeck do
2
+ it "check search by fuzzy name" do
3
+ expect(Ygoprodeck::Fname.is('dark magician')).not_to be nil
4
+ end
5
+
6
+ it "check search by fuzzy name spesific" do
7
+ spec_name = Ygoprodeck::Fname.is('dark magician')
8
+ expect(spec_name['id']).to eq('46986414')
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+
2
+ RSpec.describe Ygoprodeck do
3
+ it "Check image" do
4
+ expect(Ygoprodeck::Image.is('46986414')).not_to be nil
5
+ end
6
+
7
+ it "Check image small" do
8
+ expect(Ygoprodeck::Image_small.is('46986414')).not_to be nil
9
+ end
10
+
11
+ end
@@ -0,0 +1,19 @@
1
+ RSpec.describe Ygoprodeck do
2
+
3
+ test_spec = Ygoprodeck::List.is('karakuri')
4
+
5
+ it "check list search by name" do
6
+ expect(test_spec).not_to be nil
7
+ end
8
+
9
+ it "check list search by name (index 0)" do
10
+ expect(test_spec[0]).not_to be nil
11
+ end
12
+ it "check list search by name (index 1)" do
13
+ expect(test_spec[1]).not_to be nil
14
+ end
15
+ it "check list search by name (index 2)" do
16
+ expect(test_spec[2]).not_to be nil
17
+ end
18
+
19
+ end
@@ -0,0 +1,10 @@
1
+ RSpec.describe Ygoprodeck do
2
+ it "check search by name" do
3
+ expect(Ygoprodeck::Name.is('dark magician')).not_to be nil
4
+ end
5
+
6
+ it "check search by name spesific" do
7
+ spec_name = Ygoprodeck::Name.is('dark magician')
8
+ expect(spec_name['name']).to eq('Dark Magician')
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+
2
+ RSpec.describe Ygoprodeck do
3
+ it "Check random search" do
4
+ expect(Ygoprodeck::Card.random).not_to be nil
5
+ end
6
+
7
+ end
@@ -0,0 +1 @@
1
+ {"id"=>"46986414", "name"=>"Dark Magician", "type"=>"Normal Monster", "desc"=>"The ultimate wizard in terms of attack and defense.", "atk"=>"2500", "def"=>"2100", "level"=>"7", "race"=>"Spellcaster", "attribute"=>"DARK", "archetype"=>"Dark Magician", "card_sets"=>[{"set_name"=>"2016 Mega-Tins", "set_code"=>"CT13-EN003", "set_rarity"=>"Ultra Rare", "set_price"=>"5.68"}, {"set_name"=>"2017 Mega-Tins", "set_code"=>"CT14-EN001", "set_rarity"=>"Secret Rare", "set_price"=>"2.82"}, {"set_name"=>"Booster Pack Collectors Tins 2002", "set_code"=>"BPT-001", "set_rarity"=>"Secret Rare", "set_price"=>"50.29"}, {"set_name"=>"Collectible Tins 2003", "set_code"=>"BPT-007", "set_rarity"=>"Secret Rare", "set_price"=>"7.92"}, {"set_name"=>"Dark Beginning 1", "set_code"=>"DB1-EN102", "set_rarity"=>"Ultra Rare", "set_price"=>"3.33"}, {"set_name"=>"Dark Legends", "set_code"=>"DLG1-EN004", "set_rarity"=>"Rare", "set_price"=>"2.1"}, {"set_name"=>"Duel Power", "set_code"=>"DUPO-EN101", "set_rarity"=>"Ultra Rare", "set_price"=>"2.7"}, {"set_name"=>"Duel Terminal - Preview Wave 1", "set_code"=>"DTP1-EN002", "set_rarity"=>"Duel Terminal Normal Parallel", "set_price"=>"0.00"}, {"set_name"=>"Duel Terminal 1", "set_code"=>"DT01-EN002", "set_rarity"=>"Duel Terminal Rare Parallel Ra", "set_price"=>"3.75"}, {"set_name"=>"Duelist League 2 participation cards", "set_code"=>"DL11-EN001", "set_rarity"=>"Rare", "set_price"=>"34.96"}, {"set_name"=>"Duelist Pack: Battle City", "set_code"=>"DPBC-EN008", "set_rarity"=>"Super Rare", "set_price"=>"1.65"}, {"set_name"=>"Duelist Pack: Yugi", "set_code"=>"DPYG-EN001", "set_rarity"=>"Rare", "set_price"=>"1.19"}, {"set_name"=>"Duelist Saga", "set_code"=>"DUSA-EN100", "set_rarity"=>"Ultra Rare", "set_price"=>"4.15"}, {"set_name"=>"Forbidden Legacy", "set_code"=>"FL1-EN002", "set_rarity"=>"Secret Rare", "set_price"=>"4.51"}, {"set_name"=>"Legend of Blue Eyes White Dragon", "set_code"=>"LOB-005", "set_rarity"=>"Ultra Rare", "set_price"=>"10.06"}, {"set_name"=>"Legend of Blue Eyes White Dragon", "set_code"=>"LOB-E003", "set_rarity"=>"Ultra Rare", "set_price"=>"30.64"}, {"set_name"=>"Legend of Blue Eyes White Dragon", "set_code"=>"LOB-EN005", "set_rarity"=>"Ultra Rare", "set_price"=>"17.95"}, {"set_name"=>"Legendary Collection", "set_code"=>"LC01-EN005", "set_rarity"=>"Ultra Rare", "set_price"=>"1.51"}, {"set_name"=>"Legendary Collection 3: Yugi's World Mega Pack", "set_code"=>"LCYW-EN001", "set_rarity"=>"Secret Rare", "set_price"=>"3.38"}, {"set_name"=>"Legendary Decks II", "set_code"=>"LDK2-ENY10", "set_rarity"=>"Common", "set_price"=>"1.35"}, {"set_name"=>"Legendary Dragon Decks", "set_code"=>"LEDD-ENA01", "set_rarity"=>"Common", "set_price"=>"1.09"}, {"set_name"=>"Retro Pack", "set_code"=>"RP01-EN003", "set_rarity"=>"Ultra Rare", "set_price"=>"49.97"}, {"set_name"=>"Shonen Jump Vol. 9, Issue 4 promotional card", "set_code"=>"JUMP-EN049", "set_rarity"=>"Ultra Rare", "set_price"=>"22.57"}, {"set_name"=>"Speed Duel Starter Decks: Destiny Masters", "set_code"=>"SS01-ENA01", "set_rarity"=>"Common", "set_price"=>"1.05"}, {"set_name"=>"Speed Duel Tournament Pack 1", "set_code"=>"STP1-EN001", "set_rarity"=>"Ultra Rare", "set_price"=>"86.85"}, {"set_name"=>"Starter Deck: Yugi", "set_code"=>"SDY-006", "set_rarity"=>"Ultra Rare", "set_price"=>"4.2"}, {"set_name"=>"Starter Deck: Yugi", "set_code"=>"SDY-E005", "set_rarity"=>"Ultra Rare", "set_price"=>"13.84"}, {"set_name"=>"Starter Deck: Yugi Evolution", "set_code"=>"SYE-001", "set_rarity"=>"Super Rare", "set_price"=>"1.23"}, {"set_name"=>"Starter Deck: Yugi Reloaded", "set_code"=>"YSYR-EN001", "set_rarity"=>"Common", "set_price"=>"1.13"}, {"set_name"=>"Structure Deck: Spellcaster's Judgment", "set_code"=>"SD6-EN003", "set_rarity"=>"Common", "set_price"=>"1.23"}, {"set_name"=>"Structure Deck: Yugi Muto", "set_code"=>"SDMY-EN010", "set_rarity"=>"Common", "set_price"=>"1.13"}, {"set_name"=>"WSJ Jump Pack Fall 2016 promotional card", "set_code"=>"JMPS-EN003", "set_rarity"=>"Ultra Rare", "set_price"=>"24.38"}, {"set_name"=>"Yu-Gi-Oh! Dark Duel Stories promotional cards", "set_code"=>"DDS-002", "set_rarity"=>"Prismatic Secret Rare", "set_price"=>"445.43"}, {"set_name"=>"Yu-Gi-Oh! Power of Chaos: Yugi the Destiny promotional cards", "set_code"=>"PCY-004", "set_rarity"=>"Prismatic Secret Rare", "set_price"=>"20.56"}, {"set_name"=>"Yu-Gi-Oh! Power of Chaos: Yugi the Destiny promotional cards", "set_code"=>"PCY-E004", "set_rarity"=>"Prismatic Secret Rare", "set_price"=>"34.87"}, {"set_name"=>"Yu-Gi-Oh! The Dark Side of Dimensions Movie Pack", "set_code"=>"MVP1-EN054", "set_rarity"=>"Ultra Rare", "set_price"=>"1.64"}, {"set_name"=>"Yu-Gi-Oh! The Dark Side of Dimensions Movie Pack Special Edition", "set_code"=>"MVP1-ENSE3", "set_rarity"=>"Ultra Rare", "set_price"=>"1.53"}, {"set_name"=>"Yu-Gi-Oh! The Dark Side of Dimensions Movie Pack: Gold Edition", "set_code"=>"MVP1-ENG54", "set_rarity"=>"Gold Rare", "set_price"=>"1.63"}, {"set_name"=>"Yu-Gi-Oh! The Dark Side of Dimensions Movie Pack: Gold Edition", "set_code"=>"MVP1-ENGV3", "set_rarity"=>"Gold Secret Rare", "set_price"=>"5.85"}, {"set_name"=>"Yugi & Kaiba Collector Box", "set_code"=>"YUCB-EN001", "set_rarity"=>"Ultra Rare", "set_price"=>"3.92"}, {"set_name"=>"Yugi's Legendary Decks", "set_code"=>"YGLD-ENA03", "set_rarity"=>"Common", "set_price"=>"1.33"}, {"set_name"=>"Yugi's Legendary Decks", "set_code"=>"YGLD-ENC09", "set_rarity"=>"Ultra Rare", "set_price"=>"1.39"}], "card_images"=>[{"id"=>"46986414", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986414.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986414.jpg"}, {"id"=>"46986415", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986415.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986415.jpg"}, {"id"=>"46986416", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986416.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986416.jpg"}, {"id"=>"46986417", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986417.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986417.jpg"}, {"id"=>"46986418", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986418.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986418.jpg"}, {"id"=>"46986419", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986419.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986419.jpg"}, {"id"=>"36996508", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/36996508.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/36996508.jpg"}, {"id"=>"46986420", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986420.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986420.jpg"}, {"id"=>"46986421", "image_url"=>"https://storage.googleapis.com/ygoprodeck.com/pics/46986421.jpg", "image_url_small"=>"https://storage.googleapis.com/ygoprodeck.com/pics_small/46986421.jpg"}], "card_prices"=>{"cardmarket_price"=>"0.02", "tcgplayer_price"=>"0.2", "ebay_price"=>"2.49", "amazon_price"=>"1.95"}}
@@ -1,6 +1,11 @@
1
+
1
2
  RSpec.describe Ygoprodeck do
2
- it "has a version number" do
3
+ it "Check version gem" do
3
4
  expect(Ygoprodeck::VERSION).not_to be nil
4
5
  end
6
+
7
+ it "Check Endpoint" do
8
+ expect(Ygoprodeck::Endpoint.is).not_to be nil
9
+ end
5
10
 
6
- end
11
+ end
@@ -21,4 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.17"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "rspec", "~> 3.0"
24
+ spec.add_development_dependency 'rspec-prof', '~> 0.0.7'
25
+ spec.add_development_dependency 'rubocop', '~> 0.68.0'
26
+ spec.add_development_dependency 'rubocop-performance', '~> 1.0'
24
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ygoprodeck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rokhimin Wahid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,48 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-prof
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.0.7
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.0.7
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.68.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.68.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-performance
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
55
97
  description: ygoprodeck API wrapper for search yugioh card
56
98
  email:
57
99
  - rokhim.whd@gmail.com
@@ -84,7 +126,16 @@ files:
84
126
  - lib/ygoprodeck/search/name.rb
85
127
  - lib/ygoprodeck/search/random.rb
86
128
  - lib/ygoprodeck/version.rb
129
+ - spec/archetype_spec.rb
130
+ - spec/banlist_spec.rb
131
+ - spec/cardsets_spec.rb
132
+ - spec/fuzzy_name_spec.rb
133
+ - spec/image_spec.rb
134
+ - spec/list_spec.rb
135
+ - spec/name_spec.rb
136
+ - spec/random_spec.rb
87
137
  - spec/spec_helper.rb
138
+ - spec/ygoprodeck/response_example.json
88
139
  - spec/ygoprodeck_spec.rb
89
140
  - ygoprodeck.gemspec
90
141
  homepage: http://github.com/rokhimin/ygoprodeck
@@ -111,5 +162,14 @@ signing_key:
111
162
  specification_version: 4
112
163
  summary: ygoprodeck API wrapper for search yugioh's card
113
164
  test_files:
165
+ - spec/archetype_spec.rb
166
+ - spec/banlist_spec.rb
167
+ - spec/cardsets_spec.rb
168
+ - spec/fuzzy_name_spec.rb
169
+ - spec/image_spec.rb
170
+ - spec/list_spec.rb
171
+ - spec/name_spec.rb
172
+ - spec/random_spec.rb
114
173
  - spec/spec_helper.rb
174
+ - spec/ygoprodeck/response_example.json
115
175
  - spec/ygoprodeck_spec.rb