chake 0.7 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +8 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +4 -2
- data/chake.gemspec +1 -1
- data/lib/chake.rb +8 -2
- data/lib/chake/readline.rb +48 -0
- data/lib/chake/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe9856d68ffd9ce6f7026dfe84fc5431a6e3066e
|
4
|
+
data.tar.gz: 42b587ccb6da1cebe94fca85d9e0531e9015f1eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7be8eab84c150e1f342a1018f57309a19626f7cf5a9dba5ae50886fd8522aa3327fed89724690808b5cb1cbbf08674d5949c2ffd7160b98f132504e4758d453
|
7
|
+
data.tar.gz: 1a5980d029fb188928ca0655deedb35486a60b35952d6fa345c54b15a44727e7fe6342717ace3e08a30aaa294ecf8daf27e0d559121304c0339ec0547cb7c319
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 0.8
|
2
|
+
|
3
|
+
* gemspec: minor improvements in the long description
|
4
|
+
* LICENSE.txt: fixed license name
|
5
|
+
* run: print small message before prompting
|
6
|
+
* Add history support for the `run` tasks
|
7
|
+
* Abort `run` tasks if no command is provided
|
8
|
+
|
1
9
|
# 0.7
|
2
10
|
|
3
11
|
* gemspec: improve summary and description
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
namespace :bundler do
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
end
|
2
4
|
|
3
5
|
task :test do
|
4
6
|
sh 'rspec', '--color'
|
@@ -105,6 +107,6 @@ task :check_changelog do
|
|
105
107
|
end
|
106
108
|
end
|
107
109
|
|
108
|
-
task :release => [:check_tag, :check_changelog, :test, :obs]
|
110
|
+
task :release => [:check_tag, :check_changelog, :test, 'bundler:release', :obs]
|
109
111
|
|
110
112
|
task :default => :test
|
data/chake.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Antonio Terceiro"]
|
10
10
|
spec.email = ["terceiro@softwarelivre.org"]
|
11
11
|
spec.summary = %q{serverless configuration management tool for chef}
|
12
|
-
spec.description = %q{chake allows one to manage a number of hosts via SSH by combining chef (solo) and rake. It doesn't require a chef server; all you need is a workstation from where you can SSH into all your hosts. chake automates copying the configuration management repository to the target host (including managing encrypted files), running chef on them, and
|
12
|
+
spec.description = %q{chake allows one to manage a number of hosts via SSH by combining chef (solo) and rake. It doesn't require a chef server; all you need is a workstation from where you can SSH into all your hosts. chake automates copying the configuration management repository to the target host (including managing encrypted files), running chef on them, and running arbitrary commands on the hosts.}
|
13
13
|
spec.homepage = "https://gitlab.com/terceiro/chake"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/lib/chake.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
require 'yaml'
|
4
4
|
require 'json'
|
5
5
|
require 'tmpdir'
|
6
|
-
require 'readline'
|
7
6
|
|
8
7
|
require 'chake/version'
|
9
8
|
require 'chake/node'
|
9
|
+
require 'chake/readline'
|
10
10
|
|
11
11
|
nodes_file = ENV['CHAKE_NODES'] || 'nodes.yaml'
|
12
12
|
node_data = File.exists?(nodes_file) && YAML.load_file(nodes_file) || {}
|
@@ -192,7 +192,13 @@ $nodes.each do |node|
|
|
192
192
|
end
|
193
193
|
|
194
194
|
task :run_input do
|
195
|
-
|
195
|
+
puts "# Enter command to run (use arrow keys for history):"
|
196
|
+
$cmd = ENV['CMD'] || Chake::Readline.readline
|
197
|
+
if !$cmd || $cmd.strip == ''
|
198
|
+
puts
|
199
|
+
puts "I: no command provided, operation aborted."
|
200
|
+
exit(1)
|
201
|
+
end
|
196
202
|
end
|
197
203
|
|
198
204
|
desc "upload to all nodes"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'etc'
|
2
|
+
require 'readline'
|
3
|
+
|
4
|
+
module Chake
|
5
|
+
|
6
|
+
module Readline
|
7
|
+
|
8
|
+
class << self
|
9
|
+
|
10
|
+
def history_file
|
11
|
+
File.join(Dir.home, '.chake_history')
|
12
|
+
end
|
13
|
+
|
14
|
+
def init
|
15
|
+
return if !File.exists?(history_file)
|
16
|
+
File.readlines(history_file).each do |line|
|
17
|
+
@last = line.strip
|
18
|
+
::Readline::HISTORY.push(@last)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def finish
|
23
|
+
history = ::Readline::HISTORY.map { |line| line }
|
24
|
+
File.open(history_file, 'w') do |f|
|
25
|
+
history.last(500).each do |line|
|
26
|
+
f.puts(line)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def readline
|
32
|
+
input = ::Readline.readline('$ ')
|
33
|
+
if input && input.strip != '' && input != @last
|
34
|
+
::Readline::HISTORY.push(input)
|
35
|
+
end
|
36
|
+
input
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
Chake::Readline.init
|
46
|
+
at_exit do
|
47
|
+
Chake::Readline.finish
|
48
|
+
end
|
data/lib/chake/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Terceiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,7 +56,7 @@ description: chake allows one to manage a number of hosts via SSH by combining c
|
|
56
56
|
(solo) and rake. It doesn't require a chef server; all you need is a workstation
|
57
57
|
from where you can SSH into all your hosts. chake automates copying the configuration
|
58
58
|
management repository to the target host (including managing encrypted files), running
|
59
|
-
chef on them, and
|
59
|
+
chef on them, and running arbitrary commands on the hosts.
|
60
60
|
email:
|
61
61
|
- terceiro@softwarelivre.org
|
62
62
|
executables:
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/chake/bootstrap/01_debian.sh
|
87
87
|
- lib/chake/bootstrap/99_unsupported.sh
|
88
88
|
- lib/chake/node.rb
|
89
|
+
- lib/chake/readline.rb
|
89
90
|
- lib/chake/version.rb
|
90
91
|
- spec/chake/backend/local_spec.rb
|
91
92
|
- spec/chake/backend/ssh_spec.rb
|
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
113
|
version: '0'
|
113
114
|
requirements: []
|
114
115
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.4.5
|
116
117
|
signing_key:
|
117
118
|
specification_version: 4
|
118
119
|
summary: serverless configuration management tool for chef
|