gem_bench 1.0.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/gem_bench.rb CHANGED
@@ -1,5 +1,8 @@
1
- require "gem_bench/version"
1
+ # external gems
2
+ require "version_gem"
2
3
  require "bundler" # This gem utilizes bundler as a tool.
4
+
5
+ require "gem_bench/version"
3
6
  require "gem_bench/scout"
4
7
  require "gem_bench/player"
5
8
  require "gem_bench/team"
@@ -10,19 +13,20 @@ require "gem_bench/strict_version_requirement"
10
13
  module GemBench
11
14
  USAGE = "[GemBench] Usage: Require another gem in this session to evaluate it.\n\tExample:\n\t\trequire 'rails'\n\t\tGemBench.check({verbose: true})\n"
12
15
  RAILTIE_REGEX = /Rails::Engine|Rails::Railtie/
13
- TRASH_REGEX = /^(\s*)([#]+.*)?$/
14
- REQUIRE_FALSE_REGEX = /^[^#]+require(([:]\s*)|(\s*=>\s*))false.*/
16
+ TRASH_REGEX = /^(\s*)(\#+.*)?$/
17
+ REQUIRE_FALSE_REGEX = /^[^#]+require((:\s*)|(\s*=>\s*))false.*/
15
18
  DEPENDENCY_REGEX_PROC = ->(name) { /^\s*[^#]*\s*gem\s+['"]{1}#{name}['"]{1}/ }
16
19
  PATH_GLOB = ->(name) { "#{name}*/lib/**/*.rb" }
17
- EXCLUDE_FILE_PATTERN_REGEX_PROC = ->(name) { /#{name}\/test|features|spec|bin|exe/ }
20
+ EXCLUDE_FILE_PATTERN_REGEX_PROC = ->(name) { %r{#{name}/test|features|spec|bin|exe} }
18
21
  DO_NOT_SCAN = []
19
22
  PLAYER_STATES = {
20
- starter: :starter,
21
- bench: :bench
23
+ starter: :starter,
24
+ bench: :bench,
22
25
  }
23
26
 
24
27
  class << self
25
28
  attr_accessor :roster
29
+
26
30
  def check(verbose: false)
27
31
  @roster = GemBench::Team.new({verbose: verbose})
28
32
  end
@@ -37,8 +41,17 @@ module GemBench
37
41
  @roster.list_missing_version_constraints
38
42
  end
39
43
 
40
- def find(look_for_regex: GemBench::RAILTIE_REGEX, exclude_file_pattern_regex_proc: GemBench::EXCLUDE_FILE_PATTERN_REGEX_PROC, verbose: false)
41
- @roster = GemBench::Team.new({look_for_regex: look_for_regex, exclude_file_pattern_regex_proc: exclude_file_pattern_regex_proc, verbose: verbose})
44
+ def find(look_for_regex: GemBench::RAILTIE_REGEX,
45
+ exclude_file_pattern_regex_proc: GemBench::EXCLUDE_FILE_PATTERN_REGEX_PROC, verbose: false)
46
+ @roster = GemBench::Team.new({
47
+ look_for_regex: look_for_regex,
48
+ exclude_file_pattern_regex_proc: exclude_file_pattern_regex_proc,
49
+ verbose: verbose,
50
+ })
42
51
  end
43
52
  end
44
53
  end
54
+
55
+ GemBench::Version.class_eval do
56
+ extend VersionGem::Basic
57
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ����蘄���,Wë��(�����E�����=I��4�����S�l߂��Y�'L!����Wd�k�i�0O��"����*�}i�7I�Є�vˡ2"�.�;�,ܣ&l/�K&~������?��9��g��6�{koZ������]�:��9��Z�=����|��k�o\��GM�'�!\�^�`�*��٤H�r�� C>\���M[F��s�* ,� �)�q2n]�>p>���8�@q�, ��H��<DZ)/\Ֆ
metadata CHANGED
@@ -1,73 +1,239 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
- cert_chain: []
11
- date: 2018-09-09 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
14
+ ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
15
+ A2NvbTAeFw0yMzA5MjAxNzMwMjhaFw0yNDA5MTkxNzMwMjhaMEMxFT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UKeksPXqJvNxNPDu2DVYsa/IWdl96whzS4
32
+ Bl7SwB1E7agps40UcshCSKaVDOU0M+XN6SrnJMElnBic+KSAkBkVFbzS0BE4ODZM
33
+ BgE6nYzQ05qhuvbE+oGdACTlemNtDDWCh0uw+7x0q2PocGIDU5zsPn/WNTkCXPmB
34
+ CHGvqDNWq4M7ncTKAaS2XExgyb7uPdq9fKiOW8nmH+zCiGzJXzBWwZlKf7L4Ht9E
35
+ a3f0e5C+zvee9Z5Ng9ciyfav9/fcXgYt5MjoBv27THr5XfBhgOCIHSYW2tqJmWKi
36
+ KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb
37
+ pF8dMA==
38
+ -----END CERTIFICATE-----
39
+ date: 2023-09-25 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: bundler
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
- - - "~>"
45
+ - - ">="
18
46
  - !ruby/object:Gem::Version
19
47
  version: '1.14'
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - "~>"
52
+ - - ">="
25
53
  - !ruby/object:Gem::Version
26
54
  version: '1.14'
27
55
  - !ruby/object:Gem::Dependency
28
- name: rake
56
+ name: version_gem
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '12.2'
61
+ version: '1.1'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.1.3
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '1.1'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.1.3
75
+ - !ruby/object:Gem::Dependency
76
+ name: redcarpet
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
34
82
  type: :development
35
83
  prerelease: false
36
84
  version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: yard
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: yard-junk
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: awesome_print
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: gem-release
133
+ requirement: !ruby/object:Gem::Requirement
37
134
  requirements:
38
135
  - - "~>"
39
136
  - !ruby/object:Gem::Version
40
- version: '12.2'
137
+ version: '2.0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '2.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: rake
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
41
159
  - !ruby/object:Gem::Dependency
42
160
  name: rspec
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: rspec-block_is_expected
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ - !ruby/object:Gem::Dependency
188
+ name: rubocop-lts
43
189
  requirement: !ruby/object:Gem::Requirement
44
190
  requirements:
45
191
  - - "~>"
46
192
  - !ruby/object:Gem::Version
47
- version: '3.5'
193
+ version: '10.1'
48
194
  type: :development
49
195
  prerelease: false
50
196
  version_requirements: !ruby/object:Gem::Requirement
51
197
  requirements:
52
198
  - - "~>"
53
199
  - !ruby/object:Gem::Version
54
- version: '3.5'
200
+ version: '10.1'
55
201
  - !ruby/object:Gem::Dependency
56
- name: gem-release
202
+ name: rubocop-packaging
57
203
  requirement: !ruby/object:Gem::Requirement
58
204
  requirements:
59
205
  - - "~>"
60
206
  - !ruby/object:Gem::Version
61
- version: '2.0'
207
+ version: '0.5'
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: 0.5.2
62
211
  type: :development
63
212
  prerelease: false
64
213
  version_requirements: !ruby/object:Gem::Requirement
65
214
  requirements:
66
215
  - - "~>"
67
216
  - !ruby/object:Gem::Version
68
- version: '2.0'
217
+ version: '0.5'
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: 0.5.2
69
221
  - !ruby/object:Gem::Dependency
70
- name: awesome_print
222
+ name: rubocop-rspec
223
+ requirement: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ type: :development
229
+ prerelease: false
230
+ version_requirements: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - ">="
233
+ - !ruby/object:Gem::Version
234
+ version: '0'
235
+ - !ruby/object:Gem::Dependency
236
+ name: simplecov
71
237
  requirement: !ruby/object:Gem::Requirement
72
238
  requirements:
73
239
  - - ">="
@@ -90,18 +256,12 @@ executables: []
90
256
  extensions: []
91
257
  extra_rdoc_files: []
92
258
  files:
93
- - ".byebug_history"
94
- - ".gitignore"
95
- - ".rspec"
96
- - ".travis.yml"
97
- - CHANGELOG
98
- - Gemfile
259
+ - CHANGELOG.md
260
+ - CODE_OF_CONDUCT.md
261
+ - CONTRIBUTING.md
99
262
  - LICENSE.txt
100
263
  - README.md
101
- - Rakefile
102
- - bin/console
103
- - bin/setup
104
- - gem_bench.gemspec
264
+ - SECURITY.md
105
265
  - lib/gem_bench.rb
106
266
  - lib/gem_bench/gemfile_line_tokenizer.rb
107
267
  - lib/gem_bench/player.rb
@@ -110,11 +270,19 @@ files:
110
270
  - lib/gem_bench/strict_version_requirement.rb
111
271
  - lib/gem_bench/team.rb
112
272
  - lib/gem_bench/version.rb
113
- homepage: http://github.com/acquaintable/gem_bench
273
+ homepage: http://github.com/pboling/gem_bench
114
274
  licenses:
115
275
  - MIT
116
- metadata: {}
117
- post_install_message:
276
+ metadata:
277
+ homepage_uri: https://railsbling.com/tags/gem_bench/
278
+ source_code_uri: http://github.com/pboling/gem_bench/tree/v2.0.0
279
+ changelog_uri: http://github.com/pboling/gem_bench/blob/v2.0.0/CHANGELOG.md
280
+ bug_tracker_uri: http://github.com/pboling/gem_bench/issues
281
+ documentation_uri: https://www.rubydoc.info/gems/gem_bench/2.0.0
282
+ wiki_uri: http://github.com/pboling/gem_bench/wiki
283
+ funding_uri: https://liberapay.com/pboling
284
+ rubygems_mfa_required: 'true'
285
+ post_install_message:
118
286
  rdoc_options: []
119
287
  require_paths:
120
288
  - lib
@@ -122,16 +290,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
290
  requirements:
123
291
  - - ">="
124
292
  - !ruby/object:Gem::Version
125
- version: 2.0.0
293
+ version: '2.3'
126
294
  required_rubygems_version: !ruby/object:Gem::Requirement
127
295
  requirements:
128
296
  - - ">="
129
297
  - !ruby/object:Gem::Version
130
298
  version: '0'
131
299
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 2.7.7
134
- signing_key:
300
+ rubygems_version: 3.4.19
301
+ signing_key:
135
302
  specification_version: 4
136
303
  summary: Static Gemfile and installed gem library source code analysis
137
304
  test_files: []
metadata.gz.sig ADDED
Binary file
data/.byebug_history DELETED
@@ -1,44 +0,0 @@
1
- exit
2
- instance.check_gemfile?
3
- instance.check_gemfile
4
- instance
5
- exit
6
- next
7
- gemfile_lines
8
- gemfile_trash
9
- next
10
- a =~ GemBench::TRASH_REGEX
11
- a = "gem \"bundler\" # For specs!\n"
12
- all_lines
13
- exit
14
- scout.gemfile_lines
15
- gemfile_lines
16
- scout
17
- next
18
- exit
19
- self.gemfile_lines
20
- scout
21
- gemfile_lines
22
- next
23
- exit
24
- self.scout.gemfile_lines
25
- self.gemfile_lines
26
- @scout.gemfile_lines
27
- @scout
28
- @gemfile_lines
29
- gemfile_lines
30
- Gem.loaded_specs.values
31
- next
32
- Gem.loaded_specs.values
33
- next
34
- exit
35
- next
36
- @loaded_gems
37
- loaded_gems
38
- next
39
- @gemfile_trash, @gemfile_lines = all_lines.partition {|x| x =~ GemBench::TRASH_REGEX}
40
- all_lines
41
- next
42
- file.readlines
43
- next
44
- gemfile_path
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
13
-
14
- *.gem
15
- /.idea/
16
- .ruby-version
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
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/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem "bundler" # For specs!
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
-
11
- # Specify your gem's dependencies in gem_bench.gemspec
12
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "gem_bench"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/gem_bench.gemspec DELETED
@@ -1,36 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'gem_bench/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "gem_bench"
8
- spec.version = GemBench::VERSION
9
- spec.authors = ["Peter Boling"]
10
- spec.email = ["peter.boling@gmail.com"]
11
-
12
- spec.summary = %q{Static Gemfile and installed gem library source code analysis}
13
- spec.description = %q{Enforce Gemfile version constraints
14
- Regex search across all installed gem's source code to find issues quickly
15
- Trim down app load times by keeping your worst players on the bench (useful for beating Heroku slug load time cutoff)}
16
- spec.homepage = "http://github.com/acquaintable/gem_bench"
17
-
18
- spec.licenses = ['MIT']
19
- spec.platform = Gem::Platform::RUBY
20
- spec.required_ruby_version = ">= 2.0.0" # for named parameters with default values
21
-
22
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
23
- f.match(%r{^(test|spec|features)/})
24
- end
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
28
- spec.test_files = Dir.glob("{test|spec|features}/**/*")
29
-
30
- # Yes, it *is* actually a run-time dependency. This gem is sort of a bundler add-on.
31
- spec.add_runtime_dependency "bundler", "~> 1.14"
32
- spec.add_development_dependency "rake", "~> 12.2"
33
- spec.add_development_dependency "rspec", "~> 3.5"
34
- spec.add_development_dependency "gem-release", "~> 2.0"
35
- spec.add_development_dependency "awesome_print"
36
- end