jquery_on_rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2010 Joe Khoobyar
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.
1
+ Copyright (c) 2010 Joe Khoobyar
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/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
+ gem 'rspec', '>= 2.0.0.beta.8'
4
+ require 'rspec'
5
+ import *Dir["devl/**/*.rake"]
3
6
 
4
7
  begin
5
8
  require 'jeweler'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jquery_on_rails}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joe Khoobyar"]
12
- s.date = %q{2010-05-23}
12
+ s.date = %q{2010-10-28}
13
13
  s.description = %q{A complete replacement for Rails 3 javascript helpers and unobstrusive javacript (ujs) using JQuery instead of prototype/scriptaculous}
14
14
  s.email = %q{joe@ankhcraft.com}
15
15
  s.extra_rdoc_files = [
@@ -36,7 +36,6 @@ Gem::Specification.new do |s|
36
36
  "spec/dummy/config/environment.rb",
37
37
  "spec/dummy/config/environments/test.rb",
38
38
  "spec/dummy/config/routes.rb",
39
- "spec/dummy/log/test.log",
40
39
  "spec/jquery_helper_spec.rb",
41
40
  "spec/jquery_on_rails_spec.rb",
42
41
  "spec/jquery_ui_helper_spec.rb",
@@ -7,7 +7,8 @@ module JQueryOnRails
7
7
  'Left' => {:mode=>:hide,:direction=>:horizontal}, 'Right' => {:mode=>:show,:direction=>:horizontal},
8
8
  'Out' => {:mode=>:hide,:direction=>nil}, 'In' => {:mode=>:show,:direction=>nil},
9
9
  :fadeIn => {:mode=>:primitive,:direction=>nil}, :fadeOut => {:mode=>:primitive,:direction=>nil},
10
- :animate => {:mode=>:primitive,:direction=>nil}, :puff => {:direction=>nil}, :size => {:direction=>nil},
10
+ :animate => {:mode=>:primitive,:direction=>nil}, :toggleSlide => {:direction=>:up},
11
+ :puff => {:direction=>nil}, :size => {:direction=>nil},
11
12
  :toggleAppear => {:direction=>nil,:mode=>"return element[name+(element.is(':hidden')?'In':'Out')](options);"}
12
13
  }.with_indifferent_access
13
14
 
@@ -1,29 +1,29 @@
1
- require 'jquery_on_rails'
1
+ require 'jquery_on_rails'
2
2
  require 'rails'
3
-
4
- class JQueryOnRails::Railtie < Rails::Railtie
5
-
6
- initializer "jquery_on_rails.action_view_helpers" do
7
- ActiveSupport.on_load(:action_view) do
8
- # We want to override Prototype and Scriptaculous - include them first.
9
- require 'action_view/helpers'
10
- require 'action_view/helpers/javascript_helper'
11
- require 'action_view/helpers/prototype_helper'
12
- require 'action_view/helpers/scriptaculous_helper'
13
-
14
- # Include our helpers that override everything.
15
- require 'jquery_on_rails/helpers/jquery_helper'
16
- ActionView::Helpers::JavaScriptHelper.send :include, JQueryOnRails::Helpers::JQueryHelper
17
- ActionView::Helpers.send :include, JQueryOnRails::Helpers::JQueryHelper
18
- ActionView::Base.send :include, JQueryOnRails::Helpers::JQueryHelper
19
-
20
- # Redefine the default sources so that we don't try to include prototype JS files.
21
- require 'action_view/helpers/asset_tag_helper'
22
- ActionView::Helpers::AssetTagHelper.class_eval do
23
- remove_const :JAVASCRIPT_DEFAULT_SOURCES if const_defined? :JAVASCRIPT_DEFAULT_SOURCES
24
- const_set :JAVASCRIPT_DEFAULT_SOURCES, %w/jquery rails/
25
- reset_javascript_include_default
26
- end
27
- end
28
- end
29
- end
3
+
4
+ class JQueryOnRails::Railtie < Rails::Railtie
5
+
6
+ initializer "jquery_on_rails.action_view_helpers" do
7
+ ActiveSupport.on_load(:action_view) do
8
+ # We want to override Prototype and Scriptaculous - include them first.
9
+ require 'action_view/helpers'
10
+ require 'action_view/helpers/javascript_helper'
11
+ require 'action_view/helpers/prototype_helper'
12
+ require 'action_view/helpers/scriptaculous_helper'
13
+
14
+ # Include our helpers that override everything.
15
+ require 'jquery_on_rails/helpers/jquery_helper'
16
+ ActionView::Helpers::JavaScriptHelper.send :include, JQueryOnRails::Helpers::JQueryHelper
17
+ ActionView::Helpers.send :include, JQueryOnRails::Helpers::JQueryHelper
18
+ ActionView::Base.send :include, JQueryOnRails::Helpers::JQueryHelper
19
+
20
+ # Redefine the default sources so that we don't try to include prototype JS files.
21
+ require 'action_view/helpers/asset_tag_helper'
22
+ ActionView::Helpers::AssetTagHelper.class_eval do
23
+ remove_const :JAVASCRIPT_DEFAULT_SOURCES if const_defined? :JAVASCRIPT_DEFAULT_SOURCES
24
+ const_set :JAVASCRIPT_DEFAULT_SOURCES, %w/jquery rails/
25
+ reset_javascript_include_default
26
+ end
27
+ end
28
+ end
29
+ end
@@ -1,5 +1,5 @@
1
- class DummyController < ActionController::Base
2
-
3
- protect_from_forgery
4
-
5
- end
1
+ class DummyController < ActionController::Base
2
+
3
+ protect_from_forgery
4
+
5
+ end
@@ -1,2 +1,2 @@
1
- module DummyHelper
2
- end
1
+ module DummyHelper
2
+ end
@@ -1,3 +1,3 @@
1
- require 'rubygems'
2
-
3
- $:.unshift File.expand_path('../../../../lib', __FILE__)
1
+ require 'rubygems'
2
+
3
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,5 +1,5 @@
1
- # Load the rails application
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,6 @@
1
+ Dummy::Application.configure do
2
+ config.cache_classes = true
3
+ config.consider_all_requests_local = true
4
+ config.log_level = :debug
5
+ config.threadsafe!
6
+ end
@@ -38,7 +38,7 @@ describe JQueryOnRails::Helpers::JQueryUiHelper do
38
38
  %(jQuery("#blah").show('blind',{direction:'vertical'});)
39
39
  end
40
40
  it "uses jQuery UI toggle effects" do
41
- @t.visual_effect(:toggle_slide,'blah').should == %(jQuery("#blah").toggle('slide',{direction:'vertical'});)
41
+ @t.visual_effect(:toggle_slide,'blah').should == %(jQuery("#blah").toggle('slide',{direction:'up'});)
42
42
  @t.visual_effect(:toggle_blind,'blah').should == %(jQuery("#blah").toggle('blind',{direction:'vertical'});)
43
43
  @t.visual_effect(:toggle_blind,'blah',:direction=>:horizontal).should ==
44
44
  %(jQuery("#blah").toggle('blind',{direction:'horizontal'});)
@@ -52,4 +52,4 @@ describe JQueryOnRails::Helpers::JQueryUiHelper do
52
52
  "(function(element,name,options){ #{body} })(jQuery(\"#blah\"),'fade');"
53
53
  end
54
54
  end
55
- end
55
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joe Khoobyar
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-23 00:00:00 -04:00
17
+ date: 2010-10-28 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -77,7 +77,6 @@ files:
77
77
  - spec/dummy/config/environment.rb
78
78
  - spec/dummy/config/environments/test.rb
79
79
  - spec/dummy/config/routes.rb
80
- - spec/dummy/log/test.log
81
80
  - spec/jquery_helper_spec.rb
82
81
  - spec/jquery_on_rails_spec.rb
83
82
  - spec/jquery_ui_helper_spec.rb
File without changes