rails-ahoy 0.2.0 → 0.2.4
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 +4 -4
- data/README.md +2 -2
- data/lib/ahoy.rb +9 -3
- data/lib/ahoy/version.rb +1 -1
- data/lib/generators/ahoy/deployment_generator.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84b1aa8c4bfa2aa6389b037d96c494a1f47a0584
|
4
|
+
data.tar.gz: ef902544e0578df966b96c120a860bcda4cea823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c595d1d7652e4be0611be0d39e8484c6bb2444e1c829259486e4b408e226fdc2d24cdf0d194151f91fdb7009e9790a3d6ec9b65aa41191ac9c5f2f71cc40659
|
7
|
+
data.tar.gz: 9ddca2ae6726469498593e29d5675a432648c59e85ef06ed4dc3bd11dcbaee4e55f554f8059fc5d5ece073e0a05f08a4eb30b3b41a7fd475fb966116055c59d8
|
data/README.md
CHANGED
@@ -70,9 +70,9 @@ Now just copy and paste it into the following file:
|
|
70
70
|
|
71
71
|
From the root of your Rails application...
|
72
72
|
|
73
|
-
$ cd config/ansible && ./
|
73
|
+
$ cd config/ansible && ./provision.sh production
|
74
74
|
|
75
|
-
Executing `
|
75
|
+
Executing `provision.sh <RAILS ENVIRONMENT FOR DEPLOYED APP>` will launch the provisioning process and setup your box so it can run Rails using Nginx as the web server, Puma as your application server, and PostgreSQL as your database.
|
76
76
|
|
77
77
|
**NOTE:** This process may take a while (15 mins or so), so sit back and relax.
|
78
78
|
|
data/lib/ahoy.rb
CHANGED
@@ -2,8 +2,14 @@ require 'ahoy/version'
|
|
2
2
|
require 'ahoy'
|
3
3
|
|
4
4
|
module Ahoy
|
5
|
-
def self.
|
6
|
-
|
7
|
-
|
5
|
+
def self.load_variables
|
6
|
+
begin
|
7
|
+
env_file = File.open(Rails.root + ".env/#{Rails.env}_env.yml", 'r')
|
8
|
+
if env_file
|
9
|
+
env_yaml = YAML.load(env_file)
|
10
|
+
env_yaml.each { |k,v| ENV[k.to_s.upcase] = v.to_s } if env_yaml.present?
|
11
|
+
end
|
12
|
+
rescue
|
13
|
+
end
|
8
14
|
end
|
9
15
|
end
|
data/lib/ahoy/version.rb
CHANGED
@@ -103,7 +103,7 @@ module Ahoy
|
|
103
103
|
def modify_files
|
104
104
|
append_file '.gitignore', '.env/'
|
105
105
|
inject_into_file 'config/environment.rb', after: "require File.expand_path('../application', __FILE__)\n\n" do <<-'RUBY'
|
106
|
-
Ahoy.
|
106
|
+
Ahoy.load_variables
|
107
107
|
|
108
108
|
RUBY
|
109
109
|
end
|