boxen 3.1.0 → 3.1.1

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: 2446bd003647a42616bee6f20530f55b3b56b678
4
- data.tar.gz: a5bc7868ad7ba25d216e9cdc0feaa10166b0e35f
3
+ metadata.gz: 8d63fa60357ab349b4e445f31dfef7dc52f440d9
4
+ data.tar.gz: 0e2fb4630cfd1636058d571b679cd091ac3ad37d
5
5
  SHA512:
6
- metadata.gz: c8ace9ed36907e0cf2ac8679a33d4fe7f253c927ea5460ef05ce9a34e0d64c5590e081e0a1917717f971ffca97fd809f1fbf89d9df2863ed5e08938a922bdba9
7
- data.tar.gz: 3ef57a22a4192307c3c67ddee992d693fe37f3830c5a1aa398282adc66af7733306f4471bc270514db924bb8b8e03a66567e54f9de06e35948a7a16f8ca9b96d
6
+ metadata.gz: f79dbdce5b15b2a7ef1824e369f7fd4a2918fc10c34635d59c9a9c2474a383f5f45246c065ba4072281ea57d313c1d806b9f28b3de2dfd42c5595ac46f4d2b70
7
+ data.tar.gz: 2cdfdbdba0516d76b642df8057283f768dc9e021081039853f69d680ccb0f4ff0bf4d1574bf3c31bb3f06c78450824ea6f86e0f684b43a378982a01aed44ea5c
@@ -3,4 +3,6 @@ before_install: gem update --system 2.1.11
3
3
  script: "./script/tests"
4
4
  gemfile: "this/does/not/exist"
5
5
  rvm:
6
- - "2.0.0"
6
+ - 2.0
7
+ - 2.1
8
+ - 2.2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "boxen"
5
- gem.version = "3.1.0"
5
+ gem.version = "3.1.1"
6
6
  # Thanks go out to the previous maintainers John Barnette, Will
7
7
  # Farrington, David Goodlad and Mike McQuaid for getting this project
8
8
  # to where it is today.
@@ -25,8 +25,12 @@ module Boxen
25
25
  end
26
26
  end
27
27
 
28
- keychain = Boxen::Keychain.new config.user
29
- config.token = keychain.token
28
+ if Boxen::Util.osx?
29
+ keychain = Boxen::Keychain.new config.user
30
+ config.token = keychain.token
31
+ else
32
+ config.token = ''
33
+ end
30
34
 
31
35
  if config.enterprise?
32
36
  # configure to talk to GitHub Enterprise
@@ -69,8 +73,10 @@ module Boxen
69
73
  f.write JSON.generate Hash[attrs.reject { |k, v| v.nil? }]
70
74
  end
71
75
 
72
- keychain = Boxen::Keychain.new config.user
73
- keychain.token = config.token
76
+ if Boxen::Util.osx?
77
+ keychain = Boxen::Keychain.new config.user
78
+ keychain.token = config.token
79
+ end
74
80
 
75
81
  config
76
82
  end
@@ -2,16 +2,18 @@ module Boxen
2
2
  module Util
3
3
 
4
4
  # Is Boxen active?
5
-
6
5
  def self.active?
7
6
  ENV.include? "BOXEN_HOME"
8
7
  end
9
8
 
10
-
11
9
  # Run `args` as a system command with sudo if necessary.
12
-
13
10
  def self.sudo *args
14
11
  system "sudo", "-p", "Password for sudo: ", *args
15
12
  end
13
+
14
+ # Run on macos?
15
+ def self.osx?
16
+ RUBY_PLATFORM.downcase.include?('darwin')
17
+ end
16
18
  end
17
19
  end
@@ -1,23 +1,20 @@
1
- require "boxen/test"
2
- require "boxen/keychain"
1
+ require 'boxen/test'
2
+ require "boxen/util"
3
+ require 'boxen/keychain'
3
4
 
4
5
  class BoxenKeychainTest < Boxen::Test
5
6
  def setup
6
- @keychain = Boxen::Keychain.new('test') if osx?
7
- end
8
-
9
- def osx?
10
- RUBY_PLATFORM.downcase.include?("darwin")
7
+ @keychain = Boxen::Keychain.new('test') if Boxen::Util.osx?
11
8
  end
12
9
 
13
10
  def test_get_token
14
- return skip("Keychain helper is OSX only") unless osx?
11
+ return skip('Keychain helper is OSX only') unless Boxen::Util.osx?
15
12
  @keychain.expects(:get).with('GitHub API Token').returns('foobar')
16
13
  assert_equal 'foobar', @keychain.token
17
14
  end
18
15
 
19
16
  def test_set_token
20
- return skip("Keychain helper is OSX only") unless osx?
17
+ return skip('Keychain helper is OSX only') unless Boxen::Util.osx?
21
18
  @keychain.expects(:set).with('GitHub API Token', 'foobar').returns('foobar')
22
19
  assert_equal 'foobar', @keychain.token=('foobar')
23
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Bednarz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-28 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  version: '0'
237
237
  requirements: []
238
238
  rubyforge_project:
239
- rubygems_version: 2.5.1
239
+ rubygems_version: 2.6.14
240
240
  signing_key:
241
241
  specification_version: 4
242
242
  summary: You know, for laptops and stuff.