capistrano-rails-dotenv 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8c54e489966a6c76fcb921c62abf63cd696e528
4
- data.tar.gz: bcf247ea1259e6c0e20395f818c002688ac6bc1f
3
+ metadata.gz: 218f0d8a99e2f0d3619bd19d42ec4dc8c59d8384
4
+ data.tar.gz: c938d47e1b9a680ea4954434d85de5f9d316a077
5
5
  SHA512:
6
- metadata.gz: 31abc9fe71331da01220d7942d2b8a4d9bbd62055ac4ab75dce6ba82a0900ed881028c779b731fbd6392756852e5acebb900ce2d2186aa37c7689c4b5505e6f9
7
- data.tar.gz: 45cfaa14ddbcc320f457b35a84b19abf17255a2038f15461ead71bf0e2f5eb61a7b7a9049f69918dd83740e522e382f854466eedddb1d5164e29620fc4ff2d69
6
+ metadata.gz: 9d1d86f5c754515135dfb5c11dcc3fa744c0c01e62664254f79fd40bff578e9a4dbe02a0a8d4e355a65008d7dde0b5d3717cccf244c508b169dfe01fa4b78be5
7
+ data.tar.gz: 4f6c385d4284219565e8e7368da4928f8bfe4a7f433daf4c5d29c5eb19e54ae46dc0455aff6a331056095f84e0601971f8e336b45b838fec875778bd36bb8bf8
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Capistrano::Rails::Dotenv
2
2
 
3
- Update env file to remote server with Capistrano 3.
3
+ Upload dotenv's .env file to your remote server with Capistrano 3.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,7 +8,7 @@ Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
10
  group :development do
11
- gem 'capistrano-rails-dotenv'
11
+ gem 'capistrano-rails-dotenv'
12
12
  end
13
13
  ```
14
14
 
@@ -25,9 +25,16 @@ Or install it yourself as:
25
25
  Require it in your Capfile:
26
26
 
27
27
  ```ruby
28
- require 'capistrano/dotenv/tasks'
28
+ require 'capistrano/rails/dotenv'
29
29
  ```
30
30
 
31
+ Add your ```.env``` file path to your deploy file, like this:
32
+
33
+ ```ruby
34
+ set :env_file, 'config/deploy/.env.production'
35
+ ```
36
+ The default path is ```config/deploy/.env.<staging>``` if it is not set.
37
+
31
38
  ## License
32
39
 
33
40
  MIT
@@ -1,7 +1,7 @@
1
1
  namespace :deploy do
2
2
  task :upload_dotenv do
3
3
 
4
- env_file = fetch(:env_file, '.env')
4
+ env_file = fetch(:env_file, ".env.#{fetch(:stage)}")
5
5
  fail "The .env file not specify or not found." unless File.exist?(env_file)
6
6
 
7
7
  on roles(:all) do
@@ -10,4 +10,6 @@ namespace :deploy do
10
10
  upload! env_file, to_path
11
11
  end
12
12
  end
13
+
14
+ after :started, :upload_dotenv
13
15
  end
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Rails
3
3
  module Dotenv
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rails-dotenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShawnH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-05 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano-rails