jquerypp-rails 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +24 -0
- data/Rakefile +2 -0
- data/jquerypp-rails.gemspec +20 -0
- data/lib/jquerypp/generators/jquerypp/install/install_generator.rb +49 -0
- data/lib/jquerypp/rails/engine.rb +8 -0
- data/lib/jquerypp/rails/version.rb +6 -0
- data/lib/jquerypp/rails.rb +8 -0
- data/lib/jquerypp-rails.rb +1 -0
- data/vendor/assets/javascripts/jquerypp.js +5419 -0
- data/vendor/assets/javascripts/lib/jquery.animate.js +326 -0
- data/vendor/assets/javascripts/lib/jquery.compare.js +75 -0
- data/vendor/assets/javascripts/lib/jquery.cookie.js +118 -0
- data/vendor/assets/javascripts/lib/jquery.dimensions.js +191 -0
- data/vendor/assets/javascripts/lib/jquery.event.default.js +115 -0
- data/vendor/assets/javascripts/lib/jquery.event.destroyed.js +23 -0
- data/vendor/assets/javascripts/lib/jquery.event.drag.js +727 -0
- data/vendor/assets/javascripts/lib/jquery.event.drop.js +457 -0
- data/vendor/assets/javascripts/lib/jquery.event.fastfix.js +95 -0
- data/vendor/assets/javascripts/lib/jquery.event.hover.js +266 -0
- data/vendor/assets/javascripts/lib/jquery.event.key.js +156 -0
- data/vendor/assets/javascripts/lib/jquery.event.livehack.js +174 -0
- data/vendor/assets/javascripts/lib/jquery.event.pause.js +92 -0
- data/vendor/assets/javascripts/lib/jquery.event.resize.js +47 -0
- data/vendor/assets/javascripts/lib/jquery.event.swipe.js +133 -0
- data/vendor/assets/javascripts/lib/jquery.fills.js +249 -0
- data/vendor/assets/javascripts/lib/jquery.form_params.js +167 -0
- data/vendor/assets/javascripts/lib/jquery.lang.json.js +196 -0
- data/vendor/assets/javascripts/lib/jquery.lang.vector.js +214 -0
- data/vendor/assets/javascripts/lib/jquery.range.js +861 -0
- data/vendor/assets/javascripts/lib/jquery.selection.js +232 -0
- data/vendor/assets/javascripts/lib/jquery.styles.js +103 -0
- data/vendor/assets/javascripts/lib/jquery.within.js +94 -0
- metadata +81 -0
data/.document
ADDED
data/.gitignore
ADDED
data/Gemfile
ADDED
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,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 @@
|
|
1
|
+
require 'jquerypp/rails'
|