boxen 1.4.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "boxen"
5
- gem.version = "1.4.2"
5
+ gem.version = "1.5.0"
6
6
  gem.authors = ["John Barnette", "Will Farrington"]
7
7
  gem.email = ["jbarnette@github.com", "wfarr@github.com"]
8
8
  gem.description = "Manage Mac development boxes with love (and Puppet)."
@@ -1,10 +1,11 @@
1
1
  require "json"
2
2
  require "boxen/config"
3
3
 
4
- config = Boxen::Config.load
5
- facts = {}
6
- factsdir = "#{config.homedir}/config/facts"
7
- dot_boxen = "#{ENV['HOME']}/.boxen"
4
+ config = Boxen::Config.load
5
+ facts = {}
6
+ factsdir = "#{config.homedir}/config/facts"
7
+ dot_boxen = "#{ENV['HOME']}/.boxen"
8
+ user_config = "#{dot_boxen}/config.json"
8
9
 
9
10
  facts["github_login"] = config.login
10
11
  facts["github_email"] = config.email
@@ -22,7 +23,11 @@ Dir["#{config.homedir}/config/facts/*.json"].each do |file|
22
23
  end
23
24
 
24
25
  if File.exist? dot_boxen
25
- facts.merge! JSON.parse(File.read(dot_boxen))
26
+ if File.directory?(dot_boxen) && File.file?(user_config)
27
+ facts.merge! JSON.parse(File.read(user_config))
28
+ else
29
+ facts.merge! JSON.parse(File.read(dot_boxen))
30
+ end
26
31
  end
27
32
 
28
33
  facts.each { |k, v| Facter.add(k) { setcode { v } } }
Binary file
@@ -64,6 +64,9 @@ int main(int argc, char **argv) {
64
64
  OSStatus find_key = SecKeychainFindGenericPassword(
65
65
  NULL, strlen(service), service, strlen(login), login, &len, &buf, &item);
66
66
 
67
+ if (find_key == errSecItemNotFound) {
68
+ return find_key;
69
+ }
67
70
  if (find_key != 0) {
68
71
  REPORT_KEYCHAIN_ERROR(find_key);
69
72
  return 1;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-12 00:00:00.000000000 Z
13
+ date: 2013-07-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ansi