eve_online 0.42.0 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.fasterer.yml +3 -0
- data/.github/dependabot.yml +16 -8
- data/.github/workflows/mdl.yml +19 -0
- data/.github/workflows/rspec.yml +36 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +10 -0
- data/.ruby-version +1 -1
- data/.standard.yml +1 -1
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +76 -105
- data/LICENSE.txt +1 -1
- data/README.md +4 -189
- data/eve_online.gemspec +7 -11
- data/gemfiles/activesupport_6.1.gemfile +12 -0
- data/gemfiles/activesupport_7.0.gemfile +12 -0
- data/gemfiles/activesupport_main.gemfile +12 -0
- data/lib/eve_online/esi/base.rb +5 -31
- data/lib/eve_online/esi/character_assets_locations.rb +0 -4
- data/lib/eve_online/esi/character_assets_names.rb +0 -4
- data/lib/eve_online/esi/corporation_assets_locations.rb +0 -4
- data/lib/eve_online/esi/corporation_assets_names.rb +0 -4
- data/lib/eve_online/version.rb +1 -1
- data/lib/eve_online.rb +0 -1
- metadata +16 -56
- data/.circleci/config.yml +0 -50
- data/.github/FUNDING.yml +0 -1
- data/Appraisals +0 -19
- data/lib/eve_online/exceptions/not_modified.rb +0 -8
data/eve_online.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "eve_online/version"
|
3
|
+
require_relative "lib/eve_online/version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = "eve_online"
|
@@ -16,9 +14,10 @@ Gem::Specification.new do |spec|
|
|
16
14
|
spec.license = "MIT"
|
17
15
|
|
18
16
|
spec.metadata = {
|
17
|
+
"rubygems_mfa_required" => "true",
|
19
18
|
"bug_tracker_uri" => "https://github.com/evemonk/eve_online/issues",
|
20
|
-
"changelog_uri" => "https://github.com/evemonk/eve_online/blob/
|
21
|
-
"documentation_uri" => "https://github.com/evemonk/eve_online/blob/
|
19
|
+
"changelog_uri" => "https://github.com/evemonk/eve_online/blob/main/CHANGELOG.md",
|
20
|
+
"documentation_uri" => "https://github.com/evemonk/eve_online/blob/main/README.md",
|
22
21
|
"homepage_uri" => "https://github.com/evemonk/eve_online",
|
23
22
|
"source_code_uri" => "https://github.com/evemonk/eve_online"
|
24
23
|
}
|
@@ -26,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
26
25
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin|swagger)/}) }
|
27
26
|
spec.require_paths = ["lib"]
|
28
27
|
|
29
|
-
spec.required_ruby_version = ">=
|
28
|
+
spec.required_ruby_version = ">= 3.0"
|
30
29
|
|
31
30
|
spec.add_development_dependency "bundler"
|
32
31
|
spec.add_development_dependency "rake"
|
@@ -35,10 +34,7 @@ Gem::Specification.new do |spec|
|
|
35
34
|
spec.add_development_dependency "simplecov"
|
36
35
|
spec.add_development_dependency "webmock"
|
37
36
|
spec.add_development_dependency "vcr"
|
38
|
-
spec.add_development_dependency "mdl"
|
39
|
-
spec.add_development_dependency "appraisal"
|
40
37
|
|
41
|
-
spec.add_runtime_dependency "faraday"
|
42
|
-
spec.add_runtime_dependency "
|
43
|
-
spec.add_runtime_dependency "activesupport", ">= 5.2.0"
|
38
|
+
spec.add_runtime_dependency "faraday", ">= 2.3.0"
|
39
|
+
spec.add_runtime_dependency "activesupport", ">= 6.1.0"
|
44
40
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "nokogiri"
|
6
|
+
gem "awesome_print", require: "ap"
|
7
|
+
gem "pry"
|
8
|
+
gem "standard", require: false
|
9
|
+
gem "fasterer", require: false
|
10
|
+
gem "activesupport", "~> 6.1.0"
|
11
|
+
|
12
|
+
gemspec path: "../"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "nokogiri"
|
6
|
+
gem "awesome_print", require: "ap"
|
7
|
+
gem "pry"
|
8
|
+
gem "standard", require: false
|
9
|
+
gem "fasterer", require: false
|
10
|
+
gem "activesupport", "~> 7.0.0"
|
11
|
+
|
12
|
+
gemspec path: "../"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "nokogiri"
|
6
|
+
gem "awesome_print", require: "ap"
|
7
|
+
gem "pry"
|
8
|
+
gem "standard", require: false
|
9
|
+
gem "fasterer", require: false
|
10
|
+
gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport", branch: "main"
|
11
|
+
|
12
|
+
gemspec path: "../"
|
data/lib/eve_online/esi/base.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "faraday"
|
4
|
-
require "faraday_middleware"
|
5
4
|
require "active_support/time"
|
5
|
+
require "active_support/core_ext/object/blank"
|
6
6
|
|
7
7
|
module EveOnline
|
8
8
|
module ESI
|
@@ -10,7 +10,7 @@ module EveOnline
|
|
10
10
|
API_HOST = "esi.evetech.net"
|
11
11
|
|
12
12
|
attr_reader :token, :_read_timeout, :_open_timeout, :_write_timeout,
|
13
|
-
:
|
13
|
+
:language, :adapter, :middlewares
|
14
14
|
|
15
15
|
attr_writer :token
|
16
16
|
|
@@ -19,7 +19,6 @@ module EveOnline
|
|
19
19
|
@_read_timeout = options.fetch(:read_timeout, 60)
|
20
20
|
@_open_timeout = options.fetch(:open_timeout, 60)
|
21
21
|
@_write_timeout = options.fetch(:write_timeout, 60)
|
22
|
-
@_etag = options.fetch(:etag, nil)
|
23
22
|
@language = options.fetch(:language, "en-us")
|
24
23
|
@adapter = options.fetch(:adapter, Faraday.default_adapter)
|
25
24
|
@middlewares = options.fetch(:middlewares, [])
|
@@ -65,14 +64,6 @@ module EveOnline
|
|
65
64
|
connection.options.write_timeout = value
|
66
65
|
end
|
67
66
|
|
68
|
-
def etag=(value)
|
69
|
-
@_etag = value
|
70
|
-
end
|
71
|
-
|
72
|
-
def etag
|
73
|
-
resource.headers["etag"]&.gsub("W/", "")&.gsub('"', "")
|
74
|
-
end
|
75
|
-
|
76
67
|
def page
|
77
68
|
end
|
78
69
|
|
@@ -99,19 +90,14 @@ module EveOnline
|
|
99
90
|
def connection
|
100
91
|
@connection ||= Faraday.new do |f|
|
101
92
|
f.headers["User-Agent"] = user_agent
|
102
|
-
f.headers["If-None-Match"] = _etag if _etag
|
103
93
|
f.headers["Accept"] = "application/json"
|
104
|
-
f.authorization
|
94
|
+
f.request :authorization, "Bearer", token if token
|
105
95
|
f.options.read_timeout = _read_timeout
|
106
96
|
f.options.open_timeout = _open_timeout
|
107
97
|
f.options.write_timeout = _write_timeout
|
108
98
|
f.use FaradayMiddlewares::RaiseErrors
|
109
99
|
middlewares.each do |middleware|
|
110
|
-
|
111
|
-
f.use middleware[:class], esi: middleware[:esi]
|
112
|
-
else
|
113
|
-
f.use middleware[:class]
|
114
|
-
end
|
100
|
+
f.use middleware[:class], esi: self
|
115
101
|
end
|
116
102
|
f.response :json, content_type: "application/json"
|
117
103
|
f.adapter adapter
|
@@ -154,20 +140,8 @@ module EveOnline
|
|
154
140
|
raise EveOnline::Exceptions::Timeout
|
155
141
|
end
|
156
142
|
|
157
|
-
def not_modified?
|
158
|
-
resource.status == 304
|
159
|
-
end
|
160
|
-
|
161
|
-
def content
|
162
|
-
if not_modified?
|
163
|
-
raise EveOnline::Exceptions::NotModified
|
164
|
-
else
|
165
|
-
resource.body
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
143
|
def response
|
170
|
-
@response ||=
|
144
|
+
@response ||= resource.body
|
171
145
|
end
|
172
146
|
|
173
147
|
private
|
data/lib/eve_online/version.rb
CHANGED
data/lib/eve_online.rb
CHANGED
@@ -13,7 +13,6 @@ require "eve_online/exceptions/internal_server_error"
|
|
13
13
|
require "eve_online/exceptions/bad_gateway"
|
14
14
|
require "eve_online/exceptions/service_unavailable"
|
15
15
|
require "eve_online/exceptions/no_content"
|
16
|
-
require "eve_online/exceptions/not_modified"
|
17
16
|
require "eve_online/exceptions/error_limited"
|
18
17
|
|
19
18
|
module EveOnline
|
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.44.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:
|
11
|
+
date: 2023-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,76 +108,34 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: mdl
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: appraisal
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
112
|
name: faraday
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
142
114
|
requirements:
|
143
115
|
- - ">="
|
144
116
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: faraday_middleware
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
117
|
+
version: 2.3.0
|
160
118
|
type: :runtime
|
161
119
|
prerelease: false
|
162
120
|
version_requirements: !ruby/object:Gem::Requirement
|
163
121
|
requirements:
|
164
122
|
- - ">="
|
165
123
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
124
|
+
version: 2.3.0
|
167
125
|
- !ruby/object:Gem::Dependency
|
168
126
|
name: activesupport
|
169
127
|
requirement: !ruby/object:Gem::Requirement
|
170
128
|
requirements:
|
171
129
|
- - ">="
|
172
130
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
131
|
+
version: 6.1.0
|
174
132
|
type: :runtime
|
175
133
|
prerelease: false
|
176
134
|
version_requirements: !ruby/object:Gem::Requirement
|
177
135
|
requirements:
|
178
136
|
- - ">="
|
179
137
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
138
|
+
version: 6.1.0
|
181
139
|
description: EveOnline ESI API.
|
182
140
|
email:
|
183
141
|
- igor.zubkov@gmail.com
|
@@ -185,17 +143,16 @@ executables: []
|
|
185
143
|
extensions: []
|
186
144
|
extra_rdoc_files: []
|
187
145
|
files:
|
188
|
-
- ".circleci/config.yml"
|
189
146
|
- ".deepsource.toml"
|
190
147
|
- ".fasterer.yml"
|
191
|
-
- ".github/FUNDING.yml"
|
192
148
|
- ".github/dependabot.yml"
|
149
|
+
- ".github/workflows/mdl.yml"
|
150
|
+
- ".github/workflows/rspec.yml"
|
193
151
|
- ".gitignore"
|
194
152
|
- ".mdlrc"
|
195
153
|
- ".rubocop.yml"
|
196
154
|
- ".ruby-version"
|
197
155
|
- ".standard.yml"
|
198
|
-
- Appraisals
|
199
156
|
- CHANGELOG.md
|
200
157
|
- Gemfile
|
201
158
|
- Gemfile.lock
|
@@ -203,6 +160,9 @@ files:
|
|
203
160
|
- README.md
|
204
161
|
- Rakefile
|
205
162
|
- eve_online.gemspec
|
163
|
+
- gemfiles/activesupport_6.1.gemfile
|
164
|
+
- gemfiles/activesupport_7.0.gemfile
|
165
|
+
- gemfiles/activesupport_main.gemfile
|
206
166
|
- lib/eve_online.rb
|
207
167
|
- lib/eve_online/esi/alliance.rb
|
208
168
|
- lib/eve_online/esi/alliance_corporations.rb
|
@@ -388,7 +348,6 @@ files:
|
|
388
348
|
- lib/eve_online/exceptions/forbidden.rb
|
389
349
|
- lib/eve_online/exceptions/internal_server_error.rb
|
390
350
|
- lib/eve_online/exceptions/no_content.rb
|
391
|
-
- lib/eve_online/exceptions/not_modified.rb
|
392
351
|
- lib/eve_online/exceptions/resource_not_found.rb
|
393
352
|
- lib/eve_online/exceptions/service_unavailable.rb
|
394
353
|
- lib/eve_online/exceptions/timeout.rb
|
@@ -400,9 +359,10 @@ homepage: https://github.com/evemonk/eve_online
|
|
400
359
|
licenses:
|
401
360
|
- MIT
|
402
361
|
metadata:
|
362
|
+
rubygems_mfa_required: 'true'
|
403
363
|
bug_tracker_uri: https://github.com/evemonk/eve_online/issues
|
404
|
-
changelog_uri: https://github.com/evemonk/eve_online/blob/
|
405
|
-
documentation_uri: https://github.com/evemonk/eve_online/blob/
|
364
|
+
changelog_uri: https://github.com/evemonk/eve_online/blob/main/CHANGELOG.md
|
365
|
+
documentation_uri: https://github.com/evemonk/eve_online/blob/main/README.md
|
406
366
|
homepage_uri: https://github.com/evemonk/eve_online
|
407
367
|
source_code_uri: https://github.com/evemonk/eve_online
|
408
368
|
post_install_message:
|
@@ -413,14 +373,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
413
373
|
requirements:
|
414
374
|
- - ">="
|
415
375
|
- !ruby/object:Gem::Version
|
416
|
-
version: '
|
376
|
+
version: '3.0'
|
417
377
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
418
378
|
requirements:
|
419
379
|
- - ">="
|
420
380
|
- !ruby/object:Gem::Version
|
421
381
|
version: '0'
|
422
382
|
requirements: []
|
423
|
-
rubygems_version: 3.
|
383
|
+
rubygems_version: 3.4.14
|
424
384
|
signing_key:
|
425
385
|
specification_version: 4
|
426
386
|
summary: EveOnline ESI API
|
data/.circleci/config.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
jobs:
|
4
|
-
ruby-2.6.8:
|
5
|
-
docker:
|
6
|
-
- image: circleci/ruby:2.6.8
|
7
|
-
steps:
|
8
|
-
- checkout
|
9
|
-
- run: rm Gemfile.lock
|
10
|
-
- run: rm .ruby-version
|
11
|
-
- run: bundle install
|
12
|
-
- run: bundle exec appraisal install || true
|
13
|
-
- run: bundle exec appraisal rake
|
14
|
-
- run: bundle exec standardrb
|
15
|
-
- run: bundle exec fasterer
|
16
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
17
|
-
ruby-2.7.4:
|
18
|
-
docker:
|
19
|
-
- image: circleci/ruby:2.7.4
|
20
|
-
steps:
|
21
|
-
- checkout
|
22
|
-
- run: rm Gemfile.lock
|
23
|
-
- run: rm .ruby-version
|
24
|
-
- run: bundle install
|
25
|
-
- run: bundle exec appraisal install || true
|
26
|
-
- run: bundle exec appraisal rake
|
27
|
-
- run: bundle exec standardrb
|
28
|
-
- run: bundle exec fasterer
|
29
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
30
|
-
ruby-3.0.2:
|
31
|
-
docker:
|
32
|
-
- image: circleci/ruby:3.0.2
|
33
|
-
steps:
|
34
|
-
- checkout
|
35
|
-
- run: rm Gemfile.lock
|
36
|
-
- run: rm .ruby-version
|
37
|
-
- run: bundle install
|
38
|
-
- run: bundle exec appraisal install || true
|
39
|
-
- run: bundle exec appraisal rake
|
40
|
-
- run: bundle exec standardrb
|
41
|
-
- run: bundle exec fasterer
|
42
|
-
- run: bundle exec mdl README.md CHANGELOG.md
|
43
|
-
|
44
|
-
workflows:
|
45
|
-
version: 2
|
46
|
-
tests:
|
47
|
-
jobs:
|
48
|
-
- ruby-2.6.8
|
49
|
-
- ruby-2.7.4
|
50
|
-
- ruby-3.0.2
|
data/.github/FUNDING.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
github: biow0lf
|
data/Appraisals
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
appraise "activesupport_52" do
|
4
|
-
gem "activesupport", "~> 5.2.0"
|
5
|
-
end
|
6
|
-
|
7
|
-
appraise "activesupport_60" do
|
8
|
-
gem "activesupport", "~> 6.0.0"
|
9
|
-
end
|
10
|
-
|
11
|
-
appraise "activesupport_61" do
|
12
|
-
gem "activesupport", "~> 6.1.0"
|
13
|
-
end
|
14
|
-
|
15
|
-
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new("2.7.0")
|
16
|
-
appraise "activesupport_edge" do
|
17
|
-
gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport", branch: "main"
|
18
|
-
end
|
19
|
-
end
|