shiprails 0.1.18 → 0.1.19
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/lib/shiprails/port.rb +26 -12
- data/lib/shiprails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2c44e85dd37e1863dd6fdb778b295992981d00f
|
|
4
|
+
data.tar.gz: 9de493625b39caec31f4268fc26cb14fb0d73a55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36c0dceec99fa01f31b82e3c06a65154f4ab22ea384f6a24e0de8bbbdabeb1536c693332ab90f6c233186ac28e096dd91f27eedd5fc57c9ad0cdcdcd7c6e2199
|
|
7
|
+
data.tar.gz: 15ec2cf7aaf9f6f6646504afbea812a2d74ce347a92a8fb26c49af2e3104aa44a3bfef01d2239a159bdf1f933ef0d1899044cc4ceaa1f9527df8615f45cfca3d
|
data/lib/shiprails/port.rb
CHANGED
|
@@ -21,6 +21,7 @@ module Shiprails
|
|
|
21
21
|
default: false,
|
|
22
22
|
desc: "Remove container changes after use",
|
|
23
23
|
type: :boolean
|
|
24
|
+
|
|
24
25
|
def exec(*command_args)
|
|
25
26
|
build_command_args = ["docker-compose", "run"]
|
|
26
27
|
build_command_args << "--rm" unless options['no-rm']
|
|
@@ -41,18 +42,31 @@ module Shiprails
|
|
|
41
42
|
|
|
42
43
|
if commands = configuration[:exec]
|
|
43
44
|
commands.each do |name, command|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
unless command.is_a? String
|
|
46
|
+
desc name, "port exec #{command}"
|
|
47
|
+
define_method name.to_sym do |*command_args|
|
|
48
|
+
build_command_args = ["docker-compose", "run"]
|
|
49
|
+
build_command_args << "--rm" if command[:rm]
|
|
50
|
+
build_command_args << command[:service] || "app"
|
|
51
|
+
build_command_args += command[:command].split(' ') unless command[:command].nil?
|
|
52
|
+
build_command_args += command_args
|
|
53
|
+
command_string = build_command_args.join(' ')
|
|
54
|
+
run command_string
|
|
55
|
+
end
|
|
56
|
+
else
|
|
57
|
+
desc name, "port exec #{command}"
|
|
58
|
+
method_option "no-rm",
|
|
59
|
+
default: false,
|
|
60
|
+
desc: "Remove container changes after use",
|
|
61
|
+
type: :boolean
|
|
62
|
+
define_method name.to_sym do |*command_args|
|
|
63
|
+
build_command_args = ["docker-compose", "run"]
|
|
64
|
+
build_command_args << "--rm" unless options['no-rm']
|
|
65
|
+
build_command_args << "app"
|
|
66
|
+
build_command_args += command.split(' ') + command_args
|
|
67
|
+
command_string = build_command_args.join(' ')
|
|
68
|
+
run command_string
|
|
69
|
+
end
|
|
56
70
|
end
|
|
57
71
|
end
|
|
58
72
|
end
|
data/lib/shiprails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shiprails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zane Shannon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|