git-gsub 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/git/gsub.rb +2 -2
- data/lib/git/gsub/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4bb2c9e366b42ad834a11590b47beebf6d866b1
|
4
|
+
data.tar.gz: 12fa7b4d29e60e241eaf46e7f7f0f56016a5902b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91991a9c7329b9dcb883c5270577fa7779bb6a6f680dfd840aacdcac00fc79745a58a6c55744f2e1cad730fa39ddf6fc8e30876fbe4ad896b43b48cf852233b8
|
7
|
+
data.tar.gz: 4b3e90f5d4706c5a47720f49448ee1f5cae3ac19af372b5f612add9507855ac31af1c2476a1432002d4020dfd3757a0af05e7484569db112ceef659d975c3b00
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
## [0.0.5] - 2017-05-23
|
5
|
+
### Fixed
|
6
|
+
- Fix bug on assigning target directories
|
7
|
+
|
8
|
+
## (yanked)[0.0.4] - 2017-05-23
|
9
|
+
### Fixed
|
10
|
+
- Target directories can be specified correctly.
|
data/README.md
CHANGED
@@ -57,7 +57,7 @@ Maybe on many *nix like OS which has sed/gsed.
|
|
57
57
|
|
58
58
|
## Contributing
|
59
59
|
|
60
|
-
1. Fork it ( http://github.com
|
60
|
+
1. Fork it ( http://github.com/fujimura/git-gsub/fork )
|
61
61
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
62
62
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
63
63
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/git/gsub.rb
CHANGED
@@ -17,7 +17,7 @@ module Git
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.gsub *args
|
20
|
-
from, to,
|
20
|
+
from, to, *paths = args.map do |arg|
|
21
21
|
Shellwords.escape arg if arg
|
22
22
|
end
|
23
23
|
|
@@ -25,7 +25,7 @@ module Git
|
|
25
25
|
abort "No argument to gsub was given"
|
26
26
|
end
|
27
27
|
|
28
|
-
target_files = (`git grep -l #{from} #{
|
28
|
+
target_files = (`git grep -l #{from} #{paths.join ' '}`).each_line.map(&:chomp).join ' '
|
29
29
|
|
30
30
|
if system_support_gsed?
|
31
31
|
system %|gsed -i s/#{from}/#{to}/g #{target_files}|
|
data/lib/git/gsub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-gsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fujimura Daisuke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,6 +76,7 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
78
|
- ".travis.yml"
|
79
|
+
- CHANGELOG.md
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.md
|
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.6.11
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: A Git subcommand to do gsub in a repository
|