avm-tools 0.49.0 → 0.50.0
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: 1137821182b34e4446f1f175eac9e65759aa94850eaa2be6452e438794c3d7e2
|
4
|
+
data.tar.gz: 646ea6c80d87e421e6959d316c746ef24e778650346dfbc7cd141c556fec77ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a3a8f6965075d701380b9e97338b3d50497cf2ccc3e0e5bfe3f219c709db6b0c0bb3a6af6c51ea19557046c2170134fd70ea830b0faaddc03dac1f958a9c99
|
7
|
+
data.tar.gz: ea67bf1ddfdae82da134cb4883958ed9c1efc17d6b25e65d2acc40d5c16fadeacc67b1f93817c113b4165360caf16a21fee1ef38e788e2e76b8e593625a7d7ed
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/console/docopt_runner'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Rails
|
8
|
+
module Runners
|
9
|
+
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
10
|
+
enable_console_speaker
|
11
|
+
enable_simple_cache
|
12
|
+
|
13
|
+
DOC = <<~DOC
|
14
|
+
Runs a Ruby code with "rails runner".
|
15
|
+
|
16
|
+
Usage:
|
17
|
+
__PROGRAM__ [options] <code>
|
18
|
+
__PROGRAM__ --version
|
19
|
+
__PROGRAM__ -h | --help
|
20
|
+
|
21
|
+
Options:
|
22
|
+
-h --help Show this screen.
|
23
|
+
-e --environment Specifies the environment for the runner to
|
24
|
+
operate (test/development/production). Default: "development".
|
25
|
+
DOC
|
26
|
+
|
27
|
+
def run
|
28
|
+
infov 'Runner arguments', runner_args
|
29
|
+
infov 'Environment', context(:instance).host_env
|
30
|
+
runner_command.system!
|
31
|
+
end
|
32
|
+
|
33
|
+
def runner_command_uncached
|
34
|
+
context(:instance).bundle(*bundle_args)
|
35
|
+
end
|
36
|
+
|
37
|
+
def bundle_args
|
38
|
+
%w[exec rails runner] + runner_args
|
39
|
+
end
|
40
|
+
|
41
|
+
def runner_args
|
42
|
+
options.fetch('--environment').if_present([]) { |v| ['--environment', v] } +
|
43
|
+
[options.fetch('<code>')]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/rails/runners/runner'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Tools
|
7
|
+
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
8
|
+
class EacRailsBase0 < ::EacRubyUtils::Console::DocoptRunner
|
9
|
+
class Runner < ::Avm::Rails::Runners::Runner
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,41 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'eac_cli/default_runner'
|
3
|
+
require 'avm/rails/runners/runner'
|
5
4
|
|
6
5
|
module Avm
|
7
6
|
module Tools
|
8
7
|
class Runner < ::EacRubyUtils::Console::DocoptRunner
|
9
8
|
class EacRedmineBase0 < ::EacRubyUtils::Console::DocoptRunner
|
10
|
-
class Runner < ::
|
11
|
-
include ::EacCli::DefaultRunner
|
12
|
-
|
13
|
-
runner_definition do
|
14
|
-
desc 'Runs a Ruby code with "rails runner".'
|
15
|
-
arg_opt '-e', '--environment', 'Specifies the environment for the runner to operate' \
|
16
|
-
" under (test/development/production).\n" \
|
17
|
-
'Default: development'
|
18
|
-
pos_arg 'code'
|
19
|
-
end
|
20
|
-
|
21
|
-
def run
|
22
|
-
infov 'Runner arguments', runner_args
|
23
|
-
infov 'Environment', context(:instance).host_env
|
24
|
-
runner_command.system!
|
25
|
-
end
|
26
|
-
|
27
|
-
def runner_command_uncached
|
28
|
-
context(:instance).bundle(*bundle_args)
|
29
|
-
end
|
30
|
-
|
31
|
-
def bundle_args
|
32
|
-
%w[exec rails runner] + runner_args
|
33
|
-
end
|
34
|
-
|
35
|
-
def runner_args
|
36
|
-
options.fetch('--environment').if_present([]) { |v| ['--environment', v] } +
|
37
|
-
[options.fetch('<code>')]
|
38
|
-
end
|
9
|
+
class Runner < ::Avm::Rails::Runners::Runner
|
39
10
|
end
|
40
11
|
end
|
41
12
|
end
|
data/lib/avm/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- lib/avm/rails.rb
|
304
304
|
- lib/avm/rails/runners.rb
|
305
305
|
- lib/avm/rails/runners/bundle.rb
|
306
|
+
- lib/avm/rails/runners/runner.rb
|
306
307
|
- lib/avm/result.rb
|
307
308
|
- lib/avm/ruby.rb
|
308
309
|
- lib/avm/ruby/rubocop.rb
|
@@ -352,6 +353,7 @@ files:
|
|
352
353
|
- lib/avm/tools/runner/eac_rails_base0/bundle.rb
|
353
354
|
- lib/avm/tools/runner/eac_rails_base0/data.rb
|
354
355
|
- lib/avm/tools/runner/eac_rails_base0/deploy.rb
|
356
|
+
- lib/avm/tools/runner/eac_rails_base0/runner.rb
|
355
357
|
- lib/avm/tools/runner/eac_redmine_base0.rb
|
356
358
|
- lib/avm/tools/runner/eac_redmine_base0/bundle.rb
|
357
359
|
- lib/avm/tools/runner/eac_redmine_base0/data.rb
|