strutta-api 1.0.2 → 1.0.3.1

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: 1b3de72603b8fd181e8a3ce412688452c0823a7a
4
- data.tar.gz: 4178ed4ecec950231c730adbc503a44abc8cacd6
3
+ metadata.gz: 41ee21fe1c37c293ec56f346975f43baecf2f74c
4
+ data.tar.gz: 556f1121eb572b9cc8ad4c4e28febcb465e022c7
5
5
  SHA512:
6
- metadata.gz: f34071af5f7097cd1f1cd85f6b15598d3164b05e0769c07e77972d4fa9472ebb2593800d4a8954b332360f094ea7cb9dc0b1a16b5ad7175babecba3629f717c9
7
- data.tar.gz: 340152acff9afa7662d0eb5786bf414c55bcb6291e430d9604704d57a42ccb2ae19b3509f05af93c0dbf9e3dc8477ebd8287f0517aeee2355d86a845607789f7
6
+ metadata.gz: 9d003482eb8abd0719f48e2020606321e7d5e0e33500a74bd6ed3605a8495305b3beac9dbac59d16aba5f4072c749d85a171dcae140c30a05497f7b31d3a53ee
7
+ data.tar.gz: 35e2c6f2f8a34f2724d5b84defdfb7fb043360e267a9b92939711e0f4e8810843a78aea2d574114ed3b0db7729ef48844cd4e8252a6bb9c09d6d7390ffe7b07d
@@ -31,5 +31,14 @@ module Strutta
31
31
  @game.verify_no_id(@id)
32
32
  @game.get(params, 'entries/leaderboard')
33
33
  end
34
+
35
+ # GET on-demand winners from pool of active Entries (no ID required)
36
+ # games/:game_id/entries/on-demand-winners
37
+ #
38
+ # @return [Hash] Parsed body of the API response
39
+ def on_demand_winners(params = {})
40
+ @game.verify_no_id(@id)
41
+ @game.get(params, 'entries/on-demand-winners')
42
+ end
34
43
  end
35
44
  end
@@ -2,7 +2,7 @@ module Strutta
2
2
  # Strutta Wrapper Version Info
3
3
  module Version
4
4
  # This wrapper's version
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3.1'
6
6
  # This path association with this version
7
7
  VERSION_PATH = '/v2/'
8
8
  end
@@ -86,6 +86,18 @@ describe 'Strutta API Wrapper' do
86
86
  end
87
87
  end
88
88
 
89
+ context '.on_demand_winners' do
90
+ before do
91
+ stub_request(:get, /.*entries\/on-demand-winners/)
92
+ .to_return(status: 200, body: ENTRY_INDEX.to_json, headers: {})
93
+ end
94
+ it 'should return a leaderboard of entries' do
95
+ leaderboard = strutta.games(VALID_GAME_01[:id]).entries.on_demand_winners
96
+ results = leaderboard['results']
97
+ expect(results.is_a? Array).to be true
98
+ end
99
+ end
100
+
89
101
  context '.create' do
90
102
  context 'with valid parameters' do
91
103
  before do
@@ -14,18 +14,15 @@ Gem::Specification.new do |spec|
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
- # spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ['lib']
20
19
 
21
- # spec.files = ['lib/strutta-api.rb', 'lib/strutta-api/*']
22
-
23
20
  spec.add_development_dependency "bundler", "~> 1.5"
24
- spec.add_development_dependency "rake"
25
- spec.add_development_dependency "rspec"
26
- spec.add_development_dependency "excon"
27
- spec.add_development_dependency "webmock"
28
- spec.add_development_dependency "simplecov"
29
- spec.add_development_dependency 'codeclimate-test-reporter'
30
- spec.add_development_dependency 'yard'
21
+ spec.add_development_dependency "rake", "10.3.2"
22
+ spec.add_development_dependency "rspec", "3.1.0"
23
+ spec.add_development_dependency "excon", "0.41.0"
24
+ spec.add_development_dependency "webmock", "1.20.4"
25
+ spec.add_development_dependency "simplecov", "0.7.1"
26
+ spec.add_development_dependency 'codeclimate-test-reporter', "0.4.1"
27
+ spec.add_development_dependency 'yard', "0.8.7.6"
31
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strutta-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlakeTurner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-04 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,100 +28,100 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 10.3.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 10.3.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 3.1.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 3.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: excon
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.41.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.41.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 1.20.4
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.20.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.7.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: 0.7.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: codeclimate-test-reporter
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 0.4.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 0.4.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: yard
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 0.8.7.6
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 0.8.7.6
125
125
  description: ''
126
126
  email:
127
127
  - blake@strutta.com