pleasant-lawyer-cli 0.3.0 → 0.4.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/pl +9 -3
  3. data/pleasant-lawyer-cli.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cec58cb42d4c3b2c4bf3b360ca7d6dfe51671225
4
- data.tar.gz: a36ac232c3c43bc6628887c30e61f751b05fedbc
3
+ metadata.gz: 4764d2a325b338fc5afff9c22dcb6c52c3e24858
4
+ data.tar.gz: 8d7b06b7bb1d2fa09bb8d5233451a1019432c61c
5
5
  SHA512:
6
- metadata.gz: 75a8fdc07a51d5cd97860fc26658ba5478b864dcfce5176944e92c3ae3c373953682eca3e5c11caaa5a013f3a990a5301cdd99e940983c0a457a74bec5cbd9c1
7
- data.tar.gz: 812007d1887651373878342925eb48355bcee0ee24404dac8d42c47cd1188a4eabbb9816f24d2aa739753bb37d37f1e38636bf1743248b4e6d1405012627c766
6
+ metadata.gz: 7e375efbba2f8c31588d36373f87ce9a5eba1f5754b81b179e79edf46ac73f8fec999821c4d6a48fa17f1ccc610ef5aee2cbaa437552ab86b8d977976e154171
7
+ data.tar.gz: 91f9dad2ba8de24485d22722d8c66b5cedf614a7db057d6b4036993eae6838603a3bc8413dca2d3541bfeec3aaed3fcf85cde6bf2cff484c1f2c0112f148b5b8
data/exe/pl CHANGED
@@ -6,8 +6,10 @@ help = <<-HELP
6
6
  Please provide a pleasant lawyer name or beetil number as input
7
7
 
8
8
  E.g:
9
- pl famous money # => 60254
10
- pl 60254 # => famous money
9
+ pl famous money # => 60254
10
+ pl 60254 # => famous money
11
+ echo "famous money" | pl - # => 60524
12
+ echo "60254" | pl - # => famous money
11
13
  HELP
12
14
 
13
15
  if ARGV.length == 1 && %w(-h --help).include?(ARGV[0])
@@ -15,7 +17,11 @@ if ARGV.length == 1 && %w(-h --help).include?(ARGV[0])
15
17
  exit 0
16
18
  end
17
19
 
18
- input = ARGV.join ' '
20
+ if ARGV.length == 0 || (ARGV.length == 1 && '-' == ARGV[0])
21
+ input = STDIN.read
22
+ else
23
+ input = ARGV.join ' '
24
+ end
19
25
 
20
26
  fail help if input.empty?
21
27
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "pleasant-lawyer-cli"
5
- spec.version = "0.3.0"
5
+ spec.version = "0.4.0"
6
6
  spec.authors = ["Nick Johnstone"]
7
7
  spec.email = ["ncwjohnstone@gmail.com"]
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pleasant-lawyer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Johnstone
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pleasant-lawyer