rocket_fuel 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9908a5c1ceba99833e61048a297295df291389be
4
- data.tar.gz: 0bd720d0d68cd8fd2ccc07081176c77608ae7156
3
+ metadata.gz: 860e8d6e73fdcd8b76e76fbd2ce50e6ee9e47898
4
+ data.tar.gz: 84e42fec4c3beb5e5e0b78dc385caa451c616e6c
5
5
  SHA512:
6
- metadata.gz: 4c75b96ce3c7e2bf8e7ec7bac8ce2b91b74c61188088bdf7684e222ec58fded88c7c37498a3e1249df32f7f3234b4cf5e9a578245bb4057fe4acb035fdf3ce8f
7
- data.tar.gz: f20046fba9c7aa8d905652b33fba2c9b878e035b089e47428ee511da590417bcdc5180db41aa5104faa6d460673c010a102188fdb227dada37b1427a806d8c37
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
- gem 'pry'
8
- gem 'simplecov',
9
- require: false
10
- gem 'coveralls',
11
- require: false
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
- `cd #{RocketFuel::Install::RECIPE_PATH}`
6
- puts `chef-solo -c cookbooks/fueled-osx-station/config.rb -j cookbooks/fueled-osx-station/roles/default.json`
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('Installing chef omnibus. You may be prompted for your sudo password..')
22
- RocketFuel::Install::ChefInstall.new.run
23
- say('Done.')
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.run
31
+ run = RocketFuel::Install::RecipeRun.new
32
+ run.run
26
33
  say('Done')
27
34
  end
28
35
  end
@@ -3,6 +3,6 @@ require 'rocket_fuel/install/run'
3
3
  module RocketFuel
4
4
  module Install
5
5
  ARCHIVE_PATH = '/tmp/rocket_fuel.tar.gz'
6
- RECIPE_PATH = '/tmp/rocket_fuel_chef'
6
+ RECIPE_PATH = '/tmp/rocket-fuel-chef-master'
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module RocketFuel
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
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.3
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-22 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor