easycard 1.0.4 → 1.0.5

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
  SHA1:
3
- metadata.gz: 1f56e56462c2474446eb288f094f7c8c9b69da85
4
- data.tar.gz: dc5c27318dc2d86f301b721fb960e9a64e788358
3
+ metadata.gz: e70843bdb295f1fe0e746dc1208334395fd14474
4
+ data.tar.gz: 8b835c20d7a204b2118189333827867e6f81a776
5
5
  SHA512:
6
- metadata.gz: 0990a395b15ce7aff551542e932890e09016b11829ca351d759cd5718e2b0b38a57331731bf0be5ef0f547853b274c41fdb78485970abb141cbdc0624966da2f
7
- data.tar.gz: df5a0561c1badb40dcb38e2cbb5e1e9e1e5c54bd185aef7c54794efef33769bb73f6eaefe95ad1490901688bfed06efae98a22fefc6e60ebd8ed83bd31162246
6
+ metadata.gz: 7fcbf7457c2771e5a3bba0f625511913322fd9d461011f338c9a34f873ffb0794373930d0481902d42d884ff92df9f8cee8ea01200a6a6f52b658bed0db694f1
7
+ data.tar.gz: 526ea6bd8e0b7dd70a009fda74b61c0ac3fb00f7528f5fc21d4eab2954d741c5a79bb023aaee48adfea5b78ace539fcb3752647c5638977c4d03a87bb04f1e1e
@@ -2,10 +2,10 @@
2
2
  require 'optparse'
3
3
  require 'optparse/time'
4
4
  require 'easycard'
5
+ require 'easycard/version'
5
6
 
6
7
  options = {format: :table, from: Date.today << 1, to: Date.today}
7
- parser = OptionParser.new do |opts|
8
- opts.banner = 'Usage: easycard CARD_ID [options]'
8
+ parser = OptionParser.new 'Usage: easycard CARD_ID [options]' do |opts|
9
9
 
10
10
  opts.on('-mNUMBER', '--months=NUMBER', Float, '最近 n 月') do |n|
11
11
  today = Date.today
@@ -35,10 +35,15 @@ parser = OptionParser.new do |opts|
35
35
  options[:to] = time
36
36
  end
37
37
 
38
- opts.on('-h', '--help', '顯示此訊息') do |v|
38
+ opts.on('-h', '--help', '顯示此訊息') do
39
39
  puts opts
40
40
  exit 0
41
41
  end
42
+
43
+ opts.on('-v', '--version', '顯示版本資訊') do
44
+ puts EasyCard::VERSION
45
+ exit 0
46
+ end
42
47
  end
43
48
 
44
49
  parser.parse!
@@ -1,3 +1,3 @@
1
1
  module EasyCard
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easycard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jian Weihang