stevenson 2.2.1 → 2.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb3f8190c928e91ba03e4aff6a7a8a8b29cc3714
4
- data.tar.gz: 3f310e6ef86b3eeb5bebd5bd4d60d215bef18d38
3
+ metadata.gz: 9085412145e88fbe98c683633a26ffb6c6616380
4
+ data.tar.gz: 91a2c10e1f490f9a0b446eaef403b96ae72ad3b0
5
5
  SHA512:
6
- metadata.gz: 3d92c4f9478ed6c5da821b9d31d83140e18a11d66a0cf6756c85b83a5e27a38e6a1b70c70bd3c0af39b2d4edd47494a90c83501565cca0e1acd05cd0e9e5c90b
7
- data.tar.gz: 0dabc7b3dced9bb88811b4372b8803e6d347d89723ecc0fca611c5517b72e168924f6d554adb91cf148104ef7929735794f2da8b236a57bbcf43b72594256f21
6
+ metadata.gz: d31b0a9d249e5881ad59c42f2f2579d92d411d4d0534c73e7305280cf68b9a38031129b33543ee10fbe0c19a9e49d2c5536711eb93e542ce7d13c746ee27307d
7
+ data.tar.gz: 68b0e3f40bb7c978697f502b921e78a65d65a3070920570dd9ea341cb893ca8f6ff6e3cd3237ffe14fa41db47aee551e8600d8f01170d51ce4ffb014f6c02f90
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 2.2.2 (December 11th, 2015)
2
+ - Add a clearer error message to Template message
3
+ - Refactor user directory fetch to try ENV (or default to root on
4
+ failure)
5
+
1
6
  2.2.1 (December 10th, 2015)
2
7
  - Better capture and present Stevenson vs Ruby errors
3
8
 
@@ -6,15 +6,21 @@ module Stevenson
6
6
  class Dotfile < SimpleDelegator
7
7
 
8
8
  TEMPLATE_PATH = File.join(File.dirname(__FILE__), '..', '..', 'assets', 'stevenson_dotfile.yml')
9
- DOTFILE_PATH = File.join(Dir.home, ".stevenson")
9
+ DOTFILE_FILENAME = ".stevenson"
10
10
 
11
11
  class << self
12
12
  def install
13
- FileUtils.copy TEMPLATE_PATH, DOTFILE_PATH
13
+ FileUtils.copy TEMPLATE_PATH, path
14
14
  end
15
15
 
16
16
  def path
17
- DOTFILE_PATH
17
+ File.join(user_path, DOTFILE_FILENAME)
18
+ end
19
+
20
+ private
21
+
22
+ def user_path
23
+ Dir.home rescue ENV.fetch('HOME', "/")
18
24
  end
19
25
  end
20
26
 
@@ -8,7 +8,7 @@ module Stevenson
8
8
  end
9
9
 
10
10
  def local_directory
11
- raise InvalidTemplateException.new('The given path is not a directory') unless File.directory?(template_path)
11
+ raise InvalidTemplateException.new("The given path is not a directory '#{template_path}'") unless File.directory?(template_path)
12
12
 
13
13
  @_local_directory ||= Dir.mktmpdir.tap do |dir|
14
14
  directories = [template_path, options[:subdirectory], '.'].compact
@@ -1,3 +1,3 @@
1
1
  module Stevenson
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stevenson
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - RootsRated
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler