dockerfiroonga 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bed496f68b1bb9be5317a670fabc04c0245b554a
4
- data.tar.gz: 7d93460ba0ef50f230c50e0c9159dd4d13d4b934
3
+ metadata.gz: 668fa5c0f0a0a965b331c2ecd7e1f78d799304c7
4
+ data.tar.gz: 8fbadf85e6640b6100b57f75594623f61c2afec2
5
5
  SHA512:
6
- metadata.gz: 303e55b2f857fc1974fe611119909c8f2e4c006ec7dd0f42329f66c6b684477de2a2c49a12e045741d061fed026c678ce066fb697ca416739987075c695bc61c
7
- data.tar.gz: 388b9fce44c5ccb4e894d7123150baffaffb9831ebff76d3aba3ce88e15cb77ac5f087626664764d2a4ba6a9cf7b6e163e858f71384a0d561fa14bba68a02154
6
+ metadata.gz: c815f2ec578afb006e883c7385effaf839c49863610c76ffb7b7c5ca8b73cb60c58d5cdcca72201c64f260ecd0837aac2a09f520aaf47972be02076044ea065e
7
+ data.tar.gz: 386764e735099a44001946a0a888c6021fecdea8d8339cbc34629370bf3600f6f5301bcc1b2d135eae5681d02116fc0b10e1c2ae07cf1f66901727346ffc4fc7
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Masafumi Yokoyama"]
10
10
  spec.email = ["yokoyama@clear-code.com"]
11
11
 
12
- spec.summary = %q{Dockerfile generater for Groonga family.}
12
+ spec.summary = %q{Dockerfile generator for Groonga family.}
13
13
  spec.description = spec.summary
14
14
  spec.homepage = "https://github.com/myokoym/dockerfiroonga"
15
15
  spec.license = "Apache-2.0"
@@ -7,6 +7,19 @@ module Dockerfiroonga
7
7
  end
8
8
 
9
9
  def initialize(arguments)
10
+ if arguments.empty? or /-h|--help/ =~ arguments[0]
11
+ $stdout.puts(<<-END_OF_USAGE)
12
+ Usage: dockerfiroonga PLATFORM [Xroonga]
13
+ PLATFORM:
14
+ * debian:sid (.tar.gz)
15
+ * ubuntu (PPA)
16
+ * centos (yum)
17
+ Xroonga:
18
+ * groonga (default)
19
+ * rroonga
20
+ END_OF_USAGE
21
+ exit(true)
22
+ end
10
23
  @platform_name = arguments[0]
11
24
  @platform = Platform.new(@platform_name)
12
25
  @_roonga = arguments[1] || "groonga"
@@ -1,3 +1,3 @@
1
1
  module Dockerfiroonga
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/test/test-command.rb CHANGED
@@ -149,6 +149,30 @@ CMD ["groonga", "--version"]
149
149
  end
150
150
  end
151
151
 
152
+ def test_no_argument
153
+ @command = Dockerfiroonga::Command.new([])
154
+ @command.run
155
+ assert do
156
+ @output.start_with?("Usage: ")
157
+ end
158
+ end
159
+
160
+ def test_help_option_short
161
+ @command = Dockerfiroonga::Command.new(["-h"])
162
+ @command.run
163
+ assert do
164
+ @output.start_with?("Usage: ")
165
+ end
166
+ end
167
+
168
+ def test_help_option_long
169
+ @command = Dockerfiroonga::Command.new(["--help"])
170
+ @command.run
171
+ assert do
172
+ @output.start_with?("Usage: ")
173
+ end
174
+ end
175
+
152
176
  def test_not_supported_xroonga
153
177
  assert_raise ArgumentError do
154
178
  Dockerfiroonga::Command.new([@platform_name, "xxxroonga"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerfiroonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Dockerfile generater for Groonga family.
69
+ description: Dockerfile generator for Groonga family.
70
70
  email:
71
71
  - yokoyama@clear-code.com
72
72
  executables:
@@ -114,7 +114,7 @@ rubyforge_project:
114
114
  rubygems_version: 2.2.2
115
115
  signing_key:
116
116
  specification_version: 4
117
- summary: Dockerfile generater for Groonga family.
117
+ summary: Dockerfile generator for Groonga family.
118
118
  test_files:
119
119
  - test/run-test.rb
120
120
  - test/test-command.rb