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.
Files changed (59) hide show
  1. data/Gemfile +10 -0
  2. data/README.md +5 -0
  3. data/Rakefile +11 -0
  4. data/asset_pipeline_extension.rb +12 -0
  5. data/lib/asset_pipeline/asset_tags.rb +63 -0
  6. data/lib/radiant-asset_pipeline-extension.rb +9 -0
  7. data/lib/sprockets-rails2.rb +5 -0
  8. data/lib/sprockets/rails2/asset_helpers.rb +14 -0
  9. data/lib/sprockets/rails2/asset_pipeline.rb +23 -0
  10. data/lib/sprockets/rails2/middleware.rb +18 -0
  11. data/lib/sprockets/rails2/version.rb +5 -0
  12. data/radiant-asset_pipeline-extension.gemspec +30 -0
  13. data/test/dummy/README +243 -0
  14. data/test/dummy/Rakefile +10 -0
  15. data/test/dummy/app/controllers/application_controller.rb +10 -0
  16. data/test/dummy/app/controllers/test_controller.rb +2 -0
  17. data/test/dummy/app/helpers/application_helper.rb +3 -0
  18. data/test/dummy/app/helpers/test_helper.rb +2 -0
  19. data/test/dummy/app/views/test/index.html.erb +15 -0
  20. data/test/dummy/config/boot.rb +114 -0
  21. data/test/dummy/config/environment.rb +43 -0
  22. data/test/dummy/config/environments/development.rb +17 -0
  23. data/test/dummy/config/environments/production.rb +28 -0
  24. data/test/dummy/config/environments/test.rb +28 -0
  25. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  26. data/test/dummy/config/initializers/cookie_verification_secret.rb +7 -0
  27. data/test/dummy/config/initializers/inflections.rb +10 -0
  28. data/test/dummy/config/initializers/mime_types.rb +5 -0
  29. data/test/dummy/config/initializers/new_rails_defaults.rb +21 -0
  30. data/test/dummy/config/initializers/session_store.rb +15 -0
  31. data/test/dummy/config/locales/en.yml +5 -0
  32. data/test/dummy/config/routes.rb +43 -0
  33. data/test/dummy/doc/README_FOR_APP +2 -0
  34. data/test/dummy/public/404.html +30 -0
  35. data/test/dummy/public/422.html +30 -0
  36. data/test/dummy/public/500.html +30 -0
  37. data/test/dummy/public/favicon.ico +0 -0
  38. data/test/dummy/public/images/rails.png +0 -0
  39. data/test/dummy/public/index.html +275 -0
  40. data/test/dummy/public/javascripts/application.js +4 -0
  41. data/test/dummy/public/javascripts/controls.js +963 -0
  42. data/test/dummy/public/javascripts/dragdrop.js +973 -0
  43. data/test/dummy/public/javascripts/effects.js +1128 -0
  44. data/test/dummy/public/javascripts/prototype.js +4320 -0
  45. data/test/dummy/public/robots.txt +5 -0
  46. data/test/dummy/public/stylesheets/test.css +3 -0
  47. data/test/dummy/script/about +4 -0
  48. data/test/dummy/script/console +3 -0
  49. data/test/dummy/script/dbconsole +3 -0
  50. data/test/dummy/script/destroy +3 -0
  51. data/test/dummy/script/generate +3 -0
  52. data/test/dummy/script/performance/benchmarker +3 -0
  53. data/test/dummy/script/performance/profiler +3 -0
  54. data/test/dummy/script/plugin +3 -0
  55. data/test/dummy/script/runner +3 -0
  56. data/test/dummy/script/server +3 -0
  57. data/test/sprockets_rails2_test.rb +37 -0
  58. data/test/test_helper.rb +9 -0
  59. metadata +188 -0
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,3 @@
1
+ body {
2
+ background-color: white;
3
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/console'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/dbconsole'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/server'
@@ -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
@@ -0,0 +1,9 @@
1
+ $:.unshift File.dirname(__FILE__)
2
+
3
+ require 'bundler'
4
+ require 'minitest/autorun'
5
+ require 'minitest/spec'
6
+
7
+ ENV['RAILS_ENV'] = 'test'
8
+ require 'dummy/config/environment'
9
+ require 'test_help'
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