gem_version_check 0.3.0 → 0.3.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: c03eea86fa0f3b9e3756ce66dd8a772a41a57cff
4
- data.tar.gz: c3b3089a5be7c6e47ef5b81fd9ae6ff77b534a15
3
+ metadata.gz: ffd7b8438c32159db115ee740e82bd116f57c8fa
4
+ data.tar.gz: 738eddb5576a075da94d49d7249a2f88686ebb24
5
5
  SHA512:
6
- metadata.gz: 6fa06d9b640dfc253f48e6fdb0f0cf72379d855f0490c9b83607f9ba5e4b9466d01e1f651d3e7928c532c2fba93c54bf5208c7e9daca9e79a367b393f836ae70
7
- data.tar.gz: 1337d3a96d01edeee344bebb8939e920c8759bf100cc61e240a33a6b2561ac06f9ab2aae239df78f082c2d8580d92e49573971302717ec1a646657e30d555204
6
+ metadata.gz: f1b05ca58bd5fced8a808eaaebda480f04230ca5cfb4ed741cc8fd6d40e9e0d71ac8a731f3d2cd4b2e80718167997c54f48ba6ff852728ba9d64dcf0d1196bd7
7
+ data.tar.gz: 355c1077b5f3a93688ba4a31625b2c626e5dea8524daddb9526a1409ffcefce31f2e282e0521b733c4d84c6dcf3e474d02e4fdb732870918ebe58c47a3f219d5
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.5
4
+ - 2.3.1
@@ -27,7 +27,7 @@ module GemVersionCheck
27
27
  dependency.check(lock_file)
28
28
  result << dependency
29
29
 
30
- @check_failed = true unless dependency.valid?
30
+ @check_failed = true if dependency.used? && !dependency.valid?
31
31
  end
32
32
  result
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module GemVersionCheck
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/spec/project_spec.rb CHANGED
@@ -43,24 +43,37 @@ module GemVersionCheck
43
43
 
44
44
  shared_examples "check_failed" do
45
45
  it "returns true if at least one dependency is not up to date or non existing" do
46
- project.check_failed? == true
46
+ project.check_failed?.should == true
47
47
  end
48
48
  end
49
49
 
50
50
  context "#check_failed?" do
51
+ before do
52
+ project.generate_report
53
+ end
54
+
51
55
  context "with whitelisted gems" do
52
- let(:options) { { only: "actionpack" } }
56
+ let(:options) { { only: %w(actionpack) } }
53
57
  include_examples "check_failed"
54
58
  end
55
59
 
56
60
  context "with blacklisted gems" do
57
- let(:options) { { except: "actionpack" } }
61
+ let(:options) { { except: %w(actionpack) } }
58
62
  include_examples "check_failed"
59
63
  end
60
64
 
61
65
  context "without black- or whitelisting" do
62
66
  include_examples "check_failed"
63
67
  end
68
+
69
+ context "with unused gems" do
70
+ let(:options) { { only: %w(redis) } }
71
+
72
+ it "returns false if all used dependecies are up to date" do
73
+ project.check_failed?.should == false
74
+ end
75
+ end
76
+
64
77
  end
65
78
  end
66
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_version_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Dietz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -89,6 +89,7 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
+ - ".travis.yml"
92
93
  - Gemfile
93
94
  - README.md
94
95
  - Rakefile
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
134
  version: '0'
134
135
  requirements: []
135
136
  rubyforge_project:
136
- rubygems_version: 2.4.8
137
+ rubygems_version: 2.6.4
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: Check your gem dependencies