brakecheck 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -9
- data/brakecheck.gemspec +2 -1
- data/lib/brakecheck.rb +20 -11
- data/lib/brakecheck/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a7b1470e779773f5344f92d623fe3405f104d03
|
4
|
+
data.tar.gz: 33ce7e5b19198cb29e1267516444b6bf0121bf1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 881b8583710a53e83bc6c1670f46e6ff1a6928be6d81c7a709d47d5f58918516f02e1f63bb1465aaf9b38c6180307c50e91cddf9aa532ce6de2cd5629194e8b3
|
7
|
+
data.tar.gz: 459a7ae95c6051045850dd65cf2f407b3b5a313b3a7f4f2a6c5fb3057c3afe1452c00372c606a5ac78cf8d2396e0dbfeefbcdca95aef2ef6477222e935886d56
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Brakecheck
|
2
2
|
|
3
|
-
|
3
|
+
Test breakage when important gems are stale.
|
4
4
|
|
5
5
|
## Why?!? What's wrong with Bundler?
|
6
6
|
|
@@ -26,14 +26,8 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
1. Create a basic test
|
28
28
|
2. `include Brakecheck`
|
29
|
-
3.
|
29
|
+
3. expect(gem_name).to be_the_latest_version
|
30
30
|
|
31
|
-
Rspec Matcher exampe:
|
32
|
-
|
33
|
-
```ruby
|
34
|
-
expect('brakeman').to be_the_latest_version
|
35
|
-
```
|
36
|
-
|
37
31
|
|
38
32
|
__NB: This gem uses rubygems.com API to determine the latest version.__
|
39
33
|
|
@@ -49,10 +43,14 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
49
43
|
|
50
44
|
## Contributing
|
51
45
|
|
52
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/apanzerj/brakecheck.
|
53
47
|
|
54
48
|
|
55
49
|
## License
|
56
50
|
|
57
51
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
58
52
|
|
53
|
+
|
54
|
+
|
55
|
+
> “A simple gem that makes it easy to have” == bla bla
|
56
|
+
- @grosser
|
data/brakecheck.gemspec
CHANGED
@@ -23,9 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.12"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
-
spec.
|
26
|
+
spec.add_runtime_dependency "rspec", "~> 3.0"
|
27
27
|
spec.add_development_dependency "webmock"
|
28
28
|
spec.add_development_dependency "pry"
|
29
|
+
spec.add_runtime_dependency "minitest"
|
29
30
|
spec.add_runtime_dependency "faraday"
|
30
31
|
spec.add_runtime_dependency "faraday_middleware"
|
31
32
|
end
|
data/lib/brakecheck.rb
CHANGED
@@ -24,24 +24,33 @@ module Brakecheck
|
|
24
24
|
|
25
25
|
RSpec::Matchers.define :be_the_latest_version do
|
26
26
|
match do |gem_name|
|
27
|
-
|
27
|
+
spec_from_file = loaded_specs(gem_name)
|
28
|
+
if spec_from_file == :not_in_bundle
|
29
|
+
return false
|
30
|
+
else
|
31
|
+
Brakecheck::Core.latest(gem_name) == loaded_specs(gem_name)
|
32
|
+
end
|
28
33
|
end
|
29
|
-
end
|
30
|
-
end
|
31
34
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
failure_message do |actual|
|
36
|
+
if actual == :not_in_bundle
|
37
|
+
"that gem is not in the bundle"
|
38
|
+
else
|
39
|
+
"expected gem to be #{expected} but was actually #{actual}."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
39
43
|
end
|
40
44
|
|
41
45
|
def loaded_specs(gem_name)
|
42
|
-
gem_here =
|
46
|
+
gem_here = specs.detect do |specs|
|
43
47
|
specs.name == gem_name
|
44
48
|
end
|
49
|
+
|
45
50
|
gem_here.nil? ? :not_in_bundle : gem_here.version.to_s
|
46
51
|
end
|
52
|
+
|
53
|
+
def specs
|
54
|
+
@specs ||= Bundler::LockfileParser.new(Bundler.read_file(Bundler.default_lockfile)).specs
|
55
|
+
end
|
47
56
|
end
|
data/lib/brakecheck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brakecheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Panzer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: faraday
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|