gimbal 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gimbal/generators/app_generator.rb +1 -3
- data/lib/gimbal/version.rb +1 -1
- data/spec/features/cli_help_spec.rb +36 -0
- data/spec/support/gimbal.rb +14 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f20b47afba9889c590f487311b85ab8029f611e
|
4
|
+
data.tar.gz: a89b86058fa860211647b081ad164046222e0fd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75c919055d3e26f1d684b2da1bb7d11e802efd4bcfe2ba7ab5b2d983a4d7f7f7220afbaa53e8e5c9bdf6640706c115b2a7f5f3e322f27e77a03b04bdf9fe9f44
|
7
|
+
data.tar.gz: 6ef583aadc642f2efaa8feb6d4bb597fb6b8f48ae701234e2defb6c821b8d35038e518d693839bd6926f05497ca46626ec219cb347a489bdbed610d212dbfafa
|
data/lib/gimbal/version.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "Command line help output" do
|
4
|
+
let(:help_text) { gimbal_help_command }
|
5
|
+
|
6
|
+
it "does not contain the default rails usage statement" do
|
7
|
+
expect(help_text).not_to include("rails new APP_PATH [options]")
|
8
|
+
end
|
9
|
+
|
10
|
+
it "provides the correct usage statement for gimbal" do
|
11
|
+
expect(help_text).to include <<-EOH
|
12
|
+
Usage:
|
13
|
+
gimbal APP_PATH [options]
|
14
|
+
EOH
|
15
|
+
end
|
16
|
+
|
17
|
+
it "does not contain the default rails group" do
|
18
|
+
expect(help_text).not_to include("Rails options:")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "provides help and version usage within the gimbal group" do
|
22
|
+
expect(help_text).to include <<-EOH
|
23
|
+
Gimbal options:
|
24
|
+
-h, [--help], [--no-help] # Show this help message and quit
|
25
|
+
-v, [--version], [--no-version] # Show Gimbal version number and quit
|
26
|
+
EOH
|
27
|
+
end
|
28
|
+
|
29
|
+
it "does not show the default extended rails help section" do
|
30
|
+
expect(help_text).not_to include("Create suspenders files for app generator.")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "contains the usage statement from the gimbal gem" do
|
34
|
+
expect(help_text).to include IO.read(usage_file)
|
35
|
+
end
|
36
|
+
end
|
data/spec/support/gimbal.rb
CHANGED
@@ -20,6 +20,16 @@ module GimbalTestHelpers
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def gimbal_help_command
|
24
|
+
Dir.chdir(tmp_path) do
|
25
|
+
Bundler.with_clean_env do
|
26
|
+
`
|
27
|
+
#{gimbal_bin} -h
|
28
|
+
`
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
23
33
|
def setup_app_dependencies
|
24
34
|
if File.exist?(project_path)
|
25
35
|
Dir.chdir(project_path) do
|
@@ -48,6 +58,10 @@ module GimbalTestHelpers
|
|
48
58
|
@project_path ||= Pathname.new("#{tmp_path}/#{APP_NAME}")
|
49
59
|
end
|
50
60
|
|
61
|
+
def usage_file
|
62
|
+
@usage_path ||= File.join(root_path, "USAGE")
|
63
|
+
end
|
64
|
+
|
51
65
|
private
|
52
66
|
|
53
67
|
def tmp_path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gimbal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Pascoe
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/gimbal/generators/app_generator.rb
|
92
92
|
- lib/gimbal/version.rb
|
93
93
|
- spec/fakes/bin/hub
|
94
|
+
- spec/features/cli_help_spec.rb
|
94
95
|
- spec/features/github_spec.rb
|
95
96
|
- spec/features/new_project_spec.rb
|
96
97
|
- spec/spec_helper.rb
|
@@ -142,6 +143,7 @@ specification_version: 4
|
|
142
143
|
summary: A Rails App Generator.
|
143
144
|
test_files:
|
144
145
|
- spec/fakes/bin/hub
|
146
|
+
- spec/features/cli_help_spec.rb
|
145
147
|
- spec/features/github_spec.rb
|
146
148
|
- spec/features/new_project_spec.rb
|
147
149
|
- spec/spec_helper.rb
|