dorian-replace 0.5.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/replace +10 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfc486e1bb75cf78015e157b6ef61c54e67fdbeaec1e65015dd2771171c6a9b8
|
4
|
+
data.tar.gz: c0a4a0b83107f02a51a46cf8b21a1d8fb648c6c062146de99049f5437ad2fb87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e782844d5c8944698d7400a6eaa12bb9a04f39da687cdd7ce51388e8bf9c42ea55fdf788a9de1ce4600c76dd566d60d7149dfb0ac89b569ae14d9e2e97c160ee
|
7
|
+
data.tar.gz: bd4c7bd1393f2dde86a92c6de6bb7fa079d647bb6092a3c3062e02d319e30ad0a1c0c4a6b0e1a4468b1755159ab4f74d5901c5a85f93338ddda3955edd6eec8a
|
data/bin/replace
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
require "dorian/arguments"
|
5
|
+
|
6
|
+
parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
|
7
|
+
|
8
|
+
abort parsed.help if parsed.options.help
|
9
|
+
|
10
|
+
if parsed.options.version
|
11
|
+
abort File.read(File.expand_path("../VERSION", __dir__))
|
8
12
|
end
|
9
13
|
|
10
|
-
from =
|
11
|
-
|
12
|
-
files = ARGV.size > 2 ? ARGV[2..] : $stdin.each_line.to_a.map(&:strip)
|
14
|
+
from, to = parsed.arguments
|
15
|
+
files = parsed.files.any? ? parsed.files : $stdin.each_line.to_a.map(&:strip)
|
13
16
|
|
14
17
|
files.each do |file|
|
15
18
|
next if File.directory?(file)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-replace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dorian-arguments
|
@@ -43,9 +43,9 @@ require_paths:
|
|
43
43
|
- lib
|
44
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 3.3.4
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|