legion-data-java 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb498f6be55c266c124ead24ef7c4887b1b1c6c0293013c49ab2b80e981814d1
4
- data.tar.gz: ed537f3fdead5e90940387d685a60fa848a028f4cb46a47dd3340dd4804cca89
3
+ metadata.gz: 4de0020b40f9bf89d5ab158363fe60e03ddf096b367806bb519a4172a69effe4
4
+ data.tar.gz: baf095b3b51bb7fefba7fda584713ef3cca80b6f30ef18a384ed96120b1d23ed
5
5
  SHA512:
6
- metadata.gz: f5551d4474fbbd02c116d6698b97152236a2bb00e681a85f5f29f471c3dc754df777377d77294b398085474439cd005faf7bcc0dfe96cd22cd6b7e61d8b55c95
7
- data.tar.gz: 357f03cf9bfa1ad7d47ef5e33989ff11fb605a54c50983707dde4651dc03e544c393f6ff0362a1bd81f7bd0fab83a4c7041c59340bd166a34b659f7bb7d20dea
6
+ metadata.gz: 2854a459b95716de94178b75c47c0d727f17d6937da261a222d2192e2609e0dbb28f19b40b0bfe0d2f734f111369a084cdc4bcdb889f0c2da77bbfc3a1945e38
7
+ data.tar.gz: 6b30b2d60b719378df5428d55a548c94f0d7a9b7b2bcb3615da68cdfd68c9be3eaa03ab29ab5b8eaf0a87366a14ecda10a8fa419a12891e6a32b33dc6b121582
@@ -99,7 +99,7 @@ jobs:
99
99
  - sonarcloud/scan
100
100
  "jruby-nine-two-e":
101
101
  docker:
102
- - image: circleci/jruby:9.2.11-jre
102
+ - image: circleci/jruby:9.2.13-jre
103
103
  - image: circleci/mysql:5.7
104
104
  environment:
105
105
  MYSQL_DATABASE: 'legion'
@@ -130,6 +130,9 @@ jobs:
130
130
  steps:
131
131
  - checkout
132
132
  - ruby/load-cache
133
+ - run:
134
+ name: Install Rubocop
135
+ command: gem install rubocop rubocop-sequel rubocop-performance rubocop-rspec
133
136
  - run:
134
137
  name: update bundler
135
138
  command: gem update bundler
@@ -140,7 +143,7 @@ jobs:
140
143
  - ruby/run-tests
141
144
  - run:
142
145
  name: Run Rubocop
143
- command: bundle exec rubocop --format=json --out=rubocop-result.json
146
+ command: rubocop --format=json --out=rubocop-result.json
144
147
  - sonarcloud/scan
145
148
  - ruby/save-cache
146
149
 
@@ -1,6 +1,5 @@
1
1
  require:
2
2
  - rubocop-sequel
3
- - rubocop-md
4
3
  - rubocop-performance
5
4
 
6
5
  Layout/LineLength:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- legion-data-java (1.1.2)
4
+ legion-data-java (1.1.3)
5
5
  jdbc-mysql
6
6
  legion-logging
7
7
  legion-settings
@@ -11,13 +11,12 @@ GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  ast (2.4.1)
14
- codecov (0.2.8)
14
+ codecov (0.2.12)
15
15
  json
16
16
  simplecov
17
17
  diff-lcs (1.4.4)
18
18
  docile (1.3.2)
19
19
  jdbc-mysql (8.0.17)
20
- json (2.3.1)
21
20
  json (2.3.1-java)
22
21
  json_pure (2.3.1)
23
22
  legion-json (1.1.2)
@@ -30,17 +29,17 @@ GEM
30
29
  legion-logging
31
30
  multi_json (1.15.0)
32
31
  parallel (1.19.2)
33
- parser (2.7.1.4)
32
+ parser (2.7.2.0)
34
33
  ast (~> 2.4.1)
35
34
  rainbow (3.0.0)
36
35
  rake (13.0.1)
37
- regexp_parser (1.7.1)
36
+ regexp_parser (1.8.2)
38
37
  rexml (3.2.4)
39
38
  rspec (3.9.0)
40
39
  rspec-core (~> 3.9.0)
41
40
  rspec-expectations (~> 3.9.0)
42
41
  rspec-mocks (~> 3.9.0)
43
- rspec-core (3.9.2)
42
+ rspec-core (3.9.3)
44
43
  rspec-support (~> 3.9.3)
45
44
  rspec-expectations (3.9.2)
46
45
  diff-lcs (>= 1.2.0, < 2.0)
@@ -51,36 +50,36 @@ GEM
51
50
  rspec-support (3.9.3)
52
51
  rspec_junit_formatter (0.4.1)
53
52
  rspec-core (>= 2, < 4, != 2.12.0)
54
- rubocop (0.89.1)
53
+ rubocop (0.93.1)
55
54
  parallel (~> 1.10)
56
- parser (>= 2.7.1.1)
55
+ parser (>= 2.7.1.5)
57
56
  rainbow (>= 2.2.2, < 4.0)
58
- regexp_parser (>= 1.7)
57
+ regexp_parser (>= 1.8)
59
58
  rexml
60
- rubocop-ast (>= 0.3.0, < 1.0)
59
+ rubocop-ast (>= 0.6.0)
61
60
  ruby-progressbar (~> 1.7)
62
61
  unicode-display_width (>= 1.4.0, < 2.0)
63
- rubocop-ast (0.3.0)
64
- parser (>= 2.7.1.4)
62
+ rubocop-ast (0.8.0)
63
+ parser (>= 2.7.1.5)
65
64
  rubocop-md (0.4.0)
66
65
  rubocop (~> 0.60)
67
- rubocop-performance (1.7.1)
68
- rubocop (>= 0.82.0)
66
+ rubocop-performance (1.8.1)
67
+ rubocop (>= 0.87.0)
68
+ rubocop-ast (>= 0.4.0)
69
69
  rubocop-rspec (1.43.2)
70
70
  rubocop (~> 0.87)
71
71
  rubocop-sequel (0.0.6)
72
72
  rubocop (~> 0.55, >= 0.55)
73
73
  ruby-progressbar (1.10.1)
74
- sequel (5.35.0)
74
+ sequel (5.37.0)
75
75
  simplecov (0.19.0)
76
76
  docile (~> 1.1)
77
77
  simplecov-html (~> 0.11)
78
- simplecov-html (0.12.2)
78
+ simplecov-html (0.12.3)
79
79
  unicode-display_width (1.7.0)
80
80
 
81
81
  PLATFORMS
82
82
  java
83
- ruby
84
83
 
85
84
  DEPENDENCIES
86
85
  bundler
@@ -40,9 +40,9 @@ module Legion
40
40
  return unless defined?(::Legion::Cache)
41
41
 
42
42
  Legion::Data::Model::Relationship.plugin :caching, Legion::Cache, ttl: 10
43
+ Legion::Data::Model::Runner.plugin :caching, Legion::Cache, ttl: 60
43
44
  Legion::Data::Model::Chain.plugin :caching, Legion::Cache, ttl: 60
44
45
  Legion::Data::Model::Datacenter.plugin :caching, Legion::Cache, ttl: 120
45
- Legion::Data::Model::Extension.plugin :caching, Legion::Cache, ttl: 120
46
46
  Legion::Data::Model::Function.plugin :caching, Legion::Cache, ttl: 120
47
47
  Legion::Data::Model::Extension.plugin :caching, Legion::Cache, ttl: 120
48
48
  Legion::Data::Model::Node.plugin :caching, Legion::Cache, ttl: 10
@@ -50,6 +50,7 @@ module Legion
50
50
  Legion::Data::Model::Task.plugin :caching, Legion::Cache, ttl: 10
51
51
  Legion::Data::Model::User.plugin :caching, Legion::Cache, ttl: 120
52
52
  Legion::Data::Model::Group.plugin :caching, Legion::Cache, ttl: 120
53
+ Legion::Logging.info 'Legion::Data connected to Legion::Cache'
53
54
  end
54
55
 
55
56
  def shutdown
@@ -29,10 +29,19 @@ module Legion
29
29
  Legion::Settings[:data][:connected] = false
30
30
  end
31
31
 
32
- def creds_builder
32
+ def creds_builder # rubocop:disable Metrics/AbcSize
33
33
  final_creds = {}
34
- final_creds.merge! default_creds
34
+ final_creds.merge! Legion::Data::Settings.creds
35
35
  final_creds.merge! Legion::Settings[:data][:creds] if Legion::Settings[:data][:creds].is_a? Hash
36
+
37
+ if Legion::Settings[:data][:connection][:max_connections].is_a? Integer
38
+ final_creds[:max_connections] = Legion::Settings[:data][:connection][:max_connections]
39
+ end
40
+
41
+ final_creds[:preconnect] = :concurrently if Legion::Settings[:data][:connection][:preconnect]
42
+
43
+ Legion::Logging.unknown final_creds
44
+
36
45
  return final_creds if Legion::Settings[:vault].nil?
37
46
 
38
47
  if Legion::Settings[:vault][:connected] && ::Vault.sys.mounts.key?(:database)
@@ -51,8 +60,7 @@ module Legion
51
60
  username: 'legion',
52
61
  password: 'legion',
53
62
  database: 'legion',
54
- max_connections: 32,
55
- preconnect: 'concurrently'
63
+ max_connections: 4
56
64
  }
57
65
  end
58
66
  end
@@ -0,0 +1,7 @@
1
+ Sequel.migration do
2
+ change do
3
+ alter_table(:extensions) do
4
+ add_column :schema_version, Integer, null: false, default: 0, index: true
5
+ end
6
+ end
7
+ end
@@ -35,7 +35,8 @@ module Legion
35
35
  log_connection_info: false,
36
36
  log_warn_duration: 1,
37
37
  sql_log_level: 'debug',
38
- max_connections: 10
38
+ max_connections: 10,
39
+ preconnect: false
39
40
  }
40
41
  end
41
42
 
@@ -45,8 +46,7 @@ module Legion
45
46
  password: 'legion',
46
47
  database: 'legion',
47
48
  host: '127.0.0.1',
48
- port: 3306,
49
- debug: false
49
+ port: 3306
50
50
  }
51
51
  end
52
52
 
@@ -1,5 +1,5 @@
1
1
  module Legion
2
2
  module Data
3
- VERSION = '1.1.2'.freeze
3
+ VERSION = '1.1.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-data-java
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -246,6 +246,7 @@ files:
246
246
  - lib/legion/data/migrations/015_add_default_extensions.rb
247
247
  - lib/legion/data/migrations/016_change_task_args.rb
248
248
  - lib/legion/data/migrations/017_add_payload_task.rb
249
+ - lib/legion/data/migrations/018_add_migration_column.rb
249
250
  - lib/legion/data/model.rb
250
251
  - lib/legion/data/models/chain.rb
251
252
  - lib/legion/data/models/datacenter.rb