lita-statuspage 0.1.1 → 0.2.0

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: 2c3b9a68400913c33be126b7e4d10e296201c6a0
4
- data.tar.gz: b63d59a3f9b744611d6eb97501ef7353f6669cb8
3
+ metadata.gz: b01c5dde801876bc1c207904cd809f701ee23424
4
+ data.tar.gz: e150d1e626521658e5062ff5d9170085e6aed973
5
5
  SHA512:
6
- metadata.gz: dbd7c5b606d4ae7645a76b0fa99717eb0f7696909f6a8d668bcd1387c7ad1b5897fdb6e3087087c6dd1c5536e1d55fa5071976b8e6b02ec85930eef786fa995a
7
- data.tar.gz: b93a1ede9b26f3c27cd5cd646f7169fa8a8edbc507b84ff8081679bae6e7e104f11e0c2a56e9117dcb60caec4df44e055c1172314ba721708fcf0626623a583f
6
+ metadata.gz: a39ecbcc04239e4b3960beb39c7e9a6fce42ea9fc8de8168928fdee9911ecf0e40bf3f98291f6e9101f07dc5243bd55e2fbe59ebfd76e8bf573c6e64ea9b8a4f
7
+ data.tar.gz: 37e3281f82bed4712d5e9145c8b9c2f911ad4eb2dee0e25487a3474de96980e9502ee88d6e76ba3b6288a69305617d7e0ba3e225ac1a466dd70f2c0bdc9ae462
data/README.md CHANGED
@@ -42,6 +42,8 @@ Lita > Lita statuspage incident list unresolved
42
42
  No incidents to list
43
43
  ```
44
44
 
45
+ **Note:** This plugin also accepts `sp` as the command instead of `statuspage`
46
+
45
47
  ### Incidents
46
48
 
47
49
  #### Create
@@ -2,90 +2,90 @@ module Lita
2
2
  module Handlers
3
3
  class Statuspage < Handler
4
4
  route(
5
- /^statuspage\sincident\snew\s(.+)$/,
5
+ /^(?:statuspage|sp)\sincident\snew\s(.+)$/,
6
6
  :incident_new,
7
7
  command: true,
8
8
  help: {
9
- 'statuspage incident new name:"<name>"' => 'Create a new realtime incident',
10
- ' status:<status>' => '(Optional) One of: investigating|identified|monitoring|resolved ' \
11
- '(default: investigating)',
12
- ' message:"<message>"' => '(Optional) The initial message',
13
- ' twitter:<state>' => '(Optional) Post the new incident to Twitter, one of: ' \
14
- '(true|t|false|f) (default:false)',
15
- ' impact:<state>' => '(Optional) Override calculated impact value, one of: ' \
9
+ '(statuspage|sp) incident new name:"<name>"' => 'Create a new realtime incident',
10
+ ' status:<status>' => '(Optional) One of: investigating|identified|monitoring' \
11
+ '|resolved (default: investigating)',
12
+ ' message:"<message>"' => '(Optional) The initial message',
13
+ ' twitter:<state>' => '(Optional) Post the new incident to Twitter, one of: ' \
14
+ '(true|t|false|f) (default:false)',
15
+ ' impact:<state>' => '(Optional) Override calculated impact value, one of: ' \
16
16
  '(minor|major|critical)'
17
17
  }
18
18
  )
19
19
 
20
20
  route(
21
- /^statuspage\sincident\supdate\s(.+)$/,
21
+ /^(?:statuspage|sp)\sincident\supdate\s(.+)$/,
22
22
  :incident_update,
23
23
  command: true,
24
24
  help: {
25
- 'statuspage incident update id:ABC123 (...)' => 'Update an incident (takes same arguments as new)'
25
+ '(statuspage|sp) incident update id:ABC123 (...)' => 'Update an incident (takes same arguments as new)'
26
26
  }
27
27
  )
28
28
 
29
29
  route(
30
- /^statuspage\sincident\slist(\sall)?$/,
30
+ /^(?:statuspage|sp)\sincident\slist(\sall)?$/,
31
31
  :incident_list_all,
32
32
  command: true,
33
33
  help: {
34
- 'statuspage incident list all' => 'List all incidents'
34
+ '(statuspage|sp) incident list all' => 'List all incidents'
35
35
  }
36
36
  )
37
37
 
38
38
  route(
39
- /^statuspage\sincident\slist\sscheduled$/,
39
+ /^(?:statuspage|sp)\sincident\slist\sscheduled$/,
40
40
  :incident_list_scheduled,
41
41
  command: true,
42
42
  help: {
43
- 'statuspage incident list scheduled' => 'List scheduled incidents'
43
+ '(statuspage|sp) incident list scheduled' => 'List scheduled incidents'
44
44
  }
45
45
  )
46
46
 
47
47
  route(
48
- /^statuspage\sincident\slist\sunresolved$/,
48
+ /^(?:statuspage|sp)\sincident\slist\sunresolved$/,
49
49
  :incident_list_unresolved,
50
50
  command: true,
51
51
  help: {
52
- 'statuspage incident list unresolved' => 'List unresolved incidents'
52
+ '(statuspage|sp) incident list unresolved' => 'List unresolved incidents'
53
53
  }
54
54
  )
55
55
 
56
56
  route(
57
- /^statuspage\sincident\sdelete\slatest$/,
57
+ /^(?:statuspage|sp)\sincident\sdelete\slatest$/,
58
58
  :incident_delete_latest,
59
59
  command: true,
60
60
  help: {
61
- 'statuspage incident delete latest' => 'Delete latest incident'
61
+ '(statuspage|sp) incident delete latest' => 'Delete latest incident'
62
62
  }
63
63
  )
64
64
 
65
65
  route(
66
- /^statuspage\sincident\sdelete\sid:(\w+)$/,
66
+ /^(?:statuspage|sp)\sincident\sdelete\sid:(\w+)$/,
67
67
  :incident_delete,
68
68
  command: true,
69
69
  help: {
70
- 'statuspage incident delete id:<id>' => 'Delete a specific incident'
70
+ '(statuspage|sp) incident delete id:<id>' => 'Delete a specific incident'
71
71
  }
72
72
  )
73
73
 
74
74
  route(
75
- /^statuspage\scomponent\slist(\sall)?$/,
75
+ /^(?:statuspage|sp)\scomponent\slist(\sall)?$/,
76
76
  :component_list,
77
77
  command: true,
78
78
  help: {
79
- 'statuspage component list' => 'Lists all components'
79
+ '(statuspage|sp) component list' => 'Lists all components'
80
80
  }
81
81
  )
82
82
 
83
83
  route(
84
- /^statuspage\scomponent\supdate\s(.+)$/,
84
+ /^(?:statuspage|sp)\scomponent\supdate\s(.+)$/,
85
85
  :component_update,
86
86
  command: true,
87
87
  help: {
88
- 'statuspage component update' => 'Updates the component'
88
+ '(statuspage|sp) component update' => 'Updates the component'
89
89
  }
90
90
  )
91
91
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-statuspage'
3
- spec.version = '0.1.1'
3
+ spec.version = '0.2.0'
4
4
  spec.authors = ['Eric Sigler']
5
5
  spec.email = ['me@esigler.com']
6
6
  spec.description = %q{A Lita handler to interact with Statuspage.io}
@@ -57,6 +57,18 @@ describe Lita::Handlers::Statuspage, lita_handler: true do
57
57
  it { routes_command('statuspage component list all').to(:component_list) }
58
58
  it { routes_command('statuspage component update latest').to(:component_update) }
59
59
 
60
+ it { routes_command('sp incident new name:"foo"').to(:incident_new) }
61
+ it { routes_command('sp incident update latest').to(:incident_update) }
62
+ it { routes_command('sp incident list').to(:incident_list_all) }
63
+ it { routes_command('sp incident list all').to(:incident_list_all) }
64
+ it { routes_command('sp incident list scheduled').to(:incident_list_scheduled) }
65
+ it { routes_command('sp incident list unresolved').to(:incident_list_unresolved) }
66
+ it { routes_command('sp incident delete latest').to(:incident_delete_latest) }
67
+ it { routes_command('sp incident delete id:omgwtfbbq').to(:incident_delete) }
68
+ it { routes_command('sp component list').to(:component_list) }
69
+ it { routes_command('sp component list all').to(:component_list) }
70
+ it { routes_command('sp component update latest').to(:component_update) }
71
+
60
72
  describe '.default_config' do
61
73
  it 'sets api_key to nil' do
62
74
  expect(Lita.config.handlers.statuspage.api_key).to be_nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-statuspage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sigler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-01 00:00:00.000000000 Z
11
+ date: 2014-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita