lita-cmd 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95c014b178540ac78fea8382a329a46edc1fd3fb
4
- data.tar.gz: eafa77669e9e74df536f60884ab8e27baaee251f
3
+ metadata.gz: aad579995756a9b615f84a1e21d82a792bd3821b
4
+ data.tar.gz: 7537fa112442272d5b5a79adafd26118d9d97e68
5
5
  SHA512:
6
- metadata.gz: 1e7b4d4f78418f742d86a96b6a5e63ed58d4571972a79475c1e53f897d5bd3ef017c57209f866915a73c2b6d0bc6599d6901c6a1f4ac8fefa985c654ae715caa
7
- data.tar.gz: 50035f127e8286d385a920517b5f7577211a69bd7456016891ee2dd7fe6b78a59649b1b74fdc11fc1a3f78feb2fdbedb2eeeacf8cdf70135d7ba48ca20bc1dce
6
+ metadata.gz: 54be9aa10e634b1c3f197d72486790b3c533a4e11630546c6a3a25fa7b2783c01a8d3b82075ffcc4b0946193c30844ca2985a29f9b66558e6436369b4a5bf287
7
+ data.tar.gz: ff9f77fac39ba0c58e9f555696d797ffc7b770dae7d36da20df2a747573d6086c70da5b8f53559379d91de13ef431995ef77d7b5f2496804aec7a7497745a243
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.3.2
2
+
3
+ - [a79c08b](https://github.com/dfinninger/lita-cmd/commit/a79c08b7cde2295b34d38016827d410962632866): Fix issue with `lita-slack`
4
+ - [@DannyBen](https://github.com/DannyBen)
5
+
1
6
  ## 0.3.0
2
7
 
3
8
  - [6aa45ca](https://github.com/dfinninger/lita-cmd/commit/6aa45ca0acc68c8677562704a0d4436189f102f3): Customize stdout/stderr prefixes and code format.
@@ -22,12 +22,12 @@ module Lita
22
22
  opts = resp.matches[0][1].split(" ")
23
23
 
24
24
  # the script will be the robot name if command_prefix is empty
25
- return if script =~ /@?#{robot.name}/i
25
+ return if robot_name and script =~ /^@?#{robot_name}$/i
26
26
 
27
27
  return show_help(resp) if script == 'list'
28
28
 
29
29
  unless user_is_authorized(script, resp, config)
30
- resp.reply_privately "Unauthorized to run '#{script}'!"
30
+ resp.reply_privately "Unauthorized to run '#{script}'!" unless config.command_prefix.empty?
31
31
  return
32
32
  end
33
33
 
@@ -97,6 +97,12 @@ module Lita
97
97
  list = get_script_list(resp, config)
98
98
  list.include? script
99
99
  end
100
+
101
+ def robot_name
102
+ return robot.name unless robot.name.empty?
103
+ return robot.mention_name unless robot.mention_name.empty?
104
+ return false
105
+ end
100
106
  end
101
107
 
102
108
  Lita.register_handler(Cmd)
data/lita-cmd.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-cmd"
3
- spec.version = "0.3.1"
3
+ spec.version = "0.3.2"
4
4
  spec.authors = ["Devon Finninger"]
5
5
  spec.email = ["devon.finninger@peopleadmin.com"]
6
6
  spec.description = "Run commands from Lita"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-cmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Finninger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-03 00:00:00.000000000 Z
11
+ date: 2016-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita