hobo 1.3.0.pre11 → 1.3.0.pre12
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/hobo +3 -3
- data/lib/generators/hobo/resource/resource_generator.rb +1 -1
- data/lib/generators/hobo/setup_wizard/setup_wizard_generator.rb +3 -3
- data/lib/hobo/controller.rb +3 -7
- data/lib/hobo/helper/translations.rb +1 -6
- data/lib/hobo/rapid/taglibs/rapid_core.dryml +1 -1
- metadata +13 -13
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.0.
|
1
|
+
1.3.0.pre12
|
data/bin/hobo
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
|
-
if ENV["
|
5
|
-
dev_root = File.expand_path ENV["
|
4
|
+
if ENV["HOBODEV"]
|
5
|
+
dev_root = File.expand_path ENV["HOBODEV"], FileUtils.pwd
|
6
6
|
$:.unshift "#{dev_root}/hobo_support/lib"
|
7
7
|
else
|
8
8
|
require 'rubygems'
|
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
require 'hobo_support/command'
|
13
13
|
rescue LoadError
|
14
14
|
puts "The 'hobo_support' gem is not installed.
|
15
|
-
You probably need to set the
|
15
|
+
You probably need to set the HOBODEV environment variable to your local hobo git-repository path."
|
16
16
|
exit
|
17
17
|
end
|
18
18
|
|
@@ -16,7 +16,7 @@ module Hobo
|
|
16
16
|
def generate_hobo_model
|
17
17
|
# is there any better way to pass attributes?
|
18
18
|
attr = attributes.map{|a| "#{a.name}:#{a.type}"}
|
19
|
-
invoke 'hobo:model', [name
|
19
|
+
invoke 'hobo:model', [name, attr], options
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
@@ -27,7 +27,7 @@ module Hobo
|
|
27
27
|
:desc => "Admin Subsite Name", :default => 'admin'
|
28
28
|
|
29
29
|
class_option :private_site, :type => :boolean,
|
30
|
-
:desc => "Make the site unaccessible to non-
|
30
|
+
:desc => "Make the site unaccessible to non-members"
|
31
31
|
|
32
32
|
class_option :migration_generate, :type => :boolean,
|
33
33
|
:desc => "Generate migration only"
|
@@ -39,7 +39,7 @@ module Hobo
|
|
39
39
|
:desc => "Sets the default locale"
|
40
40
|
|
41
41
|
class_option :locales, :type => :array,
|
42
|
-
:desc => "Choose the locales"
|
42
|
+
:desc => "Choose the locales", :default => %w[en]
|
43
43
|
|
44
44
|
class_option :git_repo, :type => :boolean,
|
45
45
|
:desc => "Create the git repository with the initial commit"
|
@@ -64,7 +64,7 @@ module Hobo
|
|
64
64
|
fixture_replacement = ask("Type your preferred fixture replacement or <enter> for no replacement:")
|
65
65
|
else
|
66
66
|
# return if it is all default so no invoke is needed
|
67
|
-
return if (options[:test_framework] == 'test_unit' && options[:fixtures] && options[:fixture_replacement].blank?)
|
67
|
+
return if (options[:test_framework].to_s == 'test_unit' && options[:fixtures] && options[:fixture_replacement].blank?)
|
68
68
|
test_framework = options[:test_framework]
|
69
69
|
fixtures = options[:fixtures]
|
70
70
|
fixture_replacement = options[:fixture_replacement]
|
data/lib/hobo/controller.rb
CHANGED
@@ -70,8 +70,7 @@ module Hobo
|
|
70
70
|
|
71
71
|
|
72
72
|
def ajax_update_response(page_path, render_specs, results={})
|
73
|
-
|
74
|
-
renderer = Dryml.page_renderer(@template, [], page_path) if page_path
|
73
|
+
renderer = Dryml.page_renderer(view_context, page_path) if page_path
|
75
74
|
|
76
75
|
render :update do |page|
|
77
76
|
page << "var _update = typeof Hobo == 'undefined' ? Element.update : Hobo.updateElement;"
|
@@ -91,7 +90,7 @@ module Hobo
|
|
91
90
|
end
|
92
91
|
page << renderer.part_contexts_storage if renderer
|
93
92
|
end
|
94
|
-
|
93
|
+
end
|
95
94
|
|
96
95
|
|
97
96
|
def dryml_context
|
@@ -113,10 +112,7 @@ module Hobo
|
|
113
112
|
|
114
113
|
|
115
114
|
def tag_renderer
|
116
|
-
@tag_renderer ||=
|
117
|
-
@template.send(:_evaluate_assigns_and_ivars)
|
118
|
-
Dryml.empty_page_renderer(@template)
|
119
|
-
end
|
115
|
+
@tag_renderer ||= Dryml.empty_page_renderer(view_context)
|
120
116
|
end
|
121
117
|
|
122
118
|
|
@@ -27,13 +27,8 @@ module Hobo
|
|
27
27
|
# my: "Mitt {{app}}"
|
28
28
|
# The output should be: Mitt Program
|
29
29
|
#
|
30
|
-
# The "count" option
|
31
|
-
# The following lines are the same:
|
30
|
+
# The "count" option is passed to the I18n.t method as is
|
32
31
|
#
|
33
|
-
# <ht key="modelname.any.key" count="&:dynamic">
|
34
|
-
# <ht key="modelname.any.key" count="&model.count">
|
35
|
-
#
|
36
|
-
# Otherwise with features as the ht method, step 1, 2 and 3 above.
|
37
32
|
def ht(key, options={})
|
38
33
|
|
39
34
|
# Check if called as a tag, i.e. like this <ht></ht>
|
@@ -169,7 +169,7 @@ Provides a short hand way of displaying images in public/images
|
|
169
169
|
res << "var pluralisations = {#{names * ', '}}; "
|
170
170
|
end
|
171
171
|
base = [base_url, subsite].compact.join("/")
|
172
|
-
res << "urlBase = '#{base}'; hoboPagePath = '#{
|
172
|
+
res << "urlBase = '#{base}'; hoboPagePath = '#{request.fullpath}'"
|
173
173
|
if protect_against_forgery?
|
174
174
|
res << "; formAuthToken = { name: '#{request_forgery_protection_token}', value: '#{form_authenticity_token}' }"
|
175
175
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -1637175961
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 1.3.0.
|
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-
|
19
|
+
date: 2010-10-14 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -59,13 +59,13 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
hash: -
|
62
|
+
hash: -1637175961
|
63
63
|
segments:
|
64
64
|
- 1
|
65
65
|
- 3
|
66
66
|
- 0
|
67
|
-
-
|
68
|
-
version: 1.3.0.
|
67
|
+
- pre12
|
68
|
+
version: 1.3.0.pre12
|
69
69
|
type: :runtime
|
70
70
|
version_requirements: *id003
|
71
71
|
- !ruby/object:Gem::Dependency
|
@@ -76,13 +76,13 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - "="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
hash: -
|
79
|
+
hash: -1637175961
|
80
80
|
segments:
|
81
81
|
- 1
|
82
82
|
- 3
|
83
83
|
- 0
|
84
|
-
-
|
85
|
-
version: 1.3.0.
|
84
|
+
- pre12
|
85
|
+
version: 1.3.0.pre12
|
86
86
|
type: :runtime
|
87
87
|
version_requirements: *id004
|
88
88
|
- !ruby/object:Gem::Dependency
|
@@ -93,13 +93,13 @@ dependencies:
|
|
93
93
|
requirements:
|
94
94
|
- - "="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
hash: -
|
96
|
+
hash: -1637175961
|
97
97
|
segments:
|
98
98
|
- 1
|
99
99
|
- 3
|
100
100
|
- 0
|
101
|
-
-
|
102
|
-
version: 1.3.0.
|
101
|
+
- pre12
|
102
|
+
version: 1.3.0.pre12
|
103
103
|
type: :runtime
|
104
104
|
version_requirements: *id005
|
105
105
|
- !ruby/object:Gem::Dependency
|