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 +4 -4
- data/app/models/eve_app/group.rb +1 -1
- data/app/models/eve_app/type.rb +9 -0
- data/lib/eve_app/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4451aa0ad409984f8de12d81938f52e1c6c73b11
|
4
|
+
data.tar.gz: af9ce822fb10ed1a6877650ddaf029f492cf6d7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b19f77adfb1ccc27c0222c3b9a59515769f931202e78ab9cabd80f2abb9cb1369a6fb66a87a477b1a24f5f7ddfebc255989474bd3d715cc9581bacd8265248f7
|
7
|
+
data.tar.gz: ee81a94d4926de968d530a9d7de9819a91bd4199415fb27fc4524c25ce36ce8e33b20620ebe69bee99f49244cbfb066032ba613b3f00b17969e07bce6949302b
|
data/app/models/eve_app/group.rb
CHANGED
@@ -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,
|
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'
|
data/app/models/eve_app/type.rb
CHANGED
@@ -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
|
data/lib/eve_app/version.rb
CHANGED