lita 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +3 -1
- data/lib/lita/message.rb +1 -1
- data/lib/lita/robot.rb +2 -0
- data/lib/lita/version.rb +1 -1
- data/spec/lita/adapters/shell_spec.rb +1 -5
- data/spec/lita/message_spec.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f158cb443c81f822bc6d7e8c79686c2d88d4b54e
|
4
|
+
data.tar.gz: 7b69a1cf250862ccfc8e14f6744d888aca82e4bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d789ea06b6c14ccbc872ff44ec44a4da8c395648e2617fb80f423022dfa1480c109a45981dbd4be6aed48d112908f476e42685cfbe2317c74d229a7f960f9161
|
7
|
+
data.tar.gz: d5f90787d8903222cb433f8d065a0bccd2f2dc7edd7867acc4355d351352286d2876c48264745edd37fad2e861af4331ed24de97477bf95e313376b9fa3dad95
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.1.0 (June 23, 2013)
|
4
|
+
|
5
|
+
* Added a new configuration: `config.robot.mention_name`. This allows the display name of the robot `config.robot.name` to differ from the name Lita uses to detect a message as a command. For example, on HipChat, Lita's name might be displayed as "Lita Bot", but might be mentioned in messages with "LitaBot". This value will default to `config.robot.name` if not set.
|
6
|
+
|
7
|
+
## 1.0.0 (June 22, 2013)
|
8
|
+
|
9
|
+
First stable release.
|
10
|
+
|
3
11
|
## 0.0.1 (June 15, 2013)
|
4
12
|
|
5
13
|
Initial release.
|
data/README.md
CHANGED
@@ -60,6 +60,7 @@ To configure Lita, edit the file `lita_config.rb` generated by the `lita new` co
|
|
60
60
|
``` ruby
|
61
61
|
Lita.configure do |config|
|
62
62
|
config.robot.name = "Sir Bottington"
|
63
|
+
config.robot.mention_name = "bottington"
|
63
64
|
config.robot.adapter = :example_chat_service
|
64
65
|
config.adapter.username = "bottington"
|
65
66
|
config.adapter.password = "secret"
|
@@ -72,7 +73,8 @@ end
|
|
72
73
|
The main config objects are:
|
73
74
|
|
74
75
|
* `robot` - General settings for Lita.
|
75
|
-
* `name` - The name the bot will use on the chat service.
|
76
|
+
* `name` - The display name the bot will use on the chat service.
|
77
|
+
* `mention_name` - The name the bot will look for in messages to determine if the message is being addressed to it. Usually this is the same as the display name, but in some cases it may not be. For example, on HipChat, display names are required to be a first and last name, such as "Lita Bot", whereas the mention system would use a name like "LitaBot". This value defaults to whatever the name is if it's not set.
|
76
78
|
* `adapter` - A symbol or string indicating the adapter to load.
|
77
79
|
* `log_level` - A symbol or string indicating the severity level of log messages to output. Valid options are, in order of severity - `:debug`, `:info`, `:warn`, `:error`, and `:fatal`. For whichever level you choose, log messages of that severity and greater will be output. The default level is `:info`.
|
78
80
|
* `admins` - An array of string user IDs which tell Lita which users are considered administrators. Only these users will have access to Lita's `auth` command.
|
data/lib/lita/message.rb
CHANGED
data/lib/lita/robot.rb
CHANGED
data/lib/lita/version.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
describe Lita::Adapters::Shell do
|
2
|
-
let(:robot)
|
3
|
-
robot = double("Robot")
|
4
|
-
allow(robot).to receive(:name).and_return("Lita")
|
5
|
-
robot
|
6
|
-
end
|
2
|
+
let(:robot) { double("Lita::Robot", name: "Lita", mention_name: "LitaBot") }
|
7
3
|
|
8
4
|
subject { described_class.new(robot) }
|
9
5
|
|
data/spec/lita/message_spec.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe Lita::Message do
|
4
|
-
let(:robot)
|
5
|
-
robot = double("Robot")
|
6
|
-
allow(robot).to receive(:name).and_return("Lita")
|
7
|
-
robot
|
8
|
-
end
|
4
|
+
let(:robot) { double("Lita::Robot", name: "Lita", mention_name: "LitaBot") }
|
9
5
|
|
10
6
|
subject do
|
11
7
|
described_class.new(robot, "Hello", "Carl")
|
@@ -44,7 +40,11 @@ describe Lita::Message do
|
|
44
40
|
|
45
41
|
describe "#command?" do
|
46
42
|
it "is true when the message is addressed to the Robot" do
|
47
|
-
subject = described_class.new(
|
43
|
+
subject = described_class.new(
|
44
|
+
robot,
|
45
|
+
"#{robot.mention_name}: hello",
|
46
|
+
"Carl"
|
47
|
+
)
|
48
48
|
expect(subject).to be_a_command
|
49
49
|
end
|
50
50
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Cuadra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|