boxen 2.0.4 → 2.0.5

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: 27abc61c0e4d62db329ccafa124c37a67526f1ec
4
- data.tar.gz: f35bedb11781b8e030594e3650d85bb0770414bb
3
+ metadata.gz: d95ca24fcf7d0de14659e6b07e27c11ca2676f3b
4
+ data.tar.gz: e3ac4757e294c664446c3ae4e7f10c596f7f94da
5
5
  SHA512:
6
- metadata.gz: 9f413c0aea5fb929ac044afee933171d163ad7a3ff6207c45c8c3807e913f469b055cc61dff36b4816df655d7f5b1b3a28e7029e6e185957b6bcb7ad6602dc19
7
- data.tar.gz: 15a1cab0bb1e80f8f736e67e3c5d0509f87eb33e3c381928f13cc8a74bd7e6303e27d8d7545fe050a35595c05f8b0a0567302ae99905db836b742a09f8509d56
6
+ metadata.gz: 7ae4e801e9c215671043bddcd3f491e9d406de0a8b8cb266defb86628e3534417cd545d80c752d94d1734e8657f9608907f23050e179f8704052349a36902eb3
7
+ data.tar.gz: 011a9e776c0ea8c3f28b65ea76e0f71809d98219fa5c43733ae3780eada2e367ce4f64bdd3868a467bab83bb344916a4f6a876888b8e09c42174b149e951dfa3
data/boxen.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "boxen"
5
- gem.version = "2.0.4"
5
+ gem.version = "2.0.5"
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)."
data/lib/boxen/config.rb CHANGED
@@ -57,7 +57,9 @@ module Boxen
57
57
  :ghurl => config.ghurl,
58
58
  :srcdir => config.srcdir,
59
59
  :user => config.user,
60
- :repotemplate => config.repotemplate
60
+ :repotemplate => config.repotemplate,
61
+ :s3host => config.s3host,
62
+ :s3bucket => config.s3bucket
61
63
  }
62
64
 
63
65
  file = "#{config.homedir}/config/boxen/defaults.json"
@@ -291,12 +293,30 @@ module Boxen
291
293
  @user || ENV["USER"]
292
294
  end
293
295
 
294
- attr_writer :color
296
+ attr_writer :user
295
297
 
296
298
  def color?
297
299
  @color
298
300
  end
299
301
 
300
- attr_writer :user
302
+ attr_writer :color
303
+
304
+ # The S3 host name. Default is `"s3.amazonaws.com"`.
305
+ # Respects the `BOXEN_S3_HOST` environment variable.
306
+
307
+ def s3host
308
+ @s3host || ENV["BOXEN_S3_HOST"] || "s3.amazonaws.com"
309
+ end
310
+
311
+ attr_writer :s3host
312
+
313
+ # The S3 bucket name. Default is `"boxen-downloads"`.
314
+ # Respects the `BOXEN_S3_BUCKET` environment variable.
315
+
316
+ def s3bucket
317
+ @s3bucket || ENV["BOXEN_S3_BUCKET"] || "boxen-downloads"
318
+ end
319
+
320
+ attr_writer :s3bucket
301
321
  end
302
322
  end
@@ -347,4 +347,47 @@ class BoxenConfigTest < Boxen::Test
347
347
  assert_equal api, @config.api
348
348
  assert_equal api, @config.api # This extra call plus the `once` on the expectation is for the ivar cache.
349
349
  end
350
+
351
+ def test_s3host
352
+ val = ENV["BOXEN_S3_HOST"]
353
+ ENV["BOXEN_S3_HOST"] = nil
354
+
355
+ assert_equal "s3.amazonaws.com", @config.s3host
356
+
357
+ @config.s3host = "example.com"
358
+ assert_equal "example.com", @config.s3host
359
+ ensure
360
+ ENV["BOXEN_S3_HOST"] = val
361
+ end
362
+
363
+ def test_s3host_env_var
364
+ val = ENV["BOXEN_S3_HOST"]
365
+
366
+ ENV["BOXEN_S3_HOST"] = "example.com"
367
+ assert_equal "example.com", @config.s3host
368
+
369
+ ensure
370
+ ENV["BOXEN_S3_HOST"] = val
371
+ end
372
+
373
+ def test_s3bucket
374
+ val = ENV["BOXEN_S3_BUCKET"]
375
+ ENV["BOXEN_S3_BUCKET"] = nil
376
+
377
+ assert_equal "boxen-downloads", @config.s3bucket
378
+
379
+ @config.s3bucket = "my-bucket"
380
+ assert_equal "my-bucket", @config.s3bucket
381
+ ensure
382
+ ENV["BOXEN_S3_BUCKET"] = val
383
+ end
384
+
385
+ def test_s3host_env_var
386
+ val = ENV["BOXEN_S3_BUCKET"]
387
+
388
+ ENV["BOXEN_S3_BUCKET"] = "my-bucket"
389
+ assert_equal "my-bucket", @config.s3bucket
390
+ ensure
391
+ ENV["BOXEN_S3_BUCKET"] = val
392
+ end
350
393
  end
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: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Barnette
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-18 00:00:00.000000000 Z
12
+ date: 2013-10-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ansi
@@ -264,4 +264,3 @@ test_files:
264
264
  - test/fixtures/repo/modules/projects/manifests/first-project.pp
265
265
  - test/fixtures/repo/modules/projects/manifests/second-project.pp
266
266
  - test/system_timer.rb
267
- has_rdoc: