eve_app 0.1.22 → 0.1.27

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.
Files changed (63) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +9 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +15 -0
  5. data/Gemfile +14 -0
  6. data/Gemfile.lock +167 -0
  7. data/app/models/eve_app/region.rb +4 -0
  8. data/app/models/eve_app/solar_system.rb +12 -0
  9. data/app/models/eve_app/solar_system_jump.rb +15 -0
  10. data/bin/rails +14 -0
  11. data/build.sh +8 -0
  12. data/eve_app.gemspec +30 -0
  13. data/lib/eve_app/sde/normalizer.rb +8 -5
  14. data/lib/eve_app/version.rb +1 -1
  15. data/test/dummy/Rakefile +6 -0
  16. data/test/dummy/app/assets/config/manifest.js +3 -0
  17. data/test/dummy/app/assets/javascripts/application.js +13 -0
  18. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  19. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  20. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  21. data/test/dummy/app/controllers/application_controller.rb +2 -0
  22. data/test/dummy/app/controllers/concerns/.keep +0 -0
  23. data/test/dummy/app/jobs/application_job.rb +2 -0
  24. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  25. data/test/dummy/app/models/application_record.rb +3 -0
  26. data/test/dummy/app/models/concerns/.keep +0 -0
  27. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  28. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/bin/setup +35 -0
  33. data/test/dummy/bin/update +29 -0
  34. data/test/dummy/config.ru +5 -0
  35. data/test/dummy/config/application.rb +20 -0
  36. data/test/dummy/config/boot.rb +5 -0
  37. data/test/dummy/config/cable.yml +10 -0
  38. data/test/dummy/config/database.yml +25 -0
  39. data/test/dummy/config/environment.rb +5 -0
  40. data/test/dummy/config/environments/development.rb +47 -0
  41. data/test/dummy/config/environments/production.rb +83 -0
  42. data/test/dummy/config/environments/test.rb +42 -0
  43. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  44. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  45. data/test/dummy/config/initializers/cors.rb +16 -0
  46. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  47. data/test/dummy/config/initializers/inflections.rb +16 -0
  48. data/test/dummy/config/initializers/mime_types.rb +4 -0
  49. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  50. data/test/dummy/config/locales/en.yml +33 -0
  51. data/test/dummy/config/puma.rb +56 -0
  52. data/test/dummy/config/routes.rb +3 -0
  53. data/test/dummy/config/secrets.yml +32 -0
  54. data/test/dummy/config/spring.rb +6 -0
  55. data/test/dummy/db/schema.rb +490 -0
  56. data/test/dummy/log/.keep +0 -0
  57. data/test/eve_app/item_parser_test.rb +48 -0
  58. data/test/fixtures/types.yml +48 -0
  59. data/test/integration/navigation_test.rb +8 -0
  60. data/test/support/data/eft.txt +16 -0
  61. data/test/support/data/hangar.txt +10 -0
  62. data/test/test_helper.rb +18 -0
  63. metadata +123 -4
File without changes
@@ -0,0 +1,48 @@
1
+ require 'test_helper'
2
+
3
+ class EveApp::ItemParserTest < ActiveSupport::TestCase
4
+ def parsed_items(input)
5
+ parser = EveApp::ItemParser.new(input)
6
+ parser.items.map { |i| [i.type.name, i.quantity] }
7
+ end
8
+
9
+ test "parse EFT header" do
10
+ input = "[Garmur, Roaming Garmur]"
11
+ parser = EveApp::ItemParser.new(input)
12
+
13
+ assert parser.header?
14
+ assert_equal 'Roaming Garmur', parser.header.name
15
+ assert_equal types(:garmur).id, parser.header.type.try(:id)
16
+ end
17
+
18
+ test "parse an EFT text" do
19
+ result = parsed_items(load_data_file('eft.txt'))
20
+ expected = [
21
+ ['Orthrus', 1], ['10MN Afterburner II', 10], ['100MN Afterburner I', 100], ['Warp Scrambler II', 5],
22
+ ['Tracking Computer II', 1], ['800mm Repeating Cannon II', 3], ['Sensor Booster II', 2],
23
+ ['Heavy Energy Neutralizer II', 300], ['Quake L', 1500], ['Tremor L', 1000], ['Barrage L', 2000],
24
+ ['X-Large Ancillary Shield Booster', 1], ['Navy Cap Booster 400', 1]
25
+ ]
26
+ assert result & expected
27
+ end
28
+
29
+ test "parse EVE hangar text" do
30
+ result = parsed_items(load_data_file('hangar.txt'))
31
+ expected = [
32
+ ['1200mm Artillery Cannon II', 14], ['Ballistic Control System II', 50], ['Coreli A-Type 5MN Microwarpdrive', 4],
33
+ ['Nanite Repair Paste', 7000], ['Scimitar', 2], ['Small Core Defense Field Extender II', 25],
34
+ ['Vexor', 1], ['Warp Disrupt Probe', 370]
35
+ ]
36
+ assert_equal result, expected
37
+ end
38
+
39
+ # test "ignores unmatched lines" do
40
+ # # Unknown lala
41
+ # # [Med slots]
42
+ # end
43
+ #
44
+ # test "be able to parse copy & paste from hangar" do
45
+ # # Mid-grade Slave Alpha 1 1.0
46
+ # # Mid-grade Slave Beta 1 1.0
47
+ # end
48
+ end
@@ -0,0 +1,48 @@
1
+ _fixture:
2
+ model_class: EveApp::Type
3
+
4
+ garmur:
5
+ id: 33816
6
+ name: Garmur
7
+ 1200mm_artillery_cannon_ii:
8
+ name: 1200mm Artillery Cannon II
9
+ ballistic_control_system_ii:
10
+ name: Ballistic Control System II
11
+ coreli_a_type_5mn_microwarpdrive:
12
+ name: Coreli A-Type 5MN Microwarpdrive
13
+ nanite_repair_paste:
14
+ name: Nanite Repair Paste
15
+ scimitar:
16
+ name: Scimitar
17
+ small_core_defense_field_extender_ii:
18
+ name: Small Core Defense Field Extender II
19
+ vexor:
20
+ name: Vexor
21
+ warp_disrupt_probe:
22
+ name: Warp Disrupt Probe
23
+ orthrus:
24
+ name: Orthrus
25
+ 10mn_afterburner_ii:
26
+ name: 10MN Afterburner II
27
+ 100mn_afterburner_i:
28
+ name: 100MN Afterburner I
29
+ warp_scrambler_ii:
30
+ name: Warp Scrambler II
31
+ tracking_computer_ii:
32
+ name: Tracking Computer II
33
+ 800mm_repeating_cannon_ii:
34
+ name: 800mm Repeating Cannon II
35
+ sensor_booster_ii:
36
+ name: Sensor Booster II
37
+ heavy_energy_neutralizer_ii:
38
+ name: Heavy Energy Neutralizer II
39
+ quake_l:
40
+ name: Quake L
41
+ tremor_l:
42
+ name: Tremor L
43
+ barrage_l:
44
+ name: Barrage L
45
+ x_large_ancillary_shield_booster:
46
+ name: X-Large Ancillary Shield Booster
47
+ navy_cap_booster_400:
48
+ name: Navy Cap Booster 400
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class NavigationTest < ActionDispatch::IntegrationTest
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
8
+
@@ -0,0 +1,16 @@
1
+ Orthrus
2
+ 10x 10MN Afterburner II
3
+ 100 100MN Afterburner I
4
+ Warp Scrambler II 5x
5
+ Tracking Computer II
6
+ X-Large Ancillary Shield Booster, Navy Cap Booster 400
7
+ 800mm Repeating Cannon II
8
+ 800mm Repeating Cannon II
9
+ 800mm Repeating Cannon II
10
+ Sensor Booster II
11
+ Sensor Booster II
12
+ Heavy Energy Neutralizer II 300
13
+ Quake L 1500
14
+ Tremor L x1000
15
+ Barrage L x2000
16
+ LAflalflsalfs
@@ -0,0 +1,10 @@
1
+ 1200mm Artillery Cannon II 14 Projectile Weapon Large High 280 m3 66.650.839,64 ISK
2
+ Ballistic Control System II 50 Ballistic Control system Low 250 m3 47.087.964,50 ISK
3
+ Coreli A-Type 5MN Microwarpdrive 4 Propulsion Module Medium 40 m3 112.707.923,08 ISK
4
+ Nanite Repair Paste 3.230 Nanite Repair Paste 32,30 m3 87.361.680,80 ISK
5
+ Nanite Repair Paste 3.770 Nanite Repair Paste 37,70 m3 101.967.039,20 ISK
6
+ Scimitar 2 Logistics 20.000 m3 343.205.885,12 ISK
7
+ Small Core Defense Field Extender II 25 Rig Shield Rigs 125 m3 154.591.291,75 ISK
8
+ Vexor 1 Cruiser 10.000 m3 10.034.966,76 ISK
9
+ Warp Disrupt Probe 12 Interdiction Probe 60 m3 2.039.949,72 ISK
10
+ Warp Disrupt Probe 358 Interdiction Probe 1.790 m3 60.858.499,98 ISK
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ ENV["RAILS_ENV"] = "test"
4
+ $LOAD_PATH.unshift File.dirname(__FILE__)
5
+
6
+ require "dummy/config/environment"
7
+ require "rails/test_help"
8
+
9
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
10
+ ActiveSupport::TestCase.fixtures :all
11
+
12
+ class ActiveSupport::TestCase
13
+ self.use_instantiated_fixtures = false
14
+
15
+ def load_data_file(filename)
16
+ File.read(File.expand_path("../support/data/#{filename}", __FILE__))
17
+ end
18
+ end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eve_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Hiemstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-22 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +129,11 @@ executables: []
115
129
  extensions: []
116
130
  extra_rdoc_files: []
117
131
  files:
132
+ - ".gitignore"
133
+ - ".ruby-version"
134
+ - ".travis.yml"
135
+ - Gemfile
136
+ - Gemfile.lock
118
137
  - MIT-LICENSE
119
138
  - README.md
120
139
  - Rakefile
@@ -140,13 +159,17 @@ files:
140
159
  - app/models/eve_app/market_group.rb
141
160
  - app/models/eve_app/region.rb
142
161
  - app/models/eve_app/solar_system.rb
162
+ - app/models/eve_app/solar_system_jump.rb
143
163
  - app/models/eve_app/station.rb
144
164
  - app/models/eve_app/type.rb
145
165
  - app/serializers/eve_app/application_serializer.rb
146
166
  - app/serializers/eve_app/region_serializer.rb
147
167
  - app/serializers/eve_app/solar_system_serializer.rb
148
168
  - app/serializers/eve_app/type_serializer.rb
169
+ - bin/rails
170
+ - build.sh
149
171
  - config/routes.rb
172
+ - eve_app.gemspec
150
173
  - lib/eve_app.rb
151
174
  - lib/eve_app/engine.rb
152
175
  - lib/eve_app/eve_central.rb
@@ -163,6 +186,54 @@ files:
163
186
  - lib/table-list.yml
164
187
  - lib/table-map.yml
165
188
  - lib/tasks/eve_app.rake
189
+ - test/dummy/Rakefile
190
+ - test/dummy/app/assets/config/manifest.js
191
+ - test/dummy/app/assets/javascripts/application.js
192
+ - test/dummy/app/assets/stylesheets/application.css
193
+ - test/dummy/app/channels/application_cable/channel.rb
194
+ - test/dummy/app/channels/application_cable/connection.rb
195
+ - test/dummy/app/controllers/application_controller.rb
196
+ - test/dummy/app/controllers/concerns/.keep
197
+ - test/dummy/app/jobs/application_job.rb
198
+ - test/dummy/app/mailers/application_mailer.rb
199
+ - test/dummy/app/models/application_record.rb
200
+ - test/dummy/app/models/concerns/.keep
201
+ - test/dummy/app/views/layouts/mailer.html.erb
202
+ - test/dummy/app/views/layouts/mailer.text.erb
203
+ - test/dummy/bin/bundle
204
+ - test/dummy/bin/rails
205
+ - test/dummy/bin/rake
206
+ - test/dummy/bin/setup
207
+ - test/dummy/bin/update
208
+ - test/dummy/config.ru
209
+ - test/dummy/config/application.rb
210
+ - test/dummy/config/boot.rb
211
+ - test/dummy/config/cable.yml
212
+ - test/dummy/config/database.yml
213
+ - test/dummy/config/environment.rb
214
+ - test/dummy/config/environments/development.rb
215
+ - test/dummy/config/environments/production.rb
216
+ - test/dummy/config/environments/test.rb
217
+ - test/dummy/config/initializers/application_controller_renderer.rb
218
+ - test/dummy/config/initializers/backtrace_silencers.rb
219
+ - test/dummy/config/initializers/cors.rb
220
+ - test/dummy/config/initializers/filter_parameter_logging.rb
221
+ - test/dummy/config/initializers/inflections.rb
222
+ - test/dummy/config/initializers/mime_types.rb
223
+ - test/dummy/config/initializers/wrap_parameters.rb
224
+ - test/dummy/config/locales/en.yml
225
+ - test/dummy/config/puma.rb
226
+ - test/dummy/config/routes.rb
227
+ - test/dummy/config/secrets.yml
228
+ - test/dummy/config/spring.rb
229
+ - test/dummy/db/schema.rb
230
+ - test/dummy/log/.keep
231
+ - test/eve_app/item_parser_test.rb
232
+ - test/fixtures/types.yml
233
+ - test/integration/navigation_test.rb
234
+ - test/support/data/eft.txt
235
+ - test/support/data/hangar.txt
236
+ - test/test_helper.rb
166
237
  homepage: http://www.evebuddy.net
167
238
  licenses:
168
239
  - MIT
@@ -183,8 +254,56 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
254
  version: '0'
184
255
  requirements: []
185
256
  rubyforge_project:
186
- rubygems_version: 2.6.11
257
+ rubygems_version: 2.7.6
187
258
  signing_key:
188
259
  specification_version: 4
189
260
  summary: EveApp API
190
- test_files: []
261
+ test_files:
262
+ - test/dummy/Rakefile
263
+ - test/dummy/app/assets/config/manifest.js
264
+ - test/dummy/app/assets/javascripts/application.js
265
+ - test/dummy/app/assets/stylesheets/application.css
266
+ - test/dummy/app/channels/application_cable/channel.rb
267
+ - test/dummy/app/channels/application_cable/connection.rb
268
+ - test/dummy/app/controllers/application_controller.rb
269
+ - test/dummy/app/controllers/concerns/.keep
270
+ - test/dummy/app/jobs/application_job.rb
271
+ - test/dummy/app/mailers/application_mailer.rb
272
+ - test/dummy/app/models/application_record.rb
273
+ - test/dummy/app/models/concerns/.keep
274
+ - test/dummy/app/views/layouts/mailer.html.erb
275
+ - test/dummy/app/views/layouts/mailer.text.erb
276
+ - test/dummy/bin/bundle
277
+ - test/dummy/bin/rails
278
+ - test/dummy/bin/rake
279
+ - test/dummy/bin/setup
280
+ - test/dummy/bin/update
281
+ - test/dummy/config.ru
282
+ - test/dummy/config/application.rb
283
+ - test/dummy/config/boot.rb
284
+ - test/dummy/config/cable.yml
285
+ - test/dummy/config/database.yml
286
+ - test/dummy/config/environment.rb
287
+ - test/dummy/config/environments/development.rb
288
+ - test/dummy/config/environments/production.rb
289
+ - test/dummy/config/environments/test.rb
290
+ - test/dummy/config/initializers/application_controller_renderer.rb
291
+ - test/dummy/config/initializers/backtrace_silencers.rb
292
+ - test/dummy/config/initializers/cors.rb
293
+ - test/dummy/config/initializers/filter_parameter_logging.rb
294
+ - test/dummy/config/initializers/inflections.rb
295
+ - test/dummy/config/initializers/mime_types.rb
296
+ - test/dummy/config/initializers/wrap_parameters.rb
297
+ - test/dummy/config/locales/en.yml
298
+ - test/dummy/config/puma.rb
299
+ - test/dummy/config/routes.rb
300
+ - test/dummy/config/secrets.yml
301
+ - test/dummy/config/spring.rb
302
+ - test/dummy/db/schema.rb
303
+ - test/dummy/log/.keep
304
+ - test/eve_app/item_parser_test.rb
305
+ - test/fixtures/types.yml
306
+ - test/integration/navigation_test.rb
307
+ - test/support/data/eft.txt
308
+ - test/support/data/hangar.txt
309
+ - test/test_helper.rb