jquery-rails 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jquery-rails might be problematic. Click here for more details.
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +10 -7
- data/jquery-rails.gemspec +1 -0
- data/lib/generators/jquery/install/install_generator.rb +1 -1
- data/lib/jquery-rails/version.rb +1 -1
- data/spec/lib/jquery-rails_spec.rb +29 -5
- data/spec/support/custom_app/Gemfile +1 -1
- data/spec/support/default_app/Gemfile +1 -1
- data/spec/support/default_app/config.ru +1 -1
- data/spec/support/default_app/config/application.rb +1 -1
- data/spec/support/default_app/config/environment.rb +1 -1
- data/spec/support/default_app/config/environments/development.rb +1 -1
- data/spec/support/default_app/config/environments/production.rb +1 -1
- data/spec/support/default_app/config/environments/test.rb +1 -1
- data/spec/support/default_app/config/routes.rb +1 -1
- metadata +34 -10
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jquery-rails (0.2.
|
4
|
+
jquery-rails (0.2.4)
|
5
5
|
rails (~> 3.0)
|
6
|
+
thor (~> 0.14.4)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: http://rubygems.org/
|
@@ -41,11 +42,12 @@ GEM
|
|
41
42
|
crack (0.1.8)
|
42
43
|
erubis (2.6.6)
|
43
44
|
abstract (>= 1.0.0)
|
44
|
-
i18n (0.4.
|
45
|
-
mail (2.2.
|
45
|
+
i18n (0.4.2)
|
46
|
+
mail (2.2.9)
|
46
47
|
activesupport (>= 2.3.6)
|
47
|
-
|
48
|
-
|
48
|
+
i18n (~> 0.4.1)
|
49
|
+
mime-types (~> 1.16)
|
50
|
+
treetop (~> 1.4.8)
|
49
51
|
mime-types (1.16)
|
50
52
|
polyglot (0.3.1)
|
51
53
|
rack (1.2.1)
|
@@ -67,8 +69,8 @@ GEM
|
|
67
69
|
rake (>= 0.8.4)
|
68
70
|
thor (~> 0.14.0)
|
69
71
|
rake (0.8.7)
|
70
|
-
rspec (1.3.
|
71
|
-
thor (0.14.
|
72
|
+
rspec (1.3.1)
|
73
|
+
thor (0.14.4)
|
72
74
|
treetop (1.4.8)
|
73
75
|
polyglot (>= 0.3.1)
|
74
76
|
tzinfo (0.3.23)
|
@@ -84,4 +86,5 @@ DEPENDENCIES
|
|
84
86
|
jquery-rails!
|
85
87
|
rails (~> 3.0)
|
86
88
|
rspec (~> 1.3)
|
89
|
+
thor (~> 0.14.4)
|
87
90
|
webmock (~> 1.4.0)
|
data/jquery-rails.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "jquery-rails"
|
16
16
|
|
17
17
|
s.add_dependency "rails", "~> 3.0"
|
18
|
+
s.add_dependency "thor", "~>0.14.4"
|
18
19
|
s.add_development_dependency "bundler", "~> 1.0.0"
|
19
20
|
s.add_development_dependency "rspec", "~> 1.3"
|
20
21
|
s.add_development_dependency "webmock", "~> 1.4.0"
|
@@ -31,7 +31,7 @@ module Jquery
|
|
31
31
|
|
32
32
|
def download_ujs_driver
|
33
33
|
say_status("fetching", "jQuery UJS adapter (github HEAD)", :green)
|
34
|
-
get "
|
34
|
+
get "https://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
data/lib/jquery-rails/version.rb
CHANGED
@@ -14,12 +14,36 @@ describe "The jQuery-Rails railtie" do
|
|
14
14
|
get_js_defaults("custom").should == ["foo", "bar", "baz"].inspect
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
it "ouputs with .js extensions in production" do
|
18
|
+
get_javascript_include_tag("default").should =~ /jquery.min.js/
|
19
|
+
end
|
20
|
+
|
21
|
+
it "outputs with .js extensions in development" do
|
22
|
+
get_javascript_include_tag("default", "development").should =~ /jquery.js/
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
# Helper methods
|
27
|
+
|
28
|
+
def get_js_defaults(app, env = "production")
|
29
|
+
cmd = "Rails.application.config.action_view.
|
30
|
+
javascript_expansions[:defaults]"
|
31
|
+
run(app, cmd, env)
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_javascript_include_tag(app, env = "production")
|
35
|
+
cmd = "Rails.application.config.action_controller.
|
36
|
+
each{|k,v| ActionController::Base.helpers.config[k]=v} &&
|
37
|
+
ActionController::Base.helpers.javascript_include_tag(:defaults)"
|
38
|
+
run(app, cmd, env)
|
39
|
+
end
|
40
|
+
|
41
|
+
def run(app, expr, env)
|
42
|
+
dir = File.expand_path("../../support/#{app}_app", __FILE__)
|
19
43
|
Dir.chdir(dir) do
|
20
|
-
`bundle install --local`
|
21
|
-
|
22
|
-
|
44
|
+
`bundle check || bundle install --local`
|
45
|
+
cmd = "rails runner -e #{env} 'puts #{expr}.inspect'"
|
46
|
+
`#{cmd}`.chomp
|
23
47
|
end
|
24
48
|
end
|
25
49
|
|
@@ -6,7 +6,7 @@ require 'rails/all'
|
|
6
6
|
# you've limited to :test, :development, or :production.
|
7
7
|
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
8
|
|
9
|
-
module
|
9
|
+
module DefaultApp
|
10
10
|
class Application < Rails::Application
|
11
11
|
# Settings in config/environments/* take precedence over those specified here.
|
12
12
|
# Application configuration should go into files in config/initializers
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Andr\xC3\xA9 Arko"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-04 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -34,9 +34,25 @@ dependencies:
|
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
37
|
+
name: thor
|
38
38
|
prerelease: false
|
39
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 47
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 14
|
48
|
+
- 4
|
49
|
+
version: 0.14.4
|
50
|
+
type: :runtime
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: bundler
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
56
|
none: false
|
41
57
|
requirements:
|
42
58
|
- - ~>
|
@@ -48,11 +64,11 @@ dependencies:
|
|
48
64
|
- 0
|
49
65
|
version: 1.0.0
|
50
66
|
type: :development
|
51
|
-
version_requirements: *
|
67
|
+
version_requirements: *id003
|
52
68
|
- !ruby/object:Gem::Dependency
|
53
69
|
name: rspec
|
54
70
|
prerelease: false
|
55
|
-
requirement: &
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
56
72
|
none: false
|
57
73
|
requirements:
|
58
74
|
- - ~>
|
@@ -63,11 +79,11 @@ dependencies:
|
|
63
79
|
- 3
|
64
80
|
version: "1.3"
|
65
81
|
type: :development
|
66
|
-
version_requirements: *
|
82
|
+
version_requirements: *id004
|
67
83
|
- !ruby/object:Gem::Dependency
|
68
84
|
name: webmock
|
69
85
|
prerelease: false
|
70
|
-
requirement: &
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
71
87
|
none: false
|
72
88
|
requirements:
|
73
89
|
- - ~>
|
@@ -79,7 +95,7 @@ dependencies:
|
|
79
95
|
- 0
|
80
96
|
version: 1.4.0
|
81
97
|
type: :development
|
82
|
-
version_requirements: *
|
98
|
+
version_requirements: *id005
|
83
99
|
description: This gem provides a Rails generator to install jQuery and the jQuery-ujs driver into your Rails 3 application, and then have them included automatically instead of Prototype.
|
84
100
|
email:
|
85
101
|
- andre@arko.net
|
@@ -127,6 +143,14 @@ files:
|
|
127
143
|
- spec/support/default_app/config/environments/production.rb
|
128
144
|
- spec/support/default_app/config/environments/test.rb
|
129
145
|
- spec/support/default_app/config/routes.rb
|
146
|
+
- spec/support/default_app/public/javascripts/application.js
|
147
|
+
- spec/support/default_app/public/javascripts/controls.js
|
148
|
+
- spec/support/default_app/public/javascripts/dragdrop.js
|
149
|
+
- spec/support/default_app/public/javascripts/effects.js
|
150
|
+
- spec/support/default_app/public/javascripts/jquery.js
|
151
|
+
- spec/support/default_app/public/javascripts/jquery.min.js
|
152
|
+
- spec/support/default_app/public/javascripts/prototype.js
|
153
|
+
- spec/support/default_app/public/javascripts/rails.js
|
130
154
|
- spec/support/default_app/script/rails
|
131
155
|
has_rdoc: true
|
132
156
|
homepage: http://rubygems.org/gems/jquery-rails
|