heroku-helper 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,8 @@ Heroku deployment helper
8
8
 
9
9
  == SYNOPSIS:
10
10
 
11
- $ heroku-deploy -c share -e staging
12
- $ heroku-deploy -c deploy -e production
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
- hook :before, :share do
29
- puts 'hello before share'
28
+ before :share do
29
+ # run code before sharing
30
30
  end
31
31
 
32
- hook :after, :deploy do
33
- puts 'hello after deploy'
32
+ after :deploy do
33
+ # run code after deploy
34
34
  end
35
35
  end
36
36
 
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module HerokuHelper
5
- VERSION = '0.2.2'
5
+ VERSION = '0.3.0'
6
6
  end
@@ -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
- hook :before, :share do
48
- puts 'hello before share'
55
+ before :share do
56
+ # run code before sharing
49
57
  end
50
58
 
51
- hook :after, :deploy do
52
- puts 'hello after deploy'
59
+ after :deploy do
60
+ # run code after deploy
53
61
  end
54
62
  end
55
63
  FORMAT
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - ELC Technologies