fast_underscore 0.3.2 → 0.3.4
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 +4 -4
- data/CHANGELOG.md +20 -6
- data/CODE_OF_CONDUCT.md +1 -1
- data/LICENSE +1 -1
- data/README.md +3 -3
- data/ext/fast_underscore/extconf.rb +2 -2
- data/fast_underscore.gemspec +45 -28
- data/lib/fast_underscore/version.rb +1 -1
- data/lib/fast_underscore.rb +7 -7
- metadata +27 -25
- data/.github/dependabot.yml +0 -6
- data/.github/workflows/main.yml +0 -44
- data/.gitignore +0 -11
- data/.rubocop.yml +0 -30
- data/Gemfile +0 -7
- data/Gemfile.lock +0 -82
- data/Rakefile +0 -22
- data/Steepfile +0 -6
- data/bin/bench +0 -24
- data/bin/console +0 -8
- data/bin/setup +0 -6
- data/gemfiles/5.1.gemfile +0 -7
- data/gemfiles/5.2.gemfile +0 -7
- data/gemfiles/6.0.gemfile +0 -7
- data/gemfiles/6.1.gemfile +0 -7
- data/sig/fast_underscore.rbs +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19f7d80999c34375fec07a65c9508caa62532ab60013eb7f14185ff1ff59c3f9
|
|
4
|
+
data.tar.gz: e1079092105d5ce4ef58957d000e12206f053b471a7f4535ed7f72fbb59913fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a73bb48fdcbad7d4c3791119f21bba127aeba1400aa4c7baa107162ea8c7de0bb84485502491670febb6698e78e99fa3ef1cdaa32cdcc6c1ffc7f5a12203b9c4
|
|
7
|
+
data.tar.gz: 6bc9a730ad636a5904fe2136f3f29822c5dc25bd570f129131d4619f19f4fd31939c0d01db31873367d8b471fc4de54e25fdd8ac71fd460e3c047aba6bbd9f6f
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.4] - 2024-05-25
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Trim files from built artifact.
|
|
14
|
+
|
|
15
|
+
## [0.3.3] - 2021-11-17
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Require MFA for releasing.
|
|
20
|
+
|
|
9
21
|
## [0.3.2] - 2021-04-16
|
|
10
22
|
|
|
11
23
|
### Changed
|
|
@@ -36,9 +48,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
36
48
|
|
|
37
49
|
- Support for the Rails 5.2 beta.
|
|
38
50
|
|
|
39
|
-
[unreleased]: https://github.com/
|
|
40
|
-
[0.3.
|
|
41
|
-
[0.3.
|
|
42
|
-
[0.3.
|
|
43
|
-
[0.
|
|
44
|
-
[0.
|
|
51
|
+
[unreleased]: https://github.com/kddnewton/fast_underscore/compare/v0.3.4...HEAD
|
|
52
|
+
[0.3.4]: https://github.com/kddnewton/fast_underscore/compare/v0.3.3...v0.3.4
|
|
53
|
+
[0.3.3]: https://github.com/kddnewton/fast_underscore/compare/v0.3.2...v0.3.3
|
|
54
|
+
[0.3.2]: https://github.com/kddnewton/fast_underscore/compare/v0.3.1...v0.3.2
|
|
55
|
+
[0.3.1]: https://github.com/kddnewton/fast_underscore/compare/v0.3.0...v0.3.1
|
|
56
|
+
[0.3.0]: https://github.com/kddnewton/fast_underscore/compare/v0.2.0...v0.3.0
|
|
57
|
+
[0.2.0]: https://github.com/kddnewton/fast_underscore/compare/v0.1.0...v0.2.0
|
|
58
|
+
[0.1.0]: https://github.com/kddnewton/fast_underscore/compare/6981d0...v0.1.0
|
data/CODE_OF_CONDUCT.md
CHANGED
|
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
|
55
55
|
## Enforcement
|
|
56
56
|
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at
|
|
58
|
+
reported by contacting the project team at kddnewton@gmail.com. All
|
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `String#underscore` Ruby Extension
|
|
2
2
|
|
|
3
|
-
[](https://github.com/kddnewton/fast_underscore/actions)
|
|
4
4
|
[](https://rubygems.org/gems/fast_underscore)
|
|
5
5
|
|
|
6
6
|
`fast_underscore` is a C extension that provides a fast implementation of [ActiveSupport's `String#underscore` method](http://api.rubyonrails.org/classes/String.html#method-i-underscore).
|
|
@@ -27,7 +27,7 @@ Comparison:
|
|
|
27
27
|
Add this line to your application's Gemfile:
|
|
28
28
|
|
|
29
29
|
```ruby
|
|
30
|
-
gem
|
|
30
|
+
gem "fast_underscore"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
And then execute:
|
|
@@ -52,7 +52,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
52
52
|
|
|
53
53
|
## Contributing
|
|
54
54
|
|
|
55
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
55
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kddnewton/fast_underscore.
|
|
56
56
|
|
|
57
57
|
## License
|
|
58
58
|
|
data/fast_underscore.gemspec
CHANGED
|
@@ -1,33 +1,50 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
require_relative "lib/fast_underscore/version"
|
|
4
|
+
|
|
5
|
+
version = FastUnderscore::VERSION
|
|
6
|
+
repository = "https://github.com/kddnewton/fast_underscore"
|
|
6
7
|
|
|
7
8
|
Gem::Specification.new do |spec|
|
|
8
|
-
spec.name
|
|
9
|
-
spec.version
|
|
10
|
-
spec.authors
|
|
11
|
-
spec.email
|
|
12
|
-
|
|
13
|
-
spec.summary
|
|
14
|
-
spec.description
|
|
15
|
-
spec.homepage
|
|
16
|
-
spec.license
|
|
17
|
-
|
|
18
|
-
spec.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
spec.name = "fast_underscore"
|
|
10
|
+
spec.version = version
|
|
11
|
+
spec.authors = ["Kevin Newton"]
|
|
12
|
+
spec.email = ["kddnewton@gmail.com"]
|
|
13
|
+
|
|
14
|
+
spec.summary = "Fast String#underscore implementation"
|
|
15
|
+
spec.description = "Provides a C-optimized method for underscoring a string"
|
|
16
|
+
spec.homepage = repository
|
|
17
|
+
spec.license = "MIT"
|
|
18
|
+
|
|
19
|
+
spec.metadata = {
|
|
20
|
+
"bug_tracker_uri" => "#{repository}/issues",
|
|
21
|
+
"changelog_uri" => "#{repository}/blob/v#{version}/CHANGELOG.md",
|
|
22
|
+
"source_code_uri" => repository,
|
|
23
|
+
"rubygems_mfa_required" => "true"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
spec.files = [
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"CODE_OF_CONDUCT.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md",
|
|
31
|
+
"ext/fast_underscore/extconf.rb",
|
|
32
|
+
"ext/fast_underscore/fast_underscore.c",
|
|
33
|
+
"ext/fast_underscore/fast_underscore.h",
|
|
34
|
+
"fast_underscore.gemspec",
|
|
35
|
+
"lib/fast_underscore.rb",
|
|
36
|
+
"lib/fast_underscore/version.rb"
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
spec.require_paths = ["lib"]
|
|
40
|
+
spec.extensions = ["ext/fast_underscore/extconf.rb"]
|
|
41
|
+
|
|
42
|
+
spec.add_development_dependency "benchmark-ips", "~> 2"
|
|
43
|
+
spec.add_development_dependency "bundler", "~> 2"
|
|
44
|
+
spec.add_development_dependency "minitest", "~> 5"
|
|
45
|
+
spec.add_development_dependency "rake", "~> 13"
|
|
46
|
+
spec.add_development_dependency "rake-compiler", "~> 1"
|
|
47
|
+
spec.add_development_dependency "rubocop", "~> 1.12"
|
|
48
|
+
spec.add_development_dependency "ruby_memcheck"
|
|
49
|
+
spec.add_development_dependency "syntax_tree"
|
|
33
50
|
end
|
data/lib/fast_underscore.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "fast_underscore/version"
|
|
4
|
+
require "fast_underscore/fast_underscore"
|
|
5
5
|
|
|
6
6
|
module FastUnderscore
|
|
7
7
|
# Override ActiveSupport::Inflector::underscore to use
|
|
@@ -19,7 +19,7 @@ module FastUnderscore
|
|
|
19
19
|
|
|
20
20
|
response = string.dup
|
|
21
21
|
response.gsub!(ActiveSupportInflectorOldPatch.pattern) do
|
|
22
|
-
"#{$1 &&
|
|
22
|
+
"#{$1 && "_"}#{$2.downcase}"
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
FastUnderscore.underscore(response)
|
|
@@ -35,7 +35,7 @@ module FastUnderscore
|
|
|
35
35
|
response = string.dup
|
|
36
36
|
acronyms = ActiveSupport::Inflector.inflections.acronyms_underscore_regex
|
|
37
37
|
|
|
38
|
-
response.gsub!(acronyms) { "#{$1 &&
|
|
38
|
+
response.gsub!(acronyms) { "#{$1 && "_"}#{$2.downcase}" }
|
|
39
39
|
|
|
40
40
|
FastUnderscore.underscore(response)
|
|
41
41
|
end
|
|
@@ -51,7 +51,7 @@ module FastUnderscore
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
# Override the String#underscore method no matter when it was defined so that
|
|
54
|
-
# we
|
|
54
|
+
# we"re sure it"s going to call the correct implementation.
|
|
55
55
|
module ActiveSupportStringPatch
|
|
56
56
|
def underscore
|
|
57
57
|
ActiveSupport::Inflector.underscore(self)
|
|
@@ -63,10 +63,10 @@ module FastUnderscore
|
|
|
63
63
|
# ActiveSupport::Inflector::underscore method to use the FastUnderscore
|
|
64
64
|
# native extension.
|
|
65
65
|
def self.active_support
|
|
66
|
-
require
|
|
66
|
+
require "active_support/version"
|
|
67
67
|
gem_version = Gem::Version.new(ActiveSupport::VERSION::STRING)
|
|
68
68
|
|
|
69
|
-
if gem_version >= Gem::Version.new(
|
|
69
|
+
if gem_version >= Gem::Version.new("5.2.0")
|
|
70
70
|
ActiveSupport::Inflector.prepend(ActiveSupportInflectorPatch)
|
|
71
71
|
else
|
|
72
72
|
ActiveSupport::Inflector.prepend(ActiveSupportInflectorOldPatch)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_underscore
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Kevin
|
|
7
|
+
- Kevin Newton
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: benchmark-ips
|
|
@@ -95,7 +95,21 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '1.12'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: ruby_memcheck
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: syntax_tree
|
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
|
100
114
|
requirements:
|
|
101
115
|
- - ">="
|
|
@@ -110,42 +124,30 @@ dependencies:
|
|
|
110
124
|
version: '0'
|
|
111
125
|
description: Provides a C-optimized method for underscoring a string
|
|
112
126
|
email:
|
|
113
|
-
-
|
|
127
|
+
- kddnewton@gmail.com
|
|
114
128
|
executables: []
|
|
115
129
|
extensions:
|
|
116
130
|
- ext/fast_underscore/extconf.rb
|
|
117
131
|
extra_rdoc_files: []
|
|
118
132
|
files:
|
|
119
|
-
- ".github/dependabot.yml"
|
|
120
|
-
- ".github/workflows/main.yml"
|
|
121
|
-
- ".gitignore"
|
|
122
|
-
- ".rubocop.yml"
|
|
123
133
|
- CHANGELOG.md
|
|
124
134
|
- CODE_OF_CONDUCT.md
|
|
125
|
-
- Gemfile
|
|
126
|
-
- Gemfile.lock
|
|
127
135
|
- LICENSE
|
|
128
136
|
- README.md
|
|
129
|
-
- Rakefile
|
|
130
|
-
- Steepfile
|
|
131
|
-
- bin/bench
|
|
132
|
-
- bin/console
|
|
133
|
-
- bin/setup
|
|
134
137
|
- ext/fast_underscore/extconf.rb
|
|
135
138
|
- ext/fast_underscore/fast_underscore.c
|
|
136
139
|
- ext/fast_underscore/fast_underscore.h
|
|
137
140
|
- fast_underscore.gemspec
|
|
138
|
-
- gemfiles/5.1.gemfile
|
|
139
|
-
- gemfiles/5.2.gemfile
|
|
140
|
-
- gemfiles/6.0.gemfile
|
|
141
|
-
- gemfiles/6.1.gemfile
|
|
142
141
|
- lib/fast_underscore.rb
|
|
143
142
|
- lib/fast_underscore/version.rb
|
|
144
|
-
|
|
145
|
-
homepage: https://github.com/kddeisz/fast_underscore
|
|
143
|
+
homepage: https://github.com/kddnewton/fast_underscore
|
|
146
144
|
licenses:
|
|
147
145
|
- MIT
|
|
148
|
-
metadata:
|
|
146
|
+
metadata:
|
|
147
|
+
bug_tracker_uri: https://github.com/kddnewton/fast_underscore/issues
|
|
148
|
+
changelog_uri: https://github.com/kddnewton/fast_underscore/blob/v0.3.4/CHANGELOG.md
|
|
149
|
+
source_code_uri: https://github.com/kddnewton/fast_underscore
|
|
150
|
+
rubygems_mfa_required: 'true'
|
|
149
151
|
post_install_message:
|
|
150
152
|
rdoc_options: []
|
|
151
153
|
require_paths:
|
|
@@ -161,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
161
163
|
- !ruby/object:Gem::Version
|
|
162
164
|
version: '0'
|
|
163
165
|
requirements: []
|
|
164
|
-
rubygems_version: 3.
|
|
166
|
+
rubygems_version: 3.6.0.dev
|
|
165
167
|
signing_key:
|
|
166
168
|
specification_version: 4
|
|
167
169
|
summary: Fast String#underscore implementation
|
data/.github/dependabot.yml
DELETED
data/.github/workflows/main.yml
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: Main
|
|
2
|
-
on:
|
|
3
|
-
- push
|
|
4
|
-
- pull_request_target
|
|
5
|
-
jobs:
|
|
6
|
-
ci:
|
|
7
|
-
name: CI
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
strategy:
|
|
10
|
-
fail-fast: false
|
|
11
|
-
matrix:
|
|
12
|
-
gemfile:
|
|
13
|
-
- "5.1"
|
|
14
|
-
- "5.2"
|
|
15
|
-
- "6.0"
|
|
16
|
-
- "6.1"
|
|
17
|
-
env:
|
|
18
|
-
CI: true
|
|
19
|
-
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@master
|
|
22
|
-
- uses: ruby/setup-ruby@v1
|
|
23
|
-
with:
|
|
24
|
-
ruby-version: 3.0
|
|
25
|
-
bundler-cache: true
|
|
26
|
-
- name: Lint and test
|
|
27
|
-
run: |
|
|
28
|
-
bundle exec rubocop --parallel
|
|
29
|
-
bundle exec rake test
|
|
30
|
-
bundle exec steep check
|
|
31
|
-
automerge:
|
|
32
|
-
name: AutoMerge
|
|
33
|
-
needs: ci
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
if: github.event_name == 'pull_request_target' && (github.actor == github.repository_owner || github.actor == 'dependabot[bot]')
|
|
36
|
-
steps:
|
|
37
|
-
- uses: actions/github-script@v3
|
|
38
|
-
with:
|
|
39
|
-
script: |
|
|
40
|
-
github.pulls.merge({
|
|
41
|
-
owner: context.payload.repository.owner.login,
|
|
42
|
-
repo: context.payload.repository.name,
|
|
43
|
-
pull_number: context.payload.pull_request.number
|
|
44
|
-
})
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
AllCops:
|
|
2
|
-
DisplayCopNames: true
|
|
3
|
-
DisplayStyleGuide: true
|
|
4
|
-
TargetRubyVersion: 2.7
|
|
5
|
-
Exclude:
|
|
6
|
-
- '{tmp,vendor,yard}/**/*'
|
|
7
|
-
|
|
8
|
-
Gemspec/RequiredRubyVersion:
|
|
9
|
-
Enabled: false
|
|
10
|
-
|
|
11
|
-
Layout/LineLength:
|
|
12
|
-
Max: 80
|
|
13
|
-
|
|
14
|
-
Lint/AmbiguousBlockAssociation:
|
|
15
|
-
Enabled: false
|
|
16
|
-
|
|
17
|
-
Naming/RescuedExceptionsVariableName:
|
|
18
|
-
Enabled: false
|
|
19
|
-
|
|
20
|
-
Style/Documentation:
|
|
21
|
-
Enabled: false
|
|
22
|
-
|
|
23
|
-
Style/FormatString:
|
|
24
|
-
EnforcedStyle: percent
|
|
25
|
-
|
|
26
|
-
Style/FormatStringToken:
|
|
27
|
-
Enabled: false
|
|
28
|
-
|
|
29
|
-
Style/PerlBackrefs:
|
|
30
|
-
Enabled: false
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
fast_underscore (0.3.2)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
activesupport (6.1.3.1)
|
|
10
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
11
|
-
i18n (>= 1.6, < 2)
|
|
12
|
-
minitest (>= 5.1)
|
|
13
|
-
tzinfo (~> 2.0)
|
|
14
|
-
zeitwerk (~> 2.3)
|
|
15
|
-
ast (2.4.2)
|
|
16
|
-
benchmark-ips (2.8.4)
|
|
17
|
-
concurrent-ruby (1.1.8)
|
|
18
|
-
ffi (1.15.0)
|
|
19
|
-
i18n (1.8.10)
|
|
20
|
-
concurrent-ruby (~> 1.0)
|
|
21
|
-
language_server-protocol (3.16.0.0)
|
|
22
|
-
listen (3.5.1)
|
|
23
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
24
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
|
25
|
-
minitest (5.14.4)
|
|
26
|
-
parallel (1.20.1)
|
|
27
|
-
parser (3.0.1.0)
|
|
28
|
-
ast (~> 2.4.1)
|
|
29
|
-
rainbow (3.0.0)
|
|
30
|
-
rake (13.0.3)
|
|
31
|
-
rake-compiler (1.1.1)
|
|
32
|
-
rake
|
|
33
|
-
rb-fsevent (0.10.4)
|
|
34
|
-
rb-inotify (0.10.1)
|
|
35
|
-
ffi (~> 1.0)
|
|
36
|
-
rbs (1.1.1)
|
|
37
|
-
regexp_parser (2.1.1)
|
|
38
|
-
rexml (3.2.5)
|
|
39
|
-
rubocop (1.12.1)
|
|
40
|
-
parallel (~> 1.10)
|
|
41
|
-
parser (>= 3.0.0.0)
|
|
42
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
43
|
-
regexp_parser (>= 1.8, < 3.0)
|
|
44
|
-
rexml
|
|
45
|
-
rubocop-ast (>= 1.2.0, < 2.0)
|
|
46
|
-
ruby-progressbar (~> 1.7)
|
|
47
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
|
48
|
-
rubocop-ast (1.4.1)
|
|
49
|
-
parser (>= 2.7.1.5)
|
|
50
|
-
ruby-progressbar (1.11.0)
|
|
51
|
-
steep (0.43.1)
|
|
52
|
-
activesupport (>= 5.1)
|
|
53
|
-
language_server-protocol (>= 3.15, < 4.0)
|
|
54
|
-
listen (~> 3.0)
|
|
55
|
-
parallel (>= 1.0.0)
|
|
56
|
-
parser (>= 2.7)
|
|
57
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
58
|
-
rbs (~> 1.1.0)
|
|
59
|
-
terminal-table (>= 2, < 4)
|
|
60
|
-
terminal-table (3.0.0)
|
|
61
|
-
unicode-display_width (~> 1.1, >= 1.1.1)
|
|
62
|
-
tzinfo (2.0.4)
|
|
63
|
-
concurrent-ruby (~> 1.0)
|
|
64
|
-
unicode-display_width (1.7.0)
|
|
65
|
-
zeitwerk (2.4.2)
|
|
66
|
-
|
|
67
|
-
PLATFORMS
|
|
68
|
-
ruby
|
|
69
|
-
|
|
70
|
-
DEPENDENCIES
|
|
71
|
-
activesupport (~> 6.1)
|
|
72
|
-
benchmark-ips (~> 2)
|
|
73
|
-
bundler (~> 2)
|
|
74
|
-
fast_underscore!
|
|
75
|
-
minitest (~> 5)
|
|
76
|
-
rake (~> 13)
|
|
77
|
-
rake-compiler (~> 1)
|
|
78
|
-
rubocop (~> 1.12)
|
|
79
|
-
steep
|
|
80
|
-
|
|
81
|
-
BUNDLED WITH
|
|
82
|
-
2.2.3
|
data/Rakefile
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'bundler/gem_tasks'
|
|
4
|
-
require 'rake/testtask'
|
|
5
|
-
require 'rake/extensiontask'
|
|
6
|
-
|
|
7
|
-
Rake::ExtensionTask.new(:compile) do |ext|
|
|
8
|
-
ext.name = 'fast_underscore'
|
|
9
|
-
ext.ext_dir = 'ext/fast_underscore'
|
|
10
|
-
ext.lib_dir = 'lib/fast_underscore'
|
|
11
|
-
ext.gem_spec = Gem::Specification.load('fast_underscore.gemspec')
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
Rake::TestTask.new(:test) do |t|
|
|
15
|
-
t.libs << 'test'
|
|
16
|
-
t.libs << 'lib'
|
|
17
|
-
t.test_files = FileList['test/**/*_test.rb']
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
Rake::Task[:test].prerequisites << :compile
|
|
21
|
-
|
|
22
|
-
task default: :test
|
data/Steepfile
DELETED
data/bin/bench
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require 'bundler/setup'
|
|
5
|
-
require 'benchmark/ips'
|
|
6
|
-
|
|
7
|
-
require 'fast_underscore'
|
|
8
|
-
require 'active_support'
|
|
9
|
-
|
|
10
|
-
source =
|
|
11
|
-
%w[_ - : :: / 漢字 😊🎉] + ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
|
|
12
|
-
words = 500.times.map { Array.new(100) { source.sample }.join }
|
|
13
|
-
|
|
14
|
-
Benchmark.ips do |x|
|
|
15
|
-
x.report('ActiveSupport') do
|
|
16
|
-
words.each { |word| ActiveSupport::Inflector.as_underscore(word) }
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
x.report('FastUnderscore') do
|
|
20
|
-
words.each { |word| FastUnderscore.underscore(word) }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
x.compare!
|
|
24
|
-
end
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/gemfiles/5.1.gemfile
DELETED
data/gemfiles/5.2.gemfile
DELETED
data/gemfiles/6.0.gemfile
DELETED
data/gemfiles/6.1.gemfile
DELETED