toquen 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toquen/capistrano.rb +20 -15
- data/lib/toquen/version.rb +1 -1
- data/toquen.gemspec +4 -3
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d32944eef7c02af70094f31f5da6a672e4d091
|
4
|
+
data.tar.gz: d219dafe818f1afa110e74383303f2479157dcfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f13cf4def2069f625870c1032ae9cdef9eac497a9c858bbc46ed366e437a9e3c25c79c90402df3d72a3235c31ce9bc06d21cd22673d495fe6a2d9a60ed337f57
|
7
|
+
data.tar.gz: 3ab5bdd3f71451190c873db442a74c7c281ced839ae3fa6908f0155e6dc6d16f7bad7d63f498865ffe5f44e10b72348f90b2a938b782562eae59d6e16c9b4f73
|
data/lib/toquen/capistrano.rb
CHANGED
@@ -50,23 +50,28 @@ end
|
|
50
50
|
|
51
51
|
desc "send up apps.json config file"
|
52
52
|
task :update_appconfig do
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
53
|
+
if File.exists?('config/apps.json')
|
54
|
+
apps = JSON.parse(File.read('config/apps.json'))
|
55
|
+
config = { "_description" => "Dropped off by Toquen/Chef.", "servers" => [] }.merge(apps['default'] || {})
|
56
|
+
Dir.glob("#{fetch(:chef_data_bags_path)}/servers/*.json") do |fname|
|
57
|
+
open(fname, 'r') { |f| config['servers'] << JSON.parse(f.read) }
|
58
|
+
end
|
59
|
+
dest = File.join fetch(:apps_config_path, "/home/#{fetch(:ssh_options)[:user]}"), "apps.json"
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
on roles(:all), in: :parallel do |host|
|
62
|
+
appconfig = Marshal.load(Marshal.dump(config))
|
63
|
+
host.properties.roles.each do |role|
|
64
|
+
appconfig.merge!(apps[role.to_s] || {})
|
65
|
+
end
|
66
|
+
debug "Uploading app config file to #{dest}"
|
67
|
+
upload! StringIO.new(JSON.pretty_generate(appconfig)), "/tmp/apps.json"
|
68
|
+
sudo "mv /tmp/apps.json #{dest}"
|
69
|
+
sudo "chmod 755 #{dest}"
|
65
70
|
end
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
else
|
72
|
+
run_locally {
|
73
|
+
error "No config/apps.json file found."
|
74
|
+
}
|
70
75
|
end
|
71
76
|
end
|
72
77
|
|
data/lib/toquen/version.rb
CHANGED
data/toquen.gemspec
CHANGED
@@ -9,15 +9,16 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.authors = ["Brian Muller"]
|
10
10
|
gem.email = ["bamuller@gmail.com"]
|
11
11
|
gem.description = "Toquen: Capistrano + AWS + Chef-Solo"
|
12
|
-
gem.summary = "Toquen: Capistrano + AWS + Chef-Solo"
|
12
|
+
gem.summary = "Toquen: Joins Capistrano + AWS + Chef-Solo into small devops ease"
|
13
13
|
gem.homepage = "https://github.com/bmuller/toquen"
|
14
|
-
|
14
|
+
gem.licenses = ['MIT']
|
15
|
+
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
19
|
gem.require_paths = ["lib"]
|
19
20
|
gem.add_dependency('capistrano', '>= 3.0.1')
|
20
|
-
gem.add_dependency('aws-sdk')
|
21
|
+
gem.add_dependency('aws-sdk', '~> 1')
|
21
22
|
gem.add_dependency('terminal-table')
|
22
23
|
gem.add_dependency('term-ansicolor')
|
23
24
|
gem.add_development_dependency("rdoc")
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toquen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aws-sdk
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: terminal-table
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: term-ansicolor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: 'Toquen: Capistrano + AWS + Chef-Solo'
|
@@ -87,7 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
-
|
90
|
+
- .gitignore
|
91
91
|
- Gemfile
|
92
92
|
- LICENSE.txt
|
93
93
|
- README.md
|
@@ -104,7 +104,8 @@ files:
|
|
104
104
|
- lib/toquen/version.rb
|
105
105
|
- toquen.gemspec
|
106
106
|
homepage: https://github.com/bmuller/toquen
|
107
|
-
licenses:
|
107
|
+
licenses:
|
108
|
+
- MIT
|
108
109
|
metadata: {}
|
109
110
|
post_install_message:
|
110
111
|
rdoc_options: []
|
@@ -112,18 +113,18 @@ require_paths:
|
|
112
113
|
- lib
|
113
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
115
|
requirements:
|
115
|
-
- -
|
116
|
+
- - '>='
|
116
117
|
- !ruby/object:Gem::Version
|
117
118
|
version: '0'
|
118
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
|
-
- -
|
121
|
+
- - '>='
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
requirements: []
|
124
125
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.0.14
|
126
127
|
signing_key:
|
127
128
|
specification_version: 4
|
128
|
-
summary: 'Toquen: Capistrano + AWS + Chef-Solo'
|
129
|
+
summary: 'Toquen: Joins Capistrano + AWS + Chef-Solo into small devops ease'
|
129
130
|
test_files: []
|