brakecheck 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0defc33f43712a390b17674f92aef941bed2c54
4
- data.tar.gz: e448fe84f4d925afa273a1fe88d7e952448144e6
3
+ metadata.gz: 1f86fc95232d0cd5d6053045857fddb8e219701d
4
+ data.tar.gz: 7adf75f80ca779ed4fa29118fcb4c1b4e4efd9ea
5
5
  SHA512:
6
- metadata.gz: 61c719e48e0cec19f3a7dbd15ef2ba48fd65bd6a51e8a3fec589076fcdb0a129e64e6ca0743d144d7c23d2157b154a00eef7e508c4ab3b7575c4bf182a1e485d
7
- data.tar.gz: f9b6c34887059e95e6ab7702925530b623ae9b5620c1380f3bcd447ca7bf4639aad366c6cf1c5979774cd120cad89541ba4aa47695d48fb68bc810f6bd024716
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
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require 'rspec'
5
+ RSpec::Core::Runner.run([File.join(__FILE__, "..", "..", "lib", "bin_test.rb")])
@@ -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 = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
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"
@@ -0,0 +1,10 @@
1
+ require "brakecheck"
2
+ RSpec.describe ENV['BRAKECHECK_GEM'] do
3
+ before do
4
+ WebMock.disable_net_connect!(allow: 'rubygems.org') if defined? WebMock
5
+ end
6
+
7
+ it 'is the lastest version' do
8
+ expect(ENV['BRAKECHECK_GEM']).to be_the_latest_version
9
+ end
10
+ end
@@ -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
- 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
+ Brakecheck::Core.latest(gem_name) == spec_from_file
33
29
  end
34
30
 
35
- failure_message do |actual|
36
- if actual == :not_in_bundle
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 gem to be #{expected} but was actually #{actual}."
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
 
@@ -1,3 +1,3 @@
1
1
  module Brakecheck
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
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.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Panzer
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
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.4.5.1
168
+ rubygems_version: 2.5.1
166
169
  signing_key:
167
170
  specification_version: 4
168
171
  summary: Enforce gemfile dependencies by breaking stuff.