radiant-asset_pipeline-extension 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +10 -0
- data/README.md +5 -0
- data/Rakefile +11 -0
- data/asset_pipeline_extension.rb +12 -0
- data/lib/asset_pipeline/asset_tags.rb +63 -0
- data/lib/radiant-asset_pipeline-extension.rb +9 -0
- data/lib/sprockets-rails2.rb +5 -0
- data/lib/sprockets/rails2/asset_helpers.rb +14 -0
- data/lib/sprockets/rails2/asset_pipeline.rb +23 -0
- data/lib/sprockets/rails2/middleware.rb +18 -0
- data/lib/sprockets/rails2/version.rb +5 -0
- data/radiant-asset_pipeline-extension.gemspec +30 -0
- data/test/dummy/README +243 -0
- data/test/dummy/Rakefile +10 -0
- data/test/dummy/app/controllers/application_controller.rb +10 -0
- data/test/dummy/app/controllers/test_controller.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +3 -0
- data/test/dummy/app/helpers/test_helper.rb +2 -0
- data/test/dummy/app/views/test/index.html.erb +15 -0
- data/test/dummy/config/boot.rb +114 -0
- data/test/dummy/config/environment.rb +43 -0
- data/test/dummy/config/environments/development.rb +17 -0
- data/test/dummy/config/environments/production.rb +28 -0
- data/test/dummy/config/environments/test.rb +28 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookie_verification_secret.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/new_rails_defaults.rb +21 -0
- data/test/dummy/config/initializers/session_store.rb +15 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +43 -0
- data/test/dummy/doc/README_FOR_APP +2 -0
- data/test/dummy/public/404.html +30 -0
- data/test/dummy/public/422.html +30 -0
- data/test/dummy/public/500.html +30 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/images/rails.png +0 -0
- data/test/dummy/public/index.html +275 -0
- data/test/dummy/public/javascripts/application.js +4 -0
- data/test/dummy/public/javascripts/controls.js +963 -0
- data/test/dummy/public/javascripts/dragdrop.js +973 -0
- data/test/dummy/public/javascripts/effects.js +1128 -0
- data/test/dummy/public/javascripts/prototype.js +4320 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/public/stylesheets/test.css +3 -0
- data/test/dummy/script/about +4 -0
- data/test/dummy/script/console +3 -0
- data/test/dummy/script/dbconsole +3 -0
- data/test/dummy/script/destroy +3 -0
- data/test/dummy/script/generate +3 -0
- data/test/dummy/script/performance/benchmarker +3 -0
- data/test/dummy/script/performance/profiler +3 -0
- data/test/dummy/script/plugin +3 -0
- data/test/dummy/script/runner +3 -0
- data/test/dummy/script/server +3 -0
- data/test/sprockets_rails2_test.rb +37 -0
- data/test/test_helper.rb +9 -0
- metadata +188 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "test_helper")
|
2
|
+
|
3
|
+
class SprocketRails2Test < ActionController::IntegrationTest
|
4
|
+
def test_add_rails_asset_pipeline
|
5
|
+
assert Rails.asset_pipeline.instance_of? Sprockets::Environment
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_fingerprint_in_stylesheet_urls
|
9
|
+
get "/test"
|
10
|
+
assert response.body =~ /test-a2eac1b10320f24cdd178f53df2effdd.css/
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_fingerprint_in_javascript_urls
|
14
|
+
get "/test"
|
15
|
+
assert response.body =~ /application-94d362ea70095a9c3b5181d17e793524.js/
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_fingerprint_in_image_urls
|
19
|
+
get "/test"
|
20
|
+
assert response.body =~ /rails-9add994b9c64a94f1557f1241c433c67.png/
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_respond_to_requests_under_assets
|
24
|
+
get "/assets/images/rails-9add994b9c64a94f1557f1241c433c67.png"
|
25
|
+
assert_response :success
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_should_not_modify_url_for_non_existing_assets
|
29
|
+
get "/test"
|
30
|
+
assert response.body =~ %r{src="/images/non-existing-file.png"}
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_respond_with_404_for_assets_with_invalid_fingerprint
|
34
|
+
get "/assets/images/rails-db31f719034fee4.png"
|
35
|
+
assert_response :missing
|
36
|
+
end
|
37
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: radiant-asset_pipeline-extension
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Melissa Choy
|
14
|
+
- Andrew Willis
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2011-11-11 00:00:00 +11:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: sprockets
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - "="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 15
|
31
|
+
segments:
|
32
|
+
- 2
|
33
|
+
- 0
|
34
|
+
- 0
|
35
|
+
version: 2.0.0
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
38
|
+
description: |-
|
39
|
+
Allows Radiant extensions to use the same asset pipeline functionality introduced in Rails 3.1.
|
40
|
+
Based on sprockets-rails2 gem by Andrew Willis
|
41
|
+
email:
|
42
|
+
- mel@otilas.com.au
|
43
|
+
executables: []
|
44
|
+
|
45
|
+
extensions: []
|
46
|
+
|
47
|
+
extra_rdoc_files: []
|
48
|
+
|
49
|
+
files:
|
50
|
+
- asset_pipeline_extension.rb
|
51
|
+
- Gemfile
|
52
|
+
- lib/asset_pipeline/asset_tags.rb
|
53
|
+
- lib/radiant-asset_pipeline-extension.rb
|
54
|
+
- lib/sprockets/rails2/asset_helpers.rb
|
55
|
+
- lib/sprockets/rails2/asset_pipeline.rb
|
56
|
+
- lib/sprockets/rails2/middleware.rb
|
57
|
+
- lib/sprockets/rails2/version.rb
|
58
|
+
- lib/sprockets-rails2.rb
|
59
|
+
- radiant-asset_pipeline-extension.gemspec
|
60
|
+
- Rakefile
|
61
|
+
- README.md
|
62
|
+
- test/dummy/app/controllers/application_controller.rb
|
63
|
+
- test/dummy/app/controllers/test_controller.rb
|
64
|
+
- test/dummy/app/helpers/application_helper.rb
|
65
|
+
- test/dummy/app/helpers/test_helper.rb
|
66
|
+
- test/dummy/app/views/test/index.html.erb
|
67
|
+
- test/dummy/config/boot.rb
|
68
|
+
- test/dummy/config/environment.rb
|
69
|
+
- test/dummy/config/environments/development.rb
|
70
|
+
- test/dummy/config/environments/production.rb
|
71
|
+
- test/dummy/config/environments/test.rb
|
72
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
73
|
+
- test/dummy/config/initializers/cookie_verification_secret.rb
|
74
|
+
- test/dummy/config/initializers/inflections.rb
|
75
|
+
- test/dummy/config/initializers/mime_types.rb
|
76
|
+
- test/dummy/config/initializers/new_rails_defaults.rb
|
77
|
+
- test/dummy/config/initializers/session_store.rb
|
78
|
+
- test/dummy/config/locales/en.yml
|
79
|
+
- test/dummy/config/routes.rb
|
80
|
+
- test/dummy/doc/README_FOR_APP
|
81
|
+
- test/dummy/public/404.html
|
82
|
+
- test/dummy/public/422.html
|
83
|
+
- test/dummy/public/500.html
|
84
|
+
- test/dummy/public/favicon.ico
|
85
|
+
- test/dummy/public/images/rails.png
|
86
|
+
- test/dummy/public/index.html
|
87
|
+
- test/dummy/public/javascripts/application.js
|
88
|
+
- test/dummy/public/javascripts/controls.js
|
89
|
+
- test/dummy/public/javascripts/dragdrop.js
|
90
|
+
- test/dummy/public/javascripts/effects.js
|
91
|
+
- test/dummy/public/javascripts/prototype.js
|
92
|
+
- test/dummy/public/robots.txt
|
93
|
+
- test/dummy/public/stylesheets/test.css
|
94
|
+
- test/dummy/Rakefile
|
95
|
+
- test/dummy/README
|
96
|
+
- test/dummy/script/about
|
97
|
+
- test/dummy/script/console
|
98
|
+
- test/dummy/script/dbconsole
|
99
|
+
- test/dummy/script/destroy
|
100
|
+
- test/dummy/script/generate
|
101
|
+
- test/dummy/script/performance/benchmarker
|
102
|
+
- test/dummy/script/performance/profiler
|
103
|
+
- test/dummy/script/plugin
|
104
|
+
- test/dummy/script/runner
|
105
|
+
- test/dummy/script/server
|
106
|
+
- test/sprockets_rails2_test.rb
|
107
|
+
- test/test_helper.rb
|
108
|
+
has_rdoc: true
|
109
|
+
homepage: http://github.com/melzz/radiant-asset_pipeline-extension
|
110
|
+
licenses: []
|
111
|
+
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
hash: 3
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
version: "0"
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
version: "0"
|
135
|
+
requirements: []
|
136
|
+
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 1.3.7
|
139
|
+
signing_key:
|
140
|
+
specification_version: 3
|
141
|
+
summary: Rails 3.1 Style Asset Pipeline for Radiant CMS
|
142
|
+
test_files:
|
143
|
+
- test/dummy/app/controllers/application_controller.rb
|
144
|
+
- test/dummy/app/controllers/test_controller.rb
|
145
|
+
- test/dummy/app/helpers/application_helper.rb
|
146
|
+
- test/dummy/app/helpers/test_helper.rb
|
147
|
+
- test/dummy/app/views/test/index.html.erb
|
148
|
+
- test/dummy/config/boot.rb
|
149
|
+
- test/dummy/config/environment.rb
|
150
|
+
- test/dummy/config/environments/development.rb
|
151
|
+
- test/dummy/config/environments/production.rb
|
152
|
+
- test/dummy/config/environments/test.rb
|
153
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
154
|
+
- test/dummy/config/initializers/cookie_verification_secret.rb
|
155
|
+
- test/dummy/config/initializers/inflections.rb
|
156
|
+
- test/dummy/config/initializers/mime_types.rb
|
157
|
+
- test/dummy/config/initializers/new_rails_defaults.rb
|
158
|
+
- test/dummy/config/initializers/session_store.rb
|
159
|
+
- test/dummy/config/locales/en.yml
|
160
|
+
- test/dummy/config/routes.rb
|
161
|
+
- test/dummy/doc/README_FOR_APP
|
162
|
+
- test/dummy/public/404.html
|
163
|
+
- test/dummy/public/422.html
|
164
|
+
- test/dummy/public/500.html
|
165
|
+
- test/dummy/public/favicon.ico
|
166
|
+
- test/dummy/public/images/rails.png
|
167
|
+
- test/dummy/public/index.html
|
168
|
+
- test/dummy/public/javascripts/application.js
|
169
|
+
- test/dummy/public/javascripts/controls.js
|
170
|
+
- test/dummy/public/javascripts/dragdrop.js
|
171
|
+
- test/dummy/public/javascripts/effects.js
|
172
|
+
- test/dummy/public/javascripts/prototype.js
|
173
|
+
- test/dummy/public/robots.txt
|
174
|
+
- test/dummy/public/stylesheets/test.css
|
175
|
+
- test/dummy/Rakefile
|
176
|
+
- test/dummy/README
|
177
|
+
- test/dummy/script/about
|
178
|
+
- test/dummy/script/console
|
179
|
+
- test/dummy/script/dbconsole
|
180
|
+
- test/dummy/script/destroy
|
181
|
+
- test/dummy/script/generate
|
182
|
+
- test/dummy/script/performance/benchmarker
|
183
|
+
- test/dummy/script/performance/profiler
|
184
|
+
- test/dummy/script/plugin
|
185
|
+
- test/dummy/script/runner
|
186
|
+
- test/dummy/script/server
|
187
|
+
- test/sprockets_rails2_test.rb
|
188
|
+
- test/test_helper.rb
|