ci-helper 0.4.0 → 0.4.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b8b84c09ceed862107e1dab8edc94376d88c9dc445edee953d22b098a9c1aec
|
4
|
+
data.tar.gz: 9dc1e0f8108facb2ef0f71396aa87c6e9989679483bb799aaeb96d762908be11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01491ffa280587336bff05506b3b1bb0261c3b33c70cf2f13467f6cc2e052e70518c82ced20a4ae96d17cd7b8d4f61753d786d42c75ff96c3adbc55ada9ce004'
|
7
|
+
data.tar.gz: ac0468a7cd7aad077cfa8f35b351890fec936f888748d08d91d8fa5dca4a536a1be409ace409a9ce806995e83629be4014b7fce01b5eaea902eef5b6bb60211b
|
data/README.md
CHANGED
@@ -74,6 +74,8 @@ List of available commands:
|
|
74
74
|
Accepted flags: `--config-path`
|
75
75
|
* `--config-path` — relative path to your config yaml file with schedule.
|
76
76
|
Usually it is `config/sidekiq_scheduler.yml`.
|
77
|
+
* `--with-database` — if you want to prepare database before executing specs,
|
78
|
+
you should set this flag to `true`.
|
77
79
|
|
78
80
|
### Rake Tasks
|
79
81
|
|
data/lib/ci_helper/commands.rb
CHANGED
@@ -8,6 +8,7 @@ module CIHelper
|
|
8
8
|
def call
|
9
9
|
return 0 if job_constants.empty?
|
10
10
|
|
11
|
+
create_and_migrate_database! if with_database?
|
11
12
|
cmd = craft_jobs_const_get_cmd
|
12
13
|
execute_with_rails_runner(cmd)
|
13
14
|
0
|
@@ -15,8 +16,12 @@ module CIHelper
|
|
15
16
|
|
16
17
|
private
|
17
18
|
|
19
|
+
def env
|
20
|
+
:development
|
21
|
+
end
|
22
|
+
|
18
23
|
def execute_with_rails_runner(cmd)
|
19
|
-
execute("bundle exec rails runner
|
24
|
+
execute("bundle exec rails runner '#{cmd}'")
|
20
25
|
end
|
21
26
|
|
22
27
|
def craft_jobs_const_get_cmd
|
@@ -27,6 +32,10 @@ module CIHelper
|
|
27
32
|
@job_constants ||= config.values.reject(&:nil?).flat_map(&:keys).uniq
|
28
33
|
end
|
29
34
|
|
35
|
+
def with_database?
|
36
|
+
boolean_option(:with_database)
|
37
|
+
end
|
38
|
+
|
30
39
|
def config
|
31
40
|
@config ||= YAML.load_file(options[:config_path])
|
32
41
|
end
|
@@ -37,11 +37,11 @@ module CIHelper
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def with_database?
|
40
|
-
|
40
|
+
boolean_option(:with_database)
|
41
41
|
end
|
42
42
|
|
43
43
|
def split_resultset?
|
44
|
-
|
44
|
+
boolean_option(:split_resultset)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/lib/ci_helper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JustAnotherDude
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|