envdgen 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/envdgen/version.rb +1 -1
- data/spec/envdgen_spec.rb +33 -0
- data/wercker.yml +23 -0
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddc9e70299505d1a8a5de9c6428a8f9a1024e67f
|
4
|
+
data.tar.gz: 16ee676db638cd35a86516b3e2860997fa4a1554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb94206104d381ef5d4b568b6067e7b17f592f23f76272398d0f26db73292ede10f4c7a5dbe01cdb381774a0470a3e57cebc24c684caaf00cc407f341534054
|
7
|
+
data.tar.gz: 1db298e4ec312b2dfdfc3bd5a7ee805114c28b3e09aa51300afbe20a6db6f22d0c5483ee5a6cc2b7aaceb3420846d94f71a2964d641e6bd95a1fdbd9ee0ca189
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
# envdgen
|
1
|
+
# envdgen
|
2
2
|
|
3
3
|
**Environment config directories generator**
|
4
4
|
|
5
|
+
![Build Status](https://app.wercker.com/status/a0f597e9f976cc719bd7d6f6826f0d54/s/)
|
6
|
+
|
5
7
|
This simple tool generates `envdir` (daemontools) compatible environment directories from
|
6
8
|
sample `.env` files, like those used by Foreman.
|
7
9
|
|
@@ -43,4 +45,4 @@ Now you should be able to run tests:
|
|
43
45
|
|
44
46
|
Copyright (c) by Kris Kovalik <hi@kkvlk.me>
|
45
47
|
|
46
|
-
Released under MIT License. Check [LICENSE.txt](LICENSE.txt) for details.
|
48
|
+
Released under MIT License. Check [LICENSE.txt](LICENSE.txt) for details.
|
data/lib/envdgen/version.rb
CHANGED
data/spec/envdgen_spec.rb
CHANGED
@@ -9,6 +9,10 @@ describe "Envdgen" do
|
|
9
9
|
`echo "BAZ=\"foo\"" >> spec/tmp/.env`
|
10
10
|
end
|
11
11
|
|
12
|
+
after :all do
|
13
|
+
`rm -rf spec/tmp`
|
14
|
+
end
|
15
|
+
|
12
16
|
describe ".gen" do
|
13
17
|
it "should generate environment directory from given env file" do
|
14
18
|
Envdgen.gen("spec/tmp/.env", "spec/tmp/envdir")
|
@@ -16,5 +20,34 @@ describe "Envdgen" do
|
|
16
20
|
File.read("spec/tmp/envdir/BAR").should == ""
|
17
21
|
File.read("spec/tmp/envdir/BAZ").should == "foo"
|
18
22
|
end
|
23
|
+
|
24
|
+
describe "overwriting" do
|
25
|
+
let(:force) do
|
26
|
+
false
|
27
|
+
end
|
28
|
+
|
29
|
+
before do
|
30
|
+
`echo "FOO=1" > spec/tmp/.env`
|
31
|
+
Envdgen.gen("spec/tmp/.env", "spec/tmp/envdir")
|
32
|
+
`echo "FOO=2" > spec/tmp/.env`
|
33
|
+
Envdgen.gen("spec/tmp/.env", "spec/tmp/envdir", force)
|
34
|
+
end
|
35
|
+
|
36
|
+
context "when force flag not set" do
|
37
|
+
it "should write nothing" do
|
38
|
+
File.read("spec/tmp/envdir/FOO").should == "1"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context "when force flag set" do
|
43
|
+
let(:force) do
|
44
|
+
true
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should overwrite variable" do
|
48
|
+
File.read("spec/tmp/envdir/FOO").should == "2"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
19
52
|
end
|
20
53
|
end
|
data/wercker.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
box: wercker/rvm
|
2
|
+
build:
|
3
|
+
steps:
|
4
|
+
- rvm-use:
|
5
|
+
version: 2.1.0
|
6
|
+
- bundle-install
|
7
|
+
- script:
|
8
|
+
name: rspec
|
9
|
+
code: |
|
10
|
+
bundle exec rspec
|
11
|
+
deploy:
|
12
|
+
steps:
|
13
|
+
- rvm-use:
|
14
|
+
version: 2.1.0
|
15
|
+
- bundle-install
|
16
|
+
- script:
|
17
|
+
name: rubygems-release
|
18
|
+
code: |
|
19
|
+
echo ":rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
|
20
|
+
chmod 0600 ~/.gem/credentials
|
21
|
+
rm -rf pkg
|
22
|
+
bundle exec rake build
|
23
|
+
ls -1 pkg/*.gem | xargs gem push
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: envdgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Kovalik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: dotenv
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Gem provides a binary to generate envdir compatible env directories from
|
@@ -75,7 +75,7 @@ executables:
|
|
75
75
|
extensions: []
|
76
76
|
extra_rdoc_files: []
|
77
77
|
files:
|
78
|
-
- .gitignore
|
78
|
+
- ".gitignore"
|
79
79
|
- Gemfile
|
80
80
|
- LICENSE.txt
|
81
81
|
- README.md
|
@@ -86,6 +86,7 @@ files:
|
|
86
86
|
- lib/envdgen/version.rb
|
87
87
|
- spec/envdgen_spec.rb
|
88
88
|
- spec/spec_helper.rb
|
89
|
+
- wercker.yml
|
89
90
|
homepage: https://github.com/kkvlk/envdgen
|
90
91
|
licenses:
|
91
92
|
- MIT
|
@@ -96,17 +97,17 @@ require_paths:
|
|
96
97
|
- lib
|
97
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
99
|
requirements:
|
99
|
-
- -
|
100
|
+
- - ">="
|
100
101
|
- !ruby/object:Gem::Version
|
101
102
|
version: '0'
|
102
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
104
|
requirements:
|
104
|
-
- -
|
105
|
+
- - ">="
|
105
106
|
- !ruby/object:Gem::Version
|
106
107
|
version: '0'
|
107
108
|
requirements: []
|
108
109
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.2
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: Env directories generator
|