jquerypp-rails 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.document +5 -0
  2. data/.gitignore +7 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.rdoc +24 -0
  6. data/Rakefile +2 -0
  7. data/jquerypp-rails.gemspec +20 -0
  8. data/lib/jquerypp/generators/jquerypp/install/install_generator.rb +49 -0
  9. data/lib/jquerypp/rails/engine.rb +8 -0
  10. data/lib/jquerypp/rails/version.rb +6 -0
  11. data/lib/jquerypp/rails.rb +8 -0
  12. data/lib/jquerypp-rails.rb +1 -0
  13. data/vendor/assets/javascripts/jquerypp.js +5419 -0
  14. data/vendor/assets/javascripts/lib/jquery.animate.js +326 -0
  15. data/vendor/assets/javascripts/lib/jquery.compare.js +75 -0
  16. data/vendor/assets/javascripts/lib/jquery.cookie.js +118 -0
  17. data/vendor/assets/javascripts/lib/jquery.dimensions.js +191 -0
  18. data/vendor/assets/javascripts/lib/jquery.event.default.js +115 -0
  19. data/vendor/assets/javascripts/lib/jquery.event.destroyed.js +23 -0
  20. data/vendor/assets/javascripts/lib/jquery.event.drag.js +727 -0
  21. data/vendor/assets/javascripts/lib/jquery.event.drop.js +457 -0
  22. data/vendor/assets/javascripts/lib/jquery.event.fastfix.js +95 -0
  23. data/vendor/assets/javascripts/lib/jquery.event.hover.js +266 -0
  24. data/vendor/assets/javascripts/lib/jquery.event.key.js +156 -0
  25. data/vendor/assets/javascripts/lib/jquery.event.livehack.js +174 -0
  26. data/vendor/assets/javascripts/lib/jquery.event.pause.js +92 -0
  27. data/vendor/assets/javascripts/lib/jquery.event.resize.js +47 -0
  28. data/vendor/assets/javascripts/lib/jquery.event.swipe.js +133 -0
  29. data/vendor/assets/javascripts/lib/jquery.fills.js +249 -0
  30. data/vendor/assets/javascripts/lib/jquery.form_params.js +167 -0
  31. data/vendor/assets/javascripts/lib/jquery.lang.json.js +196 -0
  32. data/vendor/assets/javascripts/lib/jquery.lang.vector.js +214 -0
  33. data/vendor/assets/javascripts/lib/jquery.range.js +861 -0
  34. data/vendor/assets/javascripts/lib/jquery.selection.js +232 -0
  35. data/vendor/assets/javascripts/lib/jquery.styles.js +103 -0
  36. data/vendor/assets/javascripts/lib/jquery.within.js +94 -0
  37. metadata +81 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ pkg/*
2
+ tmp
3
+ spec/support/*/Gemfile.lock
4
+ spec/support/*/public/javascripts
5
+ .rvmrc
6
+ .bundle
7
+ imports/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source :gemcutter
2
+
3
+ # Specify your gem's dependencies in jquerypp-rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Jonathan Tapia
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,24 @@
1
+ # jquerypp-rails
2
+
3
+ jQuery++! For Rails! So great.
4
+
5
+ This gem provides:
6
+
7
+ * jQuery++
8
+
9
+ ## Installation
10
+
11
+ ```ruby
12
+ gem "jquerypp-rails"
13
+ ```
14
+
15
+ And run `bundle install`. The rest of the installation depends on
16
+ whether the asset pipeline is being used.
17
+
18
+ ### Rails 3.1 or greater (with asset pipeline *enabled*)
19
+
20
+ The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in `app/assets/javascripts/application.js` by default, add these lines:
21
+
22
+ ```js
23
+ //= require jquerypp
24
+ ```
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/jquerypp/rails/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "jquerypp-rails"
6
+ s.version = Jquerypp::Rails::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["Jonathan Tapia"]
9
+ s.email = ["jonathan.tapia@crowdint.com"]
10
+ s.homepage = "http://rubygems.org/gems/jquerypp-rails"
11
+ s.summary = "Use jQuery++ with Rails 3"
12
+ s.description = "This gem provides jQuery++ for your Rails 3 application."
13
+
14
+ s.required_rubygems_version = ">= 1.3.6"
15
+ s.rubyforge_project = "jquerypp-rails"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
+ s.require_path = 'lib'
20
+ end
@@ -0,0 +1,49 @@
1
+ require 'rails'
2
+
3
+ # Supply generator for Rails 3.0.x or if asset pipeline is not enabled
4
+ if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
5
+ module Jquerypp
6
+ module Generators
7
+ class InstallGenerator < ::Rails::Generators::Base
8
+
9
+ desc "This generator installs jQuery++ #{Jquerypp::Rails::JQUERYPP_VERSION}, jQuery++"
10
+ source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
11
+
12
+ def remove_prototype
13
+ Rails::PROTOTYPE_JS.each do |name|
14
+ remove_file "public/javascripts/#{name}.js"
15
+ end
16
+ end
17
+
18
+ def copy_jquerypp
19
+ say_status("copying", "jQuery++ (#{Jquerypp::Rails::JQUERY_VERSION})", :green)
20
+ copy_file "jquerypp.js", "public/javascripts/jquerypp.js"
21
+ end
22
+
23
+
24
+ def copy_jquerypp_lib
25
+ say_status("copying", "jQuery++ lib (#{Jquerypp::Rails::JQUERY_VERSION})", :green)
26
+ copy_file "lib/.*", "public/javascripts/lib"
27
+ end
28
+
29
+ end
30
+ end
31
+ end
32
+ else
33
+ module Jquery
34
+ module Generators
35
+ class InstallGenerator < ::Rails::Generators::Base
36
+ desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps"
37
+
38
+ def do_nothing
39
+ say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.")
40
+ say_status("", "The necessary files are already in your asset pipeline.")
41
+ say_status("", "Just add `//= require jquerypp` to your app/assets/javascripts/application.js")
42
+ say_status("", "If you upgraded your app from Rails 3.0 and still have jquerypp.js or rails.js in your javascripts, be sure to remove them.")
43
+ say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
44
+ # ok, nothing
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,8 @@
1
+ require "jquery/assert_select" if ::Rails.env.test?
2
+
3
+ module Jquery
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Jquerypp
2
+ module Rails
3
+ VERSION = "1.0"
4
+ JQUERYPP_VERSION = "1.0b2"
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ require 'jquerypp/rails/engine'
2
+ require 'jquerypp/rails/version'
3
+
4
+ module Jquery
5
+ module Rails
6
+ PROTOTYPE_JS = %w{prototype effects dragdrop controls}
7
+ end
8
+ end
@@ -0,0 +1 @@
1
+ require 'jquerypp/rails'