eve_app 0.1.32 → 0.1.33
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/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/eve_app/sde/data_importer.rb +3 -0
- data/lib/eve_app/sde/normalizer.rb +5 -3
- data/lib/eve_app/version.rb +1 -1
- data/release.sh +17 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed6dc98c230669685d38ec02b500110943c2d503da87e9417768273b310e531b
|
4
|
+
data.tar.gz: 7c1866fe9c730b2acdc6ccee420e1ca7dca1ccaf7a2769b0df2e963667ecf01e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f4c06e37b96eb074a7deae1577ed862c3bf249e6fa90b2770a2a31495e4d2d01062957e602613e0c10f6784b1322cf6256fd8ceb5eb13ff97e7cf7849b5379b
|
7
|
+
data.tar.gz: 43aa917b1730bcdf475d2e9cfbef2c363894170e43e9c17b581f2d933de6791304f19fd3f72f22b04f2a0c07a2ea51e432962ecb8ac465dd06aed74bf1b86bca
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -29,6 +29,9 @@ module EveApp
|
|
29
29
|
def table_list
|
30
30
|
@_table_list ||= begin
|
31
31
|
whitelist = Array[SDE.config.table_whitelist].flatten.compact.map(&:to_s)
|
32
|
+
whitelist += %w[invMarketGroups invCategories invGroups] if whitelist.include?('invTypes')
|
33
|
+
whitelist = whitelist.uniq
|
34
|
+
|
32
35
|
tables = SDE.table_info
|
33
36
|
tables.transform_values!(&:symbolize_keys)
|
34
37
|
tables.select! { |(name,_)| whitelist.include?(name) } if whitelist.any?
|
@@ -5,7 +5,7 @@ module EveApp
|
|
5
5
|
normalize_table_names
|
6
6
|
primary_keys
|
7
7
|
column_names
|
8
|
-
|
8
|
+
normalize_inv_tables if table_names.key?('invTypes')
|
9
9
|
indexes
|
10
10
|
end
|
11
11
|
|
@@ -53,20 +53,22 @@ module EveApp
|
|
53
53
|
# sql %Q(CREATE INDEX IF NOT EXISTS idx_type_attributes_type_id_attribute_id ON type_attributes (type_id, attribute_id);)
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
56
|
+
def normalize_inv_tables
|
57
57
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS category_id integer)
|
58
58
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS category_name character varying)
|
59
59
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS group_name character varying)
|
60
60
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS market_group_name character varying)
|
61
|
-
sql %Q(ALTER TABLE #{table_names['invMarketGroups']} ADD IF NOT EXISTS root_group_id INTEGER DEFAULT NULL)
|
62
61
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS market_group_root_id integer)
|
63
62
|
sql %Q(ALTER TABLE #{table_names['invTypes']} ADD IF NOT EXISTS blueprint_type_id integer)
|
63
|
+
|
64
64
|
sql %Q(UPDATE #{table_names['invTypes']} SET group_name = (SELECT name FROM #{table_names['invGroups']} WHERE id = #{table_names['invTypes']}.group_id))
|
65
65
|
sql %Q(UPDATE #{table_names['invTypes']} SET category_id = (SELECT category_id FROM #{table_names['invGroups']} WHERE id = #{table_names['invTypes']}.group_id))
|
66
66
|
sql %Q(UPDATE #{table_names['invTypes']} SET category_name = (SELECT name FROM #{table_names['invCategories']} WHERE id = #{table_names['invTypes']}.category_id))
|
67
67
|
sql %Q(UPDATE #{table_names['invTypes']} SET market_group_name = (SELECT name FROM #{table_names['invMarketGroups']} WHERE id = #{table_names['invTypes']}.market_group_id))
|
68
68
|
# sql %Q(UPDATE #{table_names['invTypes']} SET blueprint_type_id = (SELECT type_id FROM #{table_names['industryActivityProducts']} WHERE activity_id = 1 AND product_type_id = #{table_names['invTypes']}.id LIMIT 1))
|
69
69
|
|
70
|
+
sql %Q(ALTER TABLE #{table_names['invMarketGroups']} ADD IF NOT EXISTS root_group_id INTEGER DEFAULT NULL)
|
71
|
+
|
70
72
|
sql %Q(
|
71
73
|
WITH RECURSIVE mg_roots(id, root_id) AS (
|
72
74
|
SELECT mg.id, mg.id AS root_id FROM #{table_names['invMarketGroups']} AS mg WHERE mg.parent_group_id IS NULL
|
data/lib/eve_app/version.rb
CHANGED
data/release.sh
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
VERSION="$1"
|
6
|
+
|
7
|
+
if [ -z "$VERSION" ]; then
|
8
|
+
echo "Usage: ./release.sh VERSION"
|
9
|
+
exit 1
|
10
|
+
fi
|
11
|
+
|
12
|
+
sed -i "s/VERSION = .*/VERSION = '${VERSION}'/" lib/eve_app/version.rb
|
13
|
+
bundle install
|
14
|
+
|
15
|
+
git commit -am "Release v${VERSION}"
|
16
|
+
git tag "v${VERSION}" -a -m "Release v${VERSION}" --force
|
17
|
+
git push origin master --follow-tags
|
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.
|
4
|
+
version: 0.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Hiemstra
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/table-list.yml
|
214
214
|
- lib/table-map.yml
|
215
215
|
- lib/tasks/eve_app.rake
|
216
|
+
- release.sh
|
216
217
|
- test/dummy/Rakefile
|
217
218
|
- test/dummy/app/assets/config/manifest.js
|
218
219
|
- test/dummy/app/assets/javascripts/application.js
|