dorian-shuffle 0.5.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/shuffle +13 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d889ea3c19078c5b27983ad8dc02e0b8963d0522401468d4935832fc1eb07004
|
4
|
+
data.tar.gz: 2656f9235d6f9fad03d6dd3aa1ef5db609d4f701950b177a9bb9191412c56122
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 133f77aefe8c3aef3375477d645e4a624af981637d9c03d151b2a5d1a111093a70716a755b53de0a00804fa6967039177bd30f539394609d76855fe91ca29ec6
|
7
|
+
data.tar.gz: 00ebfbb0cbb3afab5778d2e864718fe630ea72111c7b7dc56f78b37a874838fb78d014de777d630cf4de31b8536ccea0f541ee1fd4def21675bde78db536b0c4
|
data/bin/shuffle
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
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", __FILE__))
|
7
12
|
end
|
8
13
|
|
9
|
-
|
14
|
+
input = parsed.files.map { |file| File.read(file) }.join
|
15
|
+
input += parsed.arguments.join("\n")
|
16
|
+
input = $stdin.each_line.to_a.join("\n") if input.empty?
|
17
|
+
|
18
|
+
puts input.lines.map(&:strip).shuffle
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-shuffle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dorian-arguments
|