ubiquo 0.3.2 → 0.3.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/VERSION +1 -1
- data/lib/ubiquo.rb +11 -9
- data/lib/ubiquo/template.erb +1 -1
- data/ubiquo.gemspec +6 -6
- metadata +18 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/lib/ubiquo.rb
CHANGED
@@ -4,7 +4,7 @@ $:.unshift File.dirname(__FILE__)
|
|
4
4
|
module Ubiquo
|
5
5
|
autoload :Options, 'ubiquo/options'
|
6
6
|
autoload :Generator, 'ubiquo/generator'
|
7
|
-
|
7
|
+
|
8
8
|
class App
|
9
9
|
class << self
|
10
10
|
def run!(arguments)
|
@@ -12,11 +12,14 @@ module Ubiquo
|
|
12
12
|
options = Options.new(arguments)
|
13
13
|
options = options.merge(env_opts) if env_opts
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
# We need this because edge has been upgraded to use Rails 2.3.9
|
16
|
+
options[:rails] = options[:template] == :edge ? '2.3.9' : '2.3.8'
|
17
|
+
|
18
|
+
unless Gem.available?('rails', options[:rails])
|
19
|
+
$stderr.puts "Sorry ubiquo needs rails #{options[:rails]} to work properly."
|
17
20
|
options[:show_help] = true
|
18
21
|
end
|
19
|
-
|
22
|
+
|
20
23
|
if `which git` == ''
|
21
24
|
$stderr.puts "Sorry you need to install git (> 1.5.3). See http://git-scm.com/"
|
22
25
|
options[:show_help] = true
|
@@ -26,7 +29,7 @@ module Ubiquo
|
|
26
29
|
$stdout.puts options[:version]
|
27
30
|
return 0
|
28
31
|
end
|
29
|
-
|
32
|
+
|
30
33
|
if options[:invalid_argument]
|
31
34
|
$stderr.puts options[:invalid_argument]
|
32
35
|
options[:show_help] = true
|
@@ -36,20 +39,19 @@ module Ubiquo
|
|
36
39
|
$stderr.puts options.opts
|
37
40
|
return 1
|
38
41
|
end
|
39
|
-
|
42
|
+
|
40
43
|
if options[:app_name].nil? || options[:app_name].squeeze.strip == ""
|
41
44
|
$stderr.puts options.opts
|
42
45
|
return 1
|
43
46
|
end
|
44
47
|
|
45
|
-
|
46
48
|
skeleton = File.dirname(__FILE__) + "/ubiquo/template.erb"
|
47
49
|
tpl = Tempfile.new('tmp')
|
48
50
|
File.open(tpl.path, 'w') do |file|
|
49
|
-
file.write Generator.build_template(options, skeleton)
|
51
|
+
file.write Generator.build_template(options, skeleton)
|
50
52
|
end
|
51
53
|
tpl.sync=true
|
52
|
-
system("rails
|
54
|
+
system("rails _#{options[:rails]}_ -m #{tpl.path} #{options[:app_name]}")
|
53
55
|
end
|
54
56
|
end
|
55
57
|
end
|
data/lib/ubiquo/template.erb
CHANGED
@@ -214,7 +214,7 @@ file 'config/environment.rb', <<-CODE
|
|
214
214
|
# Be sure to restart your server when you modify this file
|
215
215
|
|
216
216
|
# Specifies gem version of Rails to use when vendor/rails is not present
|
217
|
-
RAILS_GEM_VERSION = '
|
217
|
+
RAILS_GEM_VERSION = '<%= @opts[:rails] %>' unless defined? RAILS_GEM_VERSION
|
218
218
|
|
219
219
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
220
220
|
require File.join(File.dirname(__FILE__), 'boot')
|
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.3.
|
8
|
+
s.version = "0.3.3"
|
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-09-25}
|
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.8"])
|
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: 21
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
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-09-25 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: 19
|
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
|