rocket_fuel 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -7
- data/lib/rocket_fuel/install/chef_install.rb +9 -0
- data/lib/rocket_fuel/install/download.rb +2 -0
- data/lib/rocket_fuel/install/recipe_run.rb +3 -2
- data/lib/rocket_fuel/install/run.rb +11 -4
- data/lib/rocket_fuel/install.rb +1 -1
- data/lib/rocket_fuel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 860e8d6e73fdcd8b76e76fbd2ce50e6ee9e47898
|
4
|
+
data.tar.gz: 84e42fec4c3beb5e5e0b78dc385caa451c616e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33ec0c62af0a4ac42acb69ae727bd9f13511e3ac4a5eebe117aaba415e8338abbfa87d6b5cd7e851d6c669e682daa2d8187a7f16cc7b9572efc619c254c729fa
|
7
|
+
data.tar.gz: 197a37013fa3c52929d7ed89b0f1eba893a90f2a869e922bbed088ff097716757844e176f4dfd2f26e3893ba818f1edaeb963f7bebed64f5854bd6ad5772ec60
|
data/Gemfile
CHANGED
@@ -3,10 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in rocket_fuel.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
group :test do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
6
|
+
# group :test do
|
7
|
+
# gem 'pry'
|
8
|
+
# gem 'simplecov',
|
9
|
+
# :require => false
|
10
|
+
# gem 'coveralls',
|
11
|
+
# :require => false
|
12
|
+
# end
|
@@ -1,10 +1,19 @@
|
|
1
1
|
module RocketFuel
|
2
2
|
module Install
|
3
3
|
class ChefInstall
|
4
|
+
RECEIPT_FILE = '/var/db/receipts/com.getchef.pkg.chef.bom'
|
4
5
|
def run
|
5
6
|
`sudo echo`
|
6
7
|
`curl -L https://www.opscode.com/chef/install.sh | sudo bash`
|
7
8
|
end
|
9
|
+
|
10
|
+
def installed?
|
11
|
+
if RocketFuel::SystemDetails.platform_family?(:mac)
|
12
|
+
FileTest.exists?(RECEIPT_FILE)
|
13
|
+
else
|
14
|
+
false
|
15
|
+
end
|
16
|
+
end
|
8
17
|
end
|
9
18
|
end
|
10
19
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'net/http'
|
2
|
+
require 'net/https'
|
2
3
|
require 'open-uri'
|
3
4
|
require 'fileutils'
|
4
5
|
|
@@ -17,6 +18,7 @@ module RocketFuel
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def extract
|
21
|
+
FileUtils.mkdir_p(recipe_path)
|
20
22
|
`tar xvfz #{archive_path} -C #{File.join(recipe_path, '..') }`
|
21
23
|
end
|
22
24
|
|
@@ -2,8 +2,9 @@ module RocketFuel
|
|
2
2
|
module Install
|
3
3
|
class RecipeRun
|
4
4
|
def run
|
5
|
-
|
6
|
-
|
5
|
+
chdir_cmd = "cd #{RocketFuel::Install::RECIPE_PATH}"
|
6
|
+
io = system("#{chdir_cmd} && chef-solo -c cookbooks/fueled-osx-station/config.rb ' +
|
7
|
+
'-j cookbooks/fueled-osx-station/roles/default.json")
|
7
8
|
end
|
8
9
|
end
|
9
10
|
end
|
@@ -18,11 +18,18 @@ module RocketFuel
|
|
18
18
|
say('Extracting rocket fuel recipes...')
|
19
19
|
@download.extract
|
20
20
|
say('Done.')
|
21
|
-
say('
|
22
|
-
RocketFuel::Install::ChefInstall.new
|
23
|
-
|
21
|
+
say('Checking to see if Chef is installed...')
|
22
|
+
chef_install = RocketFuel::Install::ChefInstall.new
|
23
|
+
if chef_install.installed?
|
24
|
+
say('Done')
|
25
|
+
else
|
26
|
+
say('Installing chef omnibus. You may be prompted for your sudo password..')
|
27
|
+
chef_install.run
|
28
|
+
say('Done.')
|
29
|
+
end
|
24
30
|
say('Running rocket fuel recipes...this may take some time')
|
25
|
-
RocketFuel::Install::RecipeRun.new
|
31
|
+
run = RocketFuel::Install::RecipeRun.new
|
32
|
+
run.run
|
26
33
|
say('Done')
|
27
34
|
end
|
28
35
|
end
|
data/lib/rocket_fuel/install.rb
CHANGED
data/lib/rocket_fuel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocket_fuel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Pickett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|