thesis_cloudfront 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16b4b72b112f9fa18a2b1d9c6a42e5d7ff32b97736b390be0bc27fb78d6dbc34
|
4
|
+
data.tar.gz: 3aaf0b5051e2851188b986c0fafb429d1fbe0bc851f4dd6b613ebf991f61018e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580033c89a381457f21258d9eebf151eb65a27978168e0eea3651ad0df5b6da63bcf3ba089fd7ddd0cb48c5b2bdc9433993f17e048bcb14068e89f7c6bc3eb10
|
7
|
+
data.tar.gz: 76cf2b5d503552692bf46b13d2f9b9b57466b5f15b74ae3c3b5d07821de2c15609b9cef6bc3249c93fd630e74b933a8124f07952ff02beef775e4e86b79a35af
|
@@ -4,8 +4,8 @@ module ThesisCloudfront
|
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
6
|
def install
|
7
|
-
|
8
|
-
"
|
7
|
+
append_to_file "Gemfile" do
|
8
|
+
"\ngem 'rack_cors'"
|
9
9
|
end
|
10
10
|
|
11
11
|
heroku_app_name = ask("whats the name of this heroku app?")
|
@@ -13,13 +13,14 @@ module ThesisCloudfront
|
|
13
13
|
create_file "config/initializers/rack_cors.rb" do
|
14
14
|
["Rails.application.config.middleware.insert_before 0, Rack::Cors do",
|
15
15
|
" allow do",
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
16
|
+
" origins [",
|
17
|
+
" /https:\\/\\/#{heroku_app_name}.herokuapp.com/,",
|
18
|
+
" /http:\\/\\/#{heroku_app_name}.herokuapp.com/,",
|
19
|
+
" /https:\\/\\/#{heroku_app_name}-pr-[0-9]+.herokuapp.com/,",
|
20
|
+
" /http:\\/\\/#{heroku_app_name}-pr-[0-9]+.herokuapp.com/",
|
21
|
+
" ]",
|
22
|
+
" resource '/assets/*', headers: :any, methods: [:get, :head, :options]",
|
23
|
+
" end",
|
23
24
|
"end"].join("\n")
|
24
25
|
end
|
25
26
|
|