hobo_support 1.3.0.pre11 → 1.3.0.pre12

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/hobo_support/command.rb +19 -11
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0.pre11
1
+ 1.3.0.pre12
@@ -13,24 +13,29 @@ module HoboSupport
13
13
  Usage:
14
14
  hobo new <app_name> [rails_options] Creates a new Hobo Application
15
15
  hobo g <generator> [ARGS] [options] Fires the hobo:<generator>
16
- hobo --help This help screen
16
+ hobo --help|-h This help screen
17
17
 
18
18
  Dev Notes:
19
- Set the HOBO_DEV_ROOT ENV variable to the Hobo root path in order
20
- to use your local dev version instead of the installed gem.
19
+ Set the HOBODEV ENV variable to your local hobo git-repository path
20
+ in order to use your local dev version instead of the installed gem.
21
21
 
22
22
  )
23
23
 
24
+ # for hobo developers only
25
+ setup_wizard = true
26
+
24
27
  command = ARGV.shift
25
- if command.nil?
28
+
29
+ case command
30
+
31
+ when nil
26
32
  puts "\nThe command is missing!\n"
27
33
  puts banner
28
34
  exit
29
- end
30
- # for hobo developers only
31
- setup_wizard = true
32
35
 
33
- case command
36
+ when /^--help|-h$/
37
+ puts banner
38
+ exit
34
39
 
35
40
  when 'new'
36
41
  app_name = ARGV.shift
@@ -45,8 +50,8 @@ module HoboSupport
45
50
  end
46
51
  template_path = "/tmp/hobo_app_template"
47
52
  File.open(template_path, 'w') do |file|
48
- if ENV["HOBO_DEV_ROOT"]
49
- dev_root = File.expand_path ENV["HOBO_DEV_ROOT"], FileUtils.pwd
53
+ if ENV["HOBODEV"]
54
+ dev_root = File.expand_path ENV["HOBODEV"], FileUtils.pwd
50
55
  file.puts %(
51
56
  $:.unshift '#{dev_root}/hobo_support/lib'
52
57
  gem 'hobo_support', :path => '#{dev_root}/hobo_support'
@@ -81,11 +86,14 @@ You can rerun it at any time with `hobo g setup_wizard` from the application roo
81
86
  system "rails new #{app_name} #{ARGV * ' '} -m #{template_path}"
82
87
  File.delete template_path
83
88
 
84
- when /^(g|generate)$/
89
+ when /^g|generate$/
85
90
  if ARGV.empty?
86
91
  puts "\nThe generator name is missing!\n"
87
92
  puts banner
88
93
  else
94
+ if ARGV.first =~ /^hobo:(\w+)$/
95
+ puts "NOTICE: You can omit the 'hobo' namespace: e.g. `hobo g #{$1} #{ARGV[1..-1] * ' '}`"
96
+ end
89
97
  exec "rails g hobo:#{ARGV * ' '}"
90
98
  end
91
99
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1637175962
4
+ hash: -1637175961
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
9
  - 0
10
- - pre11
11
- version: 1.3.0.pre11
10
+ - pre12
11
+ version: 1.3.0.pre12
12
12
  platform: ruby
13
13
  authors:
14
14
  - Tom Locke
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-11 00:00:00 -04:00
19
+ date: 2010-10-14 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency