heroku-helper 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +6 -6
- data/lib/heroku-helper.rb +1 -1
- data/lib/heroku-helper/deployment_configuration.rb +12 -4
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -8,8 +8,8 @@ Heroku deployment helper
|
|
8
8
|
|
9
9
|
== SYNOPSIS:
|
10
10
|
|
11
|
-
$ heroku-
|
12
|
-
$ heroku-
|
11
|
+
$ heroku-helper -c share -e staging
|
12
|
+
$ heroku-helper -c deploy -e production
|
13
13
|
|
14
14
|
heroku_deploy.rb format:
|
15
15
|
|
@@ -25,12 +25,12 @@ heroku_deploy.rb format:
|
|
25
25
|
'gmail_smtp email=foo@bar.com password=sekret'
|
26
26
|
]
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
before :share do
|
29
|
+
# run code before sharing
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
after :deploy do
|
33
|
+
# run code after deploy
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
data/lib/heroku-helper.rb
CHANGED
@@ -16,6 +16,14 @@ def hook(stage, command, &block)
|
|
16
16
|
configuration[:hooks][command][stage] = block
|
17
17
|
end
|
18
18
|
|
19
|
+
def before(command, &block)
|
20
|
+
hook(:before, command, &block)
|
21
|
+
end
|
22
|
+
|
23
|
+
def after(command, &block)
|
24
|
+
hook(:after, command, &block)
|
25
|
+
end
|
26
|
+
|
19
27
|
module HerokuHelper
|
20
28
|
class DeploymentConfiguration
|
21
29
|
|
@@ -44,12 +52,12 @@ environment :production do
|
|
44
52
|
'gmail_smtp email=foo@bar.com password=sekret'
|
45
53
|
]
|
46
54
|
|
47
|
-
|
48
|
-
|
55
|
+
before :share do
|
56
|
+
# run code before sharing
|
49
57
|
end
|
50
58
|
|
51
|
-
|
52
|
-
|
59
|
+
after :deploy do
|
60
|
+
# run code after deploy
|
53
61
|
end
|
54
62
|
end
|
55
63
|
FORMAT
|