on_container 0.0.12 → 0.0.16
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: de09d3647113016448d9e6a404de9a51eeb765f63ae25865ccbcfa0ab0d51715
|
4
|
+
data.tar.gz: 809874753f0c96632637e5f1427aca262695dc027bae68369541e9e835c096b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c477f9274afcf3600a6e6a1e1570cc977ecee690ae0e85ceeefe13e131e305fc539f3b931dcfd03a06a9df2b30516047e7a46f226532a37d347c82ba0bd6c273
|
7
|
+
data.tar.gz: cee733d1fc26f46c113ec389efb8477a342303624c09f22eea6a604d34280e6bdc4cbeb2197ea80affeb8cd8892d4ee7db9790cf104fa2e2ad5280f880b7b350
|
@@ -13,7 +13,8 @@ module OnContainer
|
|
13
13
|
require 'yaml'
|
14
14
|
|
15
15
|
database_yaml = Pathname.new File.expand_path('config/database.yml')
|
16
|
-
|
16
|
+
database_config = ERB.new(database_yaml.read).result
|
17
|
+
loaded_yaml = YAML.safe_load(database_config, aliases: true) || {}
|
17
18
|
shared = loaded_yaml.delete('shared')
|
18
19
|
|
19
20
|
loaded_yaml.each { |_k, values| values.reverse_merge!(shared) } if shared
|
@@ -6,10 +6,14 @@ module OnContainer
|
|
6
6
|
def remove_rails_pidfile
|
7
7
|
system "rm -rf #{File.expand_path('tmp/pids/server.pid')}"
|
8
8
|
end
|
9
|
+
|
10
|
+
def rails?
|
11
|
+
ARGV[0] == 'rails'
|
12
|
+
end
|
9
13
|
|
10
14
|
def rails_server?
|
11
|
-
|
15
|
+
rails? && %w[server s].include?(ARGV[1])
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
15
|
-
end
|
19
|
+
end
|
@@ -42,6 +42,12 @@ module OnContainer
|
|
42
42
|
rails rspec sidekiq hutch puma rake webpack webpack-dev-server
|
43
43
|
].include?(ARGV[0])
|
44
44
|
end
|
45
|
+
|
46
|
+
def command_might_require_database?
|
47
|
+
%w[
|
48
|
+
rails rspec sidekiq hutch puma rake
|
49
|
+
].include?(ARGV[0])
|
50
|
+
end
|
45
51
|
end
|
46
52
|
end
|
47
|
-
end
|
53
|
+
end
|
data/lib/on_container/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: on_container
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Quintanilla
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|