eve_online 0.33.0 → 0.37.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: 8ffdc2d320b2e622d1ef6854427ea8cf1766caf92728b650cf883743ad48f3fc
4
- data.tar.gz: 351019ab095b9a5bf5501d27334c96bd7c13e39411c97627118059c5d79d2af9
3
+ metadata.gz: 9e998f90749dcdced3769f6c1f18381a04e149edc75e80862030676c627afa1c
4
+ data.tar.gz: d69199f1b3b6b4f61ef96d8c855fddac2945f66473a81a491a8062cec42fc8a6
5
5
  SHA512:
6
- metadata.gz: 81a63fb458887869b4db9e0e4c66573e8dfe769dab3602ba50733252a1d82212338cd7ac8134b9d9d0aec9406a0a4afbfbc3426786c98df6445da06c91b002e7
7
- data.tar.gz: 5e9fd5089f51b4360cd8e73679d69e3e3034b4e2310a7d410e3ee325540298855672b6d905fcbcf9b49f33c3c3a662f68c06213f723cf16183457596a15b28d4
6
+ metadata.gz: bfd50eaa259cb38e867dc6c8c8137c96a1b508f4f6266b632a2706ae1fd0cc27f5dd6aca6048ea5e8bef567ff0b5695ad6e9fa9ff470b00a04198e8befbdf5e0
7
+ data.tar.gz: aa11991f6aca34e0ccd6d53108821b181cbfb171c9559f9c73ab4d883f1ed5df623a748aadf0aa08accfa38991e058ec968ec063791af408fcd8bff96911e991
@@ -12,6 +12,7 @@ jobs:
12
12
  - run: bundle exec appraisal install || true
13
13
  - run: bundle exec appraisal rake
14
14
  - run: bundle exec standardrb
15
+ # - run: bundle exec fasterer
15
16
  - run: bundle exec mdl README.md CHANGELOG.md TODO.md
16
17
  ruby-2.6.6:
17
18
  docker:
@@ -24,10 +25,11 @@ jobs:
24
25
  - run: bundle exec appraisal install || true
25
26
  - run: bundle exec appraisal rake
26
27
  - run: bundle exec standardrb
28
+ # - run: bundle exec fasterer
27
29
  - run: bundle exec mdl README.md CHANGELOG.md TODO.md
28
- ruby-2.7.1:
30
+ ruby-2.7.2:
29
31
  docker:
30
- - image: circleci/ruby:2.7.1
32
+ - image: circleci/ruby:2.7.2
31
33
  steps:
32
34
  - checkout
33
35
  - run: rm Gemfile.lock
@@ -36,12 +38,11 @@ jobs:
36
38
  - run: bundle exec appraisal install || true
37
39
  - run: bundle exec appraisal rake
38
40
  - run: bundle exec standardrb
41
+ # - run: bundle exec fasterer
39
42
  - run: bundle exec mdl README.md CHANGELOG.md TODO.md
40
- jruby-9.2.11.1:
43
+ ruby-3.0.0:
41
44
  docker:
42
- - image: circleci/jruby:9.2.11.1
43
- environment:
44
- JRUBY_OPTS: "--debug -J-Xmn1024m -J-Xms2048m -J-Xmx2048m"
45
+ - image: circleci/ruby:3.0.0
45
46
  steps:
46
47
  - checkout
47
48
  - run: rm Gemfile.lock
@@ -50,13 +51,14 @@ jobs:
50
51
  - run: bundle exec appraisal install || true
51
52
  - run: bundle exec appraisal rake
52
53
  - run: bundle exec standardrb
54
+ # - run: bundle exec fasterer
53
55
  - run: bundle exec mdl README.md CHANGELOG.md TODO.md
54
56
 
55
57
  workflows:
56
58
  version: 2
57
59
  tests:
58
60
  jobs:
59
- - jruby-9.2.11.1
60
61
  - ruby-2.5.8
61
62
  - ruby-2.6.6
62
- - ruby-2.7.1
63
+ - ruby-2.7.2
64
+ - ruby-3.0.0
@@ -0,0 +1,5 @@
1
+ version = 1
2
+
3
+ [[analyzers]]
4
+ name = "ruby"
5
+ enabled = true
@@ -1 +1 @@
1
- 2.7.1
1
+ 3.0.0
@@ -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,10 @@ appraise "activesupport_60" do
6
6
  gem "activesupport", "~> 6.0.0"
7
7
  end
8
8
 
9
+ appraise "activesupport_61" do
10
+ gem "activesupport", "~> 6.1.0"
11
+ end
12
+
9
13
  appraise "activesupport_edge" do
10
14
  gem "activesupport", git: "https://github.com/rails/rails", require: "activesupport"
11
15
  end
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.37.0
4
+
5
+ * Use autoload for class loading
6
+ * Rails 6.1
7
+ * Ruby 3.0
8
+ * Remove `mutant` stuff
9
+
10
+ ## v0.36.0
11
+
12
+ * Drop JRuby support
13
+ * Add `EveOnline::ESI::CorporationMembers`
14
+
15
+ ## v0.35.1
16
+
17
+ * Rename `EveOnline::ESI::Models::PublicContract#type` to `#kind`. Fix Rails STI.
18
+
19
+ ## v0.35.0
20
+
21
+ * Add `EveOnline::ESI::PublicContracts`
22
+ * Add `EveOnline::ESI::Models::PublicContract`
23
+ * Add `EveOnline::ESI::Models::PublicContractItem`
24
+ * Add `EveOnline::ESI::PublicContract`
25
+
26
+ ## v0.34.0
27
+
28
+ * Rename `EveOnline::ESI::Models::Race#alliance_id` to `#faction_id`. [Fix esi issue 812](https://github.com/esi/esi-issues/issues/812).
29
+
3
30
  ## v0.33.0
4
31
 
5
32
  * Sync with new ESI API
data/Gemfile CHANGED
@@ -9,4 +9,4 @@ gem "nokogiri"
9
9
  gem "awesome_print", require: "ap"
10
10
  gem "pry"
11
11
  gem "standard", require: false
12
- gem "fasterer", require: false
12
+ # gem "fasterer", require: false
@@ -1,127 +1,132 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eve_online (0.33.0)
5
- activesupport (>= 4.2.0)
4
+ eve_online (0.37.0)
5
+ activesupport (>= 5.2.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.0.3)
10
+ activesupport (6.1.0)
11
11
  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)
12
+ i18n (>= 1.6, < 2)
13
+ minitest (>= 5.1)
14
+ tzinfo (~> 2.0)
15
+ zeitwerk (~> 2.3)
16
16
  addressable (2.7.0)
17
17
  public_suffix (>= 2.0.2, < 5.0)
18
- appraisal (2.2.0)
18
+ appraisal (2.3.0)
19
19
  bundler
20
20
  rake
21
21
  thor (>= 0.14.0)
22
- ast (2.4.0)
22
+ ast (2.4.1)
23
23
  awesome_print (1.8.0)
24
- coderay (1.1.2)
25
- 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)
32
- colorize (~> 0.7)
33
- ruby_parser (>= 3.14.1)
24
+ chef-utils (16.8.14)
25
+ coderay (1.1.3)
26
+ concurrent-ruby (1.1.7)
27
+ crack (0.4.5)
28
+ rexml
29
+ diff-lcs (1.4.4)
30
+ docile (1.3.4)
34
31
  hashdiff (1.0.1)
35
- i18n (1.8.2)
32
+ i18n (1.8.7)
36
33
  concurrent-ruby (~> 1.0)
37
- jaro_winkler (1.5.4)
38
- kramdown (2.2.1)
34
+ kramdown (2.3.0)
39
35
  rexml
40
36
  kramdown-parser-gfm (1.1.0)
41
37
  kramdown (~> 2.0)
42
- mdl (0.9.0)
43
- kramdown (~> 2.0)
44
- kramdown-parser-gfm (~> 1.0)
38
+ mdl (0.11.0)
39
+ kramdown (~> 2.3)
40
+ kramdown-parser-gfm (~> 1.1)
45
41
  mixlib-cli (~> 2.1, >= 2.1.1)
46
42
  mixlib-config (>= 2.2.1, < 4)
43
+ mixlib-shellout
47
44
  method_source (1.0.0)
48
- mini_portile2 (2.4.0)
49
- minitest (5.14.0)
50
- mixlib-cli (2.1.6)
51
- mixlib-config (3.0.6)
45
+ mini_portile2 (2.5.0)
46
+ minitest (5.14.2)
47
+ mixlib-cli (2.1.8)
48
+ mixlib-config (3.0.9)
52
49
  tomlrb
53
- nokogiri (1.10.9)
54
- mini_portile2 (~> 2.4.0)
55
- parallel (1.19.1)
56
- parser (2.7.1.2)
57
- ast (~> 2.4.0)
50
+ mixlib-shellout (3.2.2)
51
+ chef-utils
52
+ nokogiri (1.11.0)
53
+ mini_portile2 (~> 2.5.0)
54
+ racc (~> 1.4)
55
+ nokogiri (1.11.0-x86_64-darwin)
56
+ racc (~> 1.4)
57
+ parallel (1.20.1)
58
+ parser (3.0.0.0)
59
+ ast (~> 2.4.1)
58
60
  pry (0.13.1)
59
61
  coderay (~> 1.1)
60
62
  method_source (~> 1.0)
61
- public_suffix (4.0.4)
63
+ public_suffix (4.0.6)
64
+ racc (1.5.2)
62
65
  rainbow (3.0.0)
63
- rake (13.0.1)
66
+ rake (13.0.3)
67
+ regexp_parser (2.0.3)
64
68
  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.1)
69
+ rspec (3.10.0)
70
+ rspec-core (~> 3.10.0)
71
+ rspec-expectations (~> 3.10.0)
72
+ rspec-mocks (~> 3.10.0)
73
+ rspec-core (3.10.1)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-expectations (3.10.1)
72
76
  diff-lcs (>= 1.2.0, < 2.0)
73
- rspec-support (~> 3.9.0)
77
+ rspec-support (~> 3.10.0)
74
78
  rspec-its (1.3.0)
75
79
  rspec-core (>= 3.0.0)
76
80
  rspec-expectations (>= 3.0.0)
77
- rspec-mocks (3.9.1)
81
+ rspec-mocks (3.10.1)
78
82
  diff-lcs (>= 1.2.0, < 2.0)
79
- rspec-support (~> 3.9.0)
80
- rspec-support (3.9.3)
81
- rubocop (0.82.0)
82
- jaro_winkler (~> 1.5.1)
83
+ rspec-support (~> 3.10.0)
84
+ rspec-support (3.10.1)
85
+ rubocop (1.4.2)
83
86
  parallel (~> 1.10)
84
- parser (>= 2.7.0.1)
87
+ parser (>= 2.7.1.5)
85
88
  rainbow (>= 2.2.2, < 4.0)
89
+ regexp_parser (>= 1.8)
86
90
  rexml
91
+ rubocop-ast (>= 1.1.1)
87
92
  ruby-progressbar (~> 1.7)
88
93
  unicode-display_width (>= 1.4.0, < 2.0)
89
- rubocop-performance (1.5.2)
90
- rubocop (>= 0.71.0)
91
- ruby-progressbar (1.10.1)
92
- ruby_parser (3.14.2)
93
- sexp_processor (~> 4.9)
94
- safe_yaml (1.0.5)
95
- sexp_processor (4.14.1)
96
- simplecov (0.18.5)
94
+ rubocop-ast (1.4.0)
95
+ parser (>= 2.7.1.5)
96
+ rubocop-performance (1.9.1)
97
+ rubocop (>= 0.90.0, < 2.0)
98
+ rubocop-ast (>= 0.4.0)
99
+ ruby-progressbar (1.11.0)
100
+ simplecov (0.21.0)
97
101
  docile (~> 1.1)
98
102
  simplecov-html (~> 0.11)
99
- simplecov-html (0.12.2)
100
- standard (0.3.0)
101
- rubocop (~> 0.82.0)
102
- rubocop-performance (~> 1.5.2)
103
+ simplecov_json_formatter (~> 0.1)
104
+ simplecov-html (0.12.3)
105
+ simplecov_json_formatter (0.1.2)
106
+ standard (0.10.2)
107
+ rubocop (= 1.4.2)
108
+ rubocop-performance (= 1.9.1)
103
109
  thor (1.0.1)
104
- thread_safe (0.3.6)
105
- tomlrb (1.3.0)
106
- tzinfo (1.2.7)
107
- thread_safe (~> 0.1)
110
+ tomlrb (2.0.1)
111
+ tzinfo (2.0.4)
112
+ concurrent-ruby (~> 1.0)
108
113
  unicode-display_width (1.7.0)
109
- vcr (5.1.0)
110
- webmock (3.8.3)
114
+ vcr (6.0.0)
115
+ webmock (3.11.0)
111
116
  addressable (>= 2.3.6)
112
117
  crack (>= 0.3.2)
113
118
  hashdiff (>= 0.4.0, < 2.0.0)
114
- zeitwerk (2.3.0)
119
+ zeitwerk (2.4.2)
115
120
 
116
121
  PLATFORMS
117
122
  ruby
123
+ x86_64-darwin-19
118
124
 
119
125
  DEPENDENCIES
120
126
  appraisal
121
127
  awesome_print
122
128
  bundler
123
129
  eve_online!
124
- fasterer
125
130
  mdl
126
131
  nokogiri
127
132
  pry
@@ -134,4 +139,4 @@ DEPENDENCIES
134
139
  webmock
135
140
 
136
141
  BUNDLED WITH
137
- 2.1.4
142
+ 2.2.3
@@ -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
@@ -3,8 +3,10 @@
3
3
  [![CircleCI](https://circleci.com/gh/evemonk/eve_online.svg?style=svg)](https://circleci.com/gh/evemonk/eve_online)
4
4
  [![Gem Version](https://badge.fury.io/rb/eve_online.svg)](https://badge.fury.io/rb/eve_online)
5
5
  [![Gem Downloads](https://img.shields.io/gem/dt/eve_online.svg)](https://rubygems.org/gems/eve_online)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/955073c905b91d53e68c/test_coverage)](https://codeclimate.com/github/evemonk/eve_online/test_coverage)
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
+ [![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)
8
10
 
9
11
  This gem implement Ruby API for EveOnline MMORPG (ESI).
10
12
 
@@ -51,12 +53,13 @@ gem install eve_online
51
53
  * MRI 2.5
52
54
  * MRI 2.6
53
55
  * MRI 2.7
54
- * JRuby 9.2.11.1
56
+ * MRI 3.0
55
57
 
56
58
  ## Supported rails versions
57
59
 
58
60
  * 5.2
59
61
  * 6.0
62
+ * 6.1
60
63
  * Edge
61
64
 
62
65
  ## Usage examples
@@ -763,8 +766,98 @@ contracts.etag # => "6e18566a8f786f08aba678262360d0c74a783f9923aa43f8043133e4"
763
766
 
764
767
  #### Get public contracts
765
768
 
769
+ ```ruby
770
+ options = { region_id: 10_000_043, page: 1 }
771
+
772
+ contracts = EveOnline::ESI::PublicContracts.new(options)
773
+
774
+ contracts.scope # => nil
775
+
776
+ contracts.page # => 1
777
+
778
+ contracts.total_pages # => 4
779
+
780
+ contracts.contracts.size # => 1000
781
+
782
+ contract = contracts.contracts.first
783
+
784
+ contract.as_json # => {:buyout=>nil,
785
+ # :collateral=>0.0,
786
+ # :contract_id=>157834735,
787
+ # :date_expired=>Wed, 17 Jun 2020 21:36:41 UTC +00:00,
788
+ # :date_issued=>Wed, 20 May 2020 21:36:41 UTC +00:00,
789
+ # :days_to_complete=>0,
790
+ # :end_location_id=>60008494,
791
+ # :for_corporation=>true,
792
+ # :issuer_corporation_id=>897372069,
793
+ # :issuer_id=>1314102096,
794
+ # :price=>1250000000.0,
795
+ # :reward=>0.0,
796
+ # :start_location_id=>60008494,
797
+ # :title=>"Apostle Me10/Te16 Complete Bpc 10 Pack",
798
+ # :kind=>"item_exchange",
799
+ # :volume=>100.0}
800
+
801
+ contract.buyout # => nil
802
+ contract.collateral # => 0.0
803
+ contract.contract_id # => 157834735
804
+ contract.date_expired # => Wed, 17 Jun 2020 21:36:41 UTC +00:00
805
+ contract.date_issued # => Wed, 20 May 2020 21:36:41 UTC +00:00
806
+ contract.days_to_complete # => 0
807
+ contract.end_location_id # => 60008494
808
+ contract.for_corporation # => true
809
+ contract.issuer_corporation_id # => 897372069
810
+ contract.issuer_id # => 1314102096
811
+ contract.price # => 1250000000.0
812
+ contract.reward # => 0.0
813
+ contract.start_location_id # => 60008494
814
+ contract.title # => "Apostle Me10/Te16 Complete Bpc 10 Pack"
815
+ contract.kind # => "item_exchange"
816
+ contract.volume # => 100.0
817
+
818
+ contracts.etag # => "3f7fdf9a69e35bb35d619b6cb5043a2766d11ca6306a8b5af369ce6e"
819
+ ```
820
+
766
821
  #### Get public contract bids
767
822
 
823
+ ```ruby
824
+ options = { contract_id: 157_872_948, page: 1 }
825
+
826
+ contract = EveOnline::ESI::PublicContract.new(options)
827
+
828
+ contract.scope # => nil
829
+
830
+ contract.page # => 1
831
+
832
+ contract.total_pages # => 1
833
+
834
+ contract.items.size # => 1
835
+
836
+ item = contract.items.first
837
+
838
+ item.as_json # => {:is_blueprint_copy=>true,
839
+ # :is_included=>true,
840
+ # :item_id=>1029552558074,
841
+ # :material_efficiency=>10,
842
+ # :quantity=>1,
843
+ # :record_id=>3210378611,
844
+ # :runs=>400,
845
+ # :time_efficiency=>20,
846
+ # :type_id=>29040}
847
+
848
+ item.is_blueprint_copy # => true
849
+ item.is_included # => true
850
+ item.item_id # => 1029552558074
851
+ item.material_efficiency # => 10
852
+ item.quantity # => 1
853
+ item.record_id # => 3210378611
854
+ item.runs # => 400
855
+ item.time_efficiency # => 20
856
+ item.type_id # => 29040
857
+
858
+ contract.etag # => "d458c3f56c114882a9ecfe1aaf173837310b15b6e7cef86a019e700f"
859
+ ```
860
+
768
861
  #### Get public contract items
769
862
 
770
863
  #### Get corporation contracts
@@ -899,6 +992,20 @@ corporation_blueprints.roles # => ["Director"]
899
992
 
900
993
  #### Get corporation members
901
994
 
995
+ ```ruby
996
+ options = { token: 'token123', corporation_id: 98565696 }
997
+
998
+ corporation_members = EveOnline::ESI::CorporationMembers.new(options)
999
+
1000
+ corporation_members.scope # => "esi-corporations.read_corporation_membership.v1"
1001
+
1002
+ corporation_members.character_ids.size # => 118
1003
+
1004
+ corporation_members.character_ids.first # => 2114220544
1005
+
1006
+ corporation_members.etag # => "6094aeb7f2c2754a7d1f210eed73f1f858042330852fac847a477a59"
1007
+ ```
1008
+
902
1009
  #### Get corporation member limit
903
1010
 
904
1011
  #### Get corporation's members' titles
@@ -2298,12 +2405,12 @@ races.races.size # => 4
2298
2405
 
2299
2406
  race = races.races.first
2300
2407
 
2301
- race.as_json # => {:alliance_id=>500002,
2408
+ race.as_json # => {:faction_id=>500002,
2302
2409
  # :description=>"Once a thriving tribal civilization, the Minmatar...",
2303
2410
  # :name=>"Minmatar",
2304
2411
  # :race_id=>2}
2305
2412
 
2306
- race.alliance_id # => 500002
2413
+ race.faction_id # => 500002
2307
2414
  race.description # => "Once a thriving tribal civilization, the Minmatar..."
2308
2415
  race.name # => "Minmatar"
2309
2416
  race.race_id # => 2