atesta 0.0.2 → 0.0.3
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/README.rdoc +8 -1
- data/VERSION +1 -1
- data/lib/resource/template.rb +5 -1
- data/lib/status.rb +11 -8
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
= atesta
|
2
2
|
|
3
|
-
|
3
|
+
Basically it loads chef's provisioning-cookbooks with a few cool improvements!
|
4
|
+
cookbooks are more powerful and easy to use, and there is no strategy!
|
5
|
+
atesta only knows how to evaluate the cookbooks but how exactly they are executed is up to you.
|
6
|
+
|
7
|
+
That way you can use atesta for deployments, imports.
|
8
|
+
or cool automated-setups or configurations that dont even need to be remote.
|
9
|
+
|
10
|
+
more doc comming soon.
|
4
11
|
|
5
12
|
== Note on Patches/Pull Requests
|
6
13
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/resource/template.rb
CHANGED
@@ -11,6 +11,10 @@ module Resource
|
|
11
11
|
PREFIX = ''
|
12
12
|
|
13
13
|
def run
|
14
|
+
Execution.block 'Ensure template base', @target, @owner do |b|
|
15
|
+
ensure_target_zone
|
16
|
+
b.always_run @always_run
|
17
|
+
end
|
14
18
|
Execution.block 'Compiling template file', @target, @owner do |b|
|
15
19
|
compile!
|
16
20
|
b.always_run @always_run
|
@@ -27,7 +31,7 @@ module Resource
|
|
27
31
|
def initialize target, &block
|
28
32
|
set_base_defaults
|
29
33
|
@target = target
|
30
|
-
ensure_target_zone
|
34
|
+
# ensure_target_zone
|
31
35
|
self.instance_eval(&block)
|
32
36
|
end
|
33
37
|
|
data/lib/status.rb
CHANGED
@@ -3,13 +3,16 @@ class Status; end
|
|
3
3
|
|
4
4
|
class << Status
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
attr_accessor :status_file
|
7
|
+
|
8
|
+
def status_file
|
9
|
+
@status_file ||= '/tmp/deployment/env/status'
|
10
|
+
end
|
8
11
|
|
9
12
|
def load_or_create
|
10
|
-
Output.info 'Loading status file',
|
11
|
-
`mkdir -p #{File.dirname(
|
12
|
-
(File.exist?
|
13
|
+
Output.info 'Loading status file', status_file
|
14
|
+
`mkdir -p #{File.dirname(status_file)}`
|
15
|
+
(File.exist? status_file) ? eval(File.read(status_file)) : {}
|
13
16
|
end
|
14
17
|
|
15
18
|
def get
|
@@ -18,14 +21,14 @@ class << Status
|
|
18
21
|
|
19
22
|
def reload!
|
20
23
|
Output.jump
|
21
|
-
Output.info 'Reloading status',
|
24
|
+
Output.info 'Reloading status', status_file
|
22
25
|
save
|
23
26
|
@status = nil
|
24
27
|
end
|
25
28
|
|
26
29
|
def save
|
27
|
-
Output.info 'Saving deployment status to file',
|
28
|
-
File.open(
|
30
|
+
Output.info 'Saving deployment status to file', status_file
|
31
|
+
File.open(status_file, 'w+') do |file|
|
29
32
|
file.write Status.get.to_hash.inspect
|
30
33
|
end
|
31
34
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atesta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kazuyoshi tlacaelel
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-30 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|