stairs 0.0.2 → 0.1.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 +20 -42
- data/lib/stairs/steps.rb +0 -2
- data/lib/stairs/version.rb +1 -1
- data/stairs.gemspec +0 -4
- metadata +2 -18
- data/lib/stairs/steps/balanced.rb +0 -27
- data/lib/stairs/steps/s3.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1035904a5f2df9f1310a2a7499500e6bb123589
|
4
|
+
data.tar.gz: b96bd24c537f525276cc2c585a12bc8372175e61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c1fe6a87b3af48fb04782a2e773e4fa6284e23141fb34f38dd78e6aebeae835f459d75ad8e6b2f945ee0613701db1345fc83a97d990ee3dc9c3702a50292145
|
7
|
+
data.tar.gz: 05cdd22e964203a638fad22ba4e757bb479e1b54611aad59162caf8af8bdf2604527d3399bfa492aa8bba5aa0e571102479406698cdd694f9b963a1c7486b3fd
|
data/README.md
CHANGED
@@ -12,7 +12,8 @@ environments.
|
|
12
12
|
require "stairs/tasks"
|
13
13
|
```
|
14
14
|
|
15
|
-
1. Define `setup.rb`
|
15
|
+
1. [Define your script](#defining-scripts) in `setup.rb` at the root of your
|
16
|
+
project
|
16
17
|
|
17
18
|
## Usage
|
18
19
|
|
@@ -24,7 +25,8 @@ $ rake newb
|
|
24
25
|
|
25
26
|
## Defining scripts
|
26
27
|
|
27
|
-
A script composes many steps that setup a project.
|
28
|
+
A script composes many steps that setup a project. __Note:__ optional steps are
|
29
|
+
not yet implemented.
|
28
30
|
|
29
31
|
```ruby
|
30
32
|
setup :secret_token
|
@@ -92,61 +94,34 @@ write_line "more: false", "config/settings.yml"
|
|
92
94
|
```
|
93
95
|
|
94
96
|
### Defining setup steps
|
97
|
+
|
98
|
+
__Note:__ this block syntax is not yet implemented, use predefined steps for
|
99
|
+
now.
|
100
|
+
|
95
101
|
```ruby
|
96
102
|
setup :a_cool_service do
|
97
103
|
## ..
|
98
104
|
end
|
99
105
|
```
|
100
106
|
|
101
|
-
#### Using predefined steps
|
107
|
+
#### Using predefined steps (aka plugins)
|
102
108
|
```ruby
|
103
109
|
setup :s3
|
104
110
|
```
|
105
111
|
|
106
112
|
## Plugins for common setups
|
107
113
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
* `:balanced`: automatically creates a test Marketplace on Balanced
|
112
|
-
|
114
|
+
* `:secret_token` sets a secure random secret token
|
115
|
+
* `:s3` interactive prompt for setting AWS + S3 bucket access credentials:
|
116
|
+
[patbenatar/stairs-steps-s3][s3]
|
117
|
+
* `:balanced`: automatically creates a test Marketplace on Balanced:
|
118
|
+
[patbenatar/stairs-steps-balanced][balanced]
|
113
119
|
|
114
120
|
### Defining custom plugins
|
115
121
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
title "S3"
|
120
|
-
description "Setup AWS tokens and bucket"
|
121
|
-
|
122
|
-
def run
|
123
|
-
@key = provide "AWS access key"
|
124
|
-
@secret = provide "AWS secret"
|
125
|
-
|
126
|
-
choice "Do you have an existing bucket?" do |yes|
|
127
|
-
env "S3_BUCKET", if yes
|
128
|
-
provide "Bucket name", default: "app-dev"
|
129
|
-
else
|
130
|
-
create_bucket
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
env "AWS_ACCESS_KEY", @key
|
135
|
-
env "AWS_SECRET", @secret
|
136
|
-
end
|
137
|
-
|
138
|
-
private
|
139
|
-
|
140
|
-
def create_bucket
|
141
|
-
# use @key and @secret to create bucket via API
|
142
|
-
end
|
143
|
-
end
|
144
|
-
```
|
145
|
-
|
146
|
-
## To think about...
|
147
|
-
|
148
|
-
* How to manage gem dependencies (S3Setup for example requires fog to be
|
149
|
-
installed)
|
122
|
+
Steps inherit from `Stairs::Step`, have a title, description, and
|
123
|
+
implement the `run` method. See those included and in the various
|
124
|
+
extension gems for examples.
|
150
125
|
|
151
126
|
## Contributing
|
152
127
|
|
@@ -155,3 +130,6 @@ end
|
|
155
130
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
156
131
|
4. Push to the branch (`git push origin my-new-feature`)
|
157
132
|
5. Create new Pull Request
|
133
|
+
|
134
|
+
[s3]: http://github.com/patbenatar/stairs-steps-s3
|
135
|
+
[balanced]: http://github.com/patbenatar/stairs-steps-balanced
|
data/lib/stairs/steps.rb
CHANGED
data/lib/stairs/version.rb
CHANGED
data/stairs.gemspec
CHANGED
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- patbenatar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 3.2.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: balanced
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.7.4
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.7.4
|
83
69
|
description: A DSL and collection of plugins for easy setup of projects on new development
|
84
70
|
environments.
|
85
71
|
email:
|
@@ -97,8 +83,6 @@ files:
|
|
97
83
|
- lib/stairs/script.rb
|
98
84
|
- lib/stairs/step.rb
|
99
85
|
- lib/stairs/steps.rb
|
100
|
-
- lib/stairs/steps/balanced.rb
|
101
|
-
- lib/stairs/steps/s3.rb
|
102
86
|
- lib/stairs/steps/secret_token.rb
|
103
87
|
- lib/stairs/tasks.rb
|
104
88
|
- lib/stairs/version.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require "balanced"
|
2
|
-
|
3
|
-
module Stairs
|
4
|
-
module Steps
|
5
|
-
class Balanced < Step
|
6
|
-
title "Balanced Payments"
|
7
|
-
description "Creates a test Marketplace on Balanced"
|
8
|
-
|
9
|
-
def run
|
10
|
-
::Balanced.configure(api_key.secret)
|
11
|
-
|
12
|
-
env "BALANCED_URI", marketplace.uri
|
13
|
-
env "BALANCED_KEY", api_key.secret
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def api_key
|
19
|
-
@api_key ||= ::Balanced::ApiKey.new.save
|
20
|
-
end
|
21
|
-
|
22
|
-
def marketplace
|
23
|
-
@marketplace ||= ::Balanced::Marketplace.new.save
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/lib/stairs/steps/s3.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
module Stairs
|
2
|
-
module Steps
|
3
|
-
class S3 < Step
|
4
|
-
title "S3"
|
5
|
-
description "Setup AWS and S3 bucket access"
|
6
|
-
|
7
|
-
def run
|
8
|
-
env "AWS_ACCESS_KEY_ID", provide("AWS Access Key ID")
|
9
|
-
env "AWS_SECRET_ACCESS_KEY", provide("AWS Secret Access Key")
|
10
|
-
env "AWS_S3_BUCKET", provide("S3 Bucket name")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|