ubiquo 0.9.0.b3 → 0.9.0.b4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ubiquo.rb +1 -1
- data/lib/ubiquo/options.rb +13 -2
- data/lib/ubiquo/template.erb +35 -2
- data/ubiquo.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.0.
|
1
|
+
0.9.0.b4
|
data/lib/ubiquo.rb
CHANGED
@@ -13,7 +13,7 @@ module Ubiquo
|
|
13
13
|
options = options.merge(env_opts) if env_opts
|
14
14
|
|
15
15
|
# We need this because sometimes we upgrade edge but no stable
|
16
|
-
options[:rails] = options[:template] == :edge ? '3.2.0.
|
16
|
+
options[:rails] = options[:template] == :edge ? '3.2.0.rc2' : '2.3.14'
|
17
17
|
|
18
18
|
unless Gem.available?('rails', options[:rails])
|
19
19
|
$stderr.puts "Sorry ubiquo needs rails #{options[:rails]} to work properly."
|
data/lib/ubiquo/options.rb
CHANGED
@@ -10,8 +10,11 @@ module Ubiquo
|
|
10
10
|
|
11
11
|
self[:template] = :stable
|
12
12
|
self[:profile] = :complete
|
13
|
-
self[:locale]
|
13
|
+
self[:locale] = :en
|
14
14
|
self[:devel] = false
|
15
|
+
self[:rvm] = false
|
16
|
+
self[:gem_path] = false
|
17
|
+
self[:clone_gems] = false
|
15
18
|
self[:database] = :sqlite
|
16
19
|
self[:exception_recipient] = "chan@ge.me"
|
17
20
|
self[:sender_address] = "chan@ge.me"
|
@@ -66,6 +69,14 @@ module Ubiquo
|
|
66
69
|
self[:rvm] = true
|
67
70
|
end
|
68
71
|
|
72
|
+
o.on("--gem-path [PATH]", 'Use ubiquo gems that are placed in this path') do |gem_path|
|
73
|
+
self[:gem_path] = gem_path
|
74
|
+
end
|
75
|
+
|
76
|
+
o.on("--clone-gems", 'Do a git clone of the ubiquo gems in the specified --gem-path') do
|
77
|
+
self[:clone_gems] = true
|
78
|
+
end
|
79
|
+
|
69
80
|
o.on("--devel", 'For ubiquo developers (ssh acces to github repos)') do
|
70
81
|
self[:devel] = true
|
71
82
|
end
|
@@ -112,7 +123,7 @@ module Ubiquo
|
|
112
123
|
def suported_profiles
|
113
124
|
{
|
114
125
|
:minimal => "Includes minimal set of ubiquo plugins.",
|
115
|
-
:complete => "Includes all
|
126
|
+
:complete => "Includes all available ubiquo core plugins."
|
116
127
|
}
|
117
128
|
end
|
118
129
|
|
data/lib/ubiquo/template.erb
CHANGED
@@ -27,6 +27,9 @@ case choosen_plugin_set
|
|
27
27
|
else selected_plugins = minimal_plugins + rest_plugins
|
28
28
|
end
|
29
29
|
|
30
|
+
# temporally overriden to the gemified set of plugins
|
31
|
+
selected_plugins = %w[ubiquo_core ubiquo_authentication ubiquo_access_control]
|
32
|
+
|
30
33
|
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 238
|
31
34
|
def file(*args, &block)
|
32
35
|
config = args.last.is_a?(Hash) ? args.pop : {}
|
@@ -47,6 +50,12 @@ def add_plugins(plugin_names, options={})
|
|
47
50
|
git_root = options[:devel] ? 'git@github.com:gnuine' : 'git://github.com/gnuine'
|
48
51
|
plugin_names.each { |name| plugin name, :git => "#{git_root}/#{name}.git", :branch => options[:branch], :submodule => true }
|
49
52
|
end
|
53
|
+
|
54
|
+
def plugin_repo(name, options={})
|
55
|
+
git_root = options[:devel] ? 'git@github.com:gnuine' : 'git://github.com/gnuine'
|
56
|
+
"#{git_root}/#{name}.git"
|
57
|
+
end
|
58
|
+
|
50
59
|
# To ask needed settings when boostraping the app
|
51
60
|
appname = "<%= @opts[:app_name] %>"
|
52
61
|
exception_recipient = "<%= @opts[:exception_recipient] %>"
|
@@ -247,7 +256,12 @@ end
|
|
247
256
|
CODE
|
248
257
|
# default rails environment.rb
|
249
258
|
ubiquo_branch = <%= @opts[:template] == :edge ? 'nil' : "'0.8-stable'" %>
|
250
|
-
add_plugins(selected_plugins + external_plugins, :branch => ubiquo_branch, :devel => <%= @opts[:devel] ? true : false %>)
|
259
|
+
#add_plugins(selected_plugins + external_plugins, :branch => ubiquo_branch, :devel => <%= @opts[:devel] ? true : false %>)
|
260
|
+
<% if @opts[:clone_gems] %>
|
261
|
+
(selected_plugins).each do |plugin_name|
|
262
|
+
run "git clone #{plugin_repo(plugin_name)} <%= @opts[:gem_path] %>/#{plugin_name}"
|
263
|
+
end
|
264
|
+
<% end %>
|
251
265
|
|
252
266
|
adapter_gem = case choosen_adapter
|
253
267
|
when "mysql" then "mysql"
|
@@ -255,10 +269,19 @@ adapter_gem = case choosen_adapter
|
|
255
269
|
else "pg"
|
256
270
|
end
|
257
271
|
jruby_adapter_gem = adapter_gem == "pg" ? "postgres" : adapter_gem
|
272
|
+
|
273
|
+
ubiquo_gems = (selected_plugins).map do |plugin|
|
274
|
+
<% if @opts[:gem_path] %>
|
275
|
+
" gem \"#{plugin}\""
|
276
|
+
<% else %>>
|
277
|
+
" gem \"#{plugin}\", :git => #{plugin_repo(plugin)}"
|
278
|
+
<% end %>
|
279
|
+
end.join("\n")
|
280
|
+
|
258
281
|
file 'Gemfile', <<-CODE
|
259
282
|
source "https://rubygems.org"
|
260
283
|
|
261
|
-
gem "rails", "
|
284
|
+
gem "rails", "~> 3.2.0.rc2"
|
262
285
|
|
263
286
|
platforms :mri_19 do
|
264
287
|
gem "#{adapter_gem}"
|
@@ -280,6 +303,16 @@ gem 'jquery-rails'
|
|
280
303
|
group :test do
|
281
304
|
gem "mocha", ">= 0.9.8", :require => false
|
282
305
|
end
|
306
|
+
|
307
|
+
<% if @opts[:gem_path] %>
|
308
|
+
path "<%= @opts[:gem_path] %>" do
|
309
|
+
#{ubiquo_gems}
|
310
|
+
end
|
311
|
+
<% else %>
|
312
|
+
#{ubiquo_gems}
|
313
|
+
<% end %>
|
314
|
+
|
315
|
+
|
283
316
|
<% if @opts[:profile] == :complete # used in i18n %>
|
284
317
|
#gem 'routing-filter', '~> 0.2.4', :require => false
|
285
318
|
<% end %>
|
data/ubiquo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ubiquo"
|
8
|
-
s.version = "0.9.0.
|
8
|
+
s.version = "0.9.0.b4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Albert Callarisa", "Jordi Beltran", "Bernat Foj", "Eric Garc\303\255a", "Felip Ladr\303\263n", "David Lozano", "Antoni Reina", "Ramon Salvad\303\263", "Arnau S\303\241nchez"]
|
12
|
-
s.date = "2012-01-
|
12
|
+
s.date = "2012-01-11"
|
13
13
|
s.description = "This gem provides a command-line interface to speed up the creation of ubiquo based apps."
|
14
14
|
s.email = "rsalvado@gnuine.com"
|
15
15
|
s.executables = ["ubiquo"]
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubiquo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 239
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 0
|
10
10
|
- b
|
11
|
-
-
|
12
|
-
version: 0.9.0.
|
11
|
+
- 4
|
12
|
+
version: 0.9.0.b4
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Albert Callarisa
|
@@ -25,7 +25,7 @@ autorequire:
|
|
25
25
|
bindir: bin
|
26
26
|
cert_chain: []
|
27
27
|
|
28
|
-
date: 2012-01-
|
28
|
+
date: 2012-01-11 00:00:00 Z
|
29
29
|
dependencies:
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: journey
|