dorian-sort-yaml 0.2.1 → 0.2.2
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 +4 -4
- data/bin/sort-yaml +2 -1
- data/lib/dorian/sort-yaml.rb +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: 829181992a0373bdadff5c9bd77d2d227ff5223bebe2fa95725f3c331c5960f4
|
4
|
+
data.tar.gz: 3eaad49286c72ecf5fb1788bcd07cbb41c355e1aa626f5b033f012576e24c4e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 536e5cd1fb4e79368a13526000743e3f3de2fa64cfb4c49e6cbba676f7f67de6d5c613853e501722c7eeb7d1b745a4a08b75d7e057d921a66785193859ff9fe1
|
7
|
+
data.tar.gz: dd5192f93e615322a9d68996722c6a73d116e573165364aa88dfda1104fcc611b2a45a5179d6aae452b235dc83a7002abd70286baa897f57d335433bb87bc54e
|
data/bin/sort-yaml
CHANGED
data/lib/dorian/sort-yaml.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "yaml"
|
2
4
|
|
3
5
|
module Dorian
|
@@ -11,14 +13,15 @@ module Dorian
|
|
11
13
|
|
12
14
|
inputs = ARGV
|
13
15
|
|
14
|
-
if inputs.
|
15
|
-
inputs =
|
16
|
+
if inputs.empty?
|
17
|
+
inputs = $stdin.each_line.to_a
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
inputs =
|
20
|
+
if File.exist?(inputs.first.strip)
|
21
|
+
inputs.map(&:strip)
|
22
|
+
else
|
23
|
+
[inputs.join]
|
24
|
+
end
|
22
25
|
end
|
23
26
|
|
24
27
|
inputs.each do |input|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-sort-yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Sorts keys of hashes of YAML files
|
@@ -22,7 +22,7 @@ extra_rdoc_files: []
|
|
22
22
|
files:
|
23
23
|
- bin/sort-yaml
|
24
24
|
- lib/dorian/sort-yaml.rb
|
25
|
-
homepage: https://github.com/
|
25
|
+
homepage: https://github.com/dorianmariecom/sort-yaml
|
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.
|
45
|
+
rubygems_version: 3.5.3
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: Sorts keys of hashes of YAML files
|