jammit-s3 0.5.4.1 → 0.5.4.2
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/jammit-s3.gemspec +1 -1
- data/lib/jammit-s3.rb +5 -4
- metadata +4 -4
data/jammit-s3.gemspec
CHANGED
data/lib/jammit-s3.rb
CHANGED
@@ -13,15 +13,16 @@ if defined?(Rails)
|
|
13
13
|
class JammitRailtie < Rails::Railtie
|
14
14
|
initializer "set asset host and asset id" do
|
15
15
|
config.after_initialize do
|
16
|
-
protocol = Jammit.configuration[:ssl] ? "https" : "http"
|
17
16
|
if Jammit.configuration[:use_cloudfront] && Jammit.configuration[:cloudfront_domain].present?
|
18
|
-
asset_hostname =
|
17
|
+
asset_hostname = Jammit.configuration[:cloudfront_domain]
|
19
18
|
else
|
20
|
-
asset_hostname = "#{
|
19
|
+
asset_hostname = "#{Jammit.configuration[:s3_bucket]}.s3.amazonaws.com"
|
21
20
|
end
|
22
21
|
|
23
22
|
if Jammit.package_assets and asset_hostname.present?
|
24
|
-
ActionController::Base.asset_host =
|
23
|
+
ActionController::Base.asset_host = Proc.new do |source, request|
|
24
|
+
"#{Jammit.configuration[:ssl] || request.protocol}://#{asset_hostname}"
|
25
|
+
end
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 5
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.5.4.
|
9
|
+
- 2
|
10
|
+
version: 0.5.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jacques Crocker
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
hash:
|
95
|
+
hash: 543481238828431748
|
96
96
|
segments:
|
97
97
|
- 0
|
98
98
|
version: "0"
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
hash:
|
104
|
+
hash: 543481238828431748
|
105
105
|
segments:
|
106
106
|
- 0
|
107
107
|
version: "0"
|