brakecheck 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -1
- data/bin/brakecheck +5 -0
- data/brakecheck.gemspec +2 -2
- data/lib/bin_test.rb +10 -0
- data/lib/brakecheck.rb +4 -8
- data/lib/brakecheck/version.rb +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f86fc95232d0cd5d6053045857fddb8e219701d
|
4
|
+
data.tar.gz: 7adf75f80ca779ed4fa29118fcb4c1b4e4efd9ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f66c71aff2839bed21fc02360495bf19c6cb0eee9d439c5a91fa15f53ca3216aac0ea6488677bfeb7580c59ad8ca1dd37c2294733b8401a96f70aaba7cbcce11
|
7
|
+
data.tar.gz: f091d34aa833949d3f44491bf40dfff2c68cfa37aab9bb3e2e92e7652ed06c071f6367fb22daf4af8f96958a6a035bf02fd7240315da846396004a691d57593b
|
data/README.md
CHANGED
@@ -28,6 +28,25 @@ Or install it yourself as:
|
|
28
28
|
2. `include Brakecheck`
|
29
29
|
3. expect(gem_name).to be_the_latest_version
|
30
30
|
|
31
|
+
Full example:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
require 'brakecheck'
|
35
|
+
|
36
|
+
describe "Brakeman" do
|
37
|
+
before do
|
38
|
+
WebMock.allow_net_connect!
|
39
|
+
end
|
40
|
+
|
41
|
+
it "is up to date" do
|
42
|
+
expect("brakeman").to be_the_latest_version
|
43
|
+
end
|
44
|
+
|
45
|
+
after do
|
46
|
+
WebMock.disable_net_connect!
|
47
|
+
end
|
48
|
+
end
|
49
|
+
```
|
31
50
|
|
32
51
|
__NB: This gem uses rubygems.com API to determine the latest version.__
|
33
52
|
|
@@ -51,6 +70,5 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/apanze
|
|
51
70
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
52
71
|
|
53
72
|
|
54
|
-
|
55
73
|
> “A simple gem that makes it easy to have” == bla bla
|
56
74
|
- @grosser
|
data/bin/brakecheck
ADDED
data/brakecheck.gemspec
CHANGED
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
spec.bindir = "
|
21
|
-
spec.executables =
|
20
|
+
spec.bindir = "bin"
|
21
|
+
spec.executables = ['brakecheck']
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.12"
|
data/lib/bin_test.rb
ADDED
data/lib/brakecheck.rb
CHANGED
@@ -25,18 +25,14 @@ module Brakecheck
|
|
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
|
-
|
29
|
-
return false
|
30
|
-
else
|
31
|
-
Brakecheck::Core.latest(gem_name) == loaded_specs(gem_name)
|
32
|
-
end
|
28
|
+
Brakecheck::Core.latest(gem_name) == spec_from_file
|
33
29
|
end
|
34
30
|
|
35
|
-
failure_message do |
|
36
|
-
if
|
31
|
+
failure_message do |gem_name|
|
32
|
+
if loaded_specs(gem_name) == :not_in_bundle
|
37
33
|
"that gem is not in the bundle"
|
38
34
|
else
|
39
|
-
"expected
|
35
|
+
"expected #{gem_name} to be #{Brakecheck::Core.latest(gem_name)} but was actually #{loaded_specs(gem_name)}."
|
40
36
|
end
|
41
37
|
end
|
42
38
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Panzer
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -126,7 +126,8 @@ description: Make sure that your brakeman gem (or other gem) is always on the la
|
|
126
126
|
version.
|
127
127
|
email:
|
128
128
|
- apanzer@zendesk.com
|
129
|
-
executables:
|
129
|
+
executables:
|
130
|
+
- brakecheck
|
130
131
|
extensions: []
|
131
132
|
extra_rdoc_files: []
|
132
133
|
files:
|
@@ -137,9 +138,11 @@ files:
|
|
137
138
|
- LICENSE.txt
|
138
139
|
- README.md
|
139
140
|
- Rakefile
|
141
|
+
- bin/brakecheck
|
140
142
|
- bin/console
|
141
143
|
- bin/setup
|
142
144
|
- brakecheck.gemspec
|
145
|
+
- lib/bin_test.rb
|
143
146
|
- lib/brakecheck.rb
|
144
147
|
- lib/brakecheck/version.rb
|
145
148
|
homepage: https://github.com/apanzerj/brakecheck
|
@@ -162,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
165
|
version: '0'
|
163
166
|
requirements: []
|
164
167
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.5.1
|
166
169
|
signing_key:
|
167
170
|
specification_version: 4
|
168
171
|
summary: Enforce gemfile dependencies by breaking stuff.
|