rails3-generators 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,10 @@
2
2
  * Grow Mustache up.(fix the TODOs and move the source to a mustache-rails like gem)
3
3
  * Write some documentation. (In both the github wiki and the source code)
4
4
 
5
+ == 0.12.0
6
+ * enhancements
7
+ * added jqueryui (ProGNOMmers [Maurizio])
8
+
5
9
  == 0.11.0
6
10
  * enhancements
7
11
  * Added new mongo_mapper generator for mongo mapper 0.8 with lots of extra features [Kristian Mandrup]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.12.0
@@ -4,6 +4,7 @@ module Jquery
4
4
  module Generators
5
5
  class InstallGenerator < Rails::Generators::Base
6
6
  extend TemplatePath
7
+ class_option :jqueryui, :type => :boolean, :default => false, :desc => "Indicates when to Include JQueryUI (minified version; source: Google Libraries API)"
7
8
 
8
9
  def download_jquery_files
9
10
  %w(controls.js dragdrop.js effects.js prototype.js rails.js).each do |js|
@@ -17,6 +18,11 @@ module Jquery
17
18
  get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"
18
19
  end
19
20
 
21
+ def download_jqueryui_files
22
+ # Downloading latest jQueryUI minified
23
+ get "http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js", "public/javascripts/jqueryui.js" if options.jqueryui?
24
+ end
25
+
20
26
  def show_readme
21
27
  readme "README"
22
28
  end
@@ -6,5 +6,11 @@ Some manual steps you have to do
6
6
  1. Uncomment or add the following to you application.rb file:
7
7
 
8
8
  config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
9
+
10
+ or if you used included jquery ui
11
+
12
+ config.action_view.javascript_expansions[:defaults] = %w(jquery jqueryui rails)
13
+
14
+ 2. Rerun the generator to update the javascript files
9
15
 
10
16
  ===============================================================================
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails3-generators}
8
- s.version = "0.11.0"
8
+ s.version = "0.12.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jose Valim", "Anuj Dutta", "Paul Berry", "Jeff Tucker", "Louis T.", "Jai-Gouk Kim", "Darcy Laycock", "Peter Haza", "Peter Gumeson", "Kristian Mandrup"]
12
- s.date = %q{2010-07-22}
12
+ s.date = %q{2010-08-03}
13
13
  s.description = %q{Rails 3 compatible generators for DataMapper, Haml, Factory-girl, Authlogic, Mongomapper, Mongoid, Shoulda, Formtastic and SimpleForm}
14
14
  s.email = %q{andre@arko.net}
15
15
  s.extra_rdoc_files = [
@@ -151,7 +151,7 @@ Gem::Specification.new do |s|
151
151
  ]
152
152
  s.homepage = %q{http://github.com/indirect/rails3-generators}
153
153
  s.post_install_message = %q{
154
- rails3-generators-0.11.0
154
+ rails3-generators-0.12.0
155
155
 
156
156
  Be sure to check out the wiki, http://wiki.github.com/indirect/rails3-generators/,
157
157
  for information about recent changes to this project.
@@ -13,4 +13,11 @@ class Jquery::Generators::InstallGeneratorTest < Rails::Generators::TestCase
13
13
  %w(jquery.js rails.js).each { |js| assert_file "public/javascripts/#{js}" }
14
14
  %w(controls.js dragdrop.js effects.js prototype.js).each { |js| assert_no_file "public/javascripts/#{js}" }
15
15
  end
16
+
17
+ test 'jquery is installed with jqueyui' do
18
+ run_generator %w(--jqueryui)
19
+
20
+ %w(jquery.js jqueryui.js rails.js).each { |js| assert_file "public/javascripts/#{js}" }
21
+ %w(controls.js dragdrop.js effects.js prototype.js).each { |js| assert_no_file "public/javascripts/#{js}" }
22
+ end
16
23
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 11
7
+ - 12
8
8
  - 0
9
- version: 0.11.0
9
+ version: 0.12.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jose Valim
@@ -23,7 +23,7 @@ autorequire:
23
23
  bindir: bin
24
24
  cert_chain: []
25
25
 
26
- date: 2010-07-22 00:00:00 -04:00
26
+ date: 2010-08-03 00:00:00 -04:00
27
27
  default_executable:
28
28
  dependencies: []
29
29
 
@@ -173,7 +173,7 @@ homepage: http://github.com/indirect/rails3-generators
173
173
  licenses: []
174
174
 
175
175
  post_install_message: "\n\
176
- rails3-generators-0.11.0\n\n\
176
+ rails3-generators-0.12.0\n\n\
177
177
  Be sure to check out the wiki, http://wiki.github.com/indirect/rails3-generators/,\n\
178
178
  for information about recent changes to this project.\n \n\
179
179
  note: ORM :datamapper has been renamed to :data_mapper\n\