legion-data 0.1.0 → 1.1.4
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/.circleci/config.yml +98 -71
- data/.gitignore +0 -1
- data/.rubocop.yml +10 -7
- data/CHANGELOG.md +16 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +100 -0
- data/README.md +13 -11
- data/legion-data.gemspec +22 -10
- data/lib/legion/data.rb +51 -33
- data/lib/legion/data/connection.rb +55 -19
- data/lib/legion/data/migration.rb +7 -20
- data/lib/legion/data/migrations/001_add_schema_columns.rb +1 -1
- data/lib/legion/data/migrations/002_add_users.rb +17 -0
- data/lib/legion/data/migrations/003_add_groups.rb +16 -0
- data/lib/legion/data/migrations/004_add_chains.rb +25 -0
- data/lib/legion/data/migrations/005_add_envs.rb +24 -0
- data/lib/legion/data/migrations/006_add_dcs.rb +24 -0
- data/lib/legion/data/migrations/007_add_nodes.rb +26 -0
- data/lib/legion/data/migrations/008_add_settings.rb +18 -0
- data/lib/legion/data/migrations/009_add_extensions.rb +25 -0
- data/lib/legion/data/migrations/010_add_runners.rb +21 -0
- data/lib/legion/data/migrations/011_add_functions.rb +29 -0
- data/lib/legion/data/migrations/012_add_tasks.rb +28 -0
- data/lib/legion/data/migrations/013_add_task_logs.rb +23 -0
- data/lib/legion/data/migrations/014_add_relationships.rb +27 -0
- data/lib/legion/data/migrations/015_add_default_extensions.rb +24 -0
- data/lib/legion/data/migrations/016_change_task_args.rb +7 -0
- data/lib/legion/data/migrations/017_add_payload_task.rb +7 -0
- data/lib/legion/data/migrations/018_add_migration_column.rb +7 -0
- data/lib/legion/data/model.rb +26 -25
- data/lib/legion/data/models/chain.rb +0 -1
- data/lib/legion/data/models/datacenter.rb +0 -1
- data/lib/legion/data/models/environment.rb +0 -1
- data/lib/legion/data/models/extension.rb +11 -0
- data/lib/legion/data/models/function.rb +5 -4
- data/lib/legion/data/models/group.rb +10 -0
- data/lib/legion/data/models/node.rb +1 -1
- data/lib/legion/data/models/relationship.rb +1 -1
- data/lib/legion/data/models/runner.rb +15 -0
- data/lib/legion/data/models/setting.rb +10 -0
- data/lib/legion/data/models/task.rb +0 -1
- data/lib/legion/data/models/task_log.rb +0 -1
- data/lib/legion/data/models/user.rb +10 -0
- data/lib/legion/data/settings.rb +68 -0
- data/lib/legion/data/version.rb +1 -1
- data/sonar-project.properties +12 -0
- metadata +119 -54
- data/lib/legion/data/connections/base.rb +0 -45
- data/lib/legion/data/connections/jdbc.rb +0 -21
- data/lib/legion/data/connections/mysql.rb +0 -26
- data/lib/legion/data/connections/mysql2.rb +0 -26
- data/lib/legion/data/connections/mysql_base.rb +0 -19
- data/lib/legion/data/migrations/002_add_chains_table.rb +0 -21
- data/lib/legion/data/migrations/003_add_datacenters_table.rb +0 -21
- data/lib/legion/data/migrations/004_add_envs_table.rb +0 -21
- data/lib/legion/data/migrations/005_add_functions_table.rb +0 -25
- data/lib/legion/data/migrations/006_add_namespaces_table.rb +0 -24
- data/lib/legion/data/migrations/007_add_nodes_table.rb +0 -22
- data/lib/legion/data/migrations/008_add_relationships_table.rb +0 -28
- data/lib/legion/data/migrations/009_add_task_logs_table.rb +0 -17
- data/lib/legion/data/migrations/010_add_tasks_table.rb +0 -20
- data/lib/legion/data/migrations/011_add_users_and_groups.rb +0 -28
- data/lib/legion/data/migrations/012_foreign_keys_users_and_groups.rb +0 -42
- data/lib/legion/data/migrations/013_function_foreign_keys.rb +0 -10
- data/lib/legion/data/migrations/014_nodes_foreign_keys.rb +0 -12
- data/lib/legion/data/migrations/015_relationships_foreign_keys.rb +0 -14
- data/lib/legion/data/migrations/016_tasks_foreign_keys.rb +0 -22
- data/lib/legion/data/migrations/017_add_relationship_to_tasks.rb +0 -14
- data/lib/legion/data/models/namespace.rb +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef8f31798b1ea264a22d1a7d35aaa107268d6b9aa16bb936c57897b76febd4e1
|
|
4
|
+
data.tar.gz: 54c5f13cb7f956f0d0e7ed3a8b2b619432a27fcf66a8efc1eab8562065cd19fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e305e59542335455fc886ca57949a159bbad690eadceec7838713bf4e111632f20fb584b38a0689f691eaebf74dc6f38161cbbddca729db840aa00b33a99d703
|
|
7
|
+
data.tar.gz: a5a9e19e394ff914ffc19cc4332d860c68923b120db45627c8487173771732f9d49344123f79e7f961a7c3a963a716a289d7fbdcd5ce04b0d0dbc65299a90ddf
|
data/.circleci/config.yml
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
version: 2
|
|
1
|
+
version: 2.1
|
|
2
|
+
orbs:
|
|
3
|
+
ruby: circleci/ruby@0.2.1
|
|
4
|
+
sonarcloud: sonarsource/sonarcloud@1.0.1
|
|
5
|
+
|
|
2
6
|
jobs:
|
|
3
7
|
"rubocop":
|
|
4
8
|
docker:
|
|
5
|
-
- image: circleci/ruby:2.
|
|
9
|
+
- image: circleci/ruby:2.7-node
|
|
6
10
|
steps:
|
|
7
11
|
- checkout
|
|
8
|
-
-
|
|
12
|
+
- ruby/load-cache
|
|
13
|
+
- ruby/install-deps
|
|
9
14
|
- run:
|
|
10
15
|
name: Run Rubocop
|
|
11
|
-
command: rubocop
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
"ruby-2.3":
|
|
16
|
+
command: bundle exec rubocop
|
|
17
|
+
- ruby/save-cache
|
|
18
|
+
"ruby-two-five":
|
|
15
19
|
docker:
|
|
16
|
-
- image: circleci/ruby:2.
|
|
17
|
-
- image: mysql:5.7
|
|
20
|
+
- image: circleci/ruby:2.5
|
|
21
|
+
- image: circleci/mysql:5.7
|
|
18
22
|
environment:
|
|
19
23
|
MYSQL_DATABASE: 'legion'
|
|
20
24
|
MYSQL_ROOT_PASSWORD: 'legion'
|
|
@@ -22,20 +26,20 @@ jobs:
|
|
|
22
26
|
MYSQL_PASSWORD: 'legion'
|
|
23
27
|
steps:
|
|
24
28
|
- checkout
|
|
29
|
+
- ruby/load-cache
|
|
25
30
|
- run:
|
|
26
|
-
name:
|
|
27
|
-
command:
|
|
31
|
+
name: update bundler
|
|
32
|
+
command: gem update bundler
|
|
33
|
+
- ruby/install-deps
|
|
28
34
|
- run:
|
|
29
|
-
name:
|
|
30
|
-
command:
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"ruby-2.4":
|
|
35
|
+
name: update max connections
|
|
36
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
37
|
+
- ruby/run-tests
|
|
38
|
+
- ruby/save-cache
|
|
39
|
+
"ruby-two-six":
|
|
36
40
|
docker:
|
|
37
|
-
- image: circleci/ruby:2.
|
|
38
|
-
- image: mysql:5.7
|
|
41
|
+
- image: circleci/ruby:2.6
|
|
42
|
+
- image: circleci/mysql:5.7
|
|
39
43
|
environment:
|
|
40
44
|
MYSQL_DATABASE: 'legion'
|
|
41
45
|
MYSQL_ROOT_PASSWORD: 'legion'
|
|
@@ -43,19 +47,38 @@ jobs:
|
|
|
43
47
|
MYSQL_PASSWORD: 'legion'
|
|
44
48
|
steps:
|
|
45
49
|
- checkout
|
|
50
|
+
- ruby/load-cache
|
|
46
51
|
- run:
|
|
47
|
-
name:
|
|
48
|
-
command:
|
|
52
|
+
name: update bundler
|
|
53
|
+
command: gem update bundler
|
|
54
|
+
- ruby/install-deps
|
|
49
55
|
- run:
|
|
50
|
-
name:
|
|
51
|
-
command:
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
"ruby-2.5":
|
|
56
|
+
name: update max connections
|
|
57
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
58
|
+
- ruby/run-tests
|
|
59
|
+
- ruby/save-cache
|
|
60
|
+
"ruby-two-seven":
|
|
56
61
|
docker:
|
|
57
|
-
- image: circleci/ruby:2.
|
|
58
|
-
- image: mysql:5.7
|
|
62
|
+
- image: circleci/ruby:2.7
|
|
63
|
+
- image: circleci/mysql:5.7
|
|
64
|
+
environment:
|
|
65
|
+
MYSQL_DATABASE: 'legion'
|
|
66
|
+
MYSQL_ROOT_PASSWORD: 'legion'
|
|
67
|
+
MYSQL_USER: 'legion'
|
|
68
|
+
MYSQL_PASSWORD: 'legion'
|
|
69
|
+
steps:
|
|
70
|
+
- checkout
|
|
71
|
+
- ruby/load-cache
|
|
72
|
+
- ruby/install-deps
|
|
73
|
+
- run:
|
|
74
|
+
name: update max connections
|
|
75
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
76
|
+
- ruby/run-tests
|
|
77
|
+
- ruby/save-cache
|
|
78
|
+
"jruby-nine-two":
|
|
79
|
+
docker:
|
|
80
|
+
- image: circleci/jruby:9.2-jre
|
|
81
|
+
- image: circleci/mysql:5.7
|
|
59
82
|
environment:
|
|
60
83
|
MYSQL_DATABASE: 'legion'
|
|
61
84
|
MYSQL_ROOT_PASSWORD: 'legion'
|
|
@@ -66,16 +89,18 @@ jobs:
|
|
|
66
89
|
- run:
|
|
67
90
|
name: Bundle Install
|
|
68
91
|
command: bundle install
|
|
92
|
+
- run:
|
|
93
|
+
name: update max connections
|
|
94
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
69
95
|
- run:
|
|
70
96
|
name: Run RSpec
|
|
71
97
|
command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
|
|
72
98
|
when: always
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
"ruby-2.6":
|
|
99
|
+
- sonarcloud/scan
|
|
100
|
+
"jruby-nine-two-e":
|
|
76
101
|
docker:
|
|
77
|
-
- image: circleci/
|
|
78
|
-
- image: mysql:5.7
|
|
102
|
+
- image: circleci/jruby:9.2.13-jre
|
|
103
|
+
- image: circleci/mysql:5.7
|
|
79
104
|
environment:
|
|
80
105
|
MYSQL_DATABASE: 'legion'
|
|
81
106
|
MYSQL_ROOT_PASSWORD: 'legion'
|
|
@@ -86,16 +111,17 @@ jobs:
|
|
|
86
111
|
- run:
|
|
87
112
|
name: Bundle Install
|
|
88
113
|
command: bundle install
|
|
114
|
+
- run:
|
|
115
|
+
name: update max connections
|
|
116
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
89
117
|
- run:
|
|
90
118
|
name: Run RSpec
|
|
91
119
|
command: bundle exec rspec --format progress --format RspecJunitFormatter -o test-results/rspec/results.xml
|
|
92
120
|
when: always
|
|
93
|
-
|
|
94
|
-
path: test-results
|
|
95
|
-
"jruby-9.2":
|
|
121
|
+
"sonarcloud":
|
|
96
122
|
docker:
|
|
97
|
-
- image: circleci/
|
|
98
|
-
- image: mysql:5.7
|
|
123
|
+
- image: circleci/ruby:2.7
|
|
124
|
+
- image: circleci/mysql:5.7
|
|
99
125
|
environment:
|
|
100
126
|
MYSQL_DATABASE: 'legion'
|
|
101
127
|
MYSQL_ROOT_PASSWORD: 'legion'
|
|
@@ -103,45 +129,46 @@ jobs:
|
|
|
103
129
|
MYSQL_PASSWORD: 'legion'
|
|
104
130
|
steps:
|
|
105
131
|
- checkout
|
|
132
|
+
- ruby/load-cache
|
|
106
133
|
- run:
|
|
107
|
-
name:
|
|
108
|
-
command:
|
|
134
|
+
name: Install Rubocop
|
|
135
|
+
command: gem install rubocop rubocop-sequel rubocop-performance rubocop-rspec
|
|
109
136
|
- run:
|
|
110
|
-
name:
|
|
111
|
-
command:
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
137
|
+
name: update bundler
|
|
138
|
+
command: gem update bundler
|
|
139
|
+
- ruby/install-deps
|
|
140
|
+
- run:
|
|
141
|
+
name: update max connections
|
|
142
|
+
command: 'sudo apt-get install default-mysql-client && mysql -h 127.0.0.1 -u root --password=legion --execute="set global max_connections = 100000;"'
|
|
143
|
+
- ruby/run-tests
|
|
144
|
+
- run:
|
|
145
|
+
name: Run Rubocop
|
|
146
|
+
command: rubocop --format=json --out=rubocop-result.json
|
|
147
|
+
- sonarcloud/scan
|
|
148
|
+
- ruby/save-cache
|
|
115
149
|
|
|
116
150
|
workflows:
|
|
117
151
|
version: 2
|
|
118
|
-
|
|
152
|
+
rubocop-rspec:
|
|
119
153
|
jobs:
|
|
120
154
|
- rubocop
|
|
121
|
-
- ruby-
|
|
122
|
-
requires:
|
|
123
|
-
- ruby-2.4
|
|
124
|
-
filters:
|
|
125
|
-
branches:
|
|
126
|
-
only: /\bdevelop\b|\bmaster\b/
|
|
127
|
-
- ruby-2.4:
|
|
155
|
+
- ruby-two-five:
|
|
128
156
|
requires:
|
|
129
157
|
- rubocop
|
|
130
|
-
- ruby-
|
|
158
|
+
- ruby-two-six:
|
|
159
|
+
requires:
|
|
160
|
+
- ruby-two-five
|
|
161
|
+
- ruby-two-seven:
|
|
162
|
+
requires:
|
|
163
|
+
- ruby-two-five
|
|
164
|
+
- sonarcloud:
|
|
165
|
+
requires:
|
|
166
|
+
- ruby-two-seven
|
|
167
|
+
- ruby-two-six
|
|
168
|
+
- jruby-nine-two:
|
|
131
169
|
requires:
|
|
132
|
-
- ruby-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
only: /\bdevelop\b|\bmaster\b/
|
|
136
|
-
- ruby-2.6:
|
|
170
|
+
- ruby-two-seven
|
|
171
|
+
- ruby-two-six
|
|
172
|
+
- jruby-nine-two-e:
|
|
137
173
|
requires:
|
|
138
|
-
-
|
|
139
|
-
filters:
|
|
140
|
-
branches:
|
|
141
|
-
only: /\bdevelop\b|\bmaster\b/
|
|
142
|
-
# - jruby-9.2:
|
|
143
|
-
# requires:
|
|
144
|
-
# - ruby-2.3
|
|
145
|
-
# - ruby-2.4
|
|
146
|
-
# - ruby-2.5
|
|
147
|
-
# - ruby-2.6
|
|
174
|
+
- jruby-nine-two
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-sequel
|
|
3
|
+
- rubocop-performance
|
|
4
|
+
|
|
5
|
+
Layout/LineLength:
|
|
2
6
|
Max: 120
|
|
3
7
|
Exclude:
|
|
4
8
|
- 'lib/legion/data/migrations/*.rb'
|
|
@@ -6,6 +10,8 @@ Metrics/MethodLength:
|
|
|
6
10
|
Max: 30
|
|
7
11
|
Metrics/ClassLength:
|
|
8
12
|
Max: 1500
|
|
13
|
+
Metrics/AbcSize:
|
|
14
|
+
Max: 34
|
|
9
15
|
Metrics/BlockLength:
|
|
10
16
|
Max: 50
|
|
11
17
|
Exclude:
|
|
@@ -14,16 +20,13 @@ Layout/SpaceAroundEqualsInParameterDefault:
|
|
|
14
20
|
EnforcedStyle: space
|
|
15
21
|
Style/SymbolArray:
|
|
16
22
|
Enabled: true
|
|
17
|
-
Layout/
|
|
23
|
+
Layout/HashAlignment:
|
|
18
24
|
EnforcedHashRocketStyle: table
|
|
19
25
|
EnforcedColonStyle: table
|
|
20
|
-
Style/HashSyntax:
|
|
21
|
-
EnforcedStyle: ruby19_no_mixed_keys
|
|
22
26
|
Style/Documentation:
|
|
23
27
|
Enabled: false
|
|
24
28
|
AllCops:
|
|
25
|
-
TargetRubyVersion: 2.
|
|
29
|
+
TargetRubyVersion: 2.5
|
|
30
|
+
NewCops: enable
|
|
26
31
|
Style/FrozenStringLiteralComment:
|
|
27
32
|
Enabled: false
|
|
28
|
-
Naming/FileName:
|
|
29
|
-
Enabled: false
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Legion::Data Changelog
|
|
2
|
+
## v1.1.2
|
|
3
|
+
* Updating connection details to support JDBC
|
|
4
|
+
* Changing default max connections to 10
|
|
5
|
+
* Fixing issue with Legion::Cache always throwing an error
|
|
6
|
+
|
|
7
|
+
## v0.2.0
|
|
8
|
+
* Redesigning schema
|
|
9
|
+
|
|
10
|
+
## v0.1.1
|
|
11
|
+
* Updated `rubocop.yml` with updated syntax
|
|
12
|
+
* Changing default connection count to 100 from 10
|
|
13
|
+
* Updating some exception handling to meet rubocop requirements
|
|
14
|
+
* Updating gemspec to have more things
|
|
15
|
+
* Fixing logic in debug_logging
|
|
16
|
+
* Adding RSpec tests for debug_logging
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
legion-data (1.1.4)
|
|
5
|
+
legion-logging
|
|
6
|
+
legion-settings
|
|
7
|
+
mysql2
|
|
8
|
+
sequel
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: https://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
ast (2.4.1)
|
|
14
|
+
codecov (0.2.12)
|
|
15
|
+
json
|
|
16
|
+
simplecov
|
|
17
|
+
diff-lcs (1.4.4)
|
|
18
|
+
docile (1.3.2)
|
|
19
|
+
json (2.3.1)
|
|
20
|
+
json (2.3.1-java)
|
|
21
|
+
json_pure (2.3.1)
|
|
22
|
+
legion-json (1.1.2)
|
|
23
|
+
json_pure
|
|
24
|
+
multi_json
|
|
25
|
+
legion-logging (1.1.1)
|
|
26
|
+
rainbow (~> 3)
|
|
27
|
+
legion-settings (1.1.1)
|
|
28
|
+
legion-json
|
|
29
|
+
legion-logging
|
|
30
|
+
multi_json (1.15.0)
|
|
31
|
+
mysql2 (0.5.3)
|
|
32
|
+
parallel (1.19.2)
|
|
33
|
+
parser (2.7.2.0)
|
|
34
|
+
ast (~> 2.4.1)
|
|
35
|
+
rainbow (3.0.0)
|
|
36
|
+
rake (13.0.1)
|
|
37
|
+
regexp_parser (1.8.2)
|
|
38
|
+
rexml (3.2.4)
|
|
39
|
+
rspec (3.9.0)
|
|
40
|
+
rspec-core (~> 3.9.0)
|
|
41
|
+
rspec-expectations (~> 3.9.0)
|
|
42
|
+
rspec-mocks (~> 3.9.0)
|
|
43
|
+
rspec-core (3.9.3)
|
|
44
|
+
rspec-support (~> 3.9.3)
|
|
45
|
+
rspec-expectations (3.9.2)
|
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
47
|
+
rspec-support (~> 3.9.0)
|
|
48
|
+
rspec-mocks (3.9.1)
|
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
+
rspec-support (~> 3.9.0)
|
|
51
|
+
rspec-support (3.9.3)
|
|
52
|
+
rspec_junit_formatter (0.4.1)
|
|
53
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
|
54
|
+
rubocop (0.93.1)
|
|
55
|
+
parallel (~> 1.10)
|
|
56
|
+
parser (>= 2.7.1.5)
|
|
57
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
58
|
+
regexp_parser (>= 1.8)
|
|
59
|
+
rexml
|
|
60
|
+
rubocop-ast (>= 0.6.0)
|
|
61
|
+
ruby-progressbar (~> 1.7)
|
|
62
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
63
|
+
rubocop-ast (0.8.0)
|
|
64
|
+
parser (>= 2.7.1.5)
|
|
65
|
+
rubocop-md (0.4.0)
|
|
66
|
+
rubocop (~> 0.60)
|
|
67
|
+
rubocop-performance (1.8.1)
|
|
68
|
+
rubocop (>= 0.87.0)
|
|
69
|
+
rubocop-ast (>= 0.4.0)
|
|
70
|
+
rubocop-rspec (1.43.2)
|
|
71
|
+
rubocop (~> 0.87)
|
|
72
|
+
rubocop-sequel (0.0.6)
|
|
73
|
+
rubocop (~> 0.55, >= 0.55)
|
|
74
|
+
ruby-progressbar (1.10.1)
|
|
75
|
+
sequel (5.37.0)
|
|
76
|
+
simplecov (0.19.0)
|
|
77
|
+
docile (~> 1.1)
|
|
78
|
+
simplecov-html (~> 0.11)
|
|
79
|
+
simplecov-html (0.12.3)
|
|
80
|
+
unicode-display_width (1.7.0)
|
|
81
|
+
|
|
82
|
+
PLATFORMS
|
|
83
|
+
java
|
|
84
|
+
ruby
|
|
85
|
+
|
|
86
|
+
DEPENDENCIES
|
|
87
|
+
bundler
|
|
88
|
+
codecov
|
|
89
|
+
legion-data!
|
|
90
|
+
rake
|
|
91
|
+
rspec
|
|
92
|
+
rspec_junit_formatter
|
|
93
|
+
rubocop
|
|
94
|
+
rubocop-md
|
|
95
|
+
rubocop-performance
|
|
96
|
+
rubocop-rspec
|
|
97
|
+
rubocop-sequel
|
|
98
|
+
|
|
99
|
+
BUNDLED WITH
|
|
100
|
+
2.1.4
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Legion::Data
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
Legion::Data is used by the framework to connect to a database. All database changes should be
|
|
4
|
+
added as a migration with proper up/downs.
|
|
6
5
|
|
|
7
6
|
## Installation
|
|
8
7
|
|
|
@@ -22,14 +21,17 @@ Or install it yourself as:
|
|
|
22
21
|
|
|
23
22
|
## Usage
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
You can create a new connection to the database with the following example
|
|
25
|
+
``` Legion::Data::Connection.new.database.connection ```
|
|
26
|
+
Keep in mind that if you need access to the database as part of a LEX, you should instead add it as a
|
|
27
|
+
requirement inside your definitions with the following
|
|
28
|
+
```
|
|
29
|
+
def requirements
|
|
30
|
+
%w[legion-transport legion-data]
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
and the framework will take care of the rest.
|
|
32
34
|
|
|
33
35
|
## Contributing
|
|
34
36
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://
|
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/legion-io/legion-data.
|