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: cc7ffb417b7d418f2415df1cd5c6cbd0325d78e576e71a701010bd44ead098f6
4
- data.tar.gz: 260e06a5fa81789bc977cac9b02c8e092100a0896d9eccc4c4f88423592a1f9d
3
+ metadata.gz: de09d3647113016448d9e6a404de9a51eeb765f63ae25865ccbcfa0ab0d51715
4
+ data.tar.gz: 809874753f0c96632637e5f1427aca262695dc027bae68369541e9e835c096b1
5
5
  SHA512:
6
- metadata.gz: 9e54869d4ec1c390a555731ac199ece8b804098eece937321123e48884d0b7fa0dff418147f97e811b4e05fb23517f433bf622b08fc4f4941d04801fa31f8570
7
- data.tar.gz: 410eb4b5c14a632600ecccade83dcca9764965085dfa95177976365bc762516ac36e8d6ec70cdd51925d9204c19652afe80c50887774b67ffbe0990c9edeb18b
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
- loaded_yaml = YAML.load(ERB.new(database_yaml.read).result) || {}
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
- ARGV[0] == 'rails' && %w[server s].include?(ARGV[1])
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnContainer
4
- VERSION = '0.0.12'
4
+ VERSION = '0.0.16'
5
5
  end
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.12
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-02-23 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport