dorian-yaml-read-write 0.2.1 → 0.2.3

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: d6159e7b0eb991603660bd346f0cb233f2aa6511e6c7aeea7e3abd618dcf1204
4
- data.tar.gz: 18f484b4e02390919d6d061aded860f0f4a8444de8f4089e8aaf040a39bbbd20
3
+ metadata.gz: d1137ebf2cac2c944ba9270e8f983743166ce478b9a4cd07bf206e8f3914744b
4
+ data.tar.gz: f70f106af02b7de088d706ae0af595fead1ef6f83989ee978b0e575ef920f87c
5
5
  SHA512:
6
- metadata.gz: 7108570582b0cf069c11e0ce06229828fd9db14fcea3d34ff6e4742669cc6db360a6d70fb9717b976c3c7db5bc3aa7c2399ddd1bdc93738c673509d8a3925104
7
- data.tar.gz: 509a58aaea0ad11410b7b3ece3fdfa20f111798c952ed5d8004b9a8ac6e4e4dbb3dad5a3d252e850f3fb5359309b4f18f9f4c11ac64aa08d83f9a90204212f32
6
+ metadata.gz: 615d74cee94767da07549c93dddf8d2434821cacb570c488dd16bdb29cf6447426d9bdc8d9af1121a1c86f541f90254692850430e4a90a41a15bf68e0c7e2f30
7
+ data.tar.gz: bee84378d379f377c62f14752c00934362b07d867e5f91dd11faf9fd38e5eece2138aec02ca173f67e317082e7aea4893db77df7c2780d2d24cb1561a7936f77
data/bin/yaml-read-write CHANGED
@@ -1,5 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "dorian/yaml/read-write"
5
- Dorian::Yaml::ReadWrite.run
4
+ require "yaml"
5
+
6
+ if ARGV.empty?
7
+ puts "USAGE: yaml-read-write FILE [FILE...]"
8
+ exit
9
+ end
10
+
11
+ ARGV.each do |filename|
12
+ File.write(filename, YAML.safe_load_file(filename).to_yaml)
13
+ end
metadata CHANGED
@@ -1,27 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-yaml-read-write
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
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-02-08 00:00:00.000000000 Z
11
+ date: 2024-03-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Reads and writes a YAML file
15
15
 
16
16
  e.g. `yaml-read-write config/locales/en.yml`
17
- email: dorian@dorianmarie.fr
17
+ email: dorian@dorianmarie.com
18
18
  executables:
19
19
  - yaml-read-write
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - bin/yaml-read-write
24
- - lib/dorian/yaml/read-write.rb
25
24
  homepage: https://github.com/dorianmariecom/yaml-compare
26
25
  licenses:
27
26
  - MIT
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "yaml"
4
-
5
- module Dorian
6
- module Yaml
7
- class ReadWrite
8
- def self.run
9
- if ARGV.empty?
10
- puts "USAGE: yaml-read-write FILE [FILE...]"
11
- exit
12
- end
13
-
14
- ARGV.each do |filename|
15
- File.write(filename, YAML.safe_load_file(filename).to_yaml)
16
- end
17
- end
18
- end
19
- end
20
- end