cliver 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -9,11 +9,3 @@ rvm:
9
9
  - 1.8.7
10
10
  - jruby-18mode
11
11
  - rbx-18mode
12
- branches:
13
- only:
14
- - develop
15
- - master
16
- - /^release\/-.*$/
17
- - /^support\/-.*$/
18
- - /^hotfix\/-.*$/
19
- - /^feature\/-.*$/
@@ -51,12 +51,15 @@ module Cliver
51
51
  # @raise [DependencyVersionMismatch] if installed version does not match
52
52
  # @raise [DependencyNotFound] if no installed version on your path
53
53
  def assert!
54
- version = installed_version
55
- raise(DependencyNotFound, "'#{@executable}' missing.") unless version
54
+ version = installed_version ||
55
+ raise(DependencyNotFound,
56
+ "required command-line executable '#{@executable}' " +
57
+ 'could not be found on your PATH.')
56
58
 
57
59
  if @requirement && !@requirement.satisfied_by?(Gem::Version.new(version))
58
60
  raise DependencyVersionMismatch,
59
- "expected '#{@executable}' to be #{@requirement}, got #{version}"
61
+ "expected command-line executable '#{@executable}' to " +
62
+ "be #{@requirement}, got #{version}"
60
63
  end
61
64
  end
62
65
 
@@ -77,8 +80,8 @@ module Cliver
77
80
  (version_string && version_string[PARSABLE_GEM_VERSION]).tap do |version|
78
81
  unless version
79
82
  raise ArgumentError,
80
- "found #{@executable} at '#{executable_path}' " +
81
- 'but could not detect its version.'
83
+ "found command-line executable #{@executable} at " +
84
+ "'#{executable_path}' but could not detect its version."
82
85
  end
83
86
  end
84
87
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Cliver
4
4
  # Cliver follows {http://semver.org SemVer}
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
data/spec/cliver_spec.rb CHANGED
@@ -19,13 +19,13 @@ describe Cliver do
19
19
  let(:detector) { proc { RUBY_VERSION.sub('p', '.') } }
20
20
  it { should_not be_false }
21
21
  it { should match 'Dependency Version Mismatch:' }
22
- it { should match "expected 'ruby' to be #{requirements}" }
22
+ it { should match "expected .+ 'ruby' to be #{requirements}" }
23
23
  end
24
24
  context 'when dependency is not present' do
25
25
  let(:executable) { 'ruxxxby' }
26
26
  it { should_not be_false }
27
27
  it { should match 'Dependency Not Found:' }
28
- it { should match "'#{executable}' missing" }
28
+ it { should match "'#{executable}' could not be found" }
29
29
  end
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-22 00:00:00.000000000 Z
12
+ date: 2013-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler