docker_rails_proxy 0.1.14 → 0.1.15
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: 11cc5b5ffa094628db0143b27de25323c7c6e610ff51f3bc3cfd308c0d944e0e
|
4
|
+
data.tar.gz: c151d104cbc5835d2afa116c667eee6241ff728d7fb66df49b4a80ad34b07473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7177b8ff7a8918bb156065c3e5832269d70cccf1b8575544b06e455e085e6b0d77743d07fdd84e00ec55f1b6dc00cd7ae308c65080e588c5484a76293b1dc387
|
7
|
+
data.tar.gz: 83ab38f68fef1981fb682dd57e2f4cb7063a143017e322bc57fb6431affda117cecf52c8cca23b73fe8c8b9066282b3e79583325bd68eeca639596b41d757a3c
|
@@ -40,8 +40,15 @@ module DockerRailsProxy
|
|
40
40
|
|
41
41
|
def split_arguments(arguments)
|
42
42
|
arguments = arguments.join(' ') if arguments.is_a?(Array)
|
43
|
-
arguments, additional_arguments = arguments.split('-- ')
|
44
|
-
[arguments
|
43
|
+
arguments, additional_arguments = arguments.split(' -- ')
|
44
|
+
[parse_arguments(arguments), parse_arguments(additional_arguments)]
|
45
|
+
end
|
46
|
+
|
47
|
+
def parse_arguments(arguments)
|
48
|
+
arguments.to_s.split(/\ -/).each_with_index.map do |argument, index|
|
49
|
+
argument = "-#{argument}" unless index.zero?
|
50
|
+
argument.match(/([^ ]+)\s*(.*)/m).captures.reject(&:blank?)
|
51
|
+
end.compact.flatten
|
45
52
|
end
|
46
53
|
end
|
47
54
|
end
|
@@ -77,10 +77,12 @@ module DockerRailsProxy
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def fswatch_start
|
80
|
+
logger.debug "fswatch command: #{FSWATCH_CMD}"
|
80
81
|
logger.info 'fswatch has been started'
|
82
|
+
|
81
83
|
PTY.spawn(FSWATCH_CMD) do |stdout, stdin, pid|
|
82
84
|
begin
|
83
|
-
stdout.each { |path| sync_or_kill(path: path, pid: pid) }
|
85
|
+
stdout.each { |path| sync_or_kill(path: path.strip, pid: pid) }
|
84
86
|
rescue Errno::EIO
|
85
87
|
logger.error EIO_ERROR
|
86
88
|
end
|
@@ -98,7 +100,9 @@ module DockerRailsProxy
|
|
98
100
|
return if stopping?
|
99
101
|
|
100
102
|
if branch_name == (branch = current_branch)
|
103
|
+
logger.debug("syncing #{path}")
|
101
104
|
sync source: path
|
105
|
+
logger.debug("#{path} synced")
|
102
106
|
else
|
103
107
|
$stderr.puts %(
|
104
108
|
`git checkout #{branch}` was detected, stopping fswatch
|
@@ -52,8 +52,8 @@ module DockerRailsProxy
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def credentials
|
55
|
-
#
|
56
|
-
#
|
55
|
+
# Temporary solution to use credentials in Rails 5.2
|
56
|
+
# Future version will use the --environment argument instead
|
57
57
|
command = "RAILS_ENV=#{args.first} EDITOR=vim bin/rails credentials:edit"
|
58
58
|
execute "bash -c '#{command}'", tty: true
|
59
59
|
end
|
@@ -12,7 +12,7 @@ module DockerRailsProxy
|
|
12
12
|
def logger
|
13
13
|
@logger ||= ::Logger.new(STDOUT).tap do |log|
|
14
14
|
log.formatter = proc do |severity, datetime, progname, msg|
|
15
|
-
"
|
15
|
+
"#{severity[0]}, [#{datetime.strftime('%Y-%m-%d %T')}] -- : #{msg}\n"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_rails_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jairo
|
8
8
|
- Vázquez
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Configures docker-compose and provides rails command helpers
|
15
15
|
email:
|
@@ -60,7 +60,7 @@ homepage: https://github.com/jairovm/docker_rails_proxy
|
|
60
60
|
licenses:
|
61
61
|
- MIT
|
62
62
|
metadata: {}
|
63
|
-
post_install_message:
|
63
|
+
post_install_message:
|
64
64
|
rdoc_options: []
|
65
65
|
require_paths:
|
66
66
|
- lib
|
@@ -75,8 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
|
-
rubygems_version: 3.0.
|
79
|
-
signing_key:
|
78
|
+
rubygems_version: 3.0.3
|
79
|
+
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: docker, docker-compose and rails wrapper
|
82
82
|
test_files: []
|