rails_serve_static_assets 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +16 -0
  4. data/Gemfile +8 -1
  5. data/LICENSE +19 -19
  6. data/README.md +3 -3
  7. data/Rakefile +22 -0
  8. data/gemfiles/3.2.gemfile +5 -0
  9. data/gemfiles/4.1.gemfile +5 -0
  10. data/gemfiles/4.2.gemfile +5 -0
  11. data/lib/rails_serve_static_assets/railtie.rb +5 -1
  12. data/lib/rails_serve_static_assets/version.rb +1 -1
  13. data/rails_serve_static_assets.gemspec +5 -1
  14. data/test/integration/static_file_service_test.rb +23 -0
  15. data/test/rails_app/Rakefile +7 -0
  16. data/test/rails_app/app/assets/images/schneems.png +0 -0
  17. data/test/rails_app/app/assets/javascripts/application.js +1 -0
  18. data/test/rails_app/app/assets/javascripts/foo.js +1 -0
  19. data/test/rails_app/app/assets/stylesheets/application.css +13 -0
  20. data/test/rails_app/app/assets/stylesheets/foo.css +1 -0
  21. data/test/rails_app/app/controllers/application_controller.rb +9 -0
  22. data/test/rails_app/app/controllers/authenticated_controller.rb +12 -0
  23. data/test/rails_app/app/controllers/pages_controller.rb +7 -0
  24. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  25. data/test/rails_app/app/helpers/authenticated_helper.rb +2 -0
  26. data/test/rails_app/app/views/authenticated/index.html.erb +1 -0
  27. data/test/rails_app/app/views/layouts/application.html.erb +14 -0
  28. data/test/rails_app/app/views/pages/index.html.erb +1 -0
  29. data/test/rails_app/config.ru +4 -0
  30. data/test/rails_app/config/application.rb +49 -0
  31. data/test/rails_app/config/boot.rb +10 -0
  32. data/test/rails_app/config/database.yml +22 -0
  33. data/test/rails_app/config/environment.rb +5 -0
  34. data/test/rails_app/config/environments/development.rb +25 -0
  35. data/test/rails_app/config/environments/production.rb +26 -0
  36. data/test/rails_app/config/environments/test.rb +2 -0
  37. data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/rails_app/config/initializers/inflections.rb +10 -0
  39. data/test/rails_app/config/initializers/mime_types.rb +5 -0
  40. data/test/rails_app/config/initializers/secret_token.rb +7 -0
  41. data/test/rails_app/config/initializers/session_store.rb +8 -0
  42. data/test/rails_app/config/locales/devise.en.yml +59 -0
  43. data/test/rails_app/config/locales/en.yml +9 -0
  44. data/test/rails_app/config/locales/es.yml +10 -0
  45. data/test/rails_app/config/routes.rb +62 -0
  46. data/test/rails_app/db/test.sqlite3 +0 -0
  47. data/test/rails_app/log/development.log +3060 -0
  48. data/test/rails_app/log/production.log +8453 -0
  49. data/test/rails_app/log/test.log +316579 -0
  50. data/test/rails_app/perf.rake +4 -0
  51. data/test/rails_app/public/404.html +26 -0
  52. data/test/rails_app/public/422.html +26 -0
  53. data/test/rails_app/public/500.html +26 -0
  54. data/test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css +15 -0
  55. data/test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css.gz +0 -0
  56. data/test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js +2 -0
  57. data/test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js.gz +0 -0
  58. data/test/rails_app/public/assets/manifest-7bf37a2cd54094ac4d4308b706454b81.json +1 -0
  59. data/test/rails_app/public/assets/schneems-cb0905b917bde936182e153558f54a5f.png +0 -0
  60. data/test/rails_app/public/favicon.ico +0 -0
  61. data/test/rails_app/script/rails +6 -0
  62. data/test/test_helper.rb +52 -0
  63. metadata +154 -9
@@ -0,0 +1,4 @@
1
+ $LOAD_PATH << File.expand_path("../../../lib", __FILE__)
2
+
3
+ require 'derailed_benchmarks'
4
+ require 'derailed_benchmarks/tasks'
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+
12
+
13
+ */
14
+
15
+ .foo { background-color: red;}
@@ -0,0 +1 @@
1
+ {"files":{"schneems-cb0905b917bde936182e153558f54a5f.png":{"logical_path":"schneems.png","mtime":"2014-10-24T17:15:00-04:00","size":636127,"digest":"cb0905b917bde936182e153558f54a5f"},"application-89f8f774b6fb6783dfccc79d4103f256.js":{"logical_path":"application.js","mtime":"2014-12-22T14:37:39-05:00","size":18,"digest":"89f8f774b6fb6783dfccc79d4103f256"},"application-5f55f638b632759d9c9113417c3ac6bd.css":{"logical_path":"application.css","mtime":"2014-12-22T14:38:07-05:00","size":543,"digest":"5f55f638b632759d9c9113417c3ac6bd"}},"assets":{"schneems.png":"schneems-cb0905b917bde936182e153558f54a5f.png","application.js":"application-89f8f774b6fb6783dfccc79d4103f256.js","application.css":"application-5f55f638b632759d9c9113417c3ac6bd.css"}}
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,52 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+
3
+ require 'rails'
4
+
5
+ require File.expand_path("../rails_app/config/environment.rb", __FILE__)
6
+ require "rails/test_help"
7
+
8
+ ActionMailer::Base.delivery_method = :test
9
+ ActionMailer::Base.perform_deliveries = true
10
+ ActionMailer::Base.default_url_options[:host] = "test.com"
11
+
12
+ Rails.backtrace_cleaner.remove_silencers!
13
+
14
+ # Configure capybara for integration testing
15
+ require "capybara/rails"
16
+ Capybara.default_driver = :rack_test
17
+ Capybara.default_selector = :css
18
+
19
+ Rails.backtrace_cleaner.remove_silencers!
20
+
21
+
22
+
23
+ # Define a bare test case to use with Capybara
24
+ class ActiveSupport::IntegrationCase < ActiveSupport::TestCase
25
+ include Capybara::DSL
26
+ include Rails.application.routes.url_helpers
27
+
28
+ # include Sprockets::Rails::Helper
29
+ # config = Rails.application.config
30
+ # self.debug_assets = config.assets.debug
31
+ # self.digest_assets = config.assets.digest
32
+ # self.assets_prefix = config.assets.prefix
33
+
34
+ def rails_test_path(name = "")
35
+ Pathname.new(File.expand_path("../..", __FILE__)).join("test/rails_app").join(name)
36
+ end
37
+ end
38
+
39
+
40
+ class ActiveSupport::IntegrationCase
41
+ def assert_has_content?(content)
42
+ assert has_content?(content), "Expected #{page.body} to include #{content.inspect}"
43
+ end
44
+
45
+ def refute_has_content?(content)
46
+ assert !has_content?(content), "Expected #{page.body} to NEVER include #{content.inspect} but was found"
47
+ end
48
+
49
+ def assert_success
50
+ refute_has_content?("The page you were looking for doesn't exist.")
51
+ end
52
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_serve_static_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Belo
@@ -9,8 +9,50 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-25 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2014-12-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '3.1'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '3.1'
28
+ - !ruby/object:Gem::Dependency
29
+ name: capybara
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: sprockets
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
14
56
  description: Force Rails to serve static assets
15
57
  email:
16
58
  - pedro@heroku.com
@@ -19,18 +61,71 @@ executables: []
19
61
  extensions: []
20
62
  extra_rdoc_files: []
21
63
  files:
22
- - .gitignore
64
+ - ".gitignore"
65
+ - ".travis.yml"
23
66
  - Gemfile
24
67
  - LICENSE
25
68
  - README.md
26
69
  - Rakefile
70
+ - gemfiles/3.2.gemfile
71
+ - gemfiles/4.1.gemfile
72
+ - gemfiles/4.2.gemfile
27
73
  - lib/rails_serve_static_assets.rb
28
74
  - lib/rails_serve_static_assets/railtie.rb
29
75
  - lib/rails_serve_static_assets/version.rb
30
76
  - rails_serve_static_assets.gemspec
77
+ - test/integration/static_file_service_test.rb
78
+ - test/rails_app/Rakefile
79
+ - test/rails_app/app/assets/images/schneems.png
80
+ - test/rails_app/app/assets/javascripts/application.js
81
+ - test/rails_app/app/assets/javascripts/foo.js
82
+ - test/rails_app/app/assets/stylesheets/application.css
83
+ - test/rails_app/app/assets/stylesheets/foo.css
84
+ - test/rails_app/app/controllers/application_controller.rb
85
+ - test/rails_app/app/controllers/authenticated_controller.rb
86
+ - test/rails_app/app/controllers/pages_controller.rb
87
+ - test/rails_app/app/helpers/application_helper.rb
88
+ - test/rails_app/app/helpers/authenticated_helper.rb
89
+ - test/rails_app/app/views/authenticated/index.html.erb
90
+ - test/rails_app/app/views/layouts/application.html.erb
91
+ - test/rails_app/app/views/pages/index.html.erb
92
+ - test/rails_app/config.ru
93
+ - test/rails_app/config/application.rb
94
+ - test/rails_app/config/boot.rb
95
+ - test/rails_app/config/database.yml
96
+ - test/rails_app/config/environment.rb
97
+ - test/rails_app/config/environments/development.rb
98
+ - test/rails_app/config/environments/production.rb
99
+ - test/rails_app/config/environments/test.rb
100
+ - test/rails_app/config/initializers/backtrace_silencers.rb
101
+ - test/rails_app/config/initializers/inflections.rb
102
+ - test/rails_app/config/initializers/mime_types.rb
103
+ - test/rails_app/config/initializers/secret_token.rb
104
+ - test/rails_app/config/initializers/session_store.rb
105
+ - test/rails_app/config/locales/devise.en.yml
106
+ - test/rails_app/config/locales/en.yml
107
+ - test/rails_app/config/locales/es.yml
108
+ - test/rails_app/config/routes.rb
109
+ - test/rails_app/db/test.sqlite3
110
+ - test/rails_app/log/development.log
111
+ - test/rails_app/log/production.log
112
+ - test/rails_app/log/test.log
113
+ - test/rails_app/perf.rake
114
+ - test/rails_app/public/404.html
115
+ - test/rails_app/public/422.html
116
+ - test/rails_app/public/500.html
117
+ - test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css
118
+ - test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css.gz
119
+ - test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js
120
+ - test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js.gz
121
+ - test/rails_app/public/assets/manifest-7bf37a2cd54094ac4d4308b706454b81.json
122
+ - test/rails_app/public/assets/schneems-cb0905b917bde936182e153558f54a5f.png
123
+ - test/rails_app/public/favicon.ico
124
+ - test/rails_app/script/rails
125
+ - test/test_helper.rb
31
126
  homepage: https://github.com/heroku/rails_serve_static_assets
32
127
  licenses:
33
- - LICENSE
128
+ - MIT
34
129
  metadata: {}
35
130
  post_install_message:
36
131
  rdoc_options: []
@@ -38,18 +133,68 @@ require_paths:
38
133
  - lib
39
134
  required_ruby_version: !ruby/object:Gem::Requirement
40
135
  requirements:
41
- - - '>='
136
+ - - ">="
42
137
  - !ruby/object:Gem::Version
43
138
  version: '0'
44
139
  required_rubygems_version: !ruby/object:Gem::Requirement
45
140
  requirements:
46
- - - '>='
141
+ - - ">="
47
142
  - !ruby/object:Gem::Version
48
143
  version: '0'
49
144
  requirements: []
50
145
  rubyforge_project:
51
- rubygems_version: 2.0.14
146
+ rubygems_version: 2.2.2
52
147
  signing_key:
53
148
  specification_version: 4
54
149
  summary: Sets serve_static_assets to true so Rails will sere your static assets
55
- test_files: []
150
+ test_files:
151
+ - test/integration/static_file_service_test.rb
152
+ - test/rails_app/Rakefile
153
+ - test/rails_app/app/assets/images/schneems.png
154
+ - test/rails_app/app/assets/javascripts/application.js
155
+ - test/rails_app/app/assets/javascripts/foo.js
156
+ - test/rails_app/app/assets/stylesheets/application.css
157
+ - test/rails_app/app/assets/stylesheets/foo.css
158
+ - test/rails_app/app/controllers/application_controller.rb
159
+ - test/rails_app/app/controllers/authenticated_controller.rb
160
+ - test/rails_app/app/controllers/pages_controller.rb
161
+ - test/rails_app/app/helpers/application_helper.rb
162
+ - test/rails_app/app/helpers/authenticated_helper.rb
163
+ - test/rails_app/app/views/authenticated/index.html.erb
164
+ - test/rails_app/app/views/layouts/application.html.erb
165
+ - test/rails_app/app/views/pages/index.html.erb
166
+ - test/rails_app/config.ru
167
+ - test/rails_app/config/application.rb
168
+ - test/rails_app/config/boot.rb
169
+ - test/rails_app/config/database.yml
170
+ - test/rails_app/config/environment.rb
171
+ - test/rails_app/config/environments/development.rb
172
+ - test/rails_app/config/environments/production.rb
173
+ - test/rails_app/config/environments/test.rb
174
+ - test/rails_app/config/initializers/backtrace_silencers.rb
175
+ - test/rails_app/config/initializers/inflections.rb
176
+ - test/rails_app/config/initializers/mime_types.rb
177
+ - test/rails_app/config/initializers/secret_token.rb
178
+ - test/rails_app/config/initializers/session_store.rb
179
+ - test/rails_app/config/locales/devise.en.yml
180
+ - test/rails_app/config/locales/en.yml
181
+ - test/rails_app/config/locales/es.yml
182
+ - test/rails_app/config/routes.rb
183
+ - test/rails_app/db/test.sqlite3
184
+ - test/rails_app/log/development.log
185
+ - test/rails_app/log/production.log
186
+ - test/rails_app/log/test.log
187
+ - test/rails_app/perf.rake
188
+ - test/rails_app/public/404.html
189
+ - test/rails_app/public/422.html
190
+ - test/rails_app/public/500.html
191
+ - test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css
192
+ - test/rails_app/public/assets/application-5f55f638b632759d9c9113417c3ac6bd.css.gz
193
+ - test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js
194
+ - test/rails_app/public/assets/application-89f8f774b6fb6783dfccc79d4103f256.js.gz
195
+ - test/rails_app/public/assets/manifest-7bf37a2cd54094ac4d4308b706454b81.json
196
+ - test/rails_app/public/assets/schneems-cb0905b917bde936182e153558f54a5f.png
197
+ - test/rails_app/public/favicon.ico
198
+ - test/rails_app/script/rails
199
+ - test/test_helper.rb
200
+ has_rdoc: