dorian-yaml-read-write 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 991a2f84305dabd537874b6a60c0b58c6f666eb6a5d20e38a8dad4dc7b870296
4
- data.tar.gz: ee6398f4e5ad87d88cff0abd172c8e5808de6980630b972a4acd56d7def77eed
3
+ metadata.gz: d6159e7b0eb991603660bd346f0cb233f2aa6511e6c7aeea7e3abd618dcf1204
4
+ data.tar.gz: 18f484b4e02390919d6d061aded860f0f4a8444de8f4089e8aaf040a39bbbd20
5
5
  SHA512:
6
- metadata.gz: 7d4603b687c49fc87765e5c181aff7a8d7607a1855f660cf1175c7618298edf47dd1616b66280115345eb0d2c4074ef0a9742c2d33ebf7607992b5aefaa26f7f
7
- data.tar.gz: afab03616f3c19b134056c40d6c2964c58601d7aa908092a50537f99113d94cccf444922d65756e9cda283bc8df24d89146a37b0b36bcc9a71c3d9705840bcc0
6
+ metadata.gz: 7108570582b0cf069c11e0ce06229828fd9db14fcea3d34ff6e4742669cc6db360a6d70fb9717b976c3c7db5bc3aa7c2399ddd1bdc93738c673509d8a3925104
7
+ data.tar.gz: 509a58aaea0ad11410b7b3ece3fdfa20f111798c952ed5d8004b9a8ac6e4e4dbb3dad5a3d252e850f3fb5359309b4f18f9f4c11ac64aa08d83f9a90204212f32
data/bin/yaml-read-write CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require 'dorian/yaml/read-write'
4
+ require "dorian/yaml/read-write"
4
5
  Dorian::Yaml::ReadWrite.run
@@ -1,16 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "yaml"
2
4
 
3
5
  module Dorian
4
6
  module Yaml
5
7
  class ReadWrite
6
8
  def self.run
7
- if ARGV.size < 1
9
+ if ARGV.empty?
8
10
  puts "USAGE: yaml-read-write FILE [FILE...]"
9
11
  exit
10
12
  end
11
13
 
12
14
  ARGV.each do |filename|
13
- File.write(filename, YAML.safe_load(File.read(filename)).to_yaml)
15
+ File.write(filename, YAML.safe_load_file(filename).to_yaml)
14
16
  end
15
17
  end
16
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-yaml-read-write
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.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: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Reads and writes a YAML file
@@ -22,7 +22,7 @@ extra_rdoc_files: []
22
22
  files:
23
23
  - bin/yaml-read-write
24
24
  - lib/dorian/yaml/read-write.rb
25
- homepage: https://github.com/dorianmariefr/yaml-compare
25
+ homepage: https://github.com/dorianmariecom/yaml-compare
26
26
  licenses:
27
27
  - MIT
28
28
  metadata:
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.2.22
45
+ rubygems_version: 3.5.3
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Reads and writes a YAML file