ellen-alias 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/ellen/alias/version.rb +1 -1
- data/lib/ellen/handlers/alias.rb +14 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d6d167c62a039ee084644bc4abca752d16e1b72
|
4
|
+
data.tar.gz: 03506720bc16208688eb3b53dee4e44b4a15a554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 981b7bbffce43bb6cf7e5b8a812db1894cc497adec4376b5988e316be41bc4f7f9835d88980afe882012dbd906e1514d02af0ed720d67f3f9d273830d0b5b6ab
|
7
|
+
data.tar.gz: 4721249c46d015961e1bb3834911311906cbdf044a8646e4b03dbd6ccd601c5d32fafc6fafde938196414622756ec90a4853d941786dd265c0c416d64643b984
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
data/lib/ellen/alias/version.rb
CHANGED
data/lib/ellen/handlers/alias.rb
CHANGED
@@ -15,6 +15,12 @@ module Ellen
|
|
15
15
|
name: "list",
|
16
16
|
)
|
17
17
|
|
18
|
+
on(
|
19
|
+
/delete alias (?<from>.+)\z/,
|
20
|
+
description: "Delete alias",
|
21
|
+
name: "delete",
|
22
|
+
)
|
23
|
+
|
18
24
|
on(
|
19
25
|
//,
|
20
26
|
description: "Resolve alias if registered",
|
@@ -29,6 +35,14 @@ module Ellen
|
|
29
35
|
message.reply("Registered alias: #{from} -> #{to}")
|
30
36
|
end
|
31
37
|
|
38
|
+
def delete(message)
|
39
|
+
if table.delete(message[:from])
|
40
|
+
message.reply("Deleted")
|
41
|
+
else
|
42
|
+
message.reply("Not found")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
32
46
|
def list(message)
|
33
47
|
message.reply(aliases, code: true)
|
34
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ellen-alias
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- CHANGELOG.md
|
63
64
|
- Gemfile
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|