eve_app 0.1.8 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25c3a5ea79225796d3d28de0d3965e3a37a41cae
4
- data.tar.gz: de2be69f272a7eca6670f6888213ed036dfae3b9
3
+ metadata.gz: 4451aa0ad409984f8de12d81938f52e1c6c73b11
4
+ data.tar.gz: af9ce822fb10ed1a6877650ddaf029f492cf6d7a
5
5
  SHA512:
6
- metadata.gz: c124d21936222d3f3ab2b5b8c7da6e8a9646eb8f4705cd4925f2ba30b8721b14e96d6a614a8c19082edb7eed62ec9533bb6e528c573ee6f8365d8ad9f27ea76a
7
- data.tar.gz: 101df7dee21d3493c50663aee2450d4c5471bf2e7b23055d1486980e96941c260fa4e17a4f27da9803980e40558ce9998aed86726f9eff970d4099e0d624d551
6
+ metadata.gz: b19f77adfb1ccc27c0222c3b9a59515769f931202e78ab9cabd80f2abb9cb1369a6fb66a87a477b1a24f5f7ddfebc255989474bd3d715cc9581bacd8265248f7
7
+ data.tar.gz: ee81a94d4926de968d530a9d7de9819a91bd4199415fb27fc4524c25ce36ce8e33b20620ebe69bee99f49244cbfb066032ba613b3f00b17969e07bce6949302b
@@ -13,7 +13,7 @@ class EveApp::Group < EveApp::ApplicationRecord
13
13
  FAX = 1538
14
14
 
15
15
  COMPONENTS = [CONSTRUCTION_COMPONENT, STATION_COMPONENT, CAPITAL_COMPONENT, ADVANCED_CAPITAL_COMPONENT]
16
- CAPITALS = [TITAN, SUPERCARRIER, CARRIER, DREADNOUGHT, CAPITALS, JUMP_FREIGHTER, FAX]
16
+ CAPITALS = [TITAN, SUPERCARRIER, CARRIER, DREADNOUGHT, CAPITAL_INDUSTRIAL, JUMP_FREIGHTER, FAX]
17
17
  SUPER_CAPITALS = [TITAN, SUPERCARRIER]
18
18
 
19
19
  has_many :types, class_name: 'EveApp::Type'
@@ -12,6 +12,15 @@ class EveApp::Type < EveApp::ApplicationRecord
12
12
 
13
13
  scope :published, -> { where(published: true) }
14
14
 
15
+ def type
16
+ case group_id
17
+ when *EveApp::Group::COMPONENTS then :component
18
+ when *EveApp::Group::SUPER_CAPITALS then :supercapital
19
+ when *EveApp::Group::CAPITALS then :capital
20
+ else category_name.downcase.to_sym
21
+ end
22
+ end
23
+
15
24
  def blueprint?
16
25
  category_id == EveApp::Category::BLUEPRINT
17
26
  end
@@ -1,3 +1,3 @@
1
1
  module EveApp
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eve_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Hiemstra