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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc1724485965ecc6ec0100db7a13354e3a387fdbc23c2ce235ccb3bc267fc3ae
4
- data.tar.gz: 7dc7ae5ede5650d092576fe1c7f7c21c90c45bb52c3b74ae41949a1e28d07534
3
+ metadata.gz: a17167182aab15142cd5c1b3696180c84c6509231e0cfc335810866ac3104bb0
4
+ data.tar.gz: 00e490bd25daa089befa0f148b2165e68ea25f871ad2059c0dabe7ee4d771f64
5
5
  SHA512:
6
- metadata.gz: 5f131bb8fe197b440217a89cc1cefd5eba7c7ad53499f08954c9cdad079174e82aef4678520e9df4bd17a4ddf47e29055e587a1fb41d8e9e166bdc284b81fa2a
7
- data.tar.gz: dda04445357c4b066f2186bee17074b621f8965f00099ea3752ef48b02bf60a57e69530905eb3f58cd3c8766593f16301b89c431c1499723cbc29e2fd3c49f34
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
- if key == :timeout
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.id = id
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:\n#{textify(result.body)}")
129
+ raise(Error, "API Response Error:#{textify(result.body)}")
134
130
  end
135
131
  end
136
- puts "* Timeout detected... Terminating after #{Time.new - start} seconds"
137
- ''
132
+ puts "* Timeout detected... Terminating after #{Time.now - start} seconds"
133
+ nil
138
134
  end
139
135
 
140
136
  def textify(html) # :nodoc:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Smiten
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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-01 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday