butler_static 0.0.8.alpha.22 → 0.0.8
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/lib/butler/railtie.rb +24 -24
- data/lib/butler/version.rb +1 -1
- metadata +5 -5
data/lib/butler/railtie.rb
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
require 'rails/all'
|
2
|
-
|
3
1
|
module Butler
|
4
2
|
class Railtie < ::Rails::Railtie
|
5
|
-
puts 'Processing Railtie...'
|
6
|
-
# config.butler = ActiveSupport::OrderedOptions.new # enable namespaced configuration in Rails environments
|
7
|
-
|
8
3
|
# # Config
|
9
|
-
#
|
10
|
-
#
|
4
|
+
# Rails.application.config.butler = ActiveSupport::OrderedOptions.new # enable namespaced configuration in Rails environments
|
5
|
+
# enable_butler = Rails.application.config.butler.enable_butler || nil
|
6
|
+
# path = Rails.application.config.paths['public'].first
|
11
7
|
|
12
|
-
# header_rules
|
13
|
-
# options
|
8
|
+
# header_rules = Rails.application.config.butler.header_rules || {}
|
9
|
+
# options = { header_rules: header_rules }
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
11
|
+
# # Initializer
|
12
|
+
# initializer "butler.add_middleware" do |app|
|
13
|
+
# #
|
14
|
+
# # Insert Butler Middleware
|
15
|
+
# # while trying to reach a certain middleware order
|
16
|
+
# #
|
17
|
+
# if enable_butler
|
18
|
+
# if defined? ActionDispatch::Static
|
19
|
+
# if defined? Rack::Cache
|
20
|
+
# app.middleware.delete ActionDispatch::Static
|
21
|
+
# app.middleware.insert_before Rack::Cache, Butler::Static, path, options
|
22
|
+
# else
|
23
|
+
# app.middleware.swap ActionDispatch::Static, Butler::Static, path, options
|
24
|
+
# end
|
25
|
+
# else
|
26
|
+
# app.middleware.use Butler::Static, path, options
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
# end
|
30
30
|
|
31
31
|
end
|
32
32
|
end
|
data/lib/butler/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: butler_static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.8
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.8
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Thomas Klemm
|
@@ -160,15 +160,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
|
-
- - ! '
|
163
|
+
- - ! '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
165
|
+
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
168
|
rubygems_version: 1.8.23
|
169
169
|
signing_key:
|
170
170
|
specification_version: 3
|
171
|
-
summary: butler_static-0.0.8
|
171
|
+
summary: butler_static-0.0.8
|
172
172
|
test_files:
|
173
173
|
- spec/butler/asset_spec.rb
|
174
174
|
- spec/butler/files/index.html
|