gem_bench 1.0.4 → 1.0.5

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
- SHA1:
3
- metadata.gz: 0a003421ea75678d129265f4636c40e74b5602e4
4
- data.tar.gz: da500d6acf4935d195cc7e6bf687ddb289fec32f
2
+ SHA256:
3
+ metadata.gz: d0150f098c58edf7279abc13c963078e6e2a200c8191c9c123e2c4fd01dfc082
4
+ data.tar.gz: e9ce289e93f6949152cdc2440d0124b5b84c11c124678adcdf9d247fe89f5a4d
5
5
  SHA512:
6
- metadata.gz: c7823400e8545878f790d2f1c85b567dc3bddaf17d0ff9ca0769238636405539b2f8eb6d90d207eea87e6662dfdec53b6d452deb2de7ad0c513fcf6436105dce
7
- data.tar.gz: 491ec9e681e37f1e8e99ab2aa4fcbc48fe6e3ccfe9753a03733480dc66d2ff2ecd51c6caa0f1f2f2e0e9870e4fb6f23cf25dd6081fb515f4d922d620b04f6e77
6
+ metadata.gz: 9e5f931b2ebc0df56cbf9a5e2b99dfa408d14aebaadb6b7897077f10be7d809f89b65dff0061f22b33e925330f88501a54e77ab0473020c1914c426650f39449
7
+ data.tar.gz: f5c3e302abf1b337081e06d4f77ce8eb2e1f49d2faf735d2336e4660df0f99a09cf5ebc8c3297b423bca7502a2db385010d72c4685bf5a69a6c1c36606d534ff
@@ -1,9 +1,9 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- - 2.3.3
8
- - 2.4.0
9
- before_install: gem install bundler -v 1.14.5
4
+ - ruby-2.0.0-p648
5
+ - ruby-2.1.10
6
+ - ruby-2.2.10
7
+ - ruby-2.3.7
8
+ - ruby-2.4.4
9
+ - ruby-2.5.1
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ Version 1.0.6 - SEP.09.2018
2
+ * Documentation improvements
3
+ * Add Ruby 2.5 to build matrix
4
+
1
5
  Version 1.0.5 - JUN.05.2017
2
6
  * Allow github macro as an alternative to git within Gemfile for strict version constraint analysis
3
7
 
data/Gemfile CHANGED
@@ -2,5 +2,11 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem "bundler" # For specs!
4
4
 
5
+ group :test do
6
+ gem 'rubocop', '~> 0.53.0', platforms: [:mri_21, :mri_22, :mri_23, :mri_24, :mri_25]
7
+ gem 'rubocop-rspec', '~> 1.24.0', platforms: [:mri_21, :mri_22, :mri_23, :mri_24, :mri_25]
8
+ gem 'byebug', platforms: [:mri_22, :mri_23, :mri_24, :mri_25]
9
+ end
10
+
5
11
  # Specify your gem's dependencies in gem_bench.gemspec
6
12
  gemspec
@@ -1,22 +1,21 @@
1
- Copyright (c) 2013 Peter Boling
2
-
3
1
  MIT License
4
2
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
3
+ Copyright (c) 2013 - 2018 Peter H. Boling, http://railsbling.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
12
11
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
15
14
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # GemBench [![Inline docs](http://inch-ci.org/github/pboling/gem_bench.png)](http://inch-ci.org/github/pboling/gem_bench)
1
+ # GemBench
2
2
 
3
3
  `gem_bench` is for static Gemfile and installed gem library source code analysis.
4
4
 
@@ -7,8 +7,29 @@
7
7
  Gem: "Put me in coach!"
8
8
  You: ❨╯°□°❩╯︵┻━┻
9
9
 
10
- Version constraints are important. Give the Gemfile some love in your CI build - New for 1.0.2
10
+ | Project | GemBench |
11
+ |------------------------ | ----------------------- |
12
+ | gem name | [gem_bench](https://rubygems.org/gems/gem_bench) |
13
+ | license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) |
14
+ | download rank | [![Downloads Today](https://img.shields.io/gem/rd/gem_bench.svg)](https://github.com/pboling/gem_bench) |
15
+ | version | [![Version](https://img.shields.io/gem/v/gem_bench.svg)](https://rubygems.org/gems/gem_bench) |
16
+ | dependencies | [![Depfu](https://badges.depfu.com/badges/a34c123a78a86496bbc2163b801089dd/count.svg)](https://depfu.com/github/pboling/activerecord-tablefree?project_id=5613) |
17
+ | continuous integration | [![Build Status](https://travis-ci.org/pboling/gem_bench.svg?branch=master)](https://travis-ci.org/pboling/gem_bench) |
18
+ | test coverage | [![Test Coverage](https://api.codeclimate.com/v1/badges/fe504d4ab2fb77cecf7d/test_coverage)](https://codeclimate.com/github/pboling/gem_bench/test_coverage) |
19
+ | maintainability | [![Maintainability](https://api.codeclimate.com/v1/badges/fe504d4ab2fb77cecf7d/maintainability)](https://codeclimate.com/github/pboling/gem_bench/maintainability) |
20
+ | code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/gem_bench/badges/users.svg)](https://www.codetriage.com/pboling/gem_bench) |
21
+ | homepage | [on Github.com][homepage] |
22
+ | documentation | [on Rdoc.info][documentation] |
23
+ | inline documenation | [![Inline docs](http://inch-ci.org/github/pboling/gem_bench.png)](http://inch-ci.org/github/pboling/gem_bench) |
24
+ | live chat | [![Join the chat at https://gitter.im/pboling/gem_bench](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/gem_bench?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
25
+ | expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
26
+ | Spread ~♡ⓛⓞⓥⓔ♡~ | [🌍 🌎 🌏](https://about.me/peter.boling), [🍚](https://www.crowdrise.com/helprefugeeswithhopefortomorrowliberia/fundraiser/peterboling), [➕](https://plus.google.com/+PeterBoling/posts), [👼](https://angel.co/peter-boling), [🐛](https://www.topcoder.com/members/pboling/), [:shipit:][coderwall], [![Tweet Peter](https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow)](http://twitter.com/galtzo) |
11
27
 
28
+ ### New for 1.0.2 - Gemfile specs
29
+
30
+ Version constraints are important. Give the Gemfile some love in your CI build
31
+
32
+ Create a `spec/gemfile_spec.rb` like:
12
33
  ```ruby
13
34
  Rspec.describe "Gemfile" do
14
35
  it("has version constraint on every gem") do
@@ -18,7 +39,27 @@ Rspec.describe "Gemfile" do
18
39
  end
19
40
  ```
20
41
 
21
- The new feature for 1.0.0 release allows you to search the Ruby code of all your gems for a specified regex, to find out which gems have wat DRAGONS.
42
+ Then your build will fail as soon as a gem is added without a proper constraint:
43
+
44
+ ```
45
+ Failures:
46
+
47
+ 1) Gemfile has version constraint on every gem
48
+ Failure/Error: expect(requirements.list_missing_version_constraints).to eq([])
49
+
50
+ expected: []
51
+ got: ["puma"]
52
+
53
+ (compared using ==)
54
+ # ./spec/gemfile_spec.rb:7:in `block (2 levels) in <top (required)>'
55
+ ```
56
+
57
+ For `:git`/`:github` sources, `:ref` and `:tag` are considered as "constraints", while `:branch` is not, because branches may be a moving target, and this gem aims to make Gemfiles production-ready.
58
+ For string version constraints anything is allowed (e.g. `'~> 1.0'`), as it assumes the constraint placed is well considered.
59
+
60
+ ### New for 1.0.0 - Find WAT Dragons in 3rd party source code
61
+
62
+ Search the Ruby source code of all the gems loaded by your Gemfile for a specified regex, to find out which gems have wat DRAGONS.
22
63
 
23
64
  Gem: "I have no wat DRAGONS!"
24
65
  You: ❨╯°□°❩╯︵┻━┻
@@ -30,34 +71,10 @@ You: ❨╯°□°❩╯︵┻━┻
30
71
  byebug has wat DRAGONS at [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebug-9.0.6/lib/byebug/commands/frame.rb", 954]]
31
72
  => nil
32
73
  ```
74
+
33
75
  NOTE: The number (954, above) is not a line number. The file which contains the text `wat` was the 954th file evaluated, i.e. the number doesn't matter.
34
76
  NOTE: This is a contrived example. The occurrence of `wat` in byebug is meaningless: `byebug/commands/frame.rb:34` has ` if there is a front end also watching over things.`. This is just an example! You can find anything you want, perhaps even something important!
35
77
 
36
- | Project | GemBench |
37
- |------------------------ | ----------------- |
38
- | gem name | gem_bench |
39
- | license | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) |
40
- | expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
41
- | download rank | [![Download Rank](https://img.shields.io/gem/rt/gem_bench.svg)](https://rubygems.org/gems/gem_bench) |
42
- | version | [![Gem Version](https://badge.fury.io/rb/gem_bench.png)](http://badge.fury.io/rb/gem_bench) |
43
- | dependencies | [![Dependency Status](https://gemnasium.com/pboling/gem_bench.png)](https://gemnasium.com/pboling/gem_bench) |
44
- | code quality | [![Code Climate](https://codeclimate.com/github/pboling/gem_bench.png)](https://codeclimate.com/github/pboling/gem_bench) |
45
- | inline documenation | [![Inline docs](http://inch-ci.org/github/pboling/gem_bench.png)](http://inch-ci.org/github/pboling/gem_bench) |
46
- | continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/gem_bench.png?branch=master)](https://travis-ci.org/pboling/gem_bench) |
47
- | test coverage | [![Coverage Status](https://coveralls.io/repos/pboling/gem_bench/badge.png)](https://coveralls.io/r/pboling/gem_bench) |
48
- | homepage | [on Github.com][homepage] |
49
- | documentation | [on Rdoc.info][documentation] |
50
- | live chat | [![Join the chat at https://gitter.im/pboling/gem_bench](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/gem_bench?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
51
- | Spread ~♡ⓛⓞⓥⓔ♡~ | [on Coderwall][coderwall] |
52
-
53
- [semver]: http://semver.org/
54
- [pvc]: http://docs.rubygems.org/read/chapter/16#page74
55
- [railsbling]: http://www.railsbling.com
56
- [peterboling]: http://www.peterboling.com
57
- [coderwall]: http://coderwall.com/pboling
58
- [documentation]: http://rdoc.info/github/pboling/gem_bench/frames
59
- [homepage]: https://github.com/pboling/gem_bench
60
-
61
78
  It is a fact of RubyGems that many of them do not need to be loaded by your app at boot time.
62
79
  It is a fact of Bundler that you don't know which ones need to be 'required' while staring at the Gemfile.
63
80
  It is a fact of Heroku that you only have 60, 75, or 120 ([by special request](https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout)) precious seconds to get your app loaded before ❨╯°□°❩╯︵┻━┻
@@ -116,14 +133,14 @@ Find out what gems may be causing it by defining `context`!
116
133
  ```
117
134
  >> require 'gem_bench'
118
135
  => true
119
- >> bad_context_maybe = GemBench.find(look_for_regex: /def context/).starters
136
+ >> bad_context_maybes = GemBench.find(look_for_regex: /def context/).starters
120
137
  [GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@global/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@foss/bundler/gems"]
121
138
  [GemBench] Detected 11 loaded gems + 2 loaded gems which GemBench is configured to ignore.
122
139
  => [byebug, diff-lcs]
123
140
  ```
124
141
  Then find the file with the first occurrence of the regex in each:
125
142
  ```
126
- >> bad_context_maybe.stats.map(&:first)
143
+ >> bad_context_maybes.map { |bcm| bcm.stats.map(&:first) }
127
144
  => [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebug-9.0.6/lib/byebug/command.rb"], ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb"]]
128
145
  ```
129
146
 
@@ -386,9 +403,14 @@ For example:
386
403
 
387
404
  ## Legal
388
405
 
389
- * MIT License
390
- * Copyright (c) 2013 [Peter H. Boling](http://www.railsbling.com)
406
+ * [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
407
+ * Copyright (c) 2013 - 2018 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
391
408
 
392
409
  [semver]: http://semver.org/
393
410
  [pvc]: http://docs.rubygems.org/read/chapter/16#page74
394
411
  [bundle-group-pattern]: https://gist.github.com/pboling/4564780
412
+ [railsbling]: http://www.railsbling.com
413
+ [peterboling]: http://www.peterboling.com
414
+ [coderwall]: http://coderwall.com/pboling
415
+ [documentation]: http://rdoc.info/github/pboling/gem_bench/frames
416
+ [homepage]: https://github.com/pboling/gem_bench
@@ -17,7 +17,7 @@ Trim down app load times by keeping your worst players on the bench (useful for
17
17
 
18
18
  spec.licenses = ['MIT']
19
19
  spec.platform = Gem::Platform::RUBY
20
- spec.required_ruby_version = ">= 2.0.0" # because has named parameters with default values
20
+ spec.required_ruby_version = ">= 2.0.0" # for named parameters with default values
21
21
 
22
22
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
23
  f.match(%r{^(test|spec|features)/})
@@ -29,9 +29,8 @@ Trim down app load times by keeping your worst players on the bench (useful for
29
29
 
30
30
  # Yes, it *is* actually a run-time dependency. This gem is sort of a bundler add-on.
31
31
  spec.add_runtime_dependency "bundler", "~> 1.14"
32
- spec.add_development_dependency "rake", "~> 10.5"
32
+ spec.add_development_dependency "rake", "~> 12.2"
33
33
  spec.add_development_dependency "rspec", "~> 3.5"
34
- spec.add_development_dependency "byebug", "~> 9.0"
35
- spec.add_development_dependency "gem-release", "~> 0.5"
34
+ spec.add_development_dependency "gem-release", "~> 2.0"
36
35
  spec.add_development_dependency "awesome_print"
37
36
  end
@@ -1,3 +1,3 @@
1
1
  module GemBench
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-05 00:00:00.000000000 Z
11
+ date: 2018-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.5'
33
+ version: '12.2'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.5'
40
+ version: '12.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,34 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.5'
55
- - !ruby/object:Gem::Dependency
56
- name: byebug
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '9.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '9.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: gem-release
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0.5'
61
+ version: '2.0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0.5'
68
+ version: '2.0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: awesome_print
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
130
  version: '0'
145
131
  requirements: []
146
132
  rubyforge_project:
147
- rubygems_version: 2.6.12
133
+ rubygems_version: 2.7.7
148
134
  signing_key:
149
135
  specification_version: 4
150
136
  summary: Static Gemfile and installed gem library source code analysis