omnibus 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +9 -0
- data/.rspec +1 -0
- data/.yardopts +7 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/NOTICE +9 -0
- data/README.md +186 -0
- data/Rakefile +7 -0
- data/bin/makeself-header.sh +401 -0
- data/bin/makeself.sh +407 -0
- data/bin/omnibus +11 -0
- data/lib/omnibus.rb +280 -0
- data/lib/omnibus/build_version.rb +281 -0
- data/lib/omnibus/builder.rb +323 -0
- data/lib/omnibus/clean_tasks.rb +30 -0
- data/lib/omnibus/cli.rb +35 -0
- data/lib/omnibus/cli/application.rb +136 -0
- data/lib/omnibus/cli/base.rb +112 -0
- data/lib/omnibus/cli/build.rb +66 -0
- data/lib/omnibus/cli/cache.rb +60 -0
- data/lib/omnibus/config.rb +186 -0
- data/lib/omnibus/exceptions.rb +54 -0
- data/lib/omnibus/fetcher.rb +184 -0
- data/lib/omnibus/fetchers.rb +22 -0
- data/lib/omnibus/fetchers/git_fetcher.rb +212 -0
- data/lib/omnibus/fetchers/net_fetcher.rb +191 -0
- data/lib/omnibus/fetchers/path_fetcher.rb +65 -0
- data/lib/omnibus/fetchers/s3_cache_fetcher.rb +42 -0
- data/lib/omnibus/health_check.rb +260 -0
- data/lib/omnibus/library.rb +70 -0
- data/lib/omnibus/overrides.rb +69 -0
- data/lib/omnibus/project.rb +566 -0
- data/lib/omnibus/reports.rb +99 -0
- data/lib/omnibus/s3_cacher.rb +136 -0
- data/lib/omnibus/software.rb +430 -0
- data/lib/omnibus/templates/Berksfile.erb +3 -0
- data/lib/omnibus/templates/Gemfile.erb +4 -0
- data/lib/omnibus/templates/README.md.erb +102 -0
- data/lib/omnibus/templates/Vagrantfile.erb +95 -0
- data/lib/omnibus/templates/gitignore.erb +8 -0
- data/lib/omnibus/templates/omnibus.rb.example.erb +5 -0
- data/lib/omnibus/templates/package_scripts/makeselfinst.erb +27 -0
- data/lib/omnibus/templates/package_scripts/postinst.erb +17 -0
- data/lib/omnibus/templates/package_scripts/postrm.erb +9 -0
- data/lib/omnibus/templates/project.rb.erb +21 -0
- data/lib/omnibus/templates/software/c-example.rb.erb +42 -0
- data/lib/omnibus/templates/software/erlang-example.rb.erb +38 -0
- data/lib/omnibus/templates/software/ruby-example.rb.erb +24 -0
- data/lib/omnibus/util.rb +61 -0
- data/lib/omnibus/version.rb +20 -0
- data/omnibus.gemspec +34 -0
- data/spec/build_version_spec.rb +228 -0
- data/spec/data/overrides/bad_line.overrides +3 -0
- data/spec/data/overrides/good.overrides +5 -0
- data/spec/data/overrides/with_dupes.overrides +4 -0
- data/spec/data/software/erchef.rb +40 -0
- data/spec/overrides_spec.rb +114 -0
- data/spec/software_spec.rb +71 -0
- data/spec/spec_helper.rb +28 -0
- metadata +239 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
require 'rake/dsl_definition'
|
2
|
+
require 'omnibus/software'
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
describe Omnibus::Software do
|
7
|
+
|
8
|
+
let(:project) do
|
9
|
+
p = mock(Omnibus::Project)
|
10
|
+
p.should_receive(:install_path).any_number_of_times.and_return("monkeys")
|
11
|
+
p
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:software_name) {"erchef"}
|
15
|
+
let(:software_file){ software_path(software_name) }
|
16
|
+
let(:version_from_file){"4b19a96d57bff9bbf4764d7323b92a0944009b9e"}
|
17
|
+
|
18
|
+
context "testing version overrides" do
|
19
|
+
|
20
|
+
before :each do
|
21
|
+
# We don't want to mess with any of this stuff for these
|
22
|
+
# tests... we're just looking at version info right now
|
23
|
+
Omnibus::Software.any_instance.stub(:render_tasks)
|
24
|
+
end
|
25
|
+
|
26
|
+
subject{software}
|
27
|
+
|
28
|
+
context "without overrides" do
|
29
|
+
let(:software){Omnibus::Software.load(software_file, project)}
|
30
|
+
|
31
|
+
its(:name){should eq(software_name)}
|
32
|
+
its(:version){should eq(version_from_file)}
|
33
|
+
its(:given_version){should eq(software.version)}
|
34
|
+
its(:override_version){should be_nil}
|
35
|
+
end
|
36
|
+
|
37
|
+
context "with overrides" do
|
38
|
+
let(:override_software_version){"6.6.6"}
|
39
|
+
let(:overrides) do
|
40
|
+
{override_software_name => override_software_version}
|
41
|
+
end
|
42
|
+
let(:software){Omnibus::Software.load(software_file, project, overrides)}
|
43
|
+
|
44
|
+
context "but not for this software" do
|
45
|
+
let(:override_software_name){"chaos_monkey"}
|
46
|
+
|
47
|
+
it "really should not have any overrides for this software" do
|
48
|
+
overrides.should_not have_key(software_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
its(:version){should eq(version_from_file)}
|
52
|
+
its(:given_version){should eq(software.version)}
|
53
|
+
its(:override_version){should be_nil}
|
54
|
+
end
|
55
|
+
|
56
|
+
context "for this software" do
|
57
|
+
let(:override_software_name){software_name}
|
58
|
+
|
59
|
+
it "really should have an override for this software" do
|
60
|
+
overrides.should have_key(software_name)
|
61
|
+
end
|
62
|
+
|
63
|
+
its(:version){should eq(override_software_version)}
|
64
|
+
its(:override_version){should eq(software.version)}
|
65
|
+
its(:version){should_not eq(software.given_version)}
|
66
|
+
its(:given_version){should eq(version_from_file)}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Why isn't this already required in omnibus?
|
2
|
+
require 'rake/dsl_definition'
|
3
|
+
|
4
|
+
require 'omnibus'
|
5
|
+
|
6
|
+
module Omnibus
|
7
|
+
module RSpec
|
8
|
+
|
9
|
+
SPEC_DATA = File.expand_path(File.join(File.dirname(__FILE__), "data"))
|
10
|
+
|
11
|
+
def software_path(name)
|
12
|
+
File.join(SPEC_DATA, "software", "#{name}.rb")
|
13
|
+
end
|
14
|
+
|
15
|
+
def overrides_path(name)
|
16
|
+
File.join(SPEC_DATA, "overrides", "#{name}.overrides")
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
RSpec.configure do |config|
|
23
|
+
config.include Omnibus::RSpec
|
24
|
+
config.filter_run :focus => true
|
25
|
+
config.run_all_when_everything_filtered = true
|
26
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
27
|
+
end
|
28
|
+
|
metadata
ADDED
@@ -0,0 +1,239 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omnibus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Opscode
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-04-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mixlib-shellout
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mixlib-config
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ohai
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.6.12
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.6.12
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: fpm
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.3.11
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.3.11
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: uber-s3
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: thor
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.16.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.16.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec_junit_formatter
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ! '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Omnibus helps you build self-installing, full-stack software builds.
|
140
|
+
email: info@opscode.com
|
141
|
+
executables:
|
142
|
+
- omnibus
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- .gitignore
|
147
|
+
- .rspec
|
148
|
+
- .yardopts
|
149
|
+
- CHANGELOG.md
|
150
|
+
- Gemfile
|
151
|
+
- LICENSE
|
152
|
+
- NOTICE
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- bin/makeself-header.sh
|
156
|
+
- bin/makeself.sh
|
157
|
+
- bin/omnibus
|
158
|
+
- lib/omnibus.rb
|
159
|
+
- lib/omnibus/build_version.rb
|
160
|
+
- lib/omnibus/builder.rb
|
161
|
+
- lib/omnibus/clean_tasks.rb
|
162
|
+
- lib/omnibus/cli.rb
|
163
|
+
- lib/omnibus/cli/application.rb
|
164
|
+
- lib/omnibus/cli/base.rb
|
165
|
+
- lib/omnibus/cli/build.rb
|
166
|
+
- lib/omnibus/cli/cache.rb
|
167
|
+
- lib/omnibus/config.rb
|
168
|
+
- lib/omnibus/exceptions.rb
|
169
|
+
- lib/omnibus/fetcher.rb
|
170
|
+
- lib/omnibus/fetchers.rb
|
171
|
+
- lib/omnibus/fetchers/git_fetcher.rb
|
172
|
+
- lib/omnibus/fetchers/net_fetcher.rb
|
173
|
+
- lib/omnibus/fetchers/path_fetcher.rb
|
174
|
+
- lib/omnibus/fetchers/s3_cache_fetcher.rb
|
175
|
+
- lib/omnibus/health_check.rb
|
176
|
+
- lib/omnibus/library.rb
|
177
|
+
- lib/omnibus/overrides.rb
|
178
|
+
- lib/omnibus/project.rb
|
179
|
+
- lib/omnibus/reports.rb
|
180
|
+
- lib/omnibus/s3_cacher.rb
|
181
|
+
- lib/omnibus/software.rb
|
182
|
+
- lib/omnibus/templates/Berksfile.erb
|
183
|
+
- lib/omnibus/templates/Gemfile.erb
|
184
|
+
- lib/omnibus/templates/README.md.erb
|
185
|
+
- lib/omnibus/templates/Vagrantfile.erb
|
186
|
+
- lib/omnibus/templates/gitignore.erb
|
187
|
+
- lib/omnibus/templates/omnibus.rb.example.erb
|
188
|
+
- lib/omnibus/templates/package_scripts/makeselfinst.erb
|
189
|
+
- lib/omnibus/templates/package_scripts/postinst.erb
|
190
|
+
- lib/omnibus/templates/package_scripts/postrm.erb
|
191
|
+
- lib/omnibus/templates/project.rb.erb
|
192
|
+
- lib/omnibus/templates/software/c-example.rb.erb
|
193
|
+
- lib/omnibus/templates/software/erlang-example.rb.erb
|
194
|
+
- lib/omnibus/templates/software/ruby-example.rb.erb
|
195
|
+
- lib/omnibus/util.rb
|
196
|
+
- lib/omnibus/version.rb
|
197
|
+
- omnibus.gemspec
|
198
|
+
- spec/build_version_spec.rb
|
199
|
+
- spec/data/overrides/bad_line.overrides
|
200
|
+
- spec/data/overrides/good.overrides
|
201
|
+
- spec/data/overrides/with_dupes.overrides
|
202
|
+
- spec/data/software/erchef.rb
|
203
|
+
- spec/overrides_spec.rb
|
204
|
+
- spec/software_spec.rb
|
205
|
+
- spec/spec_helper.rb
|
206
|
+
homepage: https://github.com/opscode/opscode-ruby
|
207
|
+
licenses:
|
208
|
+
- Apache 2.0
|
209
|
+
metadata: {}
|
210
|
+
post_install_message:
|
211
|
+
rdoc_options: []
|
212
|
+
require_paths:
|
213
|
+
- lib
|
214
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
215
|
+
requirements:
|
216
|
+
- - ! '>='
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 1.9.1
|
219
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ! '>='
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
requirements: []
|
225
|
+
rubyforge_project:
|
226
|
+
rubygems_version: 2.0.3
|
227
|
+
signing_key:
|
228
|
+
specification_version: 4
|
229
|
+
summary: Omnibus helps you build self-installing, full-stack software builds.
|
230
|
+
test_files:
|
231
|
+
- spec/build_version_spec.rb
|
232
|
+
- spec/data/overrides/bad_line.overrides
|
233
|
+
- spec/data/overrides/good.overrides
|
234
|
+
- spec/data/overrides/with_dupes.overrides
|
235
|
+
- spec/data/software/erchef.rb
|
236
|
+
- spec/overrides_spec.rb
|
237
|
+
- spec/software_spec.rb
|
238
|
+
- spec/spec_helper.rb
|
239
|
+
has_rdoc:
|