bundle_outdated 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.0.3 (2011-05-06)
2
+
3
+ * Gracefully handle cases where Gem.latest_version_for returns nil
4
+ (Example: non-public gems in vendor/)
5
+
1
6
  ## 0.0.2 (2011-05-06)
2
7
 
3
8
  * Explicit requirement for RubyGems 1.6.0 or later.
@@ -35,7 +35,7 @@ module BundleOutdated
35
35
  end
36
36
 
37
37
  def outdated?
38
- return false unless version
38
+ return false unless version && latest_version
39
39
  version < latest_version
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module BundleOutdated
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -60,4 +60,12 @@ class GemDependencyTest < Test::Unit::TestCase
60
60
  gd = BundleOutdated::GemDependency.new 'gem "rails", "3.1"'
61
61
  assert !gd.outdated?
62
62
  end
63
+
64
+ def test_outdated_handles_unavailable_gems
65
+ mock(Gem).latest_version_for('rails') { nil }
66
+ gd = BundleOutdated::GemDependency.new 'gem "rails", "3.1"'
67
+ assert_nothing_raised {
68
+ assert !gd.outdated?
69
+ }
70
+ end
63
71
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundle_outdated
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Lenz