pokemon_tcg_sdk 2.5.0 → 3.0.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: aa73b62742bf325c68cc062c79de894df403958c
4
- data.tar.gz: db444bf8bbc1d4fb81a76e8bdc838895c64228c2
3
+ metadata.gz: 7adbc58810fc030db16f7d4dd39b5e7b3b92436a
4
+ data.tar.gz: 13f38896f518634a223ca1b24fb4bad02a5ae8b8
5
5
  SHA512:
6
- metadata.gz: 8ae47f7b9425799510b57bba57e99023feb255fb0f2e96db62a4de9520a217ac02988203971c8a62e848f0dd870a31046598223aa41f415c74160d8477bf4b41
7
- data.tar.gz: 0f6f15852265e2ed2c19562ed2af4f1eaa24cde6a87c2c1237b360497992cfe34d44f488c4dc7db30893f6425528e34bce9b1dbea05540735bc4fc8b1483f4e4
6
+ metadata.gz: 67e70378fbc2f402d255c666d3ab24df6a8e06145e057b31582f9c5f8cd376768fdc071e249e28a38a4d6c2907dc440315f7f9ada3acc8c500d9629bf11004af
7
+ data.tar.gz: c62805025b350dfcf4ad80c92e76ea5456fdafd9ebdbe51695bd6938a9546ebb714d9e6dd411bd847fbf0c3ba2ef2bb24776cd3fa7d6801834668f058250bc16
@@ -1,4 +1,15 @@
1
+ env:
2
+ global:
3
+ - CC_TEST_REPORTER_ID=c14dfc2c8a10a029ac3706d2c2c86f63f663a1445df6213e013a42cbc9a55e74
1
4
  language: ruby
2
5
  rvm:
3
6
  - 2.3.0
4
7
  before_install: gem install bundler -v 1.12.5
8
+ before_script:
9
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10
+ - chmod +x ./cc-test-reporter
11
+ - ./cc-test-reporter before-build
12
+ script:
13
+ - rake test
14
+ after_script:
15
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![Build Status](https://travis-ci.org/PokemonTCG/pokemon-tcg-sdk-ruby.svg?branch=master)](https://travis-ci.org/PokemonTCG/pokemon-tcg-sdk-ruby)
5
5
  [![Dependency Status](https://gemnasium.com/badges/github.com/PokemonTCG/pokemon-tcg-sdk-ruby.svg)](https://gemnasium.com/github.com/PokemonTCG/pokemon-tcg-sdk-ruby)
6
6
  [![Code Climate](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby)
7
- [![Coverage Status](https://coveralls.io/repos/github/PokemonTCG/pokemon-tcg-sdk-ruby/badge.svg?branch=master)](https://coveralls.io/github/PokemonTCG/pokemon-tcg-sdk-ruby?branch=master)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/ee9d7d6ee5f8276729bc/test_coverage)](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby/test_coverage)
8
8
 
9
9
  This is the Pokémon TCG SDK Ruby implementation. It is a wrapper around the Pokémon TCG API of [pokemontcg.io](http://pokemontcg.io/).
10
10
 
@@ -63,6 +63,7 @@ To change the API version (currently defaults to version 1)
63
63
  set
64
64
  set_code
65
65
  retreat_cost
66
+ converted_retreat_cost
66
67
  text
67
68
  types
68
69
  attacks
@@ -76,9 +77,12 @@ To change the API version (currently defaults to version 1)
76
77
  name
77
78
  series
78
79
  total_cards
80
+ symbol_url
81
+ logo_url
79
82
  standard_legal
80
83
  expanded_legal
81
84
  release_date
85
+ updated_at
82
86
 
83
87
  #### Ability
84
88
 
@@ -112,7 +116,7 @@ To change the API version (currently defaults to version 1)
112
116
 
113
117
  #### Filter Cards via query parameters
114
118
 
115
- cards = Pokemon::Card.where(set: 'generations').where(supertype: 'pokemon').all
119
+ cards = Pokemon::Card.where(set: 'generations', supertype: 'pokemon')
116
120
 
117
121
  #### Find all cards (will take awhile)
118
122
 
@@ -120,7 +124,7 @@ To change the API version (currently defaults to version 1)
120
124
 
121
125
  #### Get all cards, but only a specific page of data
122
126
 
123
- cards = Pokemon::Card.where(page: 5).where(pageSize: 100).all
127
+ cards = Pokemon::Card.where(page: 5, pageSize: 100)
124
128
 
125
129
  #### Find a set by code
126
130
 
@@ -128,7 +132,7 @@ To change the API version (currently defaults to version 1)
128
132
 
129
133
  #### Filter sets via query parameters
130
134
 
131
- sets = Pokemon::Set.where(standardLegal: true).all
135
+ sets = Pokemon::Set.where(standardLegal: true)
132
136
 
133
137
  #### Get all Sets
134
138
 
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'rake/testtask'
3
- require_relative 'lib/pokemon_tcg_sdk'
4
3
 
5
4
  task :default => :test
6
5
 
7
6
  Rake::TestTask.new do |t|
7
+ t.libs << "lib"
8
8
  t.libs << "test"
9
9
  t.test_files = FileList['test/*_test.rb']
10
10
  t.verbose = true
@@ -8,7 +8,7 @@ module Pokemon
8
8
  attr_accessor :id, :name, :image_url, :image_url_hi_res, :subtype, :supertype, :ability,
9
9
  :hp, :number, :artist, :rarity, :series, :set, :set_code,
10
10
  :retreat_cost, :text, :types, :attacks, :weaknesses, :resistances,
11
- :national_pokedex_number, :ancient_trait, :evolves_from
11
+ :national_pokedex_number, :ancient_trait, :evolves_from, :converted_retreat_cost
12
12
 
13
13
  # Get the resource string
14
14
  #
@@ -35,7 +35,7 @@ module Pokemon
35
35
  # Adds a parameter to the hash of query parameters
36
36
  #
37
37
  # @param args [Hash] the query parameter
38
- # @return [QueryBuilder] the QueryBuilder
38
+ # @return [Array<Card>] Array of Card objects
39
39
  def self.where(args)
40
40
  QueryBuilder.new(Card).where(args)
41
41
  end
@@ -16,7 +16,7 @@ module Pokemon
16
16
  # @return [QueryBuilder] the QueryBuilder
17
17
  def where(args)
18
18
  @query.merge!(args)
19
- self
19
+ self.all
20
20
  end
21
21
 
22
22
  # Find a single resource by the resource id
@@ -29,6 +29,7 @@ module Pokemon
29
29
  property :set_code, as: :setCode
30
30
  property :national_pokedex_number, as: :nationalPokedexNumber
31
31
  property :evolves_from, as: :evolvesFrom
32
+ property :converted_retreat_cost, as: :convertedRetreatCost
32
33
 
33
34
  collection :retreat_cost, as: :retreatCost
34
35
  collection :text
@@ -9,9 +9,11 @@ module Pokemon
9
9
  property :series
10
10
  property :ptcgo_code, as: :ptcgoCode
11
11
  property :symbol_url, as: :symbolUrl
12
+ property :logo_url, as: :logoUrl
12
13
  property :total_cards, as: :totalCards
13
14
  property :standard_legal, as: :standardLegal
14
15
  property :expanded_legal, as: :expandedLegal
15
16
  property :release_date, as: :releaseDate
17
+ property :updated_at, as: :updatedAt
16
18
  end
17
19
  end
@@ -6,7 +6,7 @@ module Pokemon
6
6
  include SetRepresenter
7
7
 
8
8
  attr_accessor :code, :name, :series, :total_cards, :standard_legal, :expanded_legal, :release_date,
9
- :symbol_url, :ptcgo_code
9
+ :symbol_url, :logo_url, :ptcgo_code, :updated_at
10
10
 
11
11
  # Get the resource string
12
12
  #
@@ -33,7 +33,7 @@ module Pokemon
33
33
  # Adds a parameter to the hash of query parameters
34
34
  #
35
35
  # @param args [Hash] the query parameter
36
- # @return [QueryBuilder] the QueryBuilder
36
+ # @return [Array<Set>] Array of Set objects
37
37
  def self.where(args)
38
38
  QueryBuilder.new(Set).where(args)
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module Pokemon
2
- VERSION = "2.5.0"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "vcr", "~> 3.0"
24
24
  spec.add_development_dependency "webmock", "~> 2.1"
25
25
  spec.add_development_dependency "simplecov", "~> 0.14"
26
- spec.add_development_dependency "coveralls", "0.8.21"
27
26
  spec.add_development_dependency "codeclimate-test-reporter", "~> 0.6"
28
27
 
29
28
  spec.add_dependency "roar", "~> 1.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pokemon_tcg_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Backes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-15 00:00:00.000000000 Z
11
+ date: 2018-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.14'
97
- - !ruby/object:Gem::Dependency
98
- name: coveralls
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '='
102
- - !ruby/object:Gem::Version
103
- version: 0.8.21
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '='
109
- - !ruby/object:Gem::Version
110
- version: 0.8.21
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: codeclimate-test-reporter
113
99
  requirement: !ruby/object:Gem::Requirement