logical-construct 0.0.1.localtesting
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/logical-construct/ground-control.rb +3 -0
- data/lib/logical-construct/ground-control/core.rb +33 -0
- data/lib/logical-construct/ground-control/provision.rb +70 -0
- data/lib/logical-construct/ground-control/run-on-target.rb +32 -0
- data/lib/logical-construct/ground-control/setup.rb +57 -0
- data/lib/logical-construct/ground-control/setup/build-files.rb +64 -0
- data/lib/logical-construct/ground-control/setup/bundle-setup.rb +36 -0
- data/lib/logical-construct/ground-control/setup/copy-files.rb +66 -0
- data/lib/logical-construct/ground-control/setup/create-construct-directory.rb +21 -0
- data/lib/logical-construct/ground-control/setup/ensure-env.rb +15 -0
- data/lib/logical-construct/resolving-task.rb +38 -0
- data/lib/logical-construct/satisfiable-task.rb +64 -0
- data/lib/logical-construct/target.rb +4 -0
- data/lib/logical-construct/target/chef-solo.rb +40 -0
- data/lib/logical-construct/target/platforms.rb +51 -0
- data/lib/logical-construct/target/platforms/aws.rb +8 -0
- data/lib/logical-construct/target/platforms/default/chef-config.rb +89 -0
- data/lib/logical-construct/target/platforms/default/resolve-configuration.rb +25 -0
- data/lib/logical-construct/target/platforms/default/volume.rb +11 -0
- data/lib/logical-construct/target/platforms/virtualbox.rb +8 -0
- data/lib/logical-construct/target/platforms/virtualbox/volume.rb +15 -0
- data/lib/logical-construct/target/provision.rb +26 -0
- data/lib/logical-construct/target/sinatra-resolver.rb +102 -0
- data/lib/logical-construct/target/unpack-cookbook.rb +40 -0
- data/lib/logical-construct/testing/resolve-configuration.rb +24 -0
- data/lib/logical-construct/testing/resolving-task.rb +15 -0
- data/lib/templates/Gemfile.erb +3 -0
- data/lib/templates/Rakefile.erb +14 -0
- data/lib/templates/chef.rb.erb +4 -0
- data/lib/templates/resolver/finished.html.erb +1 -0
- data/lib/templates/resolver/index.html.erb +8 -0
- data/lib/templates/resolver/task-form.html.erb +6 -0
- data/spec/target/chef-config.rb +64 -0
- data/spec/target/chef-solo.rb +47 -0
- data/spec/target/platforms.rb +36 -0
- data/spec_help/file-sandbox.rb +164 -0
- data/spec_help/gem_test_suite.rb +17 -0
- data/spec_help/mock-resolve.rb +21 -0
- data/spec_help/spec_helper.rb +13 -0
- data/spec_help/ungemmer.rb +36 -0
- metadata +131 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
puts Dir::pwd
|
2
|
+
require 'test/unit'
|
3
|
+
begin
|
4
|
+
require 'spec'
|
5
|
+
rescue LoadError
|
6
|
+
false
|
7
|
+
end
|
8
|
+
|
9
|
+
class RSpecTest < Test::Unit::TestCase
|
10
|
+
def test_that_rspec_is_available
|
11
|
+
assert_nothing_raised("\n\n * RSpec isn't available - please run: gem install rspec *\n\n"){ ::Spec }
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_that_specs_pass
|
15
|
+
assert(system(*%w{spec -f e -p **/*.rb spec}),"\n\n * Specs failed *\n\n")
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module LogicalConstruct
|
2
|
+
module Testing
|
3
|
+
def self.stub_resolution(resolver, fulfillment)
|
4
|
+
resolver.instance_eval do
|
5
|
+
define_method :action do
|
6
|
+
fulfillment.each_pair do |key, value|
|
7
|
+
prereq = prerequisite_tasks.find do |task|
|
8
|
+
task.name == key
|
9
|
+
end
|
10
|
+
|
11
|
+
if prereq.nil?
|
12
|
+
raise "No prerequisite task named #{key}"
|
13
|
+
else
|
14
|
+
prereq.fulfill(value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class Ungemmer
|
2
|
+
def self.ungem(*names)
|
3
|
+
deps = names.map do |name|
|
4
|
+
Gem::Dependency.new(name, nil)
|
5
|
+
end
|
6
|
+
|
7
|
+
deps.each do |dep|
|
8
|
+
Gem.source_index.search(dep).each do |gemspec|
|
9
|
+
puts " ** Ungemming #{gemspec.full_name} **"
|
10
|
+
Gem.source_index.remove_spec(gemspec.full_name)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Gem.instance_eval do
|
15
|
+
if defined? Gem::MUTEX
|
16
|
+
Gem::MUTEX.synchronize do
|
17
|
+
@searcher = nil
|
18
|
+
end
|
19
|
+
else
|
20
|
+
@searcher = nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.ungem_gemspec
|
26
|
+
Dir[File::expand_path(__FILE__ + "../../../*.gemspec")].each do |gemspec_path|
|
27
|
+
puts "Ungemming based on #{gemspec_path}"
|
28
|
+
begin
|
29
|
+
spec = Gem::Specification::load(gemspec_path)
|
30
|
+
Ungemmer::ungem(spec)
|
31
|
+
rescue LoadError
|
32
|
+
puts "Couldn't load #{gemspec_path}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: logical-construct
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.localtesting
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Judson Lester
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: corundum
|
16
|
+
requirement: &78823360 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.0.1
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *78823360
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: mattock
|
27
|
+
requirement: &78821900 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.3.0
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *78821900
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: sinatra
|
38
|
+
requirement: &78820580 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.3.3
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *78820580
|
47
|
+
description: ! ' Like Vagrant? Missing AWS? Here you go. Limited Rakefiles to
|
48
|
+
do something like that.
|
49
|
+
|
50
|
+
'
|
51
|
+
email:
|
52
|
+
- nyarly@gmail.com
|
53
|
+
executables: []
|
54
|
+
extensions: []
|
55
|
+
extra_rdoc_files: []
|
56
|
+
files:
|
57
|
+
- lib/logical-construct/ground-control.rb
|
58
|
+
- lib/logical-construct/target.rb
|
59
|
+
- lib/logical-construct/satisfiable-task.rb
|
60
|
+
- lib/logical-construct/testing/resolve-configuration.rb
|
61
|
+
- lib/logical-construct/testing/resolving-task.rb
|
62
|
+
- lib/logical-construct/target/platforms.rb
|
63
|
+
- lib/logical-construct/target/platforms/default/volume.rb
|
64
|
+
- lib/logical-construct/target/platforms/default/chef-config.rb
|
65
|
+
- lib/logical-construct/target/platforms/default/resolve-configuration.rb
|
66
|
+
- lib/logical-construct/target/platforms/aws.rb
|
67
|
+
- lib/logical-construct/target/platforms/virtualbox/volume.rb
|
68
|
+
- lib/logical-construct/target/platforms/virtualbox.rb
|
69
|
+
- lib/logical-construct/target/provision.rb
|
70
|
+
- lib/logical-construct/target/chef-solo.rb
|
71
|
+
- lib/logical-construct/target/unpack-cookbook.rb
|
72
|
+
- lib/logical-construct/target/sinatra-resolver.rb
|
73
|
+
- lib/logical-construct/ground-control/core.rb
|
74
|
+
- 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
|
+
- lib/logical-construct/ground-control/setup/copy-files.rb
|
78
|
+
- lib/logical-construct/ground-control/setup/build-files.rb
|
79
|
+
- lib/logical-construct/ground-control/setup/create-construct-directory.rb
|
80
|
+
- lib/logical-construct/ground-control/provision.rb
|
81
|
+
- lib/logical-construct/ground-control/setup.rb
|
82
|
+
- lib/logical-construct/resolving-task.rb
|
83
|
+
- lib/templates/resolver/index.html.erb
|
84
|
+
- lib/templates/resolver/finished.html.erb
|
85
|
+
- lib/templates/resolver/task-form.html.erb
|
86
|
+
- lib/templates/Gemfile.erb
|
87
|
+
- lib/templates/chef.rb.erb
|
88
|
+
- lib/templates/Rakefile.erb
|
89
|
+
- spec/target/platforms.rb
|
90
|
+
- spec/target/chef-solo.rb
|
91
|
+
- spec/target/chef-config.rb
|
92
|
+
- spec_help/spec_helper.rb
|
93
|
+
- spec_help/gem_test_suite.rb
|
94
|
+
- spec_help/ungemmer.rb
|
95
|
+
- spec_help/mock-resolve.rb
|
96
|
+
- spec_help/file-sandbox.rb
|
97
|
+
homepage: http://logical-construct.rubyforge.org/
|
98
|
+
licenses:
|
99
|
+
- MIT
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options:
|
102
|
+
- --inline-source
|
103
|
+
- --main
|
104
|
+
- doc/README
|
105
|
+
- --title
|
106
|
+
- logical-construct-0.0.1.localtesting RDoc
|
107
|
+
require_paths:
|
108
|
+
- lib/
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
111
|
+
requirements:
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
hash: -62549315
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - ! '>='
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project: logical-construct
|
126
|
+
rubygems_version: 1.8.15
|
127
|
+
signing_key:
|
128
|
+
specification_version: 3
|
129
|
+
summary: Works with Fog and Virtualbox and Chef to build servers
|
130
|
+
test_files:
|
131
|
+
- spec_help/gem_test_suite.rb
|