rts 0.1.0 → 0.1.1
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 +4 -4
- data/.rspec +1 -0
- data/.rubocop.yml +39 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +75 -0
- data/READEME.md +46 -0
- data/lib/rts/api/static_sport_event_information.rb +1 -1
- data/lib/rts/client.rb +6 -2
- data/lib/rts/version.rb +1 -1
- data/rts.gemspec +4 -3
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 170b333081f2efc309d58d24358a6f110ce9b1856b6089194e828e48b0c150d0
|
4
|
+
data.tar.gz: c567f5d041aa4871aca019acb727bfe364ac0a1e1124c08178fe93953a19f4d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6148a67d54fec166fe5036e2a22811e6da3f8a7f5cb5170e00a2f882df61f41d59515514af85c18b5a8d5a506f13c81ed5e2b0d977820cee95b5a43669d1d19c
|
7
|
+
data.tar.gz: 3f2ffb49bfc05198d29adffeab7394b4dffa41843d7c434b4b293952e7c85f4e2695b3e3674c059127fa46ae9fea6931d1185d204bc147765b52835decbbf95a
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5.1
|
3
|
+
|
4
|
+
|
5
|
+
Layout/ParameterAlignment:
|
6
|
+
EnforcedStyle: with_fixed_indentation
|
7
|
+
|
8
|
+
Metrics/AbcSize:
|
9
|
+
Max: 20
|
10
|
+
|
11
|
+
Metrics/BlockLength:
|
12
|
+
Exclude:
|
13
|
+
- spec/**/*.rb
|
14
|
+
|
15
|
+
Layout/LineLength:
|
16
|
+
Max: 120
|
17
|
+
IgnoreCopDirectives: true
|
18
|
+
|
19
|
+
Metrics/MethodLength:
|
20
|
+
Max: 20
|
21
|
+
|
22
|
+
|
23
|
+
Style/ClassAndModuleChildren:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Style/FrozenStringLiteralComment:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/HashEachMethods:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Style/HashTransformKeys:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
Style/HashTransformValues:
|
39
|
+
Enabled: true
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rts (0.1.0)
|
5
|
+
openssl (~> 2.1, >= 2.1.0)
|
6
|
+
rest-client (~> 2.1, >= 2.1.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
coderay (1.1.2)
|
14
|
+
crack (0.4.3)
|
15
|
+
safe_yaml (~> 1.0.0)
|
16
|
+
diff-lcs (1.3)
|
17
|
+
domain_name (0.5.20190701)
|
18
|
+
unf (>= 0.0.5, < 1.0.0)
|
19
|
+
hashdiff (1.0.1)
|
20
|
+
http-accept (1.7.0)
|
21
|
+
http-cookie (1.0.3)
|
22
|
+
domain_name (~> 0.5)
|
23
|
+
method_source (1.0.0)
|
24
|
+
mime-types (3.3.1)
|
25
|
+
mime-types-data (~> 3.2015)
|
26
|
+
mime-types-data (3.2019.1009)
|
27
|
+
netrc (0.11.0)
|
28
|
+
openssl (2.1.2)
|
29
|
+
pry (0.13.0)
|
30
|
+
coderay (~> 1.1)
|
31
|
+
method_source (~> 1.0)
|
32
|
+
public_suffix (4.0.3)
|
33
|
+
rake (13.0.1)
|
34
|
+
rest-client (2.1.0)
|
35
|
+
http-accept (>= 1.7.0, < 2.0)
|
36
|
+
http-cookie (>= 1.0.2, < 2.0)
|
37
|
+
mime-types (>= 1.16, < 4.0)
|
38
|
+
netrc (~> 0.8)
|
39
|
+
rspec (3.9.0)
|
40
|
+
rspec-core (~> 3.9.0)
|
41
|
+
rspec-expectations (~> 3.9.0)
|
42
|
+
rspec-mocks (~> 3.9.0)
|
43
|
+
rspec-core (3.9.1)
|
44
|
+
rspec-support (~> 3.9.1)
|
45
|
+
rspec-expectations (3.9.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.9.0)
|
48
|
+
rspec-mocks (3.9.1)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-support (3.9.2)
|
52
|
+
safe_yaml (1.0.5)
|
53
|
+
unf (0.1.4)
|
54
|
+
unf_ext
|
55
|
+
unf_ext (0.0.7.6)
|
56
|
+
vcr (4.0.0)
|
57
|
+
webmock (3.8.3)
|
58
|
+
addressable (>= 2.3.6)
|
59
|
+
crack (>= 0.3.2)
|
60
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
61
|
+
|
62
|
+
PLATFORMS
|
63
|
+
ruby
|
64
|
+
|
65
|
+
DEPENDENCIES
|
66
|
+
bundler (~> 1.17, >= 1.17.3)
|
67
|
+
pry
|
68
|
+
rake (~> 13.0)
|
69
|
+
rspec (~> 3.8)
|
70
|
+
rts!
|
71
|
+
vcr (~> 4.0)
|
72
|
+
webmock (~> 3.4)
|
73
|
+
|
74
|
+
BUNDLED WITH
|
75
|
+
1.17.3
|
data/READEME.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# RTS Ruby Wrapper
|
2
|
+
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'rts'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install rts
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
To create RTS:Client
|
23
|
+
client = RTS:Client.new(api_key: 'pass_api_key', client_certificate: 'pass_ssl_certificate', client_key: 'pass_ssl_key')
|
24
|
+
|
25
|
+
#### sports
|
26
|
+
client.sports
|
27
|
+
|
28
|
+
#### leagues
|
29
|
+
client.league(sport: 'lol')
|
30
|
+
|
31
|
+
#### teams
|
32
|
+
client.teams(sport: 'lol')
|
33
|
+
|
34
|
+
#### players
|
35
|
+
client.players(sport: 'lol')
|
36
|
+
|
37
|
+
###### players by team_id
|
38
|
+
client.players(sport: 'lol', team_id: 1)
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rmishra-ror/rts.
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/rts/client.rb
CHANGED
@@ -28,11 +28,15 @@ module RTS
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def configure_client_certificate(client_certificate, client_certificate_path)
|
31
|
-
@client_certificate =
|
31
|
+
(@client_certificate = client_certificate) && return if client_certificate
|
32
|
+
(@client_certificate = File.read(client_certificate_path)) && return if client_certificate_path
|
33
|
+
raise StandardError, 'client_certificate is missing'
|
32
34
|
end
|
33
35
|
|
34
36
|
def configure_client_key(client_key, client_key_path)
|
35
|
-
@client_key =
|
37
|
+
(@client_key = client_key) && return if client_key
|
38
|
+
(@client_key = File.read(client_key_path)) && return if client_key_path
|
39
|
+
raise StandardError, 'client_key is missing'
|
36
40
|
end
|
37
41
|
|
38
42
|
def validate_openssl_configuration
|
data/lib/rts/version.rb
CHANGED
data/rts.gemspec
CHANGED
@@ -9,8 +9,9 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = RTS::VERSION
|
10
10
|
spec.authors = ['Rahul']
|
11
11
|
spec.email = ['rahulismishra@gmail.com']
|
12
|
-
spec.summary = '
|
13
|
-
spec.description = '
|
12
|
+
spec.summary = 'A Ruby interface to the RTS JSON API.'
|
13
|
+
spec.description = 'A Ruby interface to the RTS JSON API.'
|
14
|
+
spec.homepage = 'https://github.com/rmishra-ror/rts'
|
14
15
|
spec.license = 'MIT'
|
15
16
|
|
16
17
|
# Specify which files should be added to the gem when it is released.
|
@@ -24,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
24
25
|
|
25
26
|
spec.add_development_dependency 'bundler', '~> 1.17', '>= 1.17.3'
|
26
27
|
spec.add_development_dependency 'pry'
|
27
|
-
spec.add_development_dependency 'rake', '~>
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
28
29
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
29
30
|
spec.add_development_dependency 'vcr', '~> 4.0'
|
30
31
|
spec.add_development_dependency 'webmock', '~> 3.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rahul
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '13.0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '13.0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,13 +140,18 @@ dependencies:
|
|
140
140
|
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '2.1'
|
143
|
-
description:
|
143
|
+
description: A Ruby interface to the RTS JSON API.
|
144
144
|
email:
|
145
145
|
- rahulismishra@gmail.com
|
146
146
|
executables: []
|
147
147
|
extensions: []
|
148
148
|
extra_rdoc_files: []
|
149
149
|
files:
|
150
|
+
- ".rspec"
|
151
|
+
- ".rubocop.yml"
|
152
|
+
- Gemfile
|
153
|
+
- Gemfile.lock
|
154
|
+
- READEME.md
|
150
155
|
- lib/rts.rb
|
151
156
|
- lib/rts/api/live_sport_event_information.rb
|
152
157
|
- lib/rts/api/static_sport_event_information.rb
|
@@ -155,7 +160,7 @@ files:
|
|
155
160
|
- lib/rts/request.rb
|
156
161
|
- lib/rts/version.rb
|
157
162
|
- rts.gemspec
|
158
|
-
homepage:
|
163
|
+
homepage: https://github.com/rmishra-ror/rts
|
159
164
|
licenses:
|
160
165
|
- MIT
|
161
166
|
metadata: {}
|
@@ -178,5 +183,5 @@ rubyforge_project:
|
|
178
183
|
rubygems_version: 2.7.9
|
179
184
|
signing_key:
|
180
185
|
specification_version: 4
|
181
|
-
summary:
|
186
|
+
summary: A Ruby interface to the RTS JSON API.
|
182
187
|
test_files: []
|