eve_online 0.35.1 → 0.40.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9123bed8af1eec1b5acd826bc1bac8c1c97a55d10a97f7018758dd477690220
4
- data.tar.gz: 8c75adc4f6606db348bc3d0818669729c4ec3efbd52778635b04e49bd41a0c5d
3
+ metadata.gz: 9c8425edfba5f5350b3f78a80d6304bcd6f7f55c6efd706e03bb23a2ebba5b64
4
+ data.tar.gz: ca5da43f14db713471031d1dfb503404bed3c10b7cf4971bafe8c32914141e6a
5
5
  SHA512:
6
- metadata.gz: fc26ba8fbf1c1646ebfd6aaef1058da05e5de7aaa28fcc4c2f53e4d174fd1d22e8231d81d641132f5b799367f49b00c89dbaa90ef8c305e7da90c1abc0ee9819
7
- data.tar.gz: 19932dd1f755ae058a849c469eebdea52bc45d4e53b7ccd4e1b1db9cafc64116c30e0bbb3642b7a658c80f1eaf54e1b9895d181b8664905cb16bae988ad48ab4
6
+ metadata.gz: 7b8459d805017d112ae748e5e6a296e241720f6bd27736a42af74193ab272e7e9ee6dc9bb21a4cc73006d89fff7cb53b3ab0353b259b64d5609945bb9b0cb250
7
+ data.tar.gz: c56e731258f197a3f1facc6e40797207ecf873b75e529817bc9895aa672dfe658f6f5bcf94d2e2820173f245cb4d0129d930c6f2a035fd3bb27ea3e4bc799641
data/.circleci/config.yml CHANGED
@@ -1,18 +1,6 @@
1
1
  version: 2
2
2
 
3
3
  jobs:
4
- ruby-2.5.8:
5
- docker:
6
- - image: circleci/ruby:2.5.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 mdl README.md CHANGELOG.md TODO.md
16
4
  ruby-2.6.6:
17
5
  docker:
18
6
  - image: circleci/ruby:2.6.6
@@ -24,10 +12,11 @@ jobs:
24
12
  - run: bundle exec appraisal install || true
25
13
  - run: bundle exec appraisal rake
26
14
  - run: bundle exec standardrb
27
- - run: bundle exec mdl README.md CHANGELOG.md TODO.md
28
- ruby-2.7.1:
15
+ - run: bundle exec fasterer
16
+ - run: bundle exec mdl README.md CHANGELOG.md
17
+ ruby-2.7.2:
29
18
  docker:
30
- - image: circleci/ruby:2.7.1
19
+ - image: circleci/ruby:2.7.2
31
20
  steps:
32
21
  - checkout
33
22
  - run: rm Gemfile.lock
@@ -36,12 +25,11 @@ jobs:
36
25
  - run: bundle exec appraisal install || true
37
26
  - run: bundle exec appraisal rake
38
27
  - run: bundle exec standardrb
39
- - run: bundle exec mdl README.md CHANGELOG.md TODO.md
40
- jruby-9.2.11.1:
28
+ - run: bundle exec fasterer
29
+ - run: bundle exec mdl README.md CHANGELOG.md
30
+ ruby-3.0.0:
41
31
  docker:
42
- - image: circleci/jruby:9.2.11.1
43
- environment:
44
- JRUBY_OPTS: "--debug -J-Xmn1024m -J-Xms2048m -J-Xmx2048m"
32
+ - image: circleci/ruby:3.0.0
45
33
  steps:
46
34
  - checkout
47
35
  - run: rm Gemfile.lock
@@ -50,13 +38,13 @@ jobs:
50
38
  - run: bundle exec appraisal install || true
51
39
  - run: bundle exec appraisal rake
52
40
  - run: bundle exec standardrb
53
- - run: bundle exec mdl README.md CHANGELOG.md TODO.md
41
+ - run: bundle exec fasterer
42
+ - run: bundle exec mdl README.md CHANGELOG.md
54
43
 
55
44
  workflows:
56
45
  version: 2
57
46
  tests:
58
47
  jobs:
59
- - jruby-9.2.11.1
60
- - ruby-2.5.8
61
48
  - ruby-2.6.6
62
- - ruby-2.7.1
49
+ - ruby-2.7.2
50
+ - ruby-3.0.0
data/.fasterer.yml ADDED
@@ -0,0 +1,2 @@
1
+ speedups:
2
+ fetch_with_argument_vs_block: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 3.0.0
data/.standard.yml ADDED
@@ -0,0 +1,5 @@
1
+ ruby_version: 2.5.8
2
+
3
+ ignore:
4
+ - 'lib/eve_online/esi/base.rb':
5
+ - Lint/DuplicateBranch
data/Appraisals CHANGED
@@ -6,6 +6,12 @@ appraise "activesupport_60" do
6
6
  gem "activesupport", "~> 6.0.0"
7
7
  end
8
8
 
9
- appraise "activesupport_edge" do
10
- gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport"
9
+ appraise "activesupport_61" do
10
+ gem "activesupport", "~> 6.1.0"
11
+ end
12
+
13
+ if Gem::Version.new(RUBY_VERSION) > Gem::Version.new("2.7.0")
14
+ appraise "activesupport_edge" do
15
+ gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport", branch: "main"
16
+ end
11
17
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.40.0
4
+
5
+ * Add `EveOnline::Formulas::TrainingRate`
6
+
7
+ ## v0.39.0
8
+
9
+ * Sync with new ESI
10
+ * Add "Accept" header back
11
+
12
+ ## 0.38.0
13
+
14
+ * Replace `net/http` with `faraday`
15
+ * Drop Ruby 2.5 support
16
+
17
+ ## v0.37.0
18
+
19
+ * Use autoload for class loading
20
+ * Rails 6.1
21
+ * Ruby 3.0
22
+ * Remove `mutant` stuff
23
+
24
+ ## v0.36.0
25
+
26
+ * Drop JRuby support
27
+ * Add `EveOnline::ESI::CorporationMembers`
28
+
3
29
  ## v0.35.1
4
30
 
5
31
  * Rename `EveOnline::ESI::Models::PublicContract#type` to `#kind`. Fix Rails STI.
data/Gemfile.lock CHANGED
@@ -1,123 +1,145 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eve_online (0.35.1)
4
+ eve_online (0.40.0)
5
5
  activesupport (>= 5.2.0)
6
+ faraday
7
+ faraday_middleware
6
8
 
7
9
  GEM
8
10
  remote: https://rubygems.org/
9
11
  specs:
10
- activesupport (6.0.3.2)
12
+ activesupport (6.1.3)
11
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 0.7, < 2)
13
- minitest (~> 5.1)
14
- tzinfo (~> 1.1)
15
- zeitwerk (~> 2.2, >= 2.2.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
16
18
  addressable (2.7.0)
17
19
  public_suffix (>= 2.0.2, < 5.0)
18
- appraisal (2.3.0)
20
+ appraisal (2.4.0)
19
21
  bundler
20
22
  rake
21
23
  thor (>= 0.14.0)
22
- ast (2.4.1)
23
- awesome_print (1.8.0)
24
+ ast (2.4.2)
25
+ awesome_print (1.9.2)
26
+ chef-utils (16.11.7)
24
27
  coderay (1.1.3)
25
28
  colorize (0.8.1)
26
- concurrent-ruby (1.1.6)
27
- crack (0.4.3)
28
- safe_yaml (~> 1.0.0)
29
- diff-lcs (1.3)
30
- docile (1.3.2)
31
- fasterer (0.8.3)
29
+ concurrent-ruby (1.1.8)
30
+ crack (0.4.5)
31
+ rexml
32
+ diff-lcs (1.4.4)
33
+ docile (1.3.5)
34
+ faraday (1.3.0)
35
+ faraday-net_http (~> 1.0)
36
+ multipart-post (>= 1.2, < 3)
37
+ ruby2_keywords
38
+ faraday-net_http (1.0.1)
39
+ faraday_middleware (1.0.0)
40
+ faraday (~> 1.0)
41
+ fasterer (0.9.0)
32
42
  colorize (~> 0.7)
33
43
  ruby_parser (>= 3.14.1)
34
44
  hashdiff (1.0.1)
35
- i18n (1.8.3)
45
+ i18n (1.8.9)
36
46
  concurrent-ruby (~> 1.0)
37
- kramdown (2.2.1)
47
+ kramdown (2.3.1)
38
48
  rexml
39
49
  kramdown-parser-gfm (1.1.0)
40
50
  kramdown (~> 2.0)
41
- mdl (0.9.0)
42
- kramdown (~> 2.0)
43
- kramdown-parser-gfm (~> 1.0)
51
+ mdl (0.11.0)
52
+ kramdown (~> 2.3)
53
+ kramdown-parser-gfm (~> 1.1)
44
54
  mixlib-cli (~> 2.1, >= 2.1.1)
45
55
  mixlib-config (>= 2.2.1, < 4)
56
+ mixlib-shellout
46
57
  method_source (1.0.0)
47
- mini_portile2 (2.4.0)
48
- minitest (5.14.1)
49
- mixlib-cli (2.1.6)
50
- mixlib-config (3.0.6)
58
+ mini_portile2 (2.5.0)
59
+ minitest (5.14.4)
60
+ mixlib-cli (2.1.8)
61
+ mixlib-config (3.0.9)
51
62
  tomlrb
52
- nokogiri (1.10.9)
53
- mini_portile2 (~> 2.4.0)
54
- parallel (1.19.2)
55
- parser (2.7.1.4)
63
+ mixlib-shellout (3.2.5)
64
+ chef-utils
65
+ multipart-post (2.1.1)
66
+ nokogiri (1.11.2)
67
+ mini_portile2 (~> 2.5.0)
68
+ racc (~> 1.4)
69
+ nokogiri (1.11.2-x86_64-darwin)
70
+ racc (~> 1.4)
71
+ parallel (1.20.1)
72
+ parser (3.0.0.0)
56
73
  ast (~> 2.4.1)
57
- pry (0.13.1)
74
+ pry (0.14.0)
58
75
  coderay (~> 1.1)
59
76
  method_source (~> 1.0)
60
- public_suffix (4.0.5)
77
+ public_suffix (4.0.6)
78
+ racc (1.5.2)
61
79
  rainbow (3.0.0)
62
- rake (13.0.1)
63
- regexp_parser (1.7.1)
80
+ rake (13.0.3)
81
+ regexp_parser (2.1.1)
64
82
  rexml (3.2.4)
65
- rspec (3.9.0)
66
- rspec-core (~> 3.9.0)
67
- rspec-expectations (~> 3.9.0)
68
- rspec-mocks (~> 3.9.0)
69
- rspec-core (3.9.2)
70
- rspec-support (~> 3.9.3)
71
- rspec-expectations (3.9.2)
83
+ rspec (3.10.0)
84
+ rspec-core (~> 3.10.0)
85
+ rspec-expectations (~> 3.10.0)
86
+ rspec-mocks (~> 3.10.0)
87
+ rspec-core (3.10.1)
88
+ rspec-support (~> 3.10.0)
89
+ rspec-expectations (3.10.1)
72
90
  diff-lcs (>= 1.2.0, < 2.0)
73
- rspec-support (~> 3.9.0)
91
+ rspec-support (~> 3.10.0)
74
92
  rspec-its (1.3.0)
75
93
  rspec-core (>= 3.0.0)
76
94
  rspec-expectations (>= 3.0.0)
77
- rspec-mocks (3.9.1)
95
+ rspec-mocks (3.10.2)
78
96
  diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.9.0)
80
- rspec-support (3.9.3)
81
- rubocop (0.85.1)
97
+ rspec-support (~> 3.10.0)
98
+ rspec-support (3.10.2)
99
+ rubocop (1.11.0)
82
100
  parallel (~> 1.10)
83
- parser (>= 2.7.0.1)
101
+ parser (>= 3.0.0.0)
84
102
  rainbow (>= 2.2.2, < 4.0)
85
- regexp_parser (>= 1.7)
103
+ regexp_parser (>= 1.8, < 3.0)
86
104
  rexml
87
- rubocop-ast (>= 0.0.3)
105
+ rubocop-ast (>= 1.2.0, < 2.0)
88
106
  ruby-progressbar (~> 1.7)
89
- unicode-display_width (>= 1.4.0, < 2.0)
90
- rubocop-ast (0.0.3)
91
- parser (>= 2.7.0.1)
92
- rubocop-performance (1.6.1)
93
- rubocop (>= 0.71.0)
94
- ruby-progressbar (1.10.1)
95
- ruby_parser (3.14.2)
107
+ unicode-display_width (>= 1.4.0, < 3.0)
108
+ rubocop-ast (1.4.1)
109
+ parser (>= 2.7.1.5)
110
+ rubocop-performance (1.10.1)
111
+ rubocop (>= 0.90.0, < 2.0)
112
+ rubocop-ast (>= 0.4.0)
113
+ ruby-progressbar (1.11.0)
114
+ ruby2_keywords (0.0.4)
115
+ ruby_parser (3.15.1)
96
116
  sexp_processor (~> 4.9)
97
- safe_yaml (1.0.5)
98
- sexp_processor (4.15.0)
99
- simplecov (0.18.5)
117
+ sexp_processor (4.15.2)
118
+ simplecov (0.21.2)
100
119
  docile (~> 1.1)
101
120
  simplecov-html (~> 0.11)
102
- simplecov-html (0.12.2)
103
- standard (0.4.7)
104
- rubocop (~> 0.85.0)
105
- rubocop-performance (~> 1.6.0)
106
- thor (1.0.1)
107
- thread_safe (0.3.6)
108
- tomlrb (1.3.0)
109
- tzinfo (1.2.7)
110
- thread_safe (~> 0.1)
111
- unicode-display_width (1.7.0)
121
+ simplecov_json_formatter (~> 0.1)
122
+ simplecov-html (0.12.3)
123
+ simplecov_json_formatter (0.1.2)
124
+ standard (1.0.4)
125
+ rubocop (= 1.11.0)
126
+ rubocop-performance (= 1.10.1)
127
+ thor (1.1.0)
128
+ tomlrb (2.0.1)
129
+ tzinfo (2.0.4)
130
+ concurrent-ruby (~> 1.0)
131
+ unicode-display_width (2.0.0)
112
132
  vcr (6.0.0)
113
- webmock (3.8.3)
133
+ webmock (3.12.1)
114
134
  addressable (>= 2.3.6)
115
135
  crack (>= 0.3.2)
116
136
  hashdiff (>= 0.4.0, < 2.0.0)
117
- zeitwerk (2.3.0)
137
+ zeitwerk (2.4.2)
118
138
 
119
139
  PLATFORMS
120
140
  ruby
141
+ x86_64-darwin-19
142
+ x86_64-darwin-20
121
143
 
122
144
  DEPENDENCIES
123
145
  appraisal
@@ -137,4 +159,4 @@ DEPENDENCIES
137
159
  webmock
138
160
 
139
161
  BUNDLED WITH
140
- 2.1.4
162
+ 2.2.15
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 Igor Zubkov
3
+ Copyright (c) 2015-2021 Igor Zubkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![Known Vulnerabilities](https://snyk.io/test/github/evemonk/eve_online/badge.svg)](https://snyk.io/test/github/evemonk/eve_online)
7
7
  [![security](https://hakiri.io/github/evemonk/eve_online/master.svg)](https://hakiri.io/github/evemonk/eve_online/master)
8
8
  [![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/evemonk/eve_online/?ref=repository-badge)
9
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
9
10
 
10
11
  This gem implement Ruby API for EveOnline MMORPG (ESI).
11
12
 
@@ -49,15 +50,15 @@ gem install eve_online
49
50
 
50
51
  ## Supported ruby versions
51
52
 
52
- * MRI 2.5
53
53
  * MRI 2.6
54
54
  * MRI 2.7
55
- * JRuby 9.2.11.1
55
+ * MRI 3.0
56
56
 
57
57
  ## Supported rails versions
58
58
 
59
59
  * 5.2
60
60
  * 6.0
61
+ * 6.1
61
62
  * Edge
62
63
 
63
64
  ## Usage examples
@@ -131,13 +132,13 @@ alliance_icon = EveOnline::ESI::AllianceIcon.new(options)
131
132
 
132
133
  alliance_icon.scope # => nil
133
134
 
134
- alliance_icon.as_json # => {:icon_medium=>"http://image.eveonline.com/Alliance/99005443_128.png",
135
- # :icon_small=>"http://image.eveonline.com/Alliance/99005443_64.png"}
135
+ alliance_icon.as_json # => {:icon_medium=>"https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=128",
136
+ # :icon_small=>"https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=64"}
136
137
 
137
- alliance_icon.icon_medium # => "http://image.eveonline.com/Alliance/99005443_128.png"
138
- alliance_icon.icon_small # => "http://image.eveonline.com/Alliance/99005443_64.png"
138
+ alliance_icon.icon_medium # => "https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=128"
139
+ alliance_icon.icon_small # => "https://images.evetech.net/alliances/99005443/logo?tenant=tranquility&size=64"
139
140
 
140
- alliance_icon.etag # => "e3f6a76b4a1287f54966c6253f8f5d6ac6460bc43d47570331b43e0b"
141
+ alliance_icon.etag # => "d067edb53a9019e0e05d99a2b1e7c7745433a982dda16667a14bff49"
141
142
  ```
142
143
 
143
144
  ### Assets
@@ -990,6 +991,20 @@ corporation_blueprints.roles # => ["Director"]
990
991
 
991
992
  #### Get corporation members
992
993
 
994
+ ```ruby
995
+ options = { token: 'token123', corporation_id: 98565696 }
996
+
997
+ corporation_members = EveOnline::ESI::CorporationMembers.new(options)
998
+
999
+ corporation_members.scope # => "esi-corporations.read_corporation_membership.v1"
1000
+
1001
+ corporation_members.character_ids.size # => 118
1002
+
1003
+ corporation_members.character_ids.first # => 2114220544
1004
+
1005
+ corporation_members.etag # => "6094aeb7f2c2754a7d1f210eed73f1f858042330852fac847a477a59"
1006
+ ```
1007
+
993
1008
  #### Get corporation member limit
994
1009
 
995
1010
  #### Get corporation's members' titles
@@ -3073,18 +3088,17 @@ List of exceptions:
3073
3088
 
3074
3089
  ## Timeouts
3075
3090
 
3076
- `eve_online` gem uses `net/http` for network request. `net/http` configured with:
3091
+ `eve_online` gem uses `faraday` for network request. `faraday` configured with:
3077
3092
 
3078
3093
  ```ruby
3079
- http = Net::HTTP.new
3080
-
3081
- http.read_timeout = 60
3082
- http.open_timeout = 60
3083
- # if ruby >= 2.6.0
3084
- 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
3085
3099
  ```
3086
3100
 
3087
- You can configure default timeouts with adding `read_timeout:` and `open_timeout:` (and `write_timeout` for ruby >= 2.6.0) to default hash with options:
3101
+ You can configure default timeouts with adding `read_timeout:`, `open_timeout:` and `write_timeout:` to default hash with options:
3088
3102
 
3089
3103
  ```ruby
3090
3104
  options = { read_timeout: 120, open_timeout: 120, write_timeout: 120 } # 120 seconds
@@ -3105,7 +3119,6 @@ races.read_timeout # => 60
3105
3119
  races.read_timeout = 120
3106
3120
  races.read_timeout # => 120
3107
3121
 
3108
- # if ruby >= 2.6.0
3109
3122
  races.write_timeout # => 60
3110
3123
  races.write_timeout = 120
3111
3124
  races.write_timeout # => 120
@@ -3153,6 +3166,20 @@ formula = EveOnline::Formulas::BlueprintCopyTime.new(seconds, science_level,
3153
3166
  formula.time # => 174.6
3154
3167
  ```
3155
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
+
3156
3183
  ## Useful links
3157
3184
 
3158
3185
  * [BREAKING CHANGES AND YOU - HOW TO USE ALT-ROUTES TO ENHANCE YOUR SANITY](https://developers.eveonline.com/blog/article/breaking-changes-and-you)