lita-ey-info 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +93 -0
- data/LICENSE +19 -0
- data/README.md +20 -0
- data/Rakefile +6 -0
- data/lib/lita-ey-info.rb +1 -0
- data/lib/lita/handlers/ey_info.rb +57 -0
- data/lita-ey-info.gemspec +24 -0
- data/spec/lita/handlers/ey_info_spec.rb +8 -0
- data/spec/spec_helper.rb +8 -0
- metadata +141 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3de1ea3aff8db3f56bf64d3ce7e46f4564017bf1
|
4
|
+
data.tar.gz: b06ee0d6ebc4663ed8512029c86d9921b541616b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e7122451fd6197f2d4dc2c83c59156e5f8c3e0ad1ef2a82bb9ae0185faf685453fe697ad62b4e736c67d3a668e8e580eac7e70c88294e1e7ae09fbf9a64a4c2
|
7
|
+
data.tar.gz: e2349198a2b1f6aaf5789ccb3ff7bae231a8f2c9ab99b0f0ab65ae17240e1e990c89621cde5da199a29a354a9b149f727cd7d9d70b8eb4d62bbb8d93823e75b9
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
lita-ey-info (0.0.1)
|
5
|
+
engineyard
|
6
|
+
lita (>= 3.2.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.3.6)
|
12
|
+
diff-lcs (1.2.5)
|
13
|
+
docile (1.1.3)
|
14
|
+
engineyard (2.3.3)
|
15
|
+
engineyard-cloud-client (~> 1.0.16)
|
16
|
+
engineyard-serverside-adapter (= 2.2.0)
|
17
|
+
escape (~> 0.0.4)
|
18
|
+
highline (~> 1.6.1)
|
19
|
+
launchy (~> 2.1)
|
20
|
+
net-ssh (~> 2.7)
|
21
|
+
rest-client (~> 1.6.0)
|
22
|
+
engineyard-cloud-client (1.0.16)
|
23
|
+
mime-types (~> 1.16)
|
24
|
+
multi_json (~> 1.6)
|
25
|
+
rest-client (~> 1.6.1)
|
26
|
+
engineyard-serverside-adapter (2.2.0)
|
27
|
+
escape (~> 0.0.4)
|
28
|
+
multi_json (~> 1.6)
|
29
|
+
escape (0.0.4)
|
30
|
+
faraday (0.9.0)
|
31
|
+
multipart-post (>= 1.2, < 3)
|
32
|
+
highline (1.6.21)
|
33
|
+
http_router (0.11.1)
|
34
|
+
rack (>= 1.0.0)
|
35
|
+
url_mount (~> 0.2.1)
|
36
|
+
i18n (0.6.9)
|
37
|
+
ice_nine (0.11.0)
|
38
|
+
launchy (2.4.2)
|
39
|
+
addressable (~> 2.3)
|
40
|
+
lita (3.2.0)
|
41
|
+
bundler (>= 1.3)
|
42
|
+
faraday (>= 0.8.7)
|
43
|
+
http_router (>= 0.11.1)
|
44
|
+
i18n (>= 0.6.9)
|
45
|
+
ice_nine (>= 0.11.0)
|
46
|
+
multi_json (>= 1.7.7)
|
47
|
+
puma (>= 2.7.1)
|
48
|
+
rack (>= 1.5.2)
|
49
|
+
redis-namespace (>= 1.3.0)
|
50
|
+
thor (>= 0.18.1)
|
51
|
+
mime-types (1.25.1)
|
52
|
+
multi_json (1.10.0)
|
53
|
+
multipart-post (2.0.0)
|
54
|
+
net-ssh (2.9.1)
|
55
|
+
puma (2.8.2)
|
56
|
+
rack (>= 1.1, < 2.0)
|
57
|
+
rack (1.5.2)
|
58
|
+
rake (10.3.2)
|
59
|
+
redis (3.0.7)
|
60
|
+
redis-namespace (1.4.1)
|
61
|
+
redis (~> 3.0.4)
|
62
|
+
rest-client (1.6.7)
|
63
|
+
mime-types (>= 1.16)
|
64
|
+
rspec (3.0.0.beta2)
|
65
|
+
rspec-core (= 3.0.0.beta2)
|
66
|
+
rspec-expectations (= 3.0.0.beta2)
|
67
|
+
rspec-mocks (= 3.0.0.beta2)
|
68
|
+
rspec-core (3.0.0.beta2)
|
69
|
+
rspec-support (= 3.0.0.beta2)
|
70
|
+
rspec-expectations (3.0.0.beta2)
|
71
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
+
rspec-support (= 3.0.0.beta2)
|
73
|
+
rspec-mocks (3.0.0.beta2)
|
74
|
+
rspec-support (= 3.0.0.beta2)
|
75
|
+
rspec-support (3.0.0.beta2)
|
76
|
+
simplecov (0.8.2)
|
77
|
+
docile (~> 1.1.0)
|
78
|
+
multi_json
|
79
|
+
simplecov-html (~> 0.8.0)
|
80
|
+
simplecov-html (0.8.0)
|
81
|
+
thor (0.19.1)
|
82
|
+
url_mount (0.2.1)
|
83
|
+
rack
|
84
|
+
|
85
|
+
PLATFORMS
|
86
|
+
ruby
|
87
|
+
|
88
|
+
DEPENDENCIES
|
89
|
+
bundler
|
90
|
+
lita-ey-info!
|
91
|
+
rake
|
92
|
+
rspec (>= 3.0.0.beta1)
|
93
|
+
simplecov
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2014 Carlos Paramio
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# lita-ey-info
|
2
|
+
|
3
|
+
A handler for [Lita](http://lita.io/) to display EngineYard info.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add lita-ey-info to your Lita instance's Gemfile:
|
8
|
+
|
9
|
+
``` ruby
|
10
|
+
gem "lita-ey-info"
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```
|
16
|
+
ey envs
|
17
|
+
ey <app_name> <env_name> servers
|
18
|
+
ey <app_name> <env_name> logs
|
19
|
+
ey <app_name> <env_name> status
|
20
|
+
```
|
data/Rakefile
ADDED
data/lib/lita-ey-info.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "lita/handlers/ey_info"
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require "lita"
|
2
|
+
|
3
|
+
module Lita
|
4
|
+
module Handlers
|
5
|
+
class EyInfo < Handler
|
6
|
+
|
7
|
+
route(/ey envs/i, :list_envs, restrict_to: :ey_admins, command: true, help: {
|
8
|
+
"ey envs" => "Display list of all applications and environments."
|
9
|
+
})
|
10
|
+
|
11
|
+
route(/ey (\w*) (\w*) servers/i, :list_servers, restrict_to: :ey_admins, command: true, help: {
|
12
|
+
"ey <app> <env> servers" => "Display list of all servers for an application environment."
|
13
|
+
})
|
14
|
+
|
15
|
+
route(/ey (\w*) (\w*) logs/i, :show_logs, restrict_to: :ey_admins, command: true, help: {
|
16
|
+
"ey <app> <env> logs" => "Retrieve the latest logs for an application environment."
|
17
|
+
})
|
18
|
+
|
19
|
+
route(/ey (\w*) (\w*) status/i, :show_status, restrict_to: :ey_admins, command: true, help: {
|
20
|
+
"ey <app> <env> status" => "Show the deployment status of the application environment."
|
21
|
+
})
|
22
|
+
|
23
|
+
def self.default_config(config)
|
24
|
+
config.api_token = ""
|
25
|
+
end
|
26
|
+
|
27
|
+
def list_envs(response)
|
28
|
+
response.reply "I've sent you the apps and environments list privately... shhhh..." unless response.message.source.private_message?
|
29
|
+
response.reply_privately `ey environments --all --api-token=#{config.api_token}`
|
30
|
+
end
|
31
|
+
|
32
|
+
def list_servers(response)
|
33
|
+
app = response.matches[0][0]
|
34
|
+
env = response.matches[0][1]
|
35
|
+
response.reply "I've sent you the servers list privately... shhhh..." unless response.message.source.private_message?
|
36
|
+
response.reply_privately `ey servers --app=#{app} --environment=#{env} --api-token=#{config.api_token}`
|
37
|
+
end
|
38
|
+
|
39
|
+
def show_logs(response)
|
40
|
+
app = response.matches[0][0]
|
41
|
+
env = response.matches[0][1]
|
42
|
+
response.reply "I've sent you the logs privately... shhhh..." unless response.message.source.private_message?
|
43
|
+
response.reply_privately `ey logs --app=#{app} --environment=#{env} --api-token=#{config.api_token}`
|
44
|
+
end
|
45
|
+
|
46
|
+
def show_status(response)
|
47
|
+
app = response.matches[0][0]
|
48
|
+
env = response.matches[0][1]
|
49
|
+
response.reply "I've sent you the apps and environments list privately... shhhh..." unless response.message.source.private_message?
|
50
|
+
response.reply_privately `ey status --app=#{app} --environment=#{env} --api-token=#{config.api_token}`
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
Lita.register_handler(EyInfo)
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = "lita-ey-info"
|
3
|
+
spec.version = "0.0.1"
|
4
|
+
spec.authors = ["Carlos Paramio"]
|
5
|
+
spec.email = ["hola@carlosparamio.com"]
|
6
|
+
spec.description = %q{A Lita handler to consult EY info.}
|
7
|
+
spec.summary = %q{A Lita handler to consult EY info.}
|
8
|
+
spec.homepage = "https://github.com/carlosparamio/lita-ey-info"
|
9
|
+
spec.metadata = { "lita_plugin_type" => "handler" }
|
10
|
+
|
11
|
+
spec.files = `git ls-files`.split($/)
|
12
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
13
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
14
|
+
spec.require_paths = ["lib"]
|
15
|
+
|
16
|
+
spec.add_runtime_dependency "lita", ">= 3.2.0"
|
17
|
+
|
18
|
+
spec.add_dependency "engineyard"
|
19
|
+
|
20
|
+
spec.add_development_dependency "bundler"
|
21
|
+
spec.add_development_dependency "rake"
|
22
|
+
spec.add_development_dependency "rspec", ">= 3.0.0.beta1"
|
23
|
+
spec.add_development_dependency "simplecov"
|
24
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Lita::Handlers::EyInfo, lita_handler: true do
|
4
|
+
it { routes_command("ey envs").to(:list_envs) }
|
5
|
+
it { routes_command("ey appname envname servers").to(:list_servers) }
|
6
|
+
it { routes_command("ey appname envname logs").to(:show_logs) }
|
7
|
+
it { routes_command("ey appname envname status").to(:show_status) }
|
8
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lita-ey-info
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Carlos Paramio
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lita
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: engineyard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.0.0.beta1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.0.0.beta1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: A Lita handler to consult EY info.
|
98
|
+
email:
|
99
|
+
- hola@carlosparamio.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- .gitignore
|
105
|
+
- Gemfile
|
106
|
+
- Gemfile.lock
|
107
|
+
- LICENSE
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/lita-ey-info.rb
|
111
|
+
- lib/lita/handlers/ey_info.rb
|
112
|
+
- lita-ey-info.gemspec
|
113
|
+
- spec/lita/handlers/ey_info_spec.rb
|
114
|
+
- spec/spec_helper.rb
|
115
|
+
homepage: https://github.com/carlosparamio/lita-ey-info
|
116
|
+
licenses: []
|
117
|
+
metadata:
|
118
|
+
lita_plugin_type: handler
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.1.11
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: A Lita handler to consult EY info.
|
139
|
+
test_files:
|
140
|
+
- spec/lita/handlers/ey_info_spec.rb
|
141
|
+
- spec/spec_helper.rb
|