ruboty-virtual_name_card 0.1.6 → 1.0.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28bc56badbb1fc10e1b7fe8d492df4ab3f3ac7aa67c3252d97686a0618c8c53d
|
4
|
+
data.tar.gz: acbfe1dbbe40bd5d98ba8262195dcded3b61d520c44a0f9ae8254d2e9c2bf963
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d270e3d1d4760e880fc4aac7f5d8e357f43b7a900d5819a7fe8377e70d8eea0dcd113c43b708b9568d9ebd93da90750674f3cbd80ab874b0f6d61eed03f00a4
|
7
|
+
data.tar.gz: 3cfb0007b8c0195ffa74f2d22304462be565f9b673317632751209f71f600d2c4955a0ec0ddd3023911e402ee455401a41c555bebb5b5035fbbcc2e620e90f29
|
@@ -4,24 +4,25 @@ module Ruboty
|
|
4
4
|
module Handlers
|
5
5
|
class VirtualNameCard < Base
|
6
6
|
on(
|
7
|
-
/背景画像 (?<name_kanji>.+),(?<name_romaji>.+),(?<role>.*),(?<email>.*),(?<twitter_account>.*)\z/,
|
7
|
+
/背景画像 (?<name_kanji>.+),(?<name_romaji>.+),(?<role>.*),(?<email>.*),(?<twitter_account>.*),(?<url>.*)\z/,
|
8
8
|
name: "generate_virtual_name_card",
|
9
9
|
description: "Generate virtual name card",
|
10
10
|
)
|
11
11
|
|
12
12
|
def generate_virtual_name_card(message)
|
13
|
-
|
13
|
+
virtual_name_card_image = ::VirtualNameCard::Generator.build(
|
14
14
|
name_kanji: message[:name_kanji],
|
15
15
|
name_romaji: message[:name_romaji],
|
16
16
|
role: message[:role] == "" ? nil : message[:role],
|
17
17
|
email: message[:email] == "" ? nil : message[:email],
|
18
18
|
twitter_account: message[:twitter_account] == "" ? nil : message[:twitter_account],
|
19
|
+
url: message[:url] == "" ? nil : message[:url],
|
19
20
|
)
|
20
21
|
|
21
22
|
message.reply(
|
22
23
|
"できました!",
|
23
24
|
file: {
|
24
|
-
path:
|
25
|
+
path: virtual_name_card_image.mini_magick_image.path,
|
25
26
|
title: message[:name_romaji],
|
26
27
|
content_type: "image/jpeg" # TODO: Change for virtual name card image
|
27
28
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-virtual_name_card
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michikawa Masayoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|