bulldoze_renamer 0.0.1 → 0.0.3

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: 810a46d0c33d974031e0ec0aad18faa747f24bbc1b64d759103ac2c46987d7d1
4
- data.tar.gz: f97652392e76b61b2f4b2ef228ec141cddc12c36209b120c5c3a31baf82d0916
3
+ metadata.gz: 3c1c26f4718c88914de27e9d8af117564d12f707a94c4b4102f7928ca08a5226
4
+ data.tar.gz: bac112230bb720efc92fedc3abbe0665883e92399f285bb9aa14296caed6db98
5
5
  SHA512:
6
- metadata.gz: b0d7863a26ffeb3293c4612dee705fedaef80cd65a89c5a69be0d71600fff259545e5d2906ae4c8c35695165b4a38b22b01ccaf0dc0342750a6dbc9e22167a78
7
- data.tar.gz: b062a5af199faae684d5908a4d2313b096b74f03a1e8752b3342996e596994db4f6ec00c972f4146d312120986429a7e5b08ef98d394b464b866416be17215a9
6
+ metadata.gz: 5188af9f5cb8eeab1840e7e2fed0eaa0e6c901d8db4c7185234cd6dee1e791e415fdba33abf8c4d850c2c29cdcb6f84c246340f27d8111565ad6abe65c265e17
7
+ data.tar.gz: ecf4f2ec007694f5f1b3037b81e30b257afdb80ffc621cce53cb819d58171fe469c3d1cf5af78778038a58182e192787cd201c595eecc85aa0373b1755482ae4
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.
data/exe/bulldoze_rename CHANGED
@@ -1,5 +1,6 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bundle exec ruby
2
+ # This script can only be run from elsewhere if BUNDLE_GEMFILE of this project
3
+ # has been set.
2
4
 
3
- PROJECT_PATH="$( cd "$(dirname "$0")/.." >/dev/null 2>&1 ; pwd -P )"
4
-
5
- BUNDLE_GEMFILE=$PROJECT_PATH/Gemfile $PROJECT_PATH/exe/bulldoze_rename_rb $*
5
+ require 'bulldoze_renamer'
6
+ BulldozeRenamer::Shell.start(ARGV)
@@ -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.1"
2
+ VERSION = "0.0.3"
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.1
4
+ version: 0.0.3
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-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -43,11 +43,11 @@ email:
43
43
  - code@tomtenthij.nl
44
44
  executables:
45
45
  - bulldoze_rename
46
- - bulldoze_rename_rb
47
46
  extensions: []
48
47
  extra_rdoc_files: []
49
48
  files:
50
49
  - ".github/FUNDING.yml"
50
+ - ".github/workflows/ruby.yml"
51
51
  - ".gitignore"
52
52
  - ".rspec"
53
53
  - ".travis.yml"
@@ -59,7 +59,6 @@ files:
59
59
  - bin/setup
60
60
  - bulldoze_renamer.gemspec
61
61
  - exe/bulldoze_rename
62
- - exe/bulldoze_rename_rb
63
62
  - lib/bulldoze_renamer.rb
64
63
  - lib/bulldoze_renamer/file_content_substitutor.rb
65
64
  - lib/bulldoze_renamer/file_finder.rb
@@ -88,5 +87,5 @@ requirements: []
88
87
  rubygems_version: 3.0.3
89
88
  signing_key:
90
89
  specification_version: 4
91
- summary: A gem environment to learn code in
90
+ summary: A command line tool to bulk rename classes and variables in ruby projects
92
91
  test_files: []
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bundle exec ruby
2
- # This script can only be run from elsewhere if BUNDLE_GEMFILE of this project
3
- # has been set.
4
-
5
- require 'bulldoze_renamer'
6
- BulldozeRenamer::Shell.start(ARGV)