slack_trello 0.0.8 → 0.0.9

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: ded47581e0e2a50541505d6f91cef86dde6a6b38
4
- data.tar.gz: d7ab0b0b7d9e8754dc6e7633020deb40e1f1283c
3
+ metadata.gz: 4a3f9e2b0d4172b5cc6690be677a5868845f5534
4
+ data.tar.gz: 740d9ce537474587c04cd07b0f6d161205573a42
5
5
  SHA512:
6
- metadata.gz: 0bb4bb89a4afe90bdabdc3cd8c6ee2f35f7cc145354c676ff7a672517af061f23ba535c16605650ef1e98eb76d4f846af225e49264f49aa4ca05559df78a723d
7
- data.tar.gz: b6037d7656a917f0263ad753e2acd4d4581ad0432cf640ab0217db56a508c242f462e40131f08aeef8aba8478a2e04c323e09c61d9e276f427b0c5a5e9448146
6
+ metadata.gz: 6c6fc191bf0ea75d35d8a44a9bf51043818026ad02b498abc50c6f52af2d7da181f32aa0a49606afc82ad45a6623da9be355ec1a65a6e8062a96d1e962e9a1b9
7
+ data.tar.gz: a5d4a00caed8e21d4ec58f69a6fe05138be55e3d7570a9c6938d0895b3b0bbf44a88ed4af799744bea8934512b319255bf04cc3874a37ada0211d8c30ff9a255
@@ -10,6 +10,7 @@ module SlackTrello; class CreateCardCommand
10
10
  end
11
11
 
12
12
  def run
13
+ return help_message unless valid_text_format?
13
14
  return board_not_found_message unless trello_card_creator.trello_board
14
15
  return list_not_found_message unless trello_card_creator.trello_list
15
16
 
@@ -20,6 +21,15 @@ module SlackTrello; class CreateCardCommand
20
21
 
21
22
  private
22
23
 
24
+ def help_message
25
+ %{:cry: Invalid format
26
+ Your message: #{text}
27
+ Example: /card (trello_board trello_list) card title
28
+ If the Trello board/list has spaces, replace them with underscores
29
+ For example, Some Board Name => some_board_name
30
+ }
31
+ end
32
+
23
33
  def speaker
24
34
  args = {
25
35
  webhook_url: webhook_url,
@@ -63,7 +73,7 @@ module SlackTrello; class CreateCardCommand
63
73
  end
64
74
 
65
75
  def card_title
66
- parser.text.strip
76
+ text_message
67
77
  end
68
78
 
69
79
  def text
@@ -1,3 +1,3 @@
1
1
  module SlackTrello
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_trello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Powers