renamespace 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: baab242cddf012fa2783d62426cafaeb4ed1787f1f00f0008cc4363f0e26c3f2
4
- data.tar.gz: f82d644df34a4c2741780ebf3bdb12be61c9ea25a9827183aedad091527cbd99
3
+ metadata.gz: 6c69909fc935aef1657c0246d34d2ce5b51e8ae28be4ebd36af445e457a30e40
4
+ data.tar.gz: 1bf26959f5a9c8020321080769df054231a9d14e5337d52c55f2188fb0a66230
5
5
  SHA512:
6
- metadata.gz: 18e11ce64cfbf8bf2fe94561bd768a34c8118a037fe41fe78c07bcddb628297ccfce174b81654a9e11a654763799f77beef47f450fb89e1a45d96fee23194843
7
- data.tar.gz: 73e4d9277f5812e7e011411c0af72715381a0be7b7bcd4704d2348dcb987c84fae9234d6cbc02fd128d0d915dc25459f29a3b2ebdc107f026fd48548330f8e76
6
+ metadata.gz: c5b6d9034bb863f47a5e818fa2492e186b10582097e1cf05e66c71ad4c763dcab6dd3ea2cf10966ec345d4c9f605e3185092f1471fcae9f82884467c9854ad78
7
+ data.tar.gz: 922a53962b2b7d96e2b872902ca0a3d56ae94cb8d31c529310eba78cac3f9f858f9ed03e60ab22968b941e041d1c6e18a8dbd4df9ef9e36bfb0aafe0736071db
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Renamespace
2
2
 
3
- [![Build status](https://badge.buildkite.com/96fe2532aa6c155b7efc6adc355a6aa58c704c29df1a739df2.svg?branch=master)](https://buildkite.com/gs/renamespace)
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 GitHub Packages
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(search_str, replace_str)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Renamespace
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
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.5
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-04-26 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp