gimbal 0.0.5 → 0.0.6

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: 85ed29613617bdc0c2772082796f47a5de0ae05e
4
- data.tar.gz: 7442eac0115b18bed58cc7cdd9bfc59f7bfcac1c
3
+ metadata.gz: 4f20b47afba9889c590f487311b85ab8029f611e
4
+ data.tar.gz: a89b86058fa860211647b081ad164046222e0fd5
5
5
  SHA512:
6
- metadata.gz: 2789621b3e7f57bb47981d48f012e9cb6db8eb239b3830a0014d432a281fa8bad837bfafce6c72dee402c04badf0249313d4a35594a902be8f5740edc4e513f8
7
- data.tar.gz: 4af2348389fe77de044408ce6e26ac79effe40af50916d0b7196f1a5a68f137759042936bb3df9f8984cccc849885bd122de0a355ed8290caa7ee7d9074bf728
6
+ metadata.gz: 75c919055d3e26f1d684b2da1bb7d11e802efd4bcfe2ba7ab5b2d983a4d7f7f7220afbaa53e8e5c9bdf6640706c115b2a7f5f3e322f27e77a03b04bdf9fe9f44
7
+ data.tar.gz: 6ef583aadc642f2efaa8feb6d4bb597fb6b8f48ae701234e2defb6c821b8d35038e518d693839bd6926f05497ca46626ec219cb347a489bdbed610d212dbfafa
@@ -57,9 +57,7 @@ module Gimbal
57
57
  def setup_database
58
58
  say 'Setting up database'
59
59
 
60
- # if 'mysql' == options[:database]
61
- # build :use_mysql_config_template
62
- # end
60
+ # TODO: Add any custom DB setup here
63
61
 
64
62
  build :create_database
65
63
  end
@@ -1,5 +1,5 @@
1
1
  module Gimbal
2
2
  RAILS_VERSION = '~> 4.2'
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
@@ -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
@@ -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.5
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