whimsy_str 1.0.2 → 1.0.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: 69b7dbb785f900080f6990c05c615304c45a91c9e424f9c5442c5d9a892bfb24
4
- data.tar.gz: 5a7118dc36bdb174a712c1890cb670a402a150bcc0721e94b45657b3d7ce504f
3
+ metadata.gz: a7db579afd1f14c94f78c2a3f476d56791165ca7592d679fb49b71bfa1556d8c
4
+ data.tar.gz: dec829ad3167ad1b93527b433969d6877f264e17f6fa80590f7c0cd1a5ed7385
5
5
  SHA512:
6
- metadata.gz: f5a6404e1022b1249d7d77c6dd0b8a22709b219d34ef2cac1a94621481bae428eca82e4cd6146b1c983384fea45d9203825f56645ace49f443bba67e4201a3ab
7
- data.tar.gz: fe4d75d26197c9a925086ba845be0073c632d744302ce4f4bc616a1b5c3080c082391bc63c842af1ff2e422e39bae7316af8ace5bb1928b1638c5c8c1c4ed300
6
+ metadata.gz: f946a3454daa978005d639d4f94d674fd5c77848b8932af039da1e7d555626815b29b5354cabc51b49ea3a1d2abedd2186ab4cf0eaae86c5280ab209f14fbbb1
7
+ data.tar.gz: b152e1843e2299f54324ea8595730e2c455051a46c7520ef0a7bedf23d3f241f5372c6f9eaf372e262d04ea479aa1e5532bbcad800af757e055bcf1f3fa7f0a6
data/bin/sponge CHANGED
@@ -1,7 +1,18 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # frozen_string_literal: true
4
+
3
5
  require 'whimsy_str'
4
6
 
5
- string = ARGV[0]
7
+ def usage_str
8
+ 'Usage: sponge <string>'
9
+ end
10
+
11
+ if ARGV.empty?
12
+ puts usage_str
13
+ exit(-1)
14
+ end
15
+
16
+ string = ARGV.first
6
17
 
7
18
  puts string.spongify
data/bin/wavy CHANGED
@@ -1,7 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # frozen_string_literal: true
4
+
3
5
  require 'whimsy_str'
4
6
 
7
+ def usage_str
8
+ "Usage: wavy <string> [count]\n\
9
+ count - number of spaces to insert between each character (defaults to 1)"
10
+ end
11
+
5
12
  string, count = ARGV
6
13
 
7
- puts string.wavify(count.nil? ? 1 : count)
14
+ if string.nil?
15
+ puts usage_str
16
+ exit(-1)
17
+ end
18
+
19
+ puts string.wavify(count.nil? ? 1 : Integer(count))
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whimsy_str
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Von Wolfe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-05 00:00:00.000000000 Z
11
+ date: 2023-03-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'A collection of whimsical methods for modifying strings.
14
14