eycloud-helper-emerge 1.0.0 → 1.1.0
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.
- data/eycloud-helper-emerge.gemspec +2 -2
- data/metadata.json +1 -1
- data/metadata.rb +2 -2
- metadata +17 -7
- data/definitions/update_file.rb +0 -36
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
|
4
|
-
version = "1.
|
|
4
|
+
version = "1.1.0" # TODO get from metadata.json or .rb
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "eycloud-helper-emerge"
|
|
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
18
18
|
s.require_paths = ["lib"]
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
s.add_dependency("eycloud-helper-common")
|
|
21
21
|
s.add_development_dependency("rake")
|
|
22
22
|
end
|
data/metadata.json
CHANGED
data/metadata.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eycloud-helper-emerge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,22 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-03-
|
|
12
|
+
date: 2012-03-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: eycloud-helper-common
|
|
16
|
+
requirement: &70319852526260 !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: *70319852526260
|
|
14
25
|
- !ruby/object:Gem::Dependency
|
|
15
26
|
name: rake
|
|
16
|
-
requirement: &
|
|
27
|
+
requirement: &70319852525740 !ruby/object:Gem::Requirement
|
|
17
28
|
none: false
|
|
18
29
|
requirements:
|
|
19
30
|
- - ! '>='
|
|
@@ -21,7 +32,7 @@ dependencies:
|
|
|
21
32
|
version: '0'
|
|
22
33
|
type: :development
|
|
23
34
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *70319852525740
|
|
25
36
|
description: Emerge recipe for EY Cloud
|
|
26
37
|
email:
|
|
27
38
|
- drnicwilliams@gmail.com
|
|
@@ -36,7 +47,6 @@ files:
|
|
|
36
47
|
- Rakefile
|
|
37
48
|
- definitions/enable_package.rb
|
|
38
49
|
- definitions/package_use.rb
|
|
39
|
-
- definitions/update_file.rb
|
|
40
50
|
- eycloud-helper-emerge.gemspec
|
|
41
51
|
- metadata.json
|
|
42
52
|
- metadata.rb
|
|
@@ -54,7 +64,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
54
64
|
version: '0'
|
|
55
65
|
segments:
|
|
56
66
|
- 0
|
|
57
|
-
hash:
|
|
67
|
+
hash: 2595088575697671068
|
|
58
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
69
|
none: false
|
|
60
70
|
requirements:
|
|
@@ -63,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
63
73
|
version: '0'
|
|
64
74
|
segments:
|
|
65
75
|
- 0
|
|
66
|
-
hash:
|
|
76
|
+
hash: 2595088575697671068
|
|
67
77
|
requirements: []
|
|
68
78
|
rubyforge_project:
|
|
69
79
|
rubygems_version: 1.8.17
|
data/definitions/update_file.rb
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
define :update_file, :action => :append do
|
|
2
|
-
require 'tempfile'
|
|
3
|
-
|
|
4
|
-
filepath = params[:path] || params[:name]
|
|
5
|
-
|
|
6
|
-
file params[:name] do
|
|
7
|
-
backup params[:backup] if params[:backup]
|
|
8
|
-
group params[:group] if params[:group]
|
|
9
|
-
mode params[:mode] if params[:mode]
|
|
10
|
-
owner params[:owner] if params[:owner]
|
|
11
|
-
path filepath
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
case params[:action].to_sym
|
|
15
|
-
when :append, :rewrite
|
|
16
|
-
|
|
17
|
-
mode = params[:action].to_sym == :append ? 'a' : 'w'
|
|
18
|
-
|
|
19
|
-
ruby_block "#{params[:action]}-to-#{filepath}" do
|
|
20
|
-
block do
|
|
21
|
-
File.open(filepath, mode) do |f|
|
|
22
|
-
f.puts params[:body]
|
|
23
|
-
end
|
|
24
|
-
not_if(params[:not_if]) if params[:not_if]
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
when :truncate
|
|
29
|
-
|
|
30
|
-
execute "truncate-#{filepath}" do
|
|
31
|
-
command "> #{filepath}"
|
|
32
|
-
not_if(params[:not_if]) if params[:not_if]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
end
|
|
36
|
-
end
|