rocket_fuel 0.0.8 → 0.1.0

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: 2b7df0ede6283b8b8e0ebc598025a037c05ecd41
4
- data.tar.gz: 27023e4feaf5d029f4502f75af5391692832fc7d
3
+ metadata.gz: a4219971f0d4c350fb5d5438292622cfa53b3e21
4
+ data.tar.gz: f804935294ced3b73f750b4ac21317a222fa9aeb
5
5
  SHA512:
6
- metadata.gz: 67a617a74a3c7267359935edea80dc07826eb18a314972f305e40dee4e13b13c55d8e290aa1fb8497448379de016f46c2a1c44d2cc35073ee1d512ee6c1e234c
7
- data.tar.gz: 6ecebc07100a2c5aa88c008bb33fb964a356bb9f3f7ed3f7698251a40e73979b79ceb42032c64a29cac6ba18e2b0c2d667fb01c267733e9a3d6494452c093ecd
6
+ metadata.gz: 2e7c3aa3db308fc675afb5597604cd561cb966a69d95d2fcf4135aa979cb5e2626d88fc21962da122f28957736457ea323b522e3137dc743a4a78e9ff5b3c4ea
7
+ data.tar.gz: 6c425ad4468287b4ee497e4e33529e02e5c50b97ae0081a7414d2ff11a9d50a62c88370226981d6e4bff33b06a4475def2344bf8866fa27459365770a09d3b96
@@ -35,11 +35,12 @@ module RocketFuel
35
35
  end
36
36
 
37
37
  desc 'install [package]', 'install rocket fuel packages'
38
+ option :vagrant, :type => :boolean, :default => false
38
39
  def install
39
40
  require 'rocket_fuel/install'
40
41
  run = precheck
41
42
  if run.ok?
42
- RocketFuel::Install::Run.new.run
43
+ RocketFuel::Install::Run.new(options).run
43
44
  end
44
45
  end
45
46
  end
@@ -1,15 +1,31 @@
1
1
  module RocketFuel
2
2
  module Install
3
3
  class RecipeRun
4
+ def initialize(options = {})
5
+ @options = options
6
+ end
7
+
4
8
  def run
5
9
  chdir_cmd = "cd #{RocketFuel::Install::RECIPE_PATH}"
6
10
  system("#{chdir_cmd} && sudo chef-solo " +
7
- "-c cookbooks/fueled-#{recipe_name}-station/config.rb " +
8
- "-j cookbooks/fueled-#{recipe_name}-station/roles/default.json")
11
+ "-c cookbooks/fueled-#{cookbook_name}-station/config.rb " +
12
+ "-j cookbooks/fueled-#{cookbook_name}-station/roles/#{recipe_name}.json")
13
+ end
14
+
15
+ def cookbook_name
16
+ if @options[:vagrant] || !RocketFuel::SystemDetails.platform_family?(:mac)
17
+ 'linux'
18
+ else
19
+ 'osx'
20
+ end
9
21
  end
10
22
 
11
23
  def recipe_name
12
- RocketFuel::SystemDetails.platform_family?(:mac) ? 'osx' : 'linux'
24
+ if @options[:vagrant]
25
+ 'vagrant'
26
+ else
27
+ 'default'
28
+ end
13
29
  end
14
30
  end
15
31
  end
@@ -7,8 +7,9 @@ module RocketFuel
7
7
  class Run
8
8
  include Thor::Base
9
9
 
10
- def initialize
10
+ def initialize(options = {})
11
11
  @download = RocketFuel::Install::Download.new
12
+ @options = options
12
13
  end
13
14
 
14
15
  def run
@@ -28,9 +29,9 @@ module RocketFuel
28
29
  say('Done.')
29
30
  end
30
31
  say('Running rocket fuel recipes...this may take some time')
31
- run = RocketFuel::Install::RecipeRun.new
32
+ run = RocketFuel::Install::RecipeRun.new(options)
32
33
  say('')
33
-
34
+
34
35
  if run.run
35
36
  say("Congratuations! You're now running with RocketFuel!", :green)
36
37
  else
@@ -1,3 +1,3 @@
1
1
  module RocketFuel
2
- VERSION = '0.0.8'
2
+ VERSION = '0.1.0'
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.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.4.5.1
181
+ rubygems_version: 2.4.5
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: A ruby client for installing rocket fuel