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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 595894dd73200a5fe967d4a7e0bca4131e6f38e5
4
- data.tar.gz: 8c634389fe0f5c187f9869d021d18bcd33c463d6
3
+ metadata.gz: 6d6d167c62a039ee084644bc4abca752d16e1b72
4
+ data.tar.gz: 03506720bc16208688eb3b53dee4e44b4a15a554
5
5
  SHA512:
6
- metadata.gz: 0814c67192f0667b8f0b69cc7c239e49d9a53e5e8cf0137b3e70a02dfedc19c6756dcaa8a885a91c1b95dc0d19c3e6bcc9557e78717fe8bbb76a3aa344ba7668
7
- data.tar.gz: dd7c5d4f1c844517f566a74b822a655a0f2de640855d558aa53f8a578b881bb759efce7582a11917be8c025a69705d7dded45c3236cd974367d6b774bc393d61
6
+ metadata.gz: 981b7bbffce43bb6cf7e5b8a812db1894cc497adec4376b5988e316be41bc4f7f9835d88980afe882012dbd906e1514d02af0ed720d67f3f9d273830d0b5b6ab
7
+ data.tar.gz: 4721249c46d015961e1bb3834911311906cbdf044a8646e4b03dbd6ccd601c5d32fafc6fafde938196414622756ec90a4853d941786dd265c0c416d64643b984
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 0.0.2
2
+ * Add a command to delete alias
3
+
4
+ ## 0.0.1
5
+ * 1st Release
data/README.md CHANGED
@@ -12,4 +12,5 @@ gem "ellen-alias"
12
12
  @ellen alias p -> ping - Register "p" as "ping"
13
13
  @ellen p - Recognize "p" as "ping"
14
14
  @ellen list alias - List registered aliases
15
+ @ellen delete alias - Delete registered alias
15
16
  ```
@@ -1,5 +1,5 @@
1
1
  module Ellen
2
2
  module Alias
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -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.1
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