smiten 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/lib/smiten/core.rb +5 -9
- data/lib/smiten/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a17167182aab15142cd5c1b3696180c84c6509231e0cfc335810866ac3104bb0
|
4
|
+
data.tar.gz: 00e490bd25daa089befa0f148b2165e68ea25f871ad2059c0dabe7ee4d771f64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e14b560bf7b0fc2e1a1f9cd2475191bd2687d2f12efbff7836bf409103b8e4f07ec33814801b09ce572e7e6009e86ae6aa850d60a86ec9eb8e7d8b3631ae6c
|
7
|
+
data.tar.gz: 370410d0cc1d00d43748ff32f31262458d6556913c2aff639f4d7839c99b05c536810428cfa9c0b0f692de6cc3c8c934ce8b3e26f01e348472002ae2e8c3db44
|
data/lib/smiten/core.rb
CHANGED
@@ -27,11 +27,7 @@ module Smiten
|
|
27
27
|
|
28
28
|
self.class.define_method(api) do |args = {}|
|
29
29
|
args.each_pair do |key, value|
|
30
|
-
|
31
|
-
@url.timeout = value
|
32
|
-
else
|
33
|
-
send("#{key}=", value)
|
34
|
-
end
|
30
|
+
send("#{key}=", value)
|
35
31
|
end
|
36
32
|
@url = calls[api][1].call
|
37
33
|
payload = get
|
@@ -93,7 +89,7 @@ module Smiten
|
|
93
89
|
|
94
90
|
# Sets the champion_id on the connection and returns the connection
|
95
91
|
def for_champion(id)
|
96
|
-
self.
|
92
|
+
self.champion_id = id
|
97
93
|
yield(self)
|
98
94
|
end
|
99
95
|
|
@@ -130,11 +126,11 @@ module Smiten
|
|
130
126
|
when result.status == 504
|
131
127
|
puts '* Gateway Timeout detected... Retrying'
|
132
128
|
else
|
133
|
-
raise(Error, "API Response Error
|
129
|
+
raise(Error, "API Response Error:#{textify(result.body)}")
|
134
130
|
end
|
135
131
|
end
|
136
|
-
puts "* Timeout detected... Terminating after #{Time.
|
137
|
-
|
132
|
+
puts "* Timeout detected... Terminating after #{Time.now - start} seconds"
|
133
|
+
nil
|
138
134
|
end
|
139
135
|
|
140
136
|
def textify(html) # :nodoc:
|
data/lib/smiten/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smiten
|
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
|
- pikelly
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|