monkey_king 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce771d409b5784b567c5c7d28118975f3ce2fb7e
4
- data.tar.gz: 0f441f92c02d808dd5e187f7a3b7d8102ca72061
3
+ metadata.gz: ba401a00ad2c74b982115b664aa720eddfd385c3
4
+ data.tar.gz: f73252403a6856213d29264012d58e213e94afa7
5
5
  SHA512:
6
- metadata.gz: c3302ba366490113f4fad46d9f4d9a72d94a93ec4af610d0e37322900c57d74be514087b26a6a074980cece1ce35fd5b300de73d3cf1bba1b8b64e1ef8b64d7a
7
- data.tar.gz: 90b24123f43f89a55b50268d0132ba626ecf6db286da4d9b195553c756120cb6916df32aebb84616b8f7248b09dc841e497b1ac56c298c94c19ae1298a791b7a
6
+ metadata.gz: c096ba127dcf5d3e50329d7be704af6fd7b550e0f150fb9a48673b4def4f7b44ce8f856094790e09f3d30a8919bc3a76d6406e991369b1abbee53938c849b5b8
7
+ data.tar.gz: 3430a7109bc73e40eebd7a0adc8225817a7ce655ec250797f7ab6c4b8bca34d31af75375f8b71b6cddbd49a15eb1549d513082c5ea03d0b9e6128fc331ff7646
@@ -29,5 +29,29 @@ module MonkeyKing
29
29
  end
30
30
  end
31
31
  end
32
+
33
+ desc "Clone the repo and replace secret and env annotation"
34
+ input :globs, :argument => :splat
35
+ def replace
36
+ globs = input[:globs]
37
+ parser = MonkeyKing::Parser.new
38
+
39
+ deployment_yaml_files = []
40
+ deployment_yaml_files += Dir.glob(globs)
41
+
42
+ deployment_yaml_files.each do |file|
43
+ extension = file.split('.').last
44
+ if extension == 'yml'
45
+ puts "Transforming #{file}..."
46
+ transformed_content = parser.transform(file)
47
+ File.open(file, "w") do |overwrite_file|
48
+ overwrite_file.write transformed_content
49
+ end
50
+ else
51
+ puts "skipping non-yaml file #{file}..."
52
+ end
53
+ end
54
+ end
55
+
32
56
  end
33
57
  end
@@ -1,3 +1,3 @@
1
1
  module MonkeyKing
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monkey_king
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudops_hosted
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-24 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mothership