rocket_fuel 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4219971f0d4c350fb5d5438292622cfa53b3e21
4
- data.tar.gz: f804935294ced3b73f750b4ac21317a222fa9aeb
3
+ metadata.gz: bc7b4cd07f7a62fce3a10e6b00aa92335409520f
4
+ data.tar.gz: 3670151e377cb5de72679152af624b626b0b9b73
5
5
  SHA512:
6
- metadata.gz: 2e7c3aa3db308fc675afb5597604cd561cb966a69d95d2fcf4135aa979cb5e2626d88fc21962da122f28957736457ea323b522e3137dc743a4a78e9ff5b3c4ea
7
- data.tar.gz: 6c425ad4468287b4ee497e4e33529e02e5c50b97ae0081a7414d2ff11a9d50a62c88370226981d6e4bff33b06a4475def2344bf8866fa27459365770a09d3b96
6
+ metadata.gz: 11b6b989673aad22ed8d9cfba4b4e60fa82a5743fa9a7363f303a36e693445ba29eecdaece6ca39d75f73366630adfeef0f62e6356b795ed42fe90d74180c34f
7
+ data.tar.gz: ebf795b56a68040a3f1a267464396653cdcdfcf6f692abad38a8f9b1fd1a070c75cf4f11bc5cee9bae63d861f39d758d81574cac8395a08deea73b6ccb37a18f
@@ -36,10 +36,10 @@ module RocketFuel
36
36
 
37
37
  desc 'install [package]', 'install rocket fuel packages'
38
38
  option :vagrant, :type => :boolean, :default => false
39
+ option :force, :type => :boolean, :default => false
39
40
  def install
40
41
  require 'rocket_fuel/install'
41
- run = precheck
42
- if run.ok?
42
+ if options[:force] || precheck.ok?
43
43
  RocketFuel::Install::Run.new(options).run
44
44
  end
45
45
  end
@@ -1,4 +1,5 @@
1
1
  require 'rocket_fuel/precheck/check'
2
+ require 'rocket_fuel/system_call'
2
3
 
3
4
  module RocketFuel
4
5
  module Precheck
@@ -29,7 +30,11 @@ module RocketFuel
29
30
  end
30
31
 
31
32
  def installed?
32
- FileTest.exist?(receipt_file)
33
+ FileTest.exist?(receipt_file) || clt_prints?
34
+ end
35
+
36
+ def clt_prints?
37
+ RocketFuel::SystemCall.make("xcode-select -p")
33
38
  end
34
39
 
35
40
  def receipt_file
@@ -0,0 +1,7 @@
1
+ module RocketFuel
2
+ module SystemCall
3
+ def self.make(cmd)
4
+ system(cmd)
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module RocketFuel
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -2,13 +2,18 @@ require 'spec_helper'
2
2
 
3
3
  require 'rocket_fuel/precheck/command_line_tool_check'
4
4
 
5
- require 'fakefs'
5
+ require 'pp'
6
+ require 'fakefs/safe'
6
7
  require 'fakefs/spec_helpers'
7
8
  require 'fileutils'
8
9
 
9
10
  describe RocketFuel::Precheck::CommandLineToolCheck do
10
11
  include FakeFS::SpecHelpers
11
12
 
13
+ before(:each) do
14
+ RocketFuel::SystemCall.stubs(:make).returns(false)
15
+ end
16
+
12
17
  context "os x 10.11" do
13
18
  before(:each) do
14
19
  os = RocketFuel::OperatingSystem.new('darwin', '10.11.2')
@@ -24,6 +29,11 @@ describe RocketFuel::Precheck::CommandLineToolCheck do
24
29
  expect(check).to be_ok
25
30
  end
26
31
 
32
+ it 'is ok if a system call to xcode says so' do
33
+ RocketFuel::SystemCall.expects(:make).returns(true)
34
+ expect(check).to be_ok
35
+ end
36
+
27
37
  it 'is not ok if the receipt is not found' do
28
38
  FileUtils.rm_f(path) if FileTest.exist?(path)
29
39
  expect(check).to_not be_ok
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.1.0
4
+ version: 0.2.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-26 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -138,6 +138,7 @@ files:
138
138
  - lib/rocket_fuel/precheck/rbenv_check.rb
139
139
  - lib/rocket_fuel/precheck/run.rb
140
140
  - lib/rocket_fuel/precheck/rvm_check.rb
141
+ - lib/rocket_fuel/system_call.rb
141
142
  - lib/rocket_fuel/system_details.rb
142
143
  - lib/rocket_fuel/version.rb
143
144
  - rocket_fuel.gemspec
@@ -178,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
179
  version: '0'
179
180
  requirements: []
180
181
  rubyforge_project:
181
- rubygems_version: 2.4.5
182
+ rubygems_version: 2.6.6
182
183
  signing_key:
183
184
  specification_version: 4
184
185
  summary: A ruby client for installing rocket fuel