heroku-helper 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
data/lib/heroku-helper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
def environment(env, &block)
|
2
|
-
HerokuHelper::DeploymentConfiguration.current_environment
|
3
|
-
HerokuHelper::DeploymentConfiguration.configuration[env]
|
2
|
+
HerokuHelper::DeploymentConfiguration.current_environment = env
|
3
|
+
HerokuHelper::DeploymentConfiguration.configuration[env] = {}
|
4
|
+
HerokuHelper::DeploymentConfiguration.configuration[env][:hooks] = {}
|
4
5
|
block.call
|
5
6
|
end
|
6
7
|
|
@@ -11,7 +12,6 @@ end
|
|
11
12
|
|
12
13
|
def hook(stage, command, &block)
|
13
14
|
configuration = HerokuHelper::DeploymentConfiguration.configuration[HerokuHelper::DeploymentConfiguration.current_environment]
|
14
|
-
configuration[:hooks] ||= {}
|
15
15
|
configuration[:hooks][command] ||= {}
|
16
16
|
configuration[:hooks][command][stage] = block
|
17
17
|
end
|