bulldoze_renamer 0.0.2 → 0.0.4

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
2
  SHA256:
3
- metadata.gz: cb3b6c2a9f05e32ed58eced59b5eccb07e66984e05296f90fb50fab4584c7d87
4
- data.tar.gz: 04c7018e10ec58647cd8e9918eaf41aaae6570781c9a4f0b0477bbe82b17843d
3
+ metadata.gz: dd56e6546b5771be54c9a41463427b952fae24bc8c0f4d869f02e9e651eb93d4
4
+ data.tar.gz: 19b03a28a4f34422fcb60d52ec8dd800a202bf9e4c1c8f4d21586bee10f8e858
5
5
  SHA512:
6
- metadata.gz: eb0f69da6256bda135c47fd84a40e4403b468874d8d350e6530b8c1a892d59aa75704a302f064c7f7cf233034a90a06c45f65badbad3dfbbaef01d076efa2a43
7
- data.tar.gz: adaffc91c64532f12304044080ece914f29d10f2cc50675b2e19c8fa0def96dab6abc9353220fb4cdd2d225ddbd54f2f7dfd9dd9294cb2cf7874d363f64ff209
6
+ metadata.gz: 74c048670ac8546fefade948fdbfe9bd633dc16ae6de8f9fc86b121a7b8cee553ea5482c37d2901afe554797dd3ee21530ad08cfaed4f69a4562f502d9525147
7
+ data.tar.gz: d94909dd3cd2c46f2c5b76c550e508c690a76b865c9b637dd8bfc00f0015475b6c6435928d5284e54dad072dd251100c4fad5e7d33ff7ca58391be17ac76dc58
data/.github/FUNDING.yml CHANGED
@@ -1,4 +1,3 @@
1
1
  # These are supported funding model platforms
2
2
 
3
- github: [tomtt]
4
3
  patreon: tomtt
@@ -0,0 +1,33 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ main ]
13
+ pull_request:
14
+ branches: [ main ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
25
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
26
+ # uses: ruby/setup-ruby@v1
27
+ uses: ruby/setup-ruby@21351ecc0a7c196081abca5dc55b08f085efe09a
28
+ with:
29
+ ruby-version: 2.6
30
+ - name: Install dependencies
31
+ run: bundle install
32
+ - name: Run tests
33
+ run: bundle exec rake
data/README.md CHANGED
@@ -12,6 +12,12 @@ and so that file should be renamed `lib/bears/pooh_bear -> lib/bears/honey_bear`
12
12
 
13
13
  This tool aims to do all those replacements for you in the entire project in one go.
14
14
 
15
+ ## Dependencies
16
+
17
+ libmagic is a dependency that should be available for your OS. E.g. using brew on OSX:
18
+
19
+ $ brew install libmagic
20
+
15
21
  ## Installation
16
22
 
17
23
  Install by installing the gem:
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.authors = ["Tom ten Thij"]
7
7
  spec.email = ["code@tomtenthij.nl"]
8
8
 
9
- spec.summary = %q{A gem environment to learn code in}
9
+ spec.summary = %q{A command line tool to bulk rename classes and variables in ruby projects}
10
10
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
11
 
12
12
  # Specify which files should be added to the gem when it is released.
@@ -171,7 +171,12 @@ module BulldozeRenamer
171
171
  end
172
172
 
173
173
  def self.rename_with_options(options, out:, err:)
174
- orch = RenamingOrchestrator.new(options)
174
+ orch = RenamingOrchestrator.new(
175
+ current_name: options[:current_name],
176
+ target_name: options[:target_name],
177
+ path: options[:path],
178
+ perform: options[:perform]
179
+ )
175
180
  out.puts orch.report_inflections_mapping
176
181
 
177
182
  if orch.files_that_have_occurences.empty?
@@ -8,11 +8,11 @@ module BulldozeRenamer
8
8
  extend Forwardable
9
9
 
10
10
  def self.active_support_inflections
11
- [:underscore, :camelize]
11
+ [:underscore]
12
12
  end
13
13
 
14
14
  def self.inflections
15
- active_support_inflections + [:dasherize, :upcase, :js_camelize]
15
+ active_support_inflections + [:camelize, :dasherize, :upcase, :js_camelize]
16
16
  end
17
17
 
18
18
  def_delegators ActiveSupport::Inflector, *StringInflector.active_support_inflections
@@ -26,7 +26,13 @@ module BulldozeRenamer
26
26
  underscore(w).upcase
27
27
  end
28
28
 
29
+ def camelize(w)
30
+ # Wrapping AR camelize because it would return 'dr-who' as 'Dr-who', we want 'DrWho'
31
+ ActiveSupport::Inflector.camelize(underscore(w))
32
+ end
33
+
29
34
  def dasherize(w)
35
+ # Wrapping AR dasherize because it would return 'DrWho' as 'DrWho', we want 'dr-who'
30
36
  ActiveSupport::Inflector.dasherize(underscore(w))
31
37
  end
32
38
 
@@ -1,3 +1,3 @@
1
1
  module BulldozeRenamer
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulldoze_renamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom ten Thij
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-03 00:00:00.000000000 Z
11
+ date: 2024-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -47,6 +47,7 @@ extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
49
  - ".github/FUNDING.yml"
50
+ - ".github/workflows/ruby.yml"
50
51
  - ".gitignore"
51
52
  - ".rspec"
52
53
  - ".travis.yml"
@@ -83,8 +84,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
85
86
  requirements: []
86
- rubygems_version: 3.0.3
87
+ rubygems_version: 3.5.6
87
88
  signing_key:
88
89
  specification_version: 4
89
- summary: A gem environment to learn code in
90
+ summary: A command line tool to bulk rename classes and variables in ruby projects
90
91
  test_files: []