food_gem 0.1.0 → 0.1.1

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: 5d23099d5c5508974f8e7fbb67903f809e94d215
4
- data.tar.gz: 691782e7858fb805bd53c1dbdc3f9bdb11d95a28
3
+ metadata.gz: 4f4b9c3d2241b755481a4a89e365b62ff901fa56
4
+ data.tar.gz: 612553b105b2fcb114fa54a9d17954685b806703
5
5
  SHA512:
6
- metadata.gz: f3433204d7f6a2c73f970b43acfbbb17c26223a85e1fa8781221840cc636e0355e9464663f2d42bd313d936ac6e0fc0a3714545a35d26b9ceea328ff7c02fa18
7
- data.tar.gz: a40ec75df2236de11139870460471b7a11c20a93800970f1be4999c7d95a016622b79a2248865727b2054f44f8e2c61e585cea283624026115528f9deeae1a02
6
+ metadata.gz: 2c0e0ef37d932c384c076454223376b745d24c85d16df5079e99f9dfe3f1ee5ddd9a344bc45cda8efc528c603c3174d6c34a07ab588198fb016f2846cf7efe2e
7
+ data.tar.gz: 8938cbb58305546ac0546117d39f1bc3d68d51beec0c25d4bddb12fa9dba98de444ae1b1fa271f46027f88d380349a35301ae7c6fce27569853442e3fc7183ea
data/lib/food/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Food
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: food_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - shangquan
@@ -56,7 +56,7 @@ description: Write a longer description or delete this line.
56
56
  email:
57
57
  - guishangquan@souche.com
58
58
  executables:
59
- - command
59
+ - command.rb
60
60
  - console
61
61
  - setup
62
62
  extensions: []
@@ -70,10 +70,7 @@ files:
70
70
  - LICENSE.txt
71
71
  - README.md
72
72
  - Rakefile
73
- - bin/command
74
- - bin/console
75
- - bin/setup
76
- - exe/command
73
+ - exe/command.rb
77
74
  - exe/console
78
75
  - exe/setup
79
76
  - food.gemspec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "food"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/exe/command DELETED
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'optparse'
4
-
5
- options = {}
6
- option_parser = OptionParser.new do |opts|
7
- # 这里是这个命令行工具的帮助信息
8
- opts.banner = 'here is help messages of the command line tool.'
9
-
10
- opts.on_tail('-h', '--help', 'Show this message') do
11
- puts opts
12
- exit
13
- end
14
-
15
- opts.on_tail('-v', '--version', 'Print version') do
16
- puts 'command 0.0.1'
17
- exit
18
- end
19
-
20
- opts.on('-v', '--version', 'Print Version') do
21
- puts 'Command 0.0.1'
22
- exit
23
- end
24
-
25
- # Option 作为switch,不带argument,用于将 switch 设置成 true 或 false
26
- options[:switch] = false
27
- # 下面第一项是 Short option(没有可以直接在引号间留空),第二项是 Long option,第三项是对 Option 的描述
28
- opts.on('-s', '--switch', 'Set options as switch') do
29
- # 这个部分就是使用这个Option后执行的代码
30
- options[:switch] = true
31
- end
32
-
33
- # Option 作为 flag,带argument,用于将argument作为数值解析,比如"name"信息
34
- #下面的“value”就是用户使用时输入的argument
35
- opts.on('-n NAME', '--name Name', 'Pass-in single name') do |value|
36
- options[:name] = value
37
- end
38
-
39
- # Option 作为 flag,带一组用逗号分割的arguments,用于将arguments作为数组解析
40
- opts.on('-a A,B', '--array A,B', Array, 'List of arguments') do |value|
41
- options[:array] = value
42
- end
43
- end.parse!
44
-
45
- p options.inspect
46
-
File without changes