renamespace 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/renamespace/rename_within_file_content.rb +5 -1
- data/lib/renamespace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c69909fc935aef1657c0246d34d2ce5b51e8ae28be4ebd36af445e457a30e40
|
4
|
+
data.tar.gz: 1bf26959f5a9c8020321080769df054231a9d14e5337d52c55f2188fb0a66230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5b6d9034bb863f47a5e818fa2492e186b10582097e1cf05e66c71ad4c763dcab6dd3ea2cf10966ec345d4c9f605e3185092f1471fcae9f82884467c9854ad78
|
7
|
+
data.tar.gz: 922a53962b2b7d96e2b872902ca0a3d56ae94cb8d31c529310eba78cac3f9f858f9ed03e60ab22968b941e041d1c6e18a8dbd4df9ef9e36bfb0aafe0736071db
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Renamespace
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![CI status](https://github.com/ZimbiX/renamespace/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/ZimbiX/renamespace/actions/workflows/main.yml) [![Gem Version](https://badge.fury.io/rb/renamespace.svg)](https://rubygems.org/gems/renamespace)
|
4
4
|
|
5
5
|
A command-line tool to help Ruby developers refactor class/module namespacing.
|
6
6
|
|
@@ -112,8 +112,6 @@ chmod +x .git/hooks/pre-push
|
|
112
112
|
|
113
113
|
### Release
|
114
114
|
|
115
|
-
First, [make sure your credentials are set up for GitHub Package Registry according to the Handbook](https://handbook.greensync.org/product/intro/getting-started/#github-package-registry-and-ruby-gems).
|
116
|
-
|
117
115
|
To release a new version:
|
118
116
|
|
119
117
|
```bash
|
@@ -124,7 +122,7 @@ This takes care of the whole process:
|
|
124
122
|
|
125
123
|
- Incrementing the version number (the patch number by default)
|
126
124
|
- Tagging & pushing commits
|
127
|
-
- Publishing the gem to
|
125
|
+
- Publishing the gem to RubyGems
|
128
126
|
- Creating a draft GitHub release
|
129
127
|
|
130
128
|
To increment the minor or major versions instead of the patch number, run `auto/release/update-version` with `--minor` or `--major`.
|
@@ -24,13 +24,17 @@ class Renamespace
|
|
24
24
|
def replace_references(content)
|
25
25
|
(1 + can_omit_prefixes_count).times do
|
26
26
|
replacements_logger.log(search_str, replace_str)
|
27
|
-
content = content.gsub(
|
27
|
+
content = content.gsub(search_regex, replace_str)
|
28
28
|
namespace_elements_source.shift
|
29
29
|
namespace_elements_dest.shift
|
30
30
|
end
|
31
31
|
content
|
32
32
|
end
|
33
33
|
|
34
|
+
def search_regex
|
35
|
+
/\b#{namespace_elements_source.join('::')}\b/
|
36
|
+
end
|
37
|
+
|
34
38
|
def search_str
|
35
39
|
namespace_elements_source.join('::')
|
36
40
|
end
|
data/lib/renamespace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renamespace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brendan Weibrecht
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|