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: 302c9621a2f344f0ceb271a7e79cddfa83bb26ca9d00d8523c3e5eb4e59768c4
4
- data.tar.gz: b86f3892352c4d45bb10013c2f26d3e3d18f154ccf3be7dae2013178c14943da
3
+ metadata.gz: 28bc56badbb1fc10e1b7fe8d492df4ab3f3ac7aa67c3252d97686a0618c8c53d
4
+ data.tar.gz: acbfe1dbbe40bd5d98ba8262195dcded3b61d520c44a0f9ae8254d2e9c2bf963
5
5
  SHA512:
6
- metadata.gz: '0399099b68ba83f89dc763dbc69df93cf9eb13fc9255020d079c7c9c5f9e4b2504138da9b1aa65838158d517bd3dacb6103e7e9f3b0a971d9712937b6e4527cb'
7
- data.tar.gz: 0d603b5e4c3721ff64e34f8d98541e1d9ad56f603b85db2b82cc866e7fd6148b205dd9347587ece69e85002b3fd8d0f018ae87cc6beb472421d1c08d3661c1c1
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
- virtual_name_card = ::VirtualNameCard::Generator.generate(
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: virtual_name_card.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
  }
@@ -1,4 +1,4 @@
1
- require "virtual_name_card/generator"
1
+ require "virtual_name_card"
2
2
 
3
3
  require "ruboty"
4
4
  require "ruboty/virtual_name_card/version"
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module VirtualNameCard
3
- VERSION = "0.1.6"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
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.1.6
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-04-23 00:00:00.000000000 Z
11
+ date: 2020-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruboty