logical-construct 0.0.1.localtesting → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. data/lib/logical-construct/ground-control/core.rb +0 -1
  2. data/lib/logical-construct/ground-control/provision.rb +146 -29
  3. data/lib/logical-construct/ground-control/run-on-target.rb +4 -4
  4. data/lib/logical-construct/ground-control/setup.rb +5 -14
  5. data/lib/logical-construct/ground-control/setup/build-files.rb +31 -10
  6. data/lib/logical-construct/ground-control/setup/copy-files.rb +31 -19
  7. data/lib/logical-construct/ground-control/setup/create-construct-directory.rb +1 -0
  8. data/lib/logical-construct/ground-control/setup/install-init.rb +32 -0
  9. data/lib/logical-construct/resolving-task.rb +108 -5
  10. data/lib/logical-construct/satisfiable-task.rb +25 -2
  11. data/lib/logical-construct/target/chef-solo.rb +12 -15
  12. data/lib/logical-construct/target/platforms/default/chef-config.rb +57 -12
  13. data/lib/logical-construct/target/platforms/default/resolve-configuration.rb +22 -3
  14. data/lib/logical-construct/target/provision.rb +10 -0
  15. data/lib/logical-construct/target/sinatra-resolver.rb +16 -19
  16. data/lib/logical-construct/testing/resolve-configuration.rb +8 -0
  17. data/lib/templates/Gemfile.erb +3 -1
  18. data/lib/templates/chef.rb.erb +6 -1
  19. data/lib/templates/construct.init.d.erb +15 -0
  20. data/lib/templates/resolver/index.html.erb +11 -2
  21. data/lib/templates/resolver/task-file-form.html.erb +6 -0
  22. data/spec/ground-control/smoke-test.rb +23 -0
  23. data/spec/resolution.rb +147 -0
  24. data/spec/target/chef-config.rb +3 -0
  25. data/spec/target/chef-solo.rb +8 -0
  26. data/spec/target/smoke-test.rb +45 -0
  27. metadata +44 -14
  28. data/lib/logical-construct/ground-control/setup/bundle-setup.rb +0 -36
  29. data/lib/logical-construct/ground-control/setup/ensure-env.rb +0 -15
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logical-construct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.localtesting
5
- prerelease: 6
4
+ version: 0.0.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Judson Lester
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-17 00:00:00.000000000 Z
12
+ date: 2012-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: corundum
16
- requirement: &78823360 !ruby/object:Gem::Requirement
16
+ requirement: &75232890 !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: *78823360
24
+ version_requirements: *75232890
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mattock
27
- requirement: &78821900 !ruby/object:Gem::Requirement
27
+ requirement: &75295170 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.3.0
32
+ version: 0.3.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *78821900
35
+ version_requirements: *75295170
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &78820580 !ruby/object:Gem::Requirement
38
+ requirement: &75336060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,33 @@ dependencies:
43
43
  version: 1.3.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *78820580
46
+ version_requirements: *75336060
47
+ - !ruby/object:Gem::Dependency
48
+ name: rest-client
49
+ requirement: &75345280 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.6.7
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *75345280
58
+ - !ruby/object:Gem::Dependency
59
+ name: nokogiri
60
+ requirement: &75387490 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: 0.13.4
66
+ segments:
67
+ - 0
68
+ - 13
69
+ - 4
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: *75387490
47
73
  description: ! ' Like Vagrant? Missing AWS? Here you go. Limited Rakefiles to
48
74
  do something like that.
49
75
 
@@ -72,23 +98,27 @@ files:
72
98
  - lib/logical-construct/target/sinatra-resolver.rb
73
99
  - lib/logical-construct/ground-control/core.rb
74
100
  - lib/logical-construct/ground-control/run-on-target.rb
75
- - lib/logical-construct/ground-control/setup/bundle-setup.rb
76
- - lib/logical-construct/ground-control/setup/ensure-env.rb
77
101
  - lib/logical-construct/ground-control/setup/copy-files.rb
78
102
  - lib/logical-construct/ground-control/setup/build-files.rb
79
103
  - lib/logical-construct/ground-control/setup/create-construct-directory.rb
104
+ - lib/logical-construct/ground-control/setup/install-init.rb
80
105
  - lib/logical-construct/ground-control/provision.rb
81
106
  - lib/logical-construct/ground-control/setup.rb
82
107
  - lib/logical-construct/resolving-task.rb
108
+ - lib/templates/construct.init.d.erb
83
109
  - lib/templates/resolver/index.html.erb
84
110
  - lib/templates/resolver/finished.html.erb
85
111
  - lib/templates/resolver/task-form.html.erb
112
+ - lib/templates/resolver/task-file-form.html.erb
86
113
  - lib/templates/Gemfile.erb
87
114
  - lib/templates/chef.rb.erb
88
115
  - lib/templates/Rakefile.erb
116
+ - spec/resolution.rb
89
117
  - spec/target/platforms.rb
90
118
  - spec/target/chef-solo.rb
119
+ - spec/target/smoke-test.rb
91
120
  - spec/target/chef-config.rb
121
+ - spec/ground-control/smoke-test.rb
92
122
  - spec_help/spec_helper.rb
93
123
  - spec_help/gem_test_suite.rb
94
124
  - spec_help/ungemmer.rb
@@ -103,7 +133,7 @@ rdoc_options:
103
133
  - --main
104
134
  - doc/README
105
135
  - --title
106
- - logical-construct-0.0.1.localtesting RDoc
136
+ - logical-construct-0.0.1 RDoc
107
137
  require_paths:
108
138
  - lib/
109
139
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -114,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
114
144
  version: '0'
115
145
  segments:
116
146
  - 0
117
- hash: -62549315
147
+ hash: 242486035
118
148
  required_rubygems_version: !ruby/object:Gem::Requirement
119
149
  none: false
120
150
  requirements:
@@ -1,36 +0,0 @@
1
- require 'logical-construct/ground-control/run-on-target'
2
-
3
- module LogicalConstruct
4
- class BundleSetup < RunOnTarget
5
- default_namespace :bundle_setup
6
-
7
- setting :construct_dir
8
- nil_fields :bundle_path, :bin_path
9
-
10
- def default_configuration(setup)
11
- setup.copy_settings_to(self)
12
- super
13
- end
14
-
15
- def resolve_configuration
16
- self.bundle_path ||= File.join(construct_dir, "lib")
17
- self.bin_path ||= File.join(construct_dir, "bin")
18
- end
19
-
20
- def remote_command
21
- Mattock::PrereqChain.new do |cmd|
22
- cmd.add Mattock::CommandLine.new("cd", construct_dir)
23
- cmd.add Mattock::CommandLine.new("bundle") do |cmd|
24
- end
25
- end
26
- end
27
-
28
- def define
29
- remote_task(:run, "Set up bundle on the remote server") do |task|
30
- task.command = (cmd("cd", construct_dir) &
31
- ["bundle", "--path #{bundle_path}", "--binstubs #{bin_path}"]).tap{|cl| p cl}
32
- end
33
- bracket_task(:remote_config, :run, :remote_setup)
34
- end
35
- end
36
- end
@@ -1,15 +0,0 @@
1
- require 'logical-construct/ground-control/run-on-target'
2
-
3
- module LogicalConstruct
4
- class EnsureEnv < RunOnTarget
5
- default_namespace :ensure_env
6
-
7
- def define
8
- remote_task(:bundler, "Ensure that bundler is installed on the remote server") do |task|
9
- task.verify_command = cmd "bundle", "--version"
10
- task.command = cmd("sudo") - %w{gem install bundler}
11
- end
12
- bracket_task(:local_setup, :bundler, :remote_setup)
13
- end
14
- end
15
- end