lita-ey-deploy 0.0.1 → 0.0.2

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: c57c5e1dc6b698942ab680084032f8c092ec7f17
4
- data.tar.gz: 90664fab373e9898e8ddea68ee7344ff8583418d
3
+ metadata.gz: 7a8a5ff6689d0fbe3ee862f223d7cbb7f64c7fb1
4
+ data.tar.gz: f4b533d909c7a39027587fd4011435d6676e4b4c
5
5
  SHA512:
6
- metadata.gz: 25d02ce00dc8506408c8cdc45f919b9e7caad6eeda1952a04416eec7e3ba09c12a94919883a8a25e5e652b600fd3be2b973547c56ee09c6bbdc00cfcfce4124b
7
- data.tar.gz: f60bc4e91c04cbb26f1e3b014de4c983ddbe5711a9a75a9f703e602fcdbc1ebf5558e52d4f8604616a9bb8697095d61ca5a165dde21b6522e8a262ba2c7fe1b8
6
+ metadata.gz: 31aed7dbe7a9db6ec0c0f74e3948a80835579b7305ff1f2391934010b6925f5e78a21d0b42262f2e75ca70dca5e3cecb5d5ea63a0755a7882a695928d0f4703b
7
+ data.tar.gz: 0c7d19aefd0940bee10dcd716eb2bd492680cf7fe934923322a8d90c8a79c45bbfd7e83d5072d7838e821f15a7d2232c69406b942e1561a103601ea87756b7ba
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lita-ey-deploy (0.0.1)
4
+ lita-ey-deploy (0.0.2)
5
5
  engineyard
6
6
  lita (>= 3.2.0)
7
7
 
@@ -4,12 +4,12 @@ module Lita
4
4
  module Handlers
5
5
  class EyDeploy < Handler
6
6
 
7
- route(/deploy help/i, :help, command: true, help: {
8
- "deploy help" => "Display list of apps and envs available, and groups authorized to deploy on them"
7
+ route(/ey deploy help/i, :help, command: true, help: {
8
+ "ey deploy help" => "Display list of apps and envs available, and groups authorized to deploy on them"
9
9
  })
10
10
 
11
- route(/deploy (\w*) (\w*)( [\w\/\.\-\_]*)?/i, :deploy, command: true, help: {
12
- "deploy [app] [env] <branch_name>" => "Deploy specified branch (or default) to env [test, staging, production]"
11
+ route(/ey deploy (\w*) (\w*)( [\w\/\.\-\_]*)?/i, :deploy, command: true, help: {
12
+ "ey deploy [app] [env] <branch_name>" => "Deploy specified branch (or default) to env [test, staging, production]"
13
13
  })
14
14
 
15
15
  def self.default_config(config)
@@ -37,8 +37,8 @@ module Lita
37
37
  end
38
38
 
39
39
  def deploy(response)
40
- app = response.matches[0][0].strip
41
- env = response.matches[0][1].strip
40
+ app = response.matches[0][0].strip
41
+ env = response.matches[0][1].strip
42
42
 
43
43
  response.reply "Deploy what to where?" and return unless valid_app?(app) && valid_env?(app, env)
44
44
 
@@ -54,7 +54,7 @@ module Lita
54
54
  feedback_msg = deploy_result.include?(ey_failure_msg) ? failed_msg : success_msg
55
55
  response.reply feedback_msg
56
56
  else
57
- response.reply "Sorry, you don't have access; you must me at #{required_group_to_deploy(app, env)} group."
57
+ response.reply access_denied % { group_name: required_group_to_deploy(app, env) }
58
58
  end
59
59
  end
60
60
 
@@ -92,6 +92,10 @@ module Lita
92
92
  "Deployment failed! Shame on you!"
93
93
  end
94
94
 
95
+ def access_denied
96
+ "Sorry, you don't have access; you must be at %{group_name} group."
97
+ end
98
+
95
99
  def default_branch_for(app, env)
96
100
  config.apps[app]["envs"][env]["default_branch"] || "master"
97
101
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-ey-deploy"
3
- spec.version = "0.0.1"
3
+ spec.version = "0.0.2"
4
4
  spec.authors = ["Carlos Paramio"]
5
5
  spec.email = ["cparamio@avallain.com"]
6
6
  spec.description = %q{A Lita handler for EngineYard deployments.}
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Lita::Handlers::EyDeploy, lita_handler: true do
4
- it { routes_command("deploy appname envname develop").to(:deploy) }
5
- it { routes_command("deploy appname envname release/1.0").to(:deploy) }
4
+ it { routes_command("ey deploy appname envname develop").to(:deploy) }
5
+ it { routes_command("ey deploy appname envname release/1.0").to(:deploy) }
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-ey-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Paramio