cdn_sumo_sprockets_rails2 0.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 (54) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +10 -0
  3. data/README.md +0 -0
  4. data/Rakefile +11 -0
  5. data/cdn_sumo_sprockets_rails2.gemspec +23 -0
  6. data/lib/cdn_sumo_sprockets_rails2.rb +16 -0
  7. data/lib/cdn_sumo_sprockets_rails2/rails2/asset_helpers.rb +14 -0
  8. data/lib/cdn_sumo_sprockets_rails2/rails2/asset_pipeline.rb +21 -0
  9. data/lib/cdn_sumo_sprockets_rails2/rails2/middleware.rb +21 -0
  10. data/lib/cdn_sumo_sprockets_rails2/rails2/version.rb +5 -0
  11. data/lib/cdn_sumo_sprockets_rails2/tasks.rb +1 -0
  12. data/lib/cdn_sumo_sprockets_rails2/tasks/assets.rake +75 -0
  13. data/test/dummy/.gitignore +1 -0
  14. data/test/dummy/README +243 -0
  15. data/test/dummy/Rakefile +8 -0
  16. data/test/dummy/app/assets/images/rails.png +0 -0
  17. data/test/dummy/app/assets/javascripts/application.js +4 -0
  18. data/test/dummy/app/assets/javascripts/controls.js +963 -0
  19. data/test/dummy/app/assets/javascripts/dragdrop.js +973 -0
  20. data/test/dummy/app/assets/javascripts/effects.js +1128 -0
  21. data/test/dummy/app/assets/javascripts/prototype.js +4320 -0
  22. data/test/dummy/app/assets/stylesheets/test.css +3 -0
  23. data/test/dummy/app/controllers/application_controller.rb +10 -0
  24. data/test/dummy/app/controllers/test_controller.rb +2 -0
  25. data/test/dummy/app/helpers/application_helper.rb +3 -0
  26. data/test/dummy/app/helpers/test_helper.rb +2 -0
  27. data/test/dummy/app/views/test/index.html.erb +15 -0
  28. data/test/dummy/config/boot.rb +114 -0
  29. data/test/dummy/config/environment.rb +43 -0
  30. data/test/dummy/config/environments/development.rb +17 -0
  31. data/test/dummy/config/environments/production.rb +28 -0
  32. data/test/dummy/config/environments/test.rb +28 -0
  33. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  34. data/test/dummy/config/initializers/cookie_verification_secret.rb +7 -0
  35. data/test/dummy/config/initializers/inflections.rb +10 -0
  36. data/test/dummy/config/initializers/mime_types.rb +5 -0
  37. data/test/dummy/config/initializers/new_rails_defaults.rb +21 -0
  38. data/test/dummy/config/initializers/session_store.rb +15 -0
  39. data/test/dummy/config/locales/en.yml +5 -0
  40. data/test/dummy/config/routes.rb +43 -0
  41. data/test/dummy/doc/README_FOR_APP +2 -0
  42. data/test/dummy/script/about +4 -0
  43. data/test/dummy/script/console +3 -0
  44. data/test/dummy/script/dbconsole +3 -0
  45. data/test/dummy/script/destroy +3 -0
  46. data/test/dummy/script/generate +3 -0
  47. data/test/dummy/script/performance/benchmarker +3 -0
  48. data/test/dummy/script/performance/profiler +3 -0
  49. data/test/dummy/script/plugin +3 -0
  50. data/test/dummy/script/runner +3 -0
  51. data/test/dummy/script/server +3 -0
  52. data/test/sprockets_rails2_test.rb +37 -0
  53. data/test/test_helper.rb +10 -0
  54. metadata +159 -0
@@ -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 "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-65a13fe6d5f53bd73b2b5623bf8ef244.css/
11
+ end
12
+
13
+ def test_fingerprint_in_javascript_urls
14
+ get "/test"
15
+ assert response.body =~ /application-40dee5efe056d7299ee6c103223d7335.js/
16
+ end
17
+
18
+ def test_fingerprint_in_image_urls
19
+ get "/test"
20
+ assert response.body =~ /rails-ff9aaa136b36bf525402d4a0b436420f.png/
21
+ end
22
+
23
+ def test_respond_to_requests_under_assets
24
+ get "/assets/rails-ff9aaa136b36bf525402d4a0b436420f.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{http://www.example.com/non-existing-file.png}
31
+ end
32
+
33
+ def test_respond_with_404_for_assets_with_invalid_fingerprint
34
+ get "/assets/rails-db31f719034fzzaqeee4.png"
35
+ assert_response :missing
36
+ end
37
+ end
@@ -0,0 +1,10 @@
1
+ $:.unshift File.dirname(__FILE__)
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ require 'minitest/autorun'
6
+ require 'minitest/spec'
7
+
8
+ ENV['RAILS_ENV'] = 'test'
9
+ require 'dummy/config/environment'
10
+ require 'test_help'
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cdn_sumo_sprockets_rails2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Richard Schneeman
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sprockets
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.8.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.8.2
30
+ description: ! "The gem allows Rails 2.3 apps to use the\n same
31
+ asset pipeline functionality introduced in Rails 3.1.\n It does
32
+ this by integrating the Sprockets gem into a Rails\n 2.3 app,
33
+ and automatically applying configuration for CDN Sumo "
34
+ email:
35
+ - richard.schneeman@gmail.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - .gitignore
41
+ - Gemfile
42
+ - README.md
43
+ - Rakefile
44
+ - cdn_sumo_sprockets_rails2.gemspec
45
+ - lib/cdn_sumo_sprockets_rails2.rb
46
+ - lib/cdn_sumo_sprockets_rails2/rails2/asset_helpers.rb
47
+ - lib/cdn_sumo_sprockets_rails2/rails2/asset_pipeline.rb
48
+ - lib/cdn_sumo_sprockets_rails2/rails2/middleware.rb
49
+ - lib/cdn_sumo_sprockets_rails2/rails2/version.rb
50
+ - lib/cdn_sumo_sprockets_rails2/tasks.rb
51
+ - lib/cdn_sumo_sprockets_rails2/tasks/assets.rake
52
+ - test/dummy/.gitignore
53
+ - test/dummy/README
54
+ - test/dummy/Rakefile
55
+ - test/dummy/app/assets/images/rails.png
56
+ - test/dummy/app/assets/javascripts/application.js
57
+ - test/dummy/app/assets/javascripts/controls.js
58
+ - test/dummy/app/assets/javascripts/dragdrop.js
59
+ - test/dummy/app/assets/javascripts/effects.js
60
+ - test/dummy/app/assets/javascripts/prototype.js
61
+ - test/dummy/app/assets/stylesheets/test.css
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/script/about
82
+ - test/dummy/script/console
83
+ - test/dummy/script/dbconsole
84
+ - test/dummy/script/destroy
85
+ - test/dummy/script/generate
86
+ - test/dummy/script/performance/benchmarker
87
+ - test/dummy/script/performance/profiler
88
+ - test/dummy/script/plugin
89
+ - test/dummy/script/runner
90
+ - test/dummy/script/server
91
+ - test/sprockets_rails2_test.rb
92
+ - test/test_helper.rb
93
+ homepage: ''
94
+ licenses: []
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 1.8.24
114
+ signing_key:
115
+ specification_version: 3
116
+ summary: Provides asset pipeline and CDN Sumo functionality to Rails 2.3
117
+ test_files:
118
+ - test/dummy/.gitignore
119
+ - test/dummy/README
120
+ - test/dummy/Rakefile
121
+ - test/dummy/app/assets/images/rails.png
122
+ - test/dummy/app/assets/javascripts/application.js
123
+ - test/dummy/app/assets/javascripts/controls.js
124
+ - test/dummy/app/assets/javascripts/dragdrop.js
125
+ - test/dummy/app/assets/javascripts/effects.js
126
+ - test/dummy/app/assets/javascripts/prototype.js
127
+ - test/dummy/app/assets/stylesheets/test.css
128
+ - test/dummy/app/controllers/application_controller.rb
129
+ - test/dummy/app/controllers/test_controller.rb
130
+ - test/dummy/app/helpers/application_helper.rb
131
+ - test/dummy/app/helpers/test_helper.rb
132
+ - test/dummy/app/views/test/index.html.erb
133
+ - test/dummy/config/boot.rb
134
+ - test/dummy/config/environment.rb
135
+ - test/dummy/config/environments/development.rb
136
+ - test/dummy/config/environments/production.rb
137
+ - test/dummy/config/environments/test.rb
138
+ - test/dummy/config/initializers/backtrace_silencers.rb
139
+ - test/dummy/config/initializers/cookie_verification_secret.rb
140
+ - test/dummy/config/initializers/inflections.rb
141
+ - test/dummy/config/initializers/mime_types.rb
142
+ - test/dummy/config/initializers/new_rails_defaults.rb
143
+ - test/dummy/config/initializers/session_store.rb
144
+ - test/dummy/config/locales/en.yml
145
+ - test/dummy/config/routes.rb
146
+ - test/dummy/doc/README_FOR_APP
147
+ - test/dummy/script/about
148
+ - test/dummy/script/console
149
+ - test/dummy/script/dbconsole
150
+ - test/dummy/script/destroy
151
+ - test/dummy/script/generate
152
+ - test/dummy/script/performance/benchmarker
153
+ - test/dummy/script/performance/profiler
154
+ - test/dummy/script/plugin
155
+ - test/dummy/script/runner
156
+ - test/dummy/script/server
157
+ - test/sprockets_rails2_test.rb
158
+ - test/test_helper.rb
159
+ has_rdoc: