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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92ee164d25a4cba9bc7bc59b2e3c093fd02e5877
4
- data.tar.gz: 79b76735f86f72b6aff583c7708b169bb91a4edb
3
+ metadata.gz: b47b9db0597447a7bb4b0f19b801612cd9b13f74
4
+ data.tar.gz: 1434bb6acadd69ae6cd383b97e69c7970d349956
5
5
  SHA512:
6
- metadata.gz: 7cd51dbb32386d4a8f2b0b7d056d602b24cc8273b40b9350577af9acc8b125747400879c4624f6b88ebfb40aa9a749601d9e4fd1959177eab1f3d534f85c792d
7
- data.tar.gz: 419d9a871c140ce33214cae856d330f7d96ecf81690d2feea64e9bb9e463fcf6317b55e8494b1a48038091fb9ef429e3c1a1cfaed8724984a6bd876abdc2233c
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 :secret_token
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
- #### `:secret_token`
206
+ #### `:secret_key_base`
207
207
 
208
208
  Sets a secure random secret token. This will write the following ENV vars:
209
- `SECRET_TOKEN`
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 SecretToken < Step
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 "SECRET_TOKEN", SecureRandom.hex(64)
10
+ env "SECRET_KEY_BASE", SecureRandom.hex(64)
11
11
  end
12
12
  end
13
13
  end
data/lib/stairs/steps.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Stairs
2
2
  module Steps
3
- autoload :SecretToken, "stairs/steps/secret_token"
3
+ autoload :SecretKeyBase, "stairs/steps/secret_key_base"
4
4
  autoload :Postgresql, "stairs/steps/postgresql"
5
5
  autoload :Facebook, "stairs/steps/facebook"
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Stairs
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
data/lib/stairs.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "stairs/version"
2
+ require "active_support"
2
3
  require "active_support/core_ext"
3
4
  require "colorize"
4
5
 
@@ -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.7.1
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-04-06 00:00:00.000000000 Z
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/secret_token.rb
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/secret_token_spec.rb
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/secret_token_spec.rb
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