ubiquo 0.4.5 → 0.4.6

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.
Files changed (6) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/lib/ubiquo/template.erb +81 -3
  4. data/ubiquo.gemspec +24 -24
  5. metadata +30 -15
  6. data/.gitignore +0 -22
data/Rakefile CHANGED
@@ -22,6 +22,7 @@ begin
22
22
  gem.add_dependency(%q<rails>, '= 2.3.11')
23
23
  gem.add_dependency(%q<i18n>, '< 0.5.0')
24
24
  gem.add_dependency(%q<lockfile>, '>= 1.4.3')
25
+ gem.add_dependency(%q<bundler>, '>= 1.0.10')
25
26
 
26
27
  gem.add_development_dependency(%q<mocha>, '>= 0.9.8')
27
28
  gem.add_development_dependency(%q<highline>, '>= 1.5.2')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.5
1
+ 0.4.6
@@ -225,7 +225,6 @@ production:
225
225
  <<: *base_config
226
226
  database: db/#{appname}_production.db
227
227
  CODE
228
-
229
228
  choosen_adapter = "<%= @opts[:database] %>"
230
229
  case choosen_adapter
231
230
  when "mysql" then file 'config/database.yml', mysql
@@ -276,7 +275,6 @@ Rails::Initializer.run do |config|
276
275
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
277
276
  # config.gem "aws-s3", :lib => "aws/s3"
278
277
  # config.gem "rmagick", :lib => 'RMagick'
279
- config.gem "lockfile"
280
278
 
281
279
  # Only load the plugins named here, in the order given (default is alphabetical).
282
280
  # :all can be used as a placeholder for all plugins not explicitly named
@@ -311,12 +309,92 @@ rake("rails:update")
311
309
  rake("calendardateselect:install")
312
310
  rake("ubiquo:install OVERWRITE=yes")
313
311
 
312
+ # Bundler setup
313
+ gsub_file 'config/boot.rb', /Rails\.boot!/ do <<-CODE
314
+ class Rails::Boot
315
+ def run
316
+ load_initializer
317
+
318
+ Rails::Initializer.class_eval do
319
+ def load_gems
320
+ @bundler_loaded ||= Bundler.require :default, Rails.env
321
+ end
322
+ end
323
+
324
+ Rails::Initializer.run(:set_load_path)
325
+ end
326
+ end
327
+
328
+ Rails.boot!
329
+ CODE
330
+ end
331
+ file 'config/preinitializer.rb', <<-CODE
332
+ begin
333
+ require "rubygems"
334
+ require "bundler"
335
+ rescue LoadError
336
+ raise "Could not load the bundler gem. Install it with `gem install bundler`."
337
+ end
338
+
339
+ if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
340
+ raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
341
+ "Run `gem install bundler` to upgrade."
342
+ end
343
+
344
+ begin
345
+ # Set up load paths for all bundled gems
346
+ ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
347
+ Bundler.setup
348
+ rescue Bundler::GemNotFound
349
+ raise RuntimeError, "Bundler couldn't find some gems." +
350
+ "Did you run `bundle install`?"
351
+ end
352
+ CODE
353
+ adapter_gem = case choosen_adapter
354
+ when "mysql" then "mysql"
355
+ when "sqlite" then "sqlite3"
356
+ else "pg"
357
+ end
358
+ jruby_adapter_gem = adapter_gem == "pg" ? "postgres" : adapter_gem
359
+ file 'Gemfile', <<-CODE
360
+ source "http://rubygems.org"
361
+
362
+ gem "rails", "= 2.3.11"
363
+ gem "lockfile", ">= 1.4.3"
364
+ gem "i18n", "< 0.5.0"
365
+ gem "#{adapter_gem}", :platforms => :mri_18
366
+
367
+ platforms :jruby do
368
+ gem "activerecord-jdbc-adapter", "~> 1.1.1"
369
+ gem "jdbc-#{jruby_adapter_gem}"
370
+ gem "jruby-openssl", "~> 0.7.3"
371
+ end
372
+
373
+ group :development do
374
+ gem "ruby-debug"
375
+ gem "ya2yaml", ">= 0.2.6"
376
+ gem "highline", ">= 1.5.2"
377
+ gem "ffi-ncurses", "~> 0.3.3", :platforms => :jruby
378
+ end
379
+
380
+ group :test do
381
+ gem "mocha", ">= 0.9.8"
382
+ end
383
+ CODE
384
+ # we need to take care of Jruby
385
+ <% if RUBY_PLATFORM =~ /java/ %>
386
+ run "jruby -S bundle install"
387
+ <% else %>
388
+ run "bundle install --without jruby"
389
+ <% end %>
390
+ # End of bundler setup
391
+
314
392
  <% if RUBY_PLATFORM =~ /java/ %>
315
393
  generate(:jdbc)
316
394
  <% end %>
317
395
 
318
396
  <% if @opts[:gnuine] %>
319
- rake("db:create:all")
397
+ rake("db:create:all")
320
398
  rake("ubiquo:db:reset")
321
399
  <% end %>
322
400
 
data/ubiquo.gemspec CHANGED
@@ -1,60 +1,58 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ubiquo}
8
- s.version = "0.4.5"
8
+ s.version = "0.4.6"
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{2011-02-22}
12
+ s.date = %q{2011-04-15}
13
13
  s.default_executable = %q{ubiquo}
14
14
  s.description = %q{This gem provides a command-line interface to speed up the creation of ubiquo based apps.}
15
15
  s.email = %q{rsalvado@gnuine.com}
16
16
  s.executables = ["ubiquo"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.rdoc"
19
+ "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
- ".gitignore",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/ubiquo",
29
- "lib/ubiquo.rb",
30
- "lib/ubiquo/generator.rb",
31
- "lib/ubiquo/options.rb",
32
- "lib/ubiquo/template.erb",
33
- "test/fixtures/template.erb",
34
- "test/helper.rb",
35
- "test/ubiquo/generator_test.rb",
36
- "test/ubiquo/options_test.rb",
37
- "ubiquo.gemspec"
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "bin/ubiquo",
28
+ "lib/ubiquo.rb",
29
+ "lib/ubiquo/generator.rb",
30
+ "lib/ubiquo/options.rb",
31
+ "lib/ubiquo/template.erb",
32
+ "test/fixtures/template.erb",
33
+ "test/helper.rb",
34
+ "test/ubiquo/generator_test.rb",
35
+ "test/ubiquo/options_test.rb",
36
+ "ubiquo.gemspec"
38
37
  ]
39
38
  s.homepage = %q{http://www.ubiquo.me}
40
- s.rdoc_options = ["--charset=UTF-8"]
41
39
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.7}
40
+ s.rubygems_version = %q{1.6.2}
43
41
  s.summary = %q{command line application for building ubiquo based applications.}
44
42
  s.test_files = [
45
43
  "test/helper.rb",
46
- "test/ubiquo/generator_test.rb",
47
- "test/ubiquo/options_test.rb"
44
+ "test/ubiquo/generator_test.rb",
45
+ "test/ubiquo/options_test.rb"
48
46
  ]
49
47
 
50
48
  if s.respond_to? :specification_version then
51
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
49
  s.specification_version = 3
53
50
 
54
51
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
52
  s.add_runtime_dependency(%q<rails>, ["= 2.3.11"])
56
53
  s.add_runtime_dependency(%q<i18n>, ["< 0.5.0"])
57
54
  s.add_runtime_dependency(%q<lockfile>, [">= 1.4.3"])
55
+ s.add_runtime_dependency(%q<bundler>, [">= 1.0.10"])
58
56
  s.add_development_dependency(%q<mocha>, [">= 0.9.8"])
59
57
  s.add_development_dependency(%q<highline>, [">= 1.5.2"])
60
58
  s.add_development_dependency(%q<ya2yaml>, [">= 0.26"])
@@ -62,6 +60,7 @@ Gem::Specification.new do |s|
62
60
  s.add_dependency(%q<rails>, ["= 2.3.11"])
63
61
  s.add_dependency(%q<i18n>, ["< 0.5.0"])
64
62
  s.add_dependency(%q<lockfile>, [">= 1.4.3"])
63
+ s.add_dependency(%q<bundler>, [">= 1.0.10"])
65
64
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
66
65
  s.add_dependency(%q<highline>, [">= 1.5.2"])
67
66
  s.add_dependency(%q<ya2yaml>, [">= 0.26"])
@@ -70,6 +69,7 @@ Gem::Specification.new do |s|
70
69
  s.add_dependency(%q<rails>, ["= 2.3.11"])
71
70
  s.add_dependency(%q<i18n>, ["< 0.5.0"])
72
71
  s.add_dependency(%q<lockfile>, [">= 1.4.3"])
72
+ s.add_dependency(%q<bundler>, [">= 1.0.10"])
73
73
  s.add_dependency(%q<mocha>, [">= 0.9.8"])
74
74
  s.add_dependency(%q<highline>, [">= 1.5.2"])
75
75
  s.add_dependency(%q<ya2yaml>, [">= 0.26"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubiquo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
5
- prerelease: false
4
+ hash: 3
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Albert Callarisa
@@ -21,7 +21,7 @@ autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
23
 
24
- date: 2011-02-22 00:00:00 +01:00
24
+ date: 2011-04-15 00:00:00 +02:00
25
25
  default_executable: ubiquo
26
26
  dependencies:
27
27
  - !ruby/object:Gem::Dependency
@@ -73,9 +73,25 @@ dependencies:
73
73
  type: :runtime
74
74
  version_requirements: *id003
75
75
  - !ruby/object:Gem::Dependency
76
- name: mocha
76
+ name: bundler
77
77
  prerelease: false
78
78
  requirement: &id004 !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 1
86
+ - 0
87
+ - 10
88
+ version: 1.0.10
89
+ type: :runtime
90
+ version_requirements: *id004
91
+ - !ruby/object:Gem::Dependency
92
+ name: mocha
93
+ prerelease: false
94
+ requirement: &id005 !ruby/object:Gem::Requirement
79
95
  none: false
80
96
  requirements:
81
97
  - - ">="
@@ -87,11 +103,11 @@ dependencies:
87
103
  - 8
88
104
  version: 0.9.8
89
105
  type: :development
90
- version_requirements: *id004
106
+ version_requirements: *id005
91
107
  - !ruby/object:Gem::Dependency
92
108
  name: highline
93
109
  prerelease: false
94
- requirement: &id005 !ruby/object:Gem::Requirement
110
+ requirement: &id006 !ruby/object:Gem::Requirement
95
111
  none: false
96
112
  requirements:
97
113
  - - ">="
@@ -103,11 +119,11 @@ dependencies:
103
119
  - 2
104
120
  version: 1.5.2
105
121
  type: :development
106
- version_requirements: *id005
122
+ version_requirements: *id006
107
123
  - !ruby/object:Gem::Dependency
108
124
  name: ya2yaml
109
125
  prerelease: false
110
- requirement: &id006 !ruby/object:Gem::Requirement
126
+ requirement: &id007 !ruby/object:Gem::Requirement
111
127
  none: false
112
128
  requirements:
113
129
  - - ">="
@@ -118,7 +134,7 @@ dependencies:
118
134
  - 26
119
135
  version: "0.26"
120
136
  type: :development
121
- version_requirements: *id006
137
+ version_requirements: *id007
122
138
  description: This gem provides a command-line interface to speed up the creation of ubiquo based apps.
123
139
  email: rsalvado@gnuine.com
124
140
  executables:
@@ -130,7 +146,6 @@ extra_rdoc_files:
130
146
  - README.rdoc
131
147
  files:
132
148
  - .document
133
- - .gitignore
134
149
  - LICENSE
135
150
  - README.rdoc
136
151
  - Rakefile
@@ -150,8 +165,8 @@ homepage: http://www.ubiquo.me
150
165
  licenses: []
151
166
 
152
167
  post_install_message:
153
- rdoc_options:
154
- - --charset=UTF-8
168
+ rdoc_options: []
169
+
155
170
  require_paths:
156
171
  - lib
157
172
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -175,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
190
  requirements: []
176
191
 
177
192
  rubyforge_project:
178
- rubygems_version: 1.3.7
193
+ rubygems_version: 1.6.2
179
194
  signing_key:
180
195
  specification_version: 3
181
196
  summary: command line application for building ubiquo based applications.
data/.gitignore DELETED
@@ -1,22 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
- TAGS
13
-
14
- ## VIM
15
- *.swp
16
-
17
- ## PROJECT::GENERAL
18
- coverage
19
- rdoc
20
- pkg
21
-
22
- ## PROJECT::SPECIFIC