dorian-replace 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/replace +2 -1
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d904cf09301e987c840243017a5631ac6c8cc7d2eec2dad5680f58c3c011164
4
- data.tar.gz: 9d8025f2bbc88ad4b583175cc331209ad4bbcbf4d60833a6ba469e312ed28398
3
+ metadata.gz: 96a9df2e5164cbeedacfa3b810ff8fff7bf6798f879b864deeee27bd675bd867
4
+ data.tar.gz: a47debb703b96477d7ae70b93a42472ee2dde8f14a80f0f7e84c88076574d426
5
5
  SHA512:
6
- metadata.gz: aade7c1848c4607cd93925aaa12bcc01082a1a732c5ea8cd78d3857c400b883bd173132d1aca12df5a124beaffaab421729b6a0c09749a2c257e9607d22826f5
7
- data.tar.gz: 4f9170f518037280bc7b5033a1b43faf2271d659c406c6b6e67779bc2c5739ccc5e5720ab8fe3b8466dc4c3454e8842e39230d38b7123164578e04fbdf60d3f2
6
+ metadata.gz: 11f2a9dd68acdfc0987321f73f9932a7eaccc3111c58025df4904f6fb988d6a4bbf136c1ee8d2c12e7934f0c9e80eeaf688cf4fc6e25f047d5da1a7da5db8342
7
+ data.tar.gz: c2a93d304dd73bc849d6dbf5840b654eaae61c5def4ba9c73b42f1c4e1113fca5bae9e303211112944224142a7e5bf6dd8342a65562cbfbc821221ea3bc2e9f4
data/bin/replace CHANGED
@@ -8,7 +8,7 @@ parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
8
8
  abort parsed.help if parsed.options.help
9
9
 
10
10
  if parsed.options.version
11
- abort File.read(File.expand_path("../../VERSION", __FILE__))
11
+ abort File.read(File.expand_path("../VERSION", __dir__))
12
12
  end
13
13
 
14
14
  from, to = parsed.arguments
@@ -16,5 +16,6 @@ files = parsed.files.any? ? parsed.files : $stdin.each_line.to_a.map(&:strip)
16
16
 
17
17
  files.each do |file|
18
18
  next if File.directory?(file)
19
+
19
20
  File.write(file, File.read(file).gsub(from, to))
20
21
  end
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: 1.0.0
4
+ version: 1.1.1
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-24 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dorian-arguments
@@ -45,14 +45,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: '3'
49
49
  required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
- rubygems_version: 3.5.11
55
+ rubygems_version: 3.5.16
56
56
  signing_key:
57
57
  specification_version: 4
58
58
  summary: replaces string with other string from files