ubiquo 0.1.3 → 0.1.4
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 +1 -1
- data/lib/ubiquo/options.rb +15 -0
- data/lib/ubiquo/template.erb +7 -7
- data/ubiquo.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/ubiquo/options.rb
CHANGED
@@ -13,6 +13,7 @@ module Ubiquo
|
|
13
13
|
self[:database] = :sqlite
|
14
14
|
self[:template] = :stable
|
15
15
|
self[:profile] = :complete
|
16
|
+
self[:locale] = :en
|
16
17
|
self[:devel] = false
|
17
18
|
self[:gnuine] = args.delete('--gnuine') || false
|
18
19
|
|
@@ -36,6 +37,12 @@ module Ubiquo
|
|
36
37
|
o.on("--#{profile.to_s}", msg) { self[:profile] = profile }
|
37
38
|
end
|
38
39
|
|
40
|
+
o.separator "\nSelects ubiquo default locale (defaults to english): "
|
41
|
+
|
42
|
+
suported_locales.each do |locale, msg|
|
43
|
+
o.on("--#{locale.to_s}", msg) { self[:locale] = locale }
|
44
|
+
end
|
45
|
+
|
39
46
|
o.separator "\nExtra options:"
|
40
47
|
|
41
48
|
o.on("--devel", 'For ubiquo developers (ssh acces to github repos)') do
|
@@ -87,6 +94,14 @@ module Ubiquo
|
|
87
94
|
:complete => "Includes all avaliable ubiquo core plugins."
|
88
95
|
}
|
89
96
|
end
|
97
|
+
|
98
|
+
def suported_locales
|
99
|
+
{
|
100
|
+
:ca => "Selects catalan.",
|
101
|
+
:es => "Selects spanish.",
|
102
|
+
:en => "Selects english."
|
103
|
+
}
|
104
|
+
end
|
90
105
|
|
91
106
|
end
|
92
107
|
end
|
data/lib/ubiquo/template.erb
CHANGED
@@ -13,7 +13,6 @@ rest_plugins = %w[
|
|
13
13
|
ubiquo_activity
|
14
14
|
ubiquo_versions
|
15
15
|
ubiquo_guides
|
16
|
-
<%= "ubiquo_design" if @opts[:gnuine] %>
|
17
16
|
]
|
18
17
|
|
19
18
|
choosen_plugin_set = "<%= @opts[:profile].to_s %>"
|
@@ -163,19 +162,19 @@ base_config: &base_config
|
|
163
162
|
|
164
163
|
development:
|
165
164
|
<<: *base_config
|
166
|
-
|
165
|
+
database: db/#{appname}_development.db
|
167
166
|
|
168
167
|
test:
|
169
168
|
<<: *base_config
|
170
|
-
|
169
|
+
database: db/#{appname}_test.db
|
171
170
|
|
172
171
|
preproduction:
|
173
172
|
<<: *base_config
|
174
|
-
|
173
|
+
database: db/#{appname}_preproduction.db
|
175
174
|
|
176
175
|
production:
|
177
176
|
<<: *base_config
|
178
|
-
|
177
|
+
database: db/#{appname}_production.db
|
179
178
|
CODE
|
180
179
|
|
181
180
|
choosen_adapter = "<%= @opts[:database] %>"
|
@@ -196,6 +195,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
196
195
|
|
197
196
|
# Ubiquo plugins routes. See routes.rb from each plugin path.
|
198
197
|
#{ubiquo_routes}
|
198
|
+
<%= "map.from_plugin :ubiquo_design" if opts[:gnuine] %>
|
199
199
|
############# default routes
|
200
200
|
#map.connect ':controller/:action/:id'
|
201
201
|
#map.connect ':controller/:action/:id.:format'
|
@@ -244,13 +244,13 @@ Rails::Initializer.run do |config|
|
|
244
244
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
245
245
|
# config.i18n.default_locale = :de
|
246
246
|
config.i18n.load_path += Dir.glob(File.join("config", "locales", "**","*.{rb,yml}"))
|
247
|
-
config.i18n.default_locale = :
|
247
|
+
config.i18n.default_locale = :<%= @opts[:locale] %>
|
248
248
|
end
|
249
249
|
CODE
|
250
250
|
ubiquo_branch = <%= @opts[:template] == :edge ? 'nil' : "'0.7-stable'" %>
|
251
251
|
add_plugins(selected_plugins + external_plugins, :branch => ubiquo_branch, :devel => <%= @opts[:devel] ? true : false %>)
|
252
252
|
|
253
|
-
<% if @opts[:gnuine] %>
|
253
|
+
<% if @opts[:gnuine] && opts[:profile] == :complete %>
|
254
254
|
plugin 'ubiquo_design', :git => 'gitosis@gandalf.gnuine.com:ubiquo_design.git', :submodule => true, :branch => ubiquo_branch
|
255
255
|
<% end %>
|
256
256
|
|
data/ubiquo.gemspec
CHANGED