rails-static-router 1.0.2 → 1.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f556d354ad6e39c6729e60cec64d92278459c66919d43e2dbd4da7aadff37870
4
- data.tar.gz: 7d0f1d7722542bd2abaa9c9f11563c66cbce02dbc0c8bbd353b3277021214c10
3
+ metadata.gz: 054e4a02f816776d523074c6c3e559ee17d4e60a62c492d0e22abd98715ec41b
4
+ data.tar.gz: e98f916e13623a222e5455af37cf6ff52deaa5e2e867873b2853d276a66c47fe
5
5
  SHA512:
6
- metadata.gz: 0ea28c05bb565f1b2f68f09d95278615aa69083e03c8854475be330c601ebcd9fdad676c5e4009383ca6a29dd3851769ffacf699a25e0ec8a42f5025288fba1b
7
- data.tar.gz: '0541872b0f377d9305730a9ab571a86100176aada2a61835c97d85fd9bdb8b17454315faf80324d9fea1686038bc95373222389e802fbf805dfe4ecffe982c3b'
6
+ metadata.gz: 8d9c385af9ccc89d8b13954ff3e0fc703cb9d24b52ddd7ce4b196176080ac1f75c0213f8372c1869e4b3204d8c37c6dc598814e381dec73e98623ff8dc8997a0
7
+ data.tar.gz: ea3bc1fad350289a7ee6b8fae9f4702869e08064dc9726b0d531561ddd06ede80b538f24b050c614a82b15cbf987cb4e9b5fdba3734d35f047794f9e98f8cd67
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rails Static Router [![Build Status](https://travis-ci.org/mufid/rails-static-router.svg?branch=master)](https://travis-ci.org/mufid/rails-static-router)
1
+ # Rails Static Router [![Build Status](https://travis-ci.org/mufid/rails-static-router.svg?branch=master)](https://travis-ci.org/mufid/rails-static-router) [![Gem Version](https://badge.fury.io/rb/rails-static-router.svg)](https://badge.fury.io/rb/rails-static-router)
2
2
 
3
3
  Enjoy static routes in your Rails `config/routes.rb`.
4
4
 
@@ -114,3 +114,8 @@ For example:
114
114
 
115
115
  For contributors that have access to release server, do the
116
116
  following commands to release the gem.
117
+
118
+ # Edit version.rb to match next version, then
119
+ git add .
120
+ git commit -m "ops: <NEXT_VERSION> release"
121
+ bundle exec rake release
@@ -51,17 +51,19 @@ require 'action_dispatch/middleware/static'
51
51
 
52
52
  module ActionDispatch
53
53
  module Routing
54
+
54
55
  if Gem::Version.new(Rails.version) >= Gem::Version.new('4.2')
55
56
  class StaticResponder < Endpoint; end
56
57
  else
57
58
  class StaticResponder; end
58
59
  end
59
60
 
60
- if Gem::Version.new(Rails.version) >= Gem::Version.new('5.0')
61
+ if Gem::Version.new(Rails.version) < Gem::Version.new('5.0')
61
62
  class StaticResponder
62
63
  def file_handler
63
64
  @file_handler ||= ::ActionDispatch::FileHandler.new(
64
- Rails.configuration.paths["public"].first
65
+ Rails.configuration.paths["public"].first,
66
+ Rails.configuration.static_cache_control
65
67
  )
66
68
  end
67
69
  end
@@ -70,7 +72,7 @@ module ActionDispatch
70
72
  def file_handler
71
73
  @file_handler ||= ::ActionDispatch::FileHandler.new(
72
74
  Rails.configuration.paths["public"].first,
73
- Rails.configuration.static_cache_control
75
+ headers: Rails.configuration.public_file_server.headers
74
76
  )
75
77
  end
76
78
  end
@@ -1,3 +1,3 @@
1
1
  module RailsStaticRouter
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-static-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eliot Sykes