stairs 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/stairs/steps/{secret_token.rb → secret_key_base.rb} +2 -2
- data/lib/stairs/steps.rb +1 -1
- data/lib/stairs/version.rb +1 -1
- data/lib/stairs.rb +1 -0
- data/spec/lib/stairs/steps/secret_key_base_spec.rb +13 -0
- metadata +5 -6
- data/spec/lib/stairs/steps/secret_token_spec.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b47b9db0597447a7bb4b0f19b801612cd9b13f74
|
4
|
+
data.tar.gz: 1434bb6acadd69ae6cd383b97e69c7970d349956
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4571358a2556379dbe69ab87cc14672eba4224811ef479fbf1c4a4fc268b63283b430db54afd5ab6b80e6c6d8d9395294b49f081b98f9e2a8cb1cf558c137da2
|
7
|
+
data.tar.gz: c66405771eccd032a8c73d7788beabf5b5d50670a74bf67d03fb329fae9a39770ff7fb1b07fbe73acb7d5e0f2655ee3dce9118778dbf5f667febebca0dd8e001
|
data/README.md
CHANGED
@@ -83,7 +83,7 @@ Usage: stairs [options]
|
|
83
83
|
A script composes many steps that setup a project.
|
84
84
|
|
85
85
|
```ruby
|
86
|
-
setup :
|
86
|
+
setup :secret_key_base
|
87
87
|
|
88
88
|
setup :s3
|
89
89
|
setup :zencoder, required: false
|
@@ -203,10 +203,10 @@ setup :step_name, option_1: "value", option_2: "value"
|
|
203
203
|
|
204
204
|
### Built-in
|
205
205
|
|
206
|
-
#### `:
|
206
|
+
#### `:secret_key_base`
|
207
207
|
|
208
208
|
Sets a secure random secret token. This will write the following ENV vars:
|
209
|
-
`
|
209
|
+
`SECRET_KEY_BASE`
|
210
210
|
|
211
211
|
#### `:postgresql`
|
212
212
|
|
@@ -2,12 +2,12 @@ require "securerandom"
|
|
2
2
|
|
3
3
|
module Stairs
|
4
4
|
module Steps
|
5
|
-
class
|
5
|
+
class SecretKeyBase < Step
|
6
6
|
title "Secret Token"
|
7
7
|
description "Generate a secure random secret token"
|
8
8
|
|
9
9
|
def run
|
10
|
-
env "
|
10
|
+
env "SECRET_KEY_BASE", SecureRandom.hex(64)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/stairs/steps.rb
CHANGED
data/lib/stairs/version.rb
CHANGED
data/lib/stairs.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Stairs::Steps::SecretKeyBase do
|
4
|
+
subject { described_class.new }
|
5
|
+
|
6
|
+
describe "#run" do
|
7
|
+
it "generates a securerandom hex and sets to SECRET_KEY_BASE" do
|
8
|
+
SecureRandom.stub hex: "imtotallysecurebro"
|
9
|
+
subject.should_receive(:env).with("SECRET_KEY_BASE", "imtotallysecurebro")
|
10
|
+
subject.run
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stairs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- patbenatar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -241,7 +241,7 @@ files:
|
|
241
241
|
- lib/stairs/steps.rb
|
242
242
|
- lib/stairs/steps/facebook.rb
|
243
243
|
- lib/stairs/steps/postgresql.rb
|
244
|
-
- lib/stairs/steps/
|
244
|
+
- lib/stairs/steps/secret_key_base.rb
|
245
245
|
- lib/stairs/tasks.rb
|
246
246
|
- lib/stairs/util.rb
|
247
247
|
- lib/stairs/util/cli.rb
|
@@ -256,7 +256,7 @@ files:
|
|
256
256
|
- spec/lib/stairs/runner_spec.rb
|
257
257
|
- spec/lib/stairs/script_spec.rb
|
258
258
|
- spec/lib/stairs/step_spec.rb
|
259
|
-
- spec/lib/stairs/steps/
|
259
|
+
- spec/lib/stairs/steps/secret_key_base_spec.rb
|
260
260
|
- spec/lib/stairs/util/cli_spec.rb
|
261
261
|
- spec/lib/stairs/util/file_mutation_spec.rb
|
262
262
|
- spec/spec_helper.rb
|
@@ -297,9 +297,8 @@ test_files:
|
|
297
297
|
- spec/lib/stairs/runner_spec.rb
|
298
298
|
- spec/lib/stairs/script_spec.rb
|
299
299
|
- spec/lib/stairs/step_spec.rb
|
300
|
-
- spec/lib/stairs/steps/
|
300
|
+
- spec/lib/stairs/steps/secret_key_base_spec.rb
|
301
301
|
- spec/lib/stairs/util/cli_spec.rb
|
302
302
|
- spec/lib/stairs/util/file_mutation_spec.rb
|
303
303
|
- spec/spec_helper.rb
|
304
304
|
- spec/support/configuration_helper.rb
|
305
|
-
has_rdoc:
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Stairs::Steps::SecretToken do
|
4
|
-
subject { described_class.new }
|
5
|
-
|
6
|
-
describe "#run" do
|
7
|
-
it "generates a securerandom hex and sets to SECRET_TOKEN" do
|
8
|
-
SecureRandom.stub hex: "imtotallysecurebro"
|
9
|
-
subject.should_receive(:env).with("SECRET_TOKEN", "imtotallysecurebro")
|
10
|
-
subject.run
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|