logical-construct 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,7 @@ module LogicalConstruct
|
|
8
8
|
:remote_server => nested( :address => nil, :user => "root"),
|
9
9
|
:construct_dir => "/var/logical-construct"
|
10
10
|
)
|
11
|
-
|
12
|
-
nil_fields :valise
|
11
|
+
nil_fields :valise, :platform
|
13
12
|
|
14
13
|
def default_configuration(core)
|
15
14
|
super
|
@@ -18,8 +17,14 @@ module LogicalConstruct
|
|
18
17
|
|
19
18
|
def define
|
20
19
|
in_namespace do
|
21
|
-
task :collect, [:address] do |t, args|
|
20
|
+
task :collect, [:address, :platform] do |t, args|
|
21
|
+
[:address, :platform].each do |field|
|
22
|
+
if args[field].nil?
|
23
|
+
fail "Need #{field} for setup"
|
24
|
+
end
|
25
|
+
end
|
22
26
|
remote_server.address = args[:address]
|
27
|
+
self.platform = args[:platform]
|
23
28
|
end
|
24
29
|
|
25
30
|
task_spine(:collect, :local_setup, :remote_groundwork, :remote_config, :remote_setup)
|
@@ -27,7 +32,7 @@ module LogicalConstruct
|
|
27
32
|
end
|
28
33
|
|
29
34
|
desc "Set up a remote server to act as a Construct foundation"
|
30
|
-
task root_task,[:address] => self[:complete]
|
35
|
+
task root_task,[:address, :platform] => self[:complete]
|
31
36
|
end
|
32
37
|
|
33
38
|
def default_subtasks
|
@@ -42,15 +42,17 @@ module LogicalConstruct
|
|
42
42
|
default_namespace :build_files
|
43
43
|
|
44
44
|
setting(:target_dir, "target_configs")
|
45
|
-
required_fields :valise, :construct_dir
|
45
|
+
required_fields :valise, :construct_dir, :platform
|
46
46
|
|
47
47
|
def default_configuration(parent)
|
48
48
|
super
|
49
49
|
parent.copy_settings_to(self)
|
50
|
+
self.platform = parent.proxy_value.platform
|
50
51
|
end
|
51
52
|
|
52
53
|
def define
|
53
54
|
rakefile = nil
|
55
|
+
initd = nil
|
54
56
|
in_namespace do
|
55
57
|
directory target_dir
|
56
58
|
|
@@ -61,7 +63,6 @@ module LogicalConstruct
|
|
61
63
|
Mattock::BundleCommandTask.new(:standalone => gemfile.target_path) do |bundle_build|
|
62
64
|
bundle_build.command = (
|
63
65
|
cmd("cd", target_dir) &
|
64
|
-
cmd("pwd") &
|
65
66
|
cmd("bundle", "install"){|bundler|
|
66
67
|
bundler.options << "--standalone"
|
67
68
|
bundler.options << "--binstubs=bin"
|
@@ -75,10 +76,12 @@ module LogicalConstruct
|
|
75
76
|
initd = ConfigBuilder.new(self) do |task|
|
76
77
|
task.base_name = "construct.init.d"
|
77
78
|
task.extra[:construct_dir] = construct_dir
|
79
|
+
task.extra[:platform] = platform
|
78
80
|
end
|
79
81
|
end
|
80
82
|
desc "Template files to be created on the remote server"
|
81
83
|
task root_task => [rakefile.target_path] + in_namespace(:standalone)
|
84
|
+
task root_task => [initd.target_path] + in_namespace(:standalone)
|
82
85
|
task :local_setup => root_task
|
83
86
|
end
|
84
87
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/
|
1
|
+
#!/sbin/runscript
|
2
2
|
|
3
3
|
DIR='<%= extra[:construct_dir] %>'
|
4
4
|
|
@@ -8,8 +8,11 @@ depend() {
|
|
8
8
|
|
9
9
|
start() {
|
10
10
|
cd $DIR
|
11
|
-
|
11
|
+
ebegin "Starting to provision using Logical Construct"
|
12
|
+
LOGCON_DEPLOYMENT_PLATFORM=<%= extra[:deployment_platform] %> bin/rake
|
13
|
+
eend $?
|
12
14
|
}
|
13
15
|
|
14
16
|
stop() {
|
17
|
+
einfo "Stopping Logical Construct [noop]"
|
15
18
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logical-construct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: corundum
|
16
|
-
requirement: &
|
16
|
+
requirement: &79903760 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,21 +21,21 @@ dependencies:
|
|
21
21
|
version: 0.0.1
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *79903760
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mattock
|
27
|
-
requirement: &
|
27
|
+
requirement: &80017420 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.3.
|
32
|
+
version: 0.3.4
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *80017420
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sinatra
|
38
|
-
requirement: &
|
38
|
+
requirement: &80040870 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.3.3
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *80040870
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rest-client
|
49
|
-
requirement: &
|
49
|
+
requirement: &80039350 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.6.7
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *80039350
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &80038760 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -69,7 +69,22 @@ dependencies:
|
|
69
69
|
- 4
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
|
-
version_requirements: *
|
72
|
+
version_requirements: *80038760
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: json
|
75
|
+
requirement: &80036220 !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 1.7.0
|
81
|
+
segments:
|
82
|
+
- 1
|
83
|
+
- 7
|
84
|
+
- 0
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: *80036220
|
73
88
|
description: ! ' Like Vagrant? Missing AWS? Here you go. Limited Rakefiles to
|
74
89
|
do something like that.
|
75
90
|
|
@@ -133,7 +148,7 @@ rdoc_options:
|
|
133
148
|
- --main
|
134
149
|
- doc/README
|
135
150
|
- --title
|
136
|
-
- logical-construct-0.0.
|
151
|
+
- logical-construct-0.0.2 RDoc
|
137
152
|
require_paths:
|
138
153
|
- lib/
|
139
154
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -144,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
159
|
version: '0'
|
145
160
|
segments:
|
146
161
|
- 0
|
147
|
-
hash:
|
162
|
+
hash: -564976447
|
148
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
164
|
none: false
|
150
165
|
requirements:
|