hobo_support 1.3.0.pre14 → 1.3.0.pre15
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.0.
|
1
|
+
1.3.0.pre15
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Generators
|
2
|
+
module HoboSupport
|
3
|
+
EvalTemplate = classy_module do
|
4
|
+
|
5
|
+
private
|
6
|
+
def eval_template(template_name)
|
7
|
+
source = File.expand_path(find_in_source_paths(template_name))
|
8
|
+
context = instance_eval('binding')
|
9
|
+
ERB.new(::File.binread(source), nil, '-').result(context)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Generators
|
2
2
|
module HoboSupport
|
3
3
|
Model = classy_module do
|
4
|
+
include EvalTemplate
|
4
5
|
|
5
6
|
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
|
6
7
|
|
@@ -15,10 +16,8 @@ module Generators
|
|
15
16
|
end
|
16
17
|
|
17
18
|
def inject_hobo_code_into_model_file
|
18
|
-
source = File.expand_path(find_in_source_paths('model_injection.rb.erb'))
|
19
|
-
context = instance_eval('binding')
|
20
19
|
inject_into_class model_path, class_name do
|
21
|
-
|
20
|
+
eval_template('model_injection.rb.erb')
|
22
21
|
end
|
23
22
|
end
|
24
23
|
|
data/lib/hobo_support/command.rb
CHANGED
@@ -75,7 +75,7 @@ Dev Notes:
|
|
75
75
|
|
76
76
|
say_title "Hobo Setup Wizard"
|
77
77
|
if yes_no?("Do you want to start the Setup Wizard now?
|
78
|
-
(Choose '
|
78
|
+
(Choose 'n' if you need to manually customize any file before running the Wizard.
|
79
79
|
You can rerun it at any time with `hobo g setup_wizard` from the application root dir.)")
|
80
80
|
exec 'rails g hobo:setup_wizard --no-main-title'
|
81
81
|
else
|
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: -
|
4
|
+
hash: -1637175966
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 1.3.0.
|
10
|
+
- pre15
|
11
|
+
version: 1.3.0.pre15
|
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-
|
19
|
+
date: 2010-11-03 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- Rakefile
|
64
64
|
- VERSION
|
65
65
|
- hobo_support.gemspec
|
66
|
+
- lib/generators/hobo_support/eval_template.rb
|
66
67
|
- lib/generators/hobo_support/model.rb
|
67
68
|
- lib/generators/hobo_support/thor_shell.rb
|
68
69
|
- lib/hobo_support.rb
|