chake 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +9 -0
- data/Rakefile +5 -1
- data/chake.gemspec +1 -0
- data/chake.spec.erb +17 -23
- data/examples/test/Rakefile +1 -1
- data/lib/chake.rb +14 -4
- data/lib/chake/version.rb +1 -1
- data/spec/spec_helper.rb +3 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a066ad18b894e6b4a17a6e67ddeea63e4120f56
|
4
|
+
data.tar.gz: 00cfd9eadc606cd339292a23ad92a35b1d519a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4df34f504c93cbc041bd7a0eb8364b8f82163ac9a0fafe7dbf8f2980d2792a7d3d9eba727cd8709889564edc0ba4ea653e986b93628d56d8d26b07caf2d6d8
|
7
|
+
data.tar.gz: 1e7531dd97822ec1afce9e1fc2b56175c6f0547639ccd9c5924846cefd369ca40be35c6c549ce5cd1306231681166608409b44b01c2c258cc93c5be54c3eb77e
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.10.2
|
2
|
+
|
3
|
+
* Fix check for modified files at the upload phase. Now chake will properly
|
4
|
+
avoiding rsync calls when there is no changed files since the latest upload.
|
5
|
+
* Fix generated RPM spec file. Will now properly build, install, and work under
|
6
|
+
both CentOS 7 and Fedora 22+.
|
7
|
+
* Collect test coverage statistics when running tests.
|
8
|
+
* Added dependency on simplecov
|
9
|
+
|
1
10
|
# 0.10.1
|
2
11
|
|
3
12
|
* actually implement support for custom ports in Node URL's. Despite being
|
data/Rakefile
CHANGED
@@ -34,7 +34,11 @@ task 'deb:install' => 'build:debsrc'do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
desc 'Create source RPM package'
|
37
|
-
task 'build:rpmsrc' => ['build:tarball', 'pkg/chake.spec']
|
37
|
+
task 'build:rpmsrc' => ['build:tarball', 'pkg/chake.spec'] do
|
38
|
+
chdir 'pkg' do
|
39
|
+
sh 'rpmbuild --define "_topdir .rpmbuild" --define "_sourcedir $(pwd)" --define "_srcrpmdir $(pwd)" -bs chake.spec --nodeps'
|
40
|
+
end
|
41
|
+
end
|
38
42
|
|
39
43
|
file 'pkg/chake.spec' => ['chake.spec.erb', 'lib/chake/version.rb'] do |t|
|
40
44
|
require 'erb'
|
data/chake.gemspec
CHANGED
data/chake.spec.erb
CHANGED
@@ -1,47 +1,41 @@
|
|
1
|
-
%define
|
2
|
-
%define version <%= pkg.version %>
|
3
|
-
%define unmangled_version <%= pkg.version %>
|
4
|
-
%define release 1
|
1
|
+
%define gem_name <%= pkg.name %>
|
5
2
|
|
6
3
|
Summary: <%= pkg.summary %>
|
7
|
-
Name:
|
8
|
-
Version:
|
9
|
-
Release:
|
10
|
-
Source0: %{name}-%{
|
4
|
+
Name: <%= pkg.name %>
|
5
|
+
Version: <%= pkg.version %>
|
6
|
+
Release: 1
|
7
|
+
Source0: %{name}-%{version}.tar.gz
|
11
8
|
License: <%= pkg.license %>
|
12
9
|
Group: Development/Tools
|
13
10
|
Prefix: %{_prefix}
|
14
11
|
Vendor: <%= pkg.authors.first %> <<%= pkg.email.first %>>
|
15
12
|
Url: <%= pkg.homepage %>
|
16
13
|
BuildArch: noarch
|
17
|
-
BuildRequires: ruby, rubygem-rake, rubygem-bundler
|
14
|
+
BuildRequires: ruby, rubygems-devel, rubygem-rake, rubygem-bundler
|
18
15
|
Requires: ruby, rubygem-rake
|
19
16
|
|
20
|
-
%define gemdir <%= Gem.dir %>
|
21
|
-
%define gembuilddir %{buildroot}%{gemdir}
|
22
|
-
|
23
17
|
%description
|
24
18
|
<%= pkg.description %>
|
25
19
|
|
26
20
|
%prep
|
27
|
-
%setup -n %{name}-%{
|
21
|
+
%setup -n %{name}-%{version}
|
28
22
|
|
29
23
|
%build
|
30
24
|
|
31
|
-
%install
|
32
25
|
%{__rm} -rf %{buildroot}
|
33
|
-
mkdir -p %{gembuilddir}
|
34
26
|
sed -i -e 's#spec.files\s*=.*#spec.files = Dir.glob("**/*")#' %{name}.gemspec
|
35
|
-
rake build
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
27
|
+
rake bundler:build
|
28
|
+
%gem_install -n pkg/%{name}-%{version}.gem
|
29
|
+
|
30
|
+
%install
|
31
|
+
cp -a usr %{buildroot}/usr
|
40
32
|
|
41
33
|
%clean
|
42
34
|
rm -rf $RPM_BUILD_ROOT
|
43
35
|
|
44
36
|
%files
|
45
|
-
%{
|
46
|
-
%{
|
47
|
-
|
37
|
+
%{gem_instdir}/
|
38
|
+
%exclude %{gem_cache}
|
39
|
+
%{gem_spec}
|
40
|
+
%{_bindir}/chake
|
41
|
+
%doc %{gem_docdir}
|
data/examples/test/Rakefile
CHANGED
data/lib/chake.rb
CHANGED
@@ -99,14 +99,23 @@ def if_files_changed(node, group_name, files)
|
|
99
99
|
if files.empty?
|
100
100
|
return
|
101
101
|
end
|
102
|
-
|
102
|
+
hash_io = IO.popen(['xargs', 'sha1sum'], 'w+')
|
103
|
+
files.sort.each { |f| hash_io.puts(f) }
|
104
|
+
hash_io.close_write
|
105
|
+
current_hash = hash_io.read
|
106
|
+
|
103
107
|
hash_file = File.join($chake_tmpdir, node + '.' + group_name + '.sha1sum')
|
104
|
-
|
108
|
+
hash_on_disk = nil
|
109
|
+
if File.exists?(hash_file)
|
110
|
+
hash_on_disk = File.read(hash_file)
|
111
|
+
end
|
112
|
+
|
113
|
+
if current_hash != hash_on_disk
|
105
114
|
yield
|
106
115
|
end
|
107
116
|
FileUtils.mkdir_p(File.dirname(hash_file))
|
108
117
|
File.open(hash_file, 'w') do |f|
|
109
|
-
f.write(
|
118
|
+
f.write(current_hash)
|
110
119
|
end
|
111
120
|
end
|
112
121
|
|
@@ -179,7 +188,8 @@ $nodes.each do |node|
|
|
179
188
|
rsync = node.rsync + ["-avp"] + ENV.fetch('CHAKE_RSYNC_OPTIONS', '').split
|
180
189
|
rsync_logging = Rake.application.options.silent && '--quiet' || '--verbose'
|
181
190
|
|
182
|
-
|
191
|
+
hash_files = Dir.glob(File.join($chake_tmpdir, '*.sha1sum'))
|
192
|
+
files = Dir.glob("**/*").select { |f| !File.directory?(f) } - encrypted.keys - encrypted.values - hash_files
|
183
193
|
if_files_changed(hostname, 'plain', files) do
|
184
194
|
sh *rsync, '--delete', rsync_logging, *rsync_excludes, './', node.rsync_dest
|
185
195
|
end
|
data/lib/chake/version.rb
CHANGED
data/spec/spec_helper.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.10.
|
4
|
+
version: 0.10.2
|
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-10-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|