ubiquo 0.2.11 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ubiquo/options.rb +23 -24
- data/lib/ubiquo/template.erb +3 -7
- data/ubiquo.gemspec +6 -6
- metadata +19 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/lib/ubiquo/options.rb
CHANGED
@@ -2,43 +2,42 @@ module Ubiquo
|
|
2
2
|
# TODO: Improve banner to inform of UBIQUO_OPTS env var merging
|
3
3
|
# TODO: Add git needed params for repo creation on github
|
4
4
|
class Options < Hash
|
5
|
-
|
5
|
+
|
6
6
|
attr_reader :opts, :orig_args
|
7
|
-
|
7
|
+
|
8
8
|
def initialize(args)
|
9
9
|
@orig_args = args.clone
|
10
|
-
|
10
|
+
|
11
11
|
self[:template] = :stable
|
12
12
|
self[:profile] = :complete
|
13
13
|
self[:locale] = :en
|
14
14
|
self[:devel] = false
|
15
|
-
self[:
|
16
|
-
self[:database] = self[:gnuine] ? :postgresql : :sqlite
|
15
|
+
self[:database] = :sqlite
|
17
16
|
self[:exception_recipient] = "chan@ge.me"
|
18
17
|
self[:sender_address] = "chan@ge.me"
|
19
|
-
|
20
|
-
|
18
|
+
|
19
|
+
|
21
20
|
@opts = OptionParser.new do |o|
|
22
|
-
o.banner = """Usage: #{File.basename($0)} [options] application_name"
|
21
|
+
o.banner = """Usage: #{File.basename($0)} [options] application_name"
|
23
22
|
o.separator "\nSelect a database (defaults to sqlite if not specified):"
|
24
|
-
|
23
|
+
|
25
24
|
suported_databases.each do |db,msg|
|
26
25
|
o.on("--#{db.to_s}", msg) { self[:database] = db }
|
27
26
|
end
|
28
|
-
|
27
|
+
|
29
28
|
o.separator "\nSelect a template (defaults to stable if not specified):"
|
30
|
-
|
29
|
+
|
31
30
|
suported_templates.each do |tpl, msg|
|
32
31
|
o.on("--#{tpl.to_s}", msg) { self[:template] = tpl }
|
33
32
|
end
|
34
|
-
|
33
|
+
|
35
34
|
o.separator "\nSelect a profile (defaults to complete if not specified):"
|
36
|
-
|
35
|
+
|
37
36
|
suported_profiles.each do |profile, msg|
|
38
37
|
o.on("--#{profile.to_s}", msg) { self[:profile] = profile }
|
39
38
|
end
|
40
39
|
o.on(
|
41
|
-
"--custom [PLUGINS]",
|
40
|
+
"--custom [PLUGINS]",
|
42
41
|
"Includes minimal template, but you can add extra plugins"
|
43
42
|
) do |plugins|
|
44
43
|
self[:profile] = :custom
|
@@ -60,7 +59,7 @@ module Ubiquo
|
|
60
59
|
o.on("--sender [EMAIL]", "E-mail to use in from.") do |sender|
|
61
60
|
self[:sender_address] = sender
|
62
61
|
end
|
63
|
-
|
62
|
+
|
64
63
|
o.separator "\nExtra options:"
|
65
64
|
|
66
65
|
o.on("--devel", 'For ubiquo developers (ssh acces to github repos)') do
|
@@ -70,13 +69,13 @@ module Ubiquo
|
|
70
69
|
o.on("-v", '--version', "Displays this gem version.") do
|
71
70
|
self[:version] = File.read(File.dirname(__FILE__) + "/../../VERSION").strip
|
72
71
|
end
|
73
|
-
|
72
|
+
|
74
73
|
o.on_tail('-h', '--help', 'displays this help and exit') do
|
75
74
|
self[:show_help] = true
|
76
75
|
end
|
77
|
-
|
76
|
+
|
78
77
|
end
|
79
|
-
|
78
|
+
|
80
79
|
begin
|
81
80
|
@opts.parse!(args)
|
82
81
|
self[:app_name] = args.shift
|
@@ -84,13 +83,13 @@ module Ubiquo
|
|
84
83
|
self[:invalid_argument] = e.message
|
85
84
|
end
|
86
85
|
end
|
87
|
-
|
86
|
+
|
88
87
|
def merge(other)
|
89
88
|
self.class.new(@orig_args + other.orig_args)
|
90
89
|
end
|
91
|
-
|
90
|
+
|
92
91
|
private
|
93
|
-
|
92
|
+
|
94
93
|
def suported_databases
|
95
94
|
{
|
96
95
|
:postgresql => "Uses postgresql database.",
|
@@ -98,14 +97,14 @@ module Ubiquo
|
|
98
97
|
:sqlite => "Uses sqlite database."
|
99
98
|
}
|
100
99
|
end
|
101
|
-
|
100
|
+
|
102
101
|
def suported_templates
|
103
102
|
{
|
104
103
|
:stable => "Follows the latest ubiquo stable branch. Recommended for production.",
|
105
104
|
:edge => "Follows the development branch."
|
106
105
|
}
|
107
106
|
end
|
108
|
-
|
107
|
+
|
109
108
|
def suported_profiles
|
110
109
|
{
|
111
110
|
:minimal => "Includes minimal set of ubiquo plugins.",
|
@@ -120,6 +119,6 @@ module Ubiquo
|
|
120
119
|
:en => "Selects English."
|
121
120
|
}
|
122
121
|
end
|
123
|
-
|
122
|
+
|
124
123
|
end
|
125
124
|
end
|
data/lib/ubiquo/template.erb
CHANGED
@@ -13,6 +13,7 @@ rest_plugins = %w[
|
|
13
13
|
ubiquo_activity
|
14
14
|
ubiquo_versions
|
15
15
|
ubiquo_guides
|
16
|
+
ubiquo_design
|
16
17
|
]
|
17
18
|
|
18
19
|
choosen_plugin_set = "<%= @opts[:profile].to_s %>"
|
@@ -198,13 +199,11 @@ ActionController::Routing::Routes.draw do |map|
|
|
198
199
|
end
|
199
200
|
|
200
201
|
# Ubiquo plugins routes. See routes.rb from each plugin path.
|
201
|
-
#{ubiquo_routes}
|
202
202
|
<% if @opts[:template] == :edge && @opts[:profile] == :complete %>
|
203
203
|
<%= "map.from_plugin :ubiquo_categories" %>
|
204
204
|
<% end %>
|
205
|
-
|
206
|
-
|
207
|
-
<% end %>
|
205
|
+
#{ubiquo_routes}
|
206
|
+
|
208
207
|
############# default routes
|
209
208
|
#map.connect ':controller/:action/:id'
|
210
209
|
#map.connect ':controller/:action/:id.:format'
|
@@ -262,9 +261,6 @@ add_plugins(selected_plugins + external_plugins, :branch => ubiquo_branch, :deve
|
|
262
261
|
<% if @opts[:template] == :edge && @opts[:profile] == :complete %>
|
263
262
|
add_plugins(['ubiquo_categories'], :branch => nil)
|
264
263
|
<% end %>
|
265
|
-
<% if @opts[:gnuine] && opts[:profile] == :complete %>
|
266
|
-
plugin 'ubiquo_design', :git => 'gitosis@gandalf.gnuine.com:ubiquo_design.git', :submodule => true, :branch => ubiquo_branch
|
267
|
-
<% end %>
|
268
264
|
|
269
265
|
rake("rails:update")
|
270
266
|
rake("calendardateselect:install")
|
data/ubiquo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ubiquo}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Albert Callarisa", "Bernat Foj", "Eric Garc\303\255a", "Felip Ladr\303\263n", "Antoni Reina", "Ramon Salvad\303\263", "Arnau S\303\241nchez"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-15}
|
13
13
|
s.default_executable = %q{ubiquo}
|
14
14
|
s.description = %q{This gem provides a command-line application to make the creation of ubiquo based applications fast and easy.}
|
15
15
|
s.email = %q{rsalvado@gnuine.com}
|
@@ -39,19 +39,19 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.homepage = %q{http://www.ubiquo.me}
|
40
40
|
s.rdoc_options = ["--charset=UTF-8"]
|
41
41
|
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = %q{1.3.
|
42
|
+
s.rubygems_version = %q{1.3.7}
|
43
43
|
s.summary = %q{command line application for building ubiquo based applications.}
|
44
44
|
s.test_files = [
|
45
45
|
"test/helper.rb",
|
46
|
-
"test/ubiquo/
|
47
|
-
"test/ubiquo/
|
46
|
+
"test/ubiquo/generator_test.rb",
|
47
|
+
"test/ubiquo/options_test.rb"
|
48
48
|
]
|
49
49
|
|
50
50
|
if s.respond_to? :specification_version then
|
51
51
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
52
52
|
s.specification_version = 3
|
53
53
|
|
54
|
-
if Gem::Version.new(Gem::
|
54
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
55
|
s.add_runtime_dependency(%q<rails>, ["= 2.3.5"])
|
56
56
|
s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
|
57
57
|
s.add_development_dependency(%q<highline>, [">= 1.5.2"])
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubiquo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Albert Callarisa
|
@@ -20,16 +21,18 @@ autorequire:
|
|
20
21
|
bindir: bin
|
21
22
|
cert_chain: []
|
22
23
|
|
23
|
-
date: 2010-
|
24
|
+
date: 2010-07-15 00:00:00 +02:00
|
24
25
|
default_executable: ubiquo
|
25
26
|
dependencies:
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: rails
|
28
29
|
prerelease: false
|
29
30
|
requirement: &id001 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
30
32
|
requirements:
|
31
33
|
- - "="
|
32
34
|
- !ruby/object:Gem::Version
|
35
|
+
hash: 9
|
33
36
|
segments:
|
34
37
|
- 2
|
35
38
|
- 3
|
@@ -41,9 +44,11 @@ dependencies:
|
|
41
44
|
name: mocha
|
42
45
|
prerelease: false
|
43
46
|
requirement: &id002 !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
44
48
|
requirements:
|
45
49
|
- - ">="
|
46
50
|
- !ruby/object:Gem::Version
|
51
|
+
hash: 43
|
47
52
|
segments:
|
48
53
|
- 0
|
49
54
|
- 9
|
@@ -55,9 +60,11 @@ dependencies:
|
|
55
60
|
name: highline
|
56
61
|
prerelease: false
|
57
62
|
requirement: &id003 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
58
64
|
requirements:
|
59
65
|
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
67
|
+
hash: 7
|
61
68
|
segments:
|
62
69
|
- 1
|
63
70
|
- 5
|
@@ -69,9 +76,11 @@ dependencies:
|
|
69
76
|
name: ya2yaml
|
70
77
|
prerelease: false
|
71
78
|
requirement: &id004 !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
72
80
|
requirements:
|
73
81
|
- - ">="
|
74
82
|
- !ruby/object:Gem::Version
|
83
|
+
hash: 63
|
75
84
|
segments:
|
76
85
|
- 0
|
77
86
|
- 26
|
@@ -114,27 +123,31 @@ rdoc_options:
|
|
114
123
|
require_paths:
|
115
124
|
- lib
|
116
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
117
127
|
requirements:
|
118
128
|
- - ">="
|
119
129
|
- !ruby/object:Gem::Version
|
130
|
+
hash: 3
|
120
131
|
segments:
|
121
132
|
- 0
|
122
133
|
version: "0"
|
123
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
124
136
|
requirements:
|
125
137
|
- - ">="
|
126
138
|
- !ruby/object:Gem::Version
|
139
|
+
hash: 3
|
127
140
|
segments:
|
128
141
|
- 0
|
129
142
|
version: "0"
|
130
143
|
requirements: []
|
131
144
|
|
132
145
|
rubyforge_project:
|
133
|
-
rubygems_version: 1.3.
|
146
|
+
rubygems_version: 1.3.7
|
134
147
|
signing_key:
|
135
148
|
specification_version: 3
|
136
149
|
summary: command line application for building ubiquo based applications.
|
137
150
|
test_files:
|
138
151
|
- test/helper.rb
|
139
|
-
- test/ubiquo/options_test.rb
|
140
152
|
- test/ubiquo/generator_test.rb
|
153
|
+
- test/ubiquo/options_test.rb
|