rconf 0.8.12 → 0.8.13

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.
@@ -20,7 +20,8 @@ module RightConf
20
20
  # === Return
21
21
  # true:: Always return true
22
22
  def self.check_and_install
23
- return true if File.directory?('/usr/local/.git')
23
+ installed = Command.execute('brew', '--version').success?
24
+ return true if installed
24
25
  new.install
25
26
  end
26
27
 
@@ -88,6 +88,7 @@ module RightConf
88
88
  args = [ p ]
89
89
  args << opts if opts
90
90
  Command.execute('brew', 'install', *args)
91
+ Command.sudo('brew', 'link', p)
91
92
  end
92
93
  end
93
94
 
data/lib/rconf/version.rb CHANGED
@@ -13,7 +13,7 @@ module RightConf
13
13
 
14
14
  MAJOR = 0
15
15
  MINOR = 8
16
- BUILD = 12
16
+ BUILD = 13
17
17
 
18
18
  VERSION = [MAJOR, MINOR, BUILD].map(&:to_s).join('.')
19
19
 
@@ -41,7 +41,9 @@ describe RightConf::PackageInstaller do
41
41
  flexmock(RightConf::Platform.instance).should_receive(:family).and_return(:darwin)
42
42
  flexmock(RightConf::BrewInstaller).should_receive(:check_and_install).once
43
43
  should_execute('brew', 'install', 'mac1').once.and_return(success_result)
44
+ should_sudo('brew', 'link', 'mac1').once.and_return(success_result)
44
45
  should_execute('brew', 'install', 'mac2').once.and_return(success_result)
46
+ should_sudo('brew', 'link', 'mac2').once.and_return(success_result)
45
47
  RightConf::PackageInstaller.install(['mac1', 'mac2'])
46
48
  end
47
49
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rconf
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.12
5
+ version: 0.8.13
6
6
  platform: ruby
7
7
  authors:
8
8
  - Raphael Simon
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-28 00:00:00 -07:00
13
+ date: 2011-11-04 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency