eve_online 0.39.0 → 0.40.0
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +13 -13
- data/README.md +21 -9
- data/lib/eve_online.rb +1 -0
- data/lib/eve_online/esi/base.rb +2 -2
- data/lib/eve_online/formulas/training_rate.rb +18 -0
- data/lib/eve_online/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c8425edfba5f5350b3f78a80d6304bcd6f7f55c6efd706e03bb23a2ebba5b64
|
4
|
+
data.tar.gz: ca5da43f14db713471031d1dfb503404bed3c10b7cf4971bafe8c32914141e6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b8459d805017d112ae748e5e6a296e241720f6bd27736a42af74193ab272e7e9ee6dc9bb21a4cc73006d89fff7cb53b3ab0353b259b64d5609945bb9b0cb250
|
7
|
+
data.tar.gz: c56e731258f197a3f1facc6e40797207ecf873b75e529817bc9895aa672dfe658f6f5bcf94d2e2820173f245cb4d0129d930c6f2a035fd3bb27ea3e4bc799641
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eve_online (0.
|
4
|
+
eve_online (0.40.0)
|
5
5
|
activesupport (>= 5.2.0)
|
6
6
|
faraday
|
7
7
|
faraday_middleware
|
@@ -22,8 +22,8 @@ GEM
|
|
22
22
|
rake
|
23
23
|
thor (>= 0.14.0)
|
24
24
|
ast (2.4.2)
|
25
|
-
awesome_print (1.
|
26
|
-
chef-utils (16.
|
25
|
+
awesome_print (1.9.2)
|
26
|
+
chef-utils (16.11.7)
|
27
27
|
coderay (1.1.3)
|
28
28
|
colorize (0.8.1)
|
29
29
|
concurrent-ruby (1.1.8)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
hashdiff (1.0.1)
|
45
45
|
i18n (1.8.9)
|
46
46
|
concurrent-ruby (~> 1.0)
|
47
|
-
kramdown (2.3.
|
47
|
+
kramdown (2.3.1)
|
48
48
|
rexml
|
49
49
|
kramdown-parser-gfm (1.1.0)
|
50
50
|
kramdown (~> 2.0)
|
@@ -63,10 +63,10 @@ GEM
|
|
63
63
|
mixlib-shellout (3.2.5)
|
64
64
|
chef-utils
|
65
65
|
multipart-post (2.1.1)
|
66
|
-
nokogiri (1.11.
|
66
|
+
nokogiri (1.11.2)
|
67
67
|
mini_portile2 (~> 2.5.0)
|
68
68
|
racc (~> 1.4)
|
69
|
-
nokogiri (1.11.
|
69
|
+
nokogiri (1.11.2-x86_64-darwin)
|
70
70
|
racc (~> 1.4)
|
71
71
|
parallel (1.20.1)
|
72
72
|
parser (3.0.0.0)
|
@@ -96,7 +96,7 @@ GEM
|
|
96
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
97
|
rspec-support (~> 3.10.0)
|
98
98
|
rspec-support (3.10.2)
|
99
|
-
rubocop (1.
|
99
|
+
rubocop (1.11.0)
|
100
100
|
parallel (~> 1.10)
|
101
101
|
parser (>= 3.0.0.0)
|
102
102
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -107,7 +107,7 @@ GEM
|
|
107
107
|
unicode-display_width (>= 1.4.0, < 3.0)
|
108
108
|
rubocop-ast (1.4.1)
|
109
109
|
parser (>= 2.7.1.5)
|
110
|
-
rubocop-performance (1.
|
110
|
+
rubocop-performance (1.10.1)
|
111
111
|
rubocop (>= 0.90.0, < 2.0)
|
112
112
|
rubocop-ast (>= 0.4.0)
|
113
113
|
ruby-progressbar (1.11.0)
|
@@ -121,16 +121,16 @@ GEM
|
|
121
121
|
simplecov_json_formatter (~> 0.1)
|
122
122
|
simplecov-html (0.12.3)
|
123
123
|
simplecov_json_formatter (0.1.2)
|
124
|
-
standard (0.
|
125
|
-
rubocop (= 1.
|
126
|
-
rubocop-performance (= 1.
|
124
|
+
standard (1.0.4)
|
125
|
+
rubocop (= 1.11.0)
|
126
|
+
rubocop-performance (= 1.10.1)
|
127
127
|
thor (1.1.0)
|
128
128
|
tomlrb (2.0.1)
|
129
129
|
tzinfo (2.0.4)
|
130
130
|
concurrent-ruby (~> 1.0)
|
131
131
|
unicode-display_width (2.0.0)
|
132
132
|
vcr (6.0.0)
|
133
|
-
webmock (3.12.
|
133
|
+
webmock (3.12.1)
|
134
134
|
addressable (>= 2.3.6)
|
135
135
|
crack (>= 0.3.2)
|
136
136
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -159,4 +159,4 @@ DEPENDENCIES
|
|
159
159
|
webmock
|
160
160
|
|
161
161
|
BUNDLED WITH
|
162
|
-
2.2.
|
162
|
+
2.2.15
|
data/README.md
CHANGED
@@ -3088,18 +3088,17 @@ List of exceptions:
|
|
3088
3088
|
|
3089
3089
|
## Timeouts
|
3090
3090
|
|
3091
|
-
`eve_online` gem uses `
|
3091
|
+
`eve_online` gem uses `faraday` for network request. `faraday` configured with:
|
3092
3092
|
|
3093
3093
|
```ruby
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
3099
|
-
http.write_timeout = 60
|
3094
|
+
Faraday.new do |f|
|
3095
|
+
f.options.read_timeout = 60
|
3096
|
+
f.options.open_timeout = 60
|
3097
|
+
f.options.write_timeout = 60
|
3098
|
+
end
|
3100
3099
|
```
|
3101
3100
|
|
3102
|
-
You can configure default timeouts with adding `read_timeout
|
3101
|
+
You can configure default timeouts with adding `read_timeout:`, `open_timeout:` and `write_timeout:` to default hash with options:
|
3103
3102
|
|
3104
3103
|
```ruby
|
3105
3104
|
options = { read_timeout: 120, open_timeout: 120, write_timeout: 120 } # 120 seconds
|
@@ -3120,7 +3119,6 @@ races.read_timeout # => 60
|
|
3120
3119
|
races.read_timeout = 120
|
3121
3120
|
races.read_timeout # => 120
|
3122
3121
|
|
3123
|
-
# if ruby >= 2.6.0
|
3124
3122
|
races.write_timeout # => 60
|
3125
3123
|
races.write_timeout = 120
|
3126
3124
|
races.write_timeout # => 120
|
@@ -3168,6 +3166,20 @@ formula = EveOnline::Formulas::BlueprintCopyTime.new(seconds, science_level,
|
|
3168
3166
|
formula.time # => 174.6
|
3169
3167
|
```
|
3170
3168
|
|
3169
|
+
### Training rate
|
3170
|
+
|
3171
|
+
```ruby
|
3172
|
+
# Memory: 24
|
3173
|
+
primary = 24
|
3174
|
+
# Charisma: 20
|
3175
|
+
secondary = 20
|
3176
|
+
|
3177
|
+
training_rate = EveOnline::Formulas::TrainingRate.new(primary, secondary)
|
3178
|
+
|
3179
|
+
# skill points per minute
|
3180
|
+
training_rate.rate # => 34.0
|
3181
|
+
```
|
3182
|
+
|
3171
3183
|
## Useful links
|
3172
3184
|
|
3173
3185
|
* [BREAKING CHANGES AND YOU - HOW TO USE ALT-ROUTES TO ENHANCE YOUR SANITY](https://developers.eveonline.com/blog/article/breaking-changes-and-you)
|
data/lib/eve_online.rb
CHANGED
data/lib/eve_online/esi/base.rb
CHANGED
@@ -97,7 +97,7 @@ module EveOnline
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def connection
|
100
|
-
@connection ||= Faraday.new
|
100
|
+
@connection ||= Faraday.new do |f|
|
101
101
|
f.headers["User-Agent"] = user_agent
|
102
102
|
f.headers["If-None-Match"] = _etag if _etag
|
103
103
|
f.headers["Accept"] = "application/json"
|
@@ -117,7 +117,7 @@ module EveOnline
|
|
117
117
|
# f.use FaradayMiddleware::FollowRedirects, limit: 5
|
118
118
|
f.response :json, content_type: "application/json"
|
119
119
|
f.adapter adapter
|
120
|
-
|
120
|
+
end
|
121
121
|
end
|
122
122
|
|
123
123
|
def uri
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module Formulas
|
5
|
+
class TrainingRate
|
6
|
+
attr_reader :primary, :secondary
|
7
|
+
|
8
|
+
def initialize(primary, secondary)
|
9
|
+
@primary = primary
|
10
|
+
@secondary = secondary
|
11
|
+
end
|
12
|
+
|
13
|
+
def rate
|
14
|
+
primary + (secondary / 2.0)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/eve_online/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eve_online
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.40.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Zubkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -390,6 +390,7 @@ files:
|
|
390
390
|
- lib/eve_online/exceptions/timeout.rb
|
391
391
|
- lib/eve_online/exceptions/unauthorized.rb
|
392
392
|
- lib/eve_online/formulas/blueprint_copy_time.rb
|
393
|
+
- lib/eve_online/formulas/training_rate.rb
|
393
394
|
- lib/eve_online/version.rb
|
394
395
|
homepage: https://github.com/evemonk/eve_online
|
395
396
|
licenses:
|
@@ -415,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
415
416
|
- !ruby/object:Gem::Version
|
416
417
|
version: '0'
|
417
418
|
requirements: []
|
418
|
-
rubygems_version: 3.2.
|
419
|
+
rubygems_version: 3.2.15
|
419
420
|
signing_key:
|
420
421
|
specification_version: 4
|
421
422
|
summary: EveOnline ESI API
|