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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ec690bca714dc1512db7f8360e58a69ae5910ac9c0861177eb5e9ca84b76f1b
4
- data.tar.gz: 80653e8c71edc1b79102d9b4b24c3940f45401d316d6ba825b36074526234429
3
+ metadata.gz: ed6dc98c230669685d38ec02b500110943c2d503da87e9417768273b310e531b
4
+ data.tar.gz: 7c1866fe9c730b2acdc6ccee420e1ca7dca1ccaf7a2769b0df2e963667ecf01e
5
5
  SHA512:
6
- metadata.gz: e5b9a9f4ab0a7fc73437436bfc7cddba00d39e71016c54825fe10e307e8b3c618b82826746063e2e3b92b9b94c2a39435fe9fa384e856a148e85c7538bcc97a2
7
- data.tar.gz: eb36266c428be51004112324b5cf66c60de129b343696e7cae23a5deb0a0fbf020b521837ca1ad8982df1230892985b9ffc497c05994f6a88817927fe723c183
6
+ metadata.gz: 9f4c06e37b96eb074a7deae1577ed862c3bf249e6fa90b2770a2a31495e4d2d01062957e602613e0c10f6784b1322cf6256fd8ceb5eb13ff97e7cf7849b5379b
7
+ data.tar.gz: 43aa917b1730bcdf475d2e9cfbef2c363894170e43e9c17b581f2d933de6791304f19fd3f72f22b04f2a0c07a2ea51e432962ecb8ac465dd06aed74bf1b86bca
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  log/*.log
3
3
  *.gem
4
4
  pkg/
5
+ tmp/
5
6
  vendor
6
7
  test/dummy/db/*.sqlite3
7
8
  test/dummy/db/*.sqlite3-journal
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eve_app (0.1.32)
4
+ eve_app (0.1.33)
5
5
  active_model_serializers
6
6
  activerecord (~> 5)
7
7
  kaminari
@@ -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
- missing_relations
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 missing_relations
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
@@ -1,3 +1,3 @@
1
1
  module EveApp
2
- VERSION = '0.1.32'
2
+ VERSION = '0.1.33'
3
3
  end
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.32
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