ettin 1.1.2 → 1.1.3

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
  SHA1:
3
- metadata.gz: f8490b9cbcf5cd7c39358c0fce96f4f972975b3f
4
- data.tar.gz: d96aa3ec4159cd684b44dea241b960474499dd70
3
+ metadata.gz: 0fce81d67e0d2aca6ca2c62a169ef8725c06b028
4
+ data.tar.gz: 49da37aeaa16188ffb672e3b3231883e1af3a11d
5
5
  SHA512:
6
- metadata.gz: 682fc75dc44fdfca0cdeea181620865faa689de3f247eb1e5a3d020e7f45dfd50994e076d102be3bf00ffee81de6f31e9f9851be62de923936fe31e70f124fe4
7
- data.tar.gz: f1818a8983c6f5b45d8b2f57d00025c46cf049310be393151d8764ae21bdbe807c338cd81f458bf2cf80dcdf316f25c1a8e0010cdef50ac43a987630d05e8ac9
6
+ metadata.gz: 6491a8b5851949c6ead0f36b2d75b34e5dcd1744cb2a901e37f62ab5ac36b4108800f59c81d6270549c9c8acec89d402df4aac25caaebc9129f1a1469f01637b
7
+ data.tar.gz: b2a93de70da048a1144dc12b12ca3956f364d8df8fed439b09f28429afc50c5c9079fb9888e6a84428d04050148f7db648166346f3b2c01865d9bd6b7895a8a3
data/bin/ettin CHANGED
@@ -19,6 +19,11 @@ parser = OptionParser.new do |opts|
19
19
  options[:verbose] = v
20
20
  end
21
21
 
22
+ options[:compat] = false
23
+ opts.on("-c", "--[no-]compat", "Create extra config files for compatibility with railsconfig gem.") do |c|
24
+ options[:compat] = c
25
+ end
26
+
22
27
  opts.on("-h", "--help", "Prints this help") do
23
28
  puts opts
24
29
  exit
@@ -33,15 +38,26 @@ unless options[:start_path]
33
38
  exit 1
34
39
  end
35
40
 
36
- ["development", "production", "test"]
41
+ files = ["development", "production", "test"]
37
42
  .map {|env| Ettin::ConfigFiles.for(root: options[:start_path], env: env) }
38
43
  .flatten
39
44
  .sort.reverse
40
45
  .uniq
41
- .each do |path|
42
- path.parent.mkpath
43
- FileUtils.touch path.to_s
44
- puts path if options[:verbose]
45
- end
46
+
47
+ unless options[:compat]
48
+ files.reject!{|path| path.dirname.basename.to_s == "environments" }
49
+ end
50
+
51
+ files.each do |path|
52
+ path.parent.mkpath
53
+ FileUtils.touch path.to_s
54
+ puts path if options[:verbose]
55
+ end
56
+
57
+ puts "\nAdding .local.yml files to .gitignore" if options[:verbose]
58
+ `echo "\n# Ignore local configuration files" >> .gitignore`
59
+ files
60
+ .select{|path| path.basename.to_s.include?("local")}
61
+ .each{|path| `echo "#{path}" >> .gitignore`}
46
62
 
47
63
  puts "" if options[:verbose]
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
19
19
  end
20
20
  spec.bindir = "bin"
21
21
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
- puts spec.executables
23
22
  spec.require_paths = ["lib"]
24
23
 
25
24
  spec.add_runtime_dependency "deep_merge"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ettin
4
- VERSION = "1.1.2"
4
+ VERSION = "1.1.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ettin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Hockey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-02 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge