ubiquo 0.1.2 → 0.1.3
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/Rakefile +0 -1
- data/VERSION +1 -1
- data/lib/ubiquo.rb +6 -1
- data/lib/ubiquo/options.rb +10 -6
- data/lib/ubiquo/template.erb +1 -3
- data/test/ubiquo/options_test.rb +7 -0
- data/ubiquo.gemspec +2 -5
- metadata +5 -17
data/Rakefile
CHANGED
@@ -13,7 +13,6 @@ begin
|
|
13
13
|
gem.authors = ["Ramon Salvadó"]
|
14
14
|
gem.add_dependency(%q<rails>, ["= 2.3.5"])
|
15
15
|
gem.add_dependency(%q<rmagick>, [">= 1.15.9"])
|
16
|
-
gem.add_development_dependency(%q<mocha>)
|
17
16
|
gem.add_dependency(%q<highline>)
|
18
17
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
18
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/ubiquo.rb
CHANGED
@@ -12,11 +12,15 @@ module Ubiquo
|
|
12
12
|
options = Options.new(arguments)
|
13
13
|
options = options.merge(env_opts) if env_opts
|
14
14
|
|
15
|
-
|
16
15
|
if `which git` == ''
|
17
16
|
$stderr.puts "Sorry you need to install git (> 1.5.3). See http://git-scm.com/"
|
18
17
|
options[:show_help] = true
|
19
18
|
end
|
19
|
+
|
20
|
+
if options[:version]
|
21
|
+
$stdout.puts options[:version]
|
22
|
+
return 0
|
23
|
+
end
|
20
24
|
|
21
25
|
if options[:invalid_argument]
|
22
26
|
$stderr.puts options[:invalid_argument]
|
@@ -33,6 +37,7 @@ module Ubiquo
|
|
33
37
|
return 1
|
34
38
|
end
|
35
39
|
|
40
|
+
|
36
41
|
skeleton = File.dirname(__FILE__) + "/ubiquo/template.erb"
|
37
42
|
tpl = Tempfile.new('tmp')
|
38
43
|
File.open(tpl.path, 'w') do |file|
|
data/lib/ubiquo/options.rb
CHANGED
@@ -18,29 +18,33 @@ module Ubiquo
|
|
18
18
|
|
19
19
|
@opts = OptionParser.new do |o|
|
20
20
|
o.banner = """Usage: #{File.basename($0)} [options] application_name"
|
21
|
-
o.separator ""
|
21
|
+
o.separator "\nSelect a database (defaults to postgresql if not specified):"
|
22
22
|
|
23
23
|
suported_databases.each do |db,msg|
|
24
24
|
o.on("--#{db.to_s}", msg) { self[:database] = db }
|
25
25
|
end
|
26
26
|
|
27
|
-
o.separator ""
|
27
|
+
o.separator "\nSelect a template (defaults to stable if not specified):"
|
28
28
|
|
29
29
|
suported_templates.each do |tpl, msg|
|
30
30
|
o.on("--#{tpl.to_s}", msg) { self[:template] = tpl }
|
31
31
|
end
|
32
32
|
|
33
|
-
o.separator ""
|
33
|
+
o.separator "\nSelect a profile (defaults to complete if not specified):"
|
34
34
|
|
35
35
|
suported_profiles.each do |profile, msg|
|
36
36
|
o.on("--#{profile.to_s}", msg) { self[:profile] = profile }
|
37
37
|
end
|
38
38
|
|
39
|
+
o.separator "\nExtra options:"
|
40
|
+
|
39
41
|
o.on("--devel", 'For ubiquo developers (ssh acces to github repos)') do
|
40
42
|
self[:devel] = true
|
41
43
|
end
|
42
|
-
|
43
|
-
o.
|
44
|
+
|
45
|
+
o.on("-v", '--version', "Displays this gem version.") do
|
46
|
+
self[:version] = File.read(File.dirname(__FILE__) + "/../../VERSION").strip
|
47
|
+
end
|
44
48
|
|
45
49
|
o.on_tail('-h', '--help', 'displays this help and exit') do
|
46
50
|
self[:show_help] = true
|
@@ -79,7 +83,7 @@ module Ubiquo
|
|
79
83
|
|
80
84
|
def suported_profiles
|
81
85
|
{
|
82
|
-
:minimal => "Includes minimal set of ubiquo plugins
|
86
|
+
:minimal => "Includes minimal set of ubiquo plugins.",
|
83
87
|
:complete => "Includes all avaliable ubiquo core plugins."
|
84
88
|
}
|
85
89
|
end
|
data/lib/ubiquo/template.erb
CHANGED
@@ -5,11 +5,9 @@ external_plugins = %w[
|
|
5
5
|
tiny_mce
|
6
6
|
paperclip
|
7
7
|
]
|
8
|
-
minimal_plugins = %w[ ubiquo_core ubiquo_authentication ]
|
8
|
+
minimal_plugins = %w[ ubiquo_core ubiquo_authentication ubiquo_access_control ubiquo_scaffold ]
|
9
9
|
rest_plugins = %w[
|
10
|
-
ubiquo_access_control
|
11
10
|
ubiquo_media
|
12
|
-
ubiquo_scaffold
|
13
11
|
ubiquo_jobs
|
14
12
|
ubiquo_i18n
|
15
13
|
ubiquo_activity
|
data/test/ubiquo/options_test.rb
CHANGED
@@ -41,4 +41,11 @@ class TestOptions < Test::Unit::TestCase
|
|
41
41
|
assert_equal "invalid option: --wrong", opts[:invalid_argument]
|
42
42
|
end
|
43
43
|
|
44
|
+
def test_should_have_a_version
|
45
|
+
opts = Options.new(%w[ --version myapp])
|
46
|
+
version_file = File.dirname(__FILE__) + "/../../VERSION"
|
47
|
+
version = File.read(version_file).strip
|
48
|
+
assert_equal version, opts[:version]
|
49
|
+
end
|
50
|
+
|
44
51
|
end
|
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.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ramon Salvad\303\263"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-23}
|
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}
|
@@ -54,18 +54,15 @@ Gem::Specification.new do |s|
|
|
54
54
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
55
55
|
s.add_runtime_dependency(%q<rails>, ["= 2.3.5"])
|
56
56
|
s.add_runtime_dependency(%q<rmagick>, [">= 1.15.9"])
|
57
|
-
s.add_development_dependency(%q<mocha>, [">= 0"])
|
58
57
|
s.add_runtime_dependency(%q<highline>, [">= 0"])
|
59
58
|
else
|
60
59
|
s.add_dependency(%q<rails>, ["= 2.3.5"])
|
61
60
|
s.add_dependency(%q<rmagick>, [">= 1.15.9"])
|
62
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
63
61
|
s.add_dependency(%q<highline>, [">= 0"])
|
64
62
|
end
|
65
63
|
else
|
66
64
|
s.add_dependency(%q<rails>, ["= 2.3.5"])
|
67
65
|
s.add_dependency(%q<rmagick>, [">= 1.15.9"])
|
68
|
-
s.add_dependency(%q<mocha>, [">= 0"])
|
69
66
|
s.add_dependency(%q<highline>, [">= 0"])
|
70
67
|
end
|
71
68
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "Ramon Salvad\xC3\xB3"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-23 00:00:00 +01:00
|
18
18
|
default_executable: ubiquo
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -45,22 +45,10 @@ dependencies:
|
|
45
45
|
version: 1.15.9
|
46
46
|
type: :runtime
|
47
47
|
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: mocha
|
50
|
-
prerelease: false
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
version: "0"
|
58
|
-
type: :development
|
59
|
-
version_requirements: *id003
|
60
48
|
- !ruby/object:Gem::Dependency
|
61
49
|
name: highline
|
62
50
|
prerelease: false
|
63
|
-
requirement: &
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
64
52
|
requirements:
|
65
53
|
- - ">="
|
66
54
|
- !ruby/object:Gem::Version
|
@@ -68,7 +56,7 @@ dependencies:
|
|
68
56
|
- 0
|
69
57
|
version: "0"
|
70
58
|
type: :runtime
|
71
|
-
version_requirements: *
|
59
|
+
version_requirements: *id003
|
72
60
|
description: This gem provides a command-line application to make the creation of ubiquo based applications fast and easy.
|
73
61
|
email: rsalvado@gnuine.com
|
74
62
|
executables:
|