itamae-node_env 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 5cc60de2a77f52cf7151ca7718a6c39227738812
4
- data.tar.gz: b4fb51ca20a78494d942bb36532912eaa1179618
3
+ metadata.gz: 754afa2903e2553325ba4b5b42699b6c27d88e6b
4
+ data.tar.gz: 5cabf257b84d2c984e6e0d4a334983e244f65dc3
5
5
  SHA512:
6
- metadata.gz: 90ef9be9f16f9f8de64dab976ec91d6f30c0d140f42ef3c0a5460a457e28d47c8da5392afae9fee9fc03397a0fdad0297cbbcee8a64926245dd84c9cf669dae7
7
- data.tar.gz: 77b4d655522566e47d89f6690252262fd00acf7759853ef91c98e01be117f5ec8948dcf580d31003d25fe0f6e5d652f78d27fb217047d957f34c3454a58f8dbf
6
+ metadata.gz: d621ba2f93f1d658ccd8225d6fc20264fb971c499f57d848dc5c89361205f28970c8f94c572adaab2ba24ebf259b2ecffc04512983635d98104da8af41d8e90b
7
+ data.tar.gz: 0aaa5ed2b6af9157cad6e07760c5446a050c78085bc5a8128e04973ea894f9a40c7e31dac95ad1bd9c2c7a2c7f5b18ef4298ac912a948e0af68051f1d86f04e9
data/README.md CHANGED
@@ -24,8 +24,6 @@ Or install it yourself as:
24
24
  recipe.rb:
25
25
 
26
26
  ```ruby
27
- require 'itamae/node_env'
28
-
29
27
  file '/home/someone/.ssh/id_rsa' do
30
28
  content node["secret_key"]
31
29
  mode "0600"
@@ -40,13 +38,28 @@ node.json:
40
38
  {"secret_key": "env[IR_SECRET_KEY]"}
41
39
  ```
42
40
 
43
- Execute itamae:
41
+ Execute Itamae with `itamae-env` command:
44
42
 
45
43
  ```bash
46
44
  export IR_SECRET_KEY="$(cat ./id_rsa_for_someone)"
47
- bundle exec itamae ssh -h target_host --node-json node.json recipe.rb
45
+ bundle exec itamae-env ssh -h target_host -j node.json recipe.rb
46
+ ```
47
+
48
+ ### With dotenv
49
+ Add this line to Gemfile:
50
+
51
+ ```ruby
52
+ gem "dotenv"
48
53
  ```
49
54
 
55
+ Make `.env` file:
56
+
57
+ ```bash
58
+ IR_PASSWORD="password"
59
+ ```
60
+
61
+ And execute `itamae-env` command.
62
+
50
63
  ## Contributing
51
64
 
52
65
  1. Fork it ( https://github.com/[my-github-username]/itamae-node_env/fork )
data/bin/itamae-env ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ begin
4
+ require "dotenv"
5
+ Dotenv.load
6
+ rescue LoadError
7
+ end
8
+ require "itamae/node_env"
9
+
10
+ require "itamae/cli"
11
+ Itamae::CLI.start
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["nownabe"]
10
10
  spec.email = ["nownabe@gmail.com"]
11
11
  spec.summary = %q{Environment variables in the node file}
12
- spec.homepage = ""
12
+ spec.homepage = "https://github.com/nownabe/itamae-node_env"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
@@ -55,5 +55,3 @@ when 1
55
55
  when 2
56
56
  ::Itamae::Node.send(:prepend, ::Itamae::NodeEnv12)
57
57
  end
58
-
59
- Dotenv.load if Object.const_defined?(:Dotenv)
@@ -1,5 +1,5 @@
1
1
  module Itamae
2
2
  module NodeEnv
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-node_env
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - nownabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -61,7 +61,8 @@ dependencies:
61
61
  description:
62
62
  email:
63
63
  - nownabe@gmail.com
64
- executables: []
64
+ executables:
65
+ - itamae-env
65
66
  extensions: []
66
67
  extra_rdoc_files: []
67
68
  files:
@@ -70,10 +71,11 @@ files:
70
71
  - LICENSE.txt
71
72
  - README.md
72
73
  - Rakefile
74
+ - bin/itamae-env
73
75
  - itamae-node_env.gemspec
74
76
  - lib/itamae/node_env.rb
75
77
  - lib/itamae/node_env/version.rb
76
- homepage: ''
78
+ homepage: https://github.com/nownabe/itamae-node_env
77
79
  licenses:
78
80
  - MIT
79
81
  metadata: {}