mina-dotenv 0.1.0 → 0.2.0
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 +13 -3
- data/lib/mina/dotenv/tasks.rb +9 -6
- data/lib/mina/dotenv/version.rb +1 -1
- data/mina-dotenv.gemspec +4 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33c98d66d7d069ce8c2e1f6ab6a1c9d8335d8628
|
4
|
+
data.tar.gz: 876305a2d6541ccc1fabfdab3d93b3a20a91da22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdfcfeb15c0001e9ba4ffa0b63c4c1a20f8a7e0416ccfd71f0bc37285b2cf60c479785fbea9c5237df38264048d32d9a08f15f0e6d55c0c105baf176b1e9286a
|
7
|
+
data.tar.gz: 78b702b46c944e6cf5c64d4d02d150b77038480fea71411ddfc4aa9e515c95e4033a4866330bfd67cea79718fb11b65e5020921052aadefaf63124b64f6974b3
|
data/README.md
CHANGED
@@ -78,10 +78,20 @@ end
|
|
78
78
|
|
79
79
|
## What it does
|
80
80
|
|
81
|
-
###
|
82
|
-
|
83
|
-
#### Push
|
81
|
+
### Push
|
84
82
|
|
85
83
|
The push task will look for the '.env' file specified in the `:dotenv_location` variable. If found it will copy it's content and echo it to an `.env` file located in the `shared` folder location you your app's deploy location. And symlink it to the root of the newest release.
|
86
84
|
|
87
85
|
If no local `.env` file is found a blank one will be created on the server.
|
86
|
+
|
87
|
+
### Pull
|
88
|
+
|
89
|
+
The pull task uses the `scp` command to retrieve the `.env` file from the server. __Note:__ It will take all configuration from your `deploy.rb` file! It is intended to be used from the terminal like this:
|
90
|
+
|
91
|
+
```
|
92
|
+
mina dotenv:pull
|
93
|
+
```
|
94
|
+
|
95
|
+
## Contribution
|
96
|
+
|
97
|
+
If you have ideas or feature requests please feel free to open an issue on [this Github page](https://github.com/Stankec/mina-dotenv/issues). Pull requests are welcome also :smile:
|
data/lib/mina/dotenv/tasks.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
require 'mina/dotenv/utils'
|
2
|
+
require 'mina/scp'
|
2
3
|
|
3
4
|
namespace :dotenv do
|
4
5
|
desc 'Copies the local .env file to the server'
|
5
6
|
task :push do
|
6
|
-
remote_dotenv_path = "#{deploy_to}/#{shared_path}/.env"
|
7
|
-
|
8
7
|
dotenv = Mina::Dotenv::Utils.read_file(dotenv_location)
|
9
8
|
queue! %(
|
10
9
|
echo #{dotenv.shellescape} | sed -e 's/^[ \t]*//' > #{remote_dotenv_path}
|
@@ -13,8 +12,12 @@ namespace :dotenv do
|
|
13
12
|
queue! %(ln -nFs #{remote_dotenv_path} .env)
|
14
13
|
end
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
desc 'Copies the remote .env file to the current directory'
|
16
|
+
task :pull do
|
17
|
+
scp_download(remote_dotenv_path, dotenv_location)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def remote_dotenv_path
|
22
|
+
"#{deploy_to}/#{shared_path}/.env"
|
20
23
|
end
|
data/lib/mina/dotenv/version.rb
CHANGED
data/mina-dotenv.gemspec
CHANGED
@@ -10,7 +10,9 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['stanko.krtalic@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = 'Dotenv tasks for mina'
|
13
|
-
spec.description = '
|
13
|
+
spec.description = 'Alleviate the need to SSH to your server and setup an '\
|
14
|
+
'.env file manually there. This plugin simply copies '\
|
15
|
+
'your local .env to your server'
|
14
16
|
|
15
17
|
spec.homepage = 'https://github.com/Stankec/mina-dotenv'
|
16
18
|
spec.license = 'MIT'
|
@@ -23,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
23
25
|
spec.require_paths = ['lib']
|
24
26
|
|
25
27
|
spec.add_dependency 'mina'
|
28
|
+
spec.add_dependency 'mina-scp'
|
26
29
|
|
27
30
|
spec.add_development_dependency 'bundler', '~> 1.8'
|
28
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina-dotenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stanko Krtalić Rusendić
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mina
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mina-scp
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +66,8 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '10.0'
|
55
|
-
description:
|
69
|
+
description: Alleviate the need to SSH to your server and setup an .env file manually
|
70
|
+
there. This plugin simply copies your local .env to your server
|
56
71
|
email:
|
57
72
|
- stanko.krtalic@gmail.com
|
58
73
|
executables: []
|