kamigo 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd8914c615cbe6e276dc27fb3e666567cffe819e1235a98eab1cb5b784738b8e
4
- data.tar.gz: 47b4cf9cb513585ae8cad02a64238faf6c03f26bb968d0c0d77b5d690f7c8052
3
+ metadata.gz: 05f1fd7d4e57f8931196756adfbad1f4cf9083d8b4f65538d0ecd05fd18dc700
4
+ data.tar.gz: c7f589be49fa51b5a2ae4da0f32e8622e90df52aae4be858c1cba1acb0961419
5
5
  SHA512:
6
- metadata.gz: 8675bb0ffcae2124d20cd512727e67f3f73d5e2119ebf173f7fe073332b3bde5678a33ddf38bc4215bbe3baccd6475165d96c3d6ea89c008efeb0002c77b18b2
7
- data.tar.gz: 27ba23384392a2cf0e1aab6d66957669ab3c762b4efb51d02624c6770f9971c418e8e3249cb0da6e6a8cf584fc9fe5a7362a6bd42917dd0536f2617ad6aea381
6
+ metadata.gz: d13b48d19628617ed526a08cfa1e9b1aa44fef8b2bf88faea1b5f73f4f8e625eea7b39359162f84f23ca067d11bcb93ef7ba82d755d9224a002f497f7c668e00
7
+ data.tar.gz: a5a8c75b0451e725d8d06f95df25fd1b8a053bf0b934db430bbfa209ad2dc7a33e9c8da61919decd03a317684ad7d0f55e19388dc112dde1d40caa4694a18960
data/README.md CHANGED
@@ -137,11 +137,11 @@ Kamigo 預設使用基本的語意理解模型,會將使用者輸入視為在
137
137
 
138
138
  # 使用 kamigo 製作的聊天機器人
139
139
  - [kamigo demo](https://github.com/etrex/kamigo_demo)
140
- <p><img width="100" height="100" src="/doc/images/kamigo_demo_qrcode.png"></p>
140
+ <p><img width="100" height="100" src="/docs/images/kamigo_demo_qrcode.png"></p>
141
141
  - [健身紀錄機器人: Muscle-Man](https://github.com/louis70109/muscle_man)
142
142
  <p><img width="100" height="100" src="https://camo.githubusercontent.com/b8c51b15b20b159d356245277d079c04482acc01/68747470733a2f2f692e696d6775722e636f6d2f7534547675676e2e706e67"></p>
143
143
  - 守護寵物機器人
144
- <p><img width="100" height="100" src="/doc/images/pet_loved_qrcode.png"></p>
144
+ <p><img width="100" height="100" src="/docs/images/pet_loved_qrcode.png"></p>
145
145
 
146
146
  # 計畫
147
147
  - 提供多種語意理解模型串接
@@ -1,6 +1,6 @@
1
1
  require 'uri'
2
2
 
3
- class LineController < ApplicationController
3
+ class LineController < ActionController::Base
4
4
  protect_from_forgery with: :null_session
5
5
 
6
6
  def entry
@@ -11,4 +11,19 @@ Kamigo.setup do |config|
11
11
 
12
12
  # When line_default_message is nil, then Kamigo don't reply message.
13
13
  # config.line_default_message = nil
14
+
15
+ # Integrate with line login
16
+ # config.line_login_channel_id = ENV["LINE_LOGIN_CHANNEL_ID"]
17
+ # config.line_login_channel_secret = ENV["LINE_LOGIN_CHANNEL_SECRET"]
18
+ # config.line_login_redirect_uri = ENV["LINE_LOGIN_REDIRECT_URI"]
19
+
20
+ # Integrate with liff
21
+ # config.liff_url_compact = ENV["LIFF_COMPACT"]
22
+ # config.liff_url_tall = ENV["LIFF_TALL"]
23
+ # config.liff_url_full = ENV["LIFF_FULL"]
24
+
25
+ # Integrate with line messaging api
26
+ # config.line_message_api_channel_id = ENV["LINE_CHANNEL_ID"]
27
+ # config.line_message_api_channel_secret = ENV["LINE_CHANNEL_SECRET"]
28
+ # config.line_message_api_channel_token = ENV["LINE_CHANNEL_TOKEN"]
14
29
  end
@@ -1,3 +1,3 @@
1
1
  module Kamigo
2
- VERSION = '0.25.0'.freeze
2
+ VERSION = '0.26.0'.freeze
3
3
  end
data/lib/kamigo.rb CHANGED
@@ -26,6 +26,32 @@ module Kamigo
26
26
  mattr_accessor :line_event_processors
27
27
  @@line_event_processors = [EventProcessors::RailsRouterProcessor.new]
28
28
 
29
+ # env
30
+ mattr_writer :line_messaging_api_channel_id
31
+ mattr_writer :line_messaging_api_channel_secret
32
+ mattr_writer :line_messaging_api_channel_access_token
33
+
34
+ def self.line_message_api_channel_id
35
+ @@line_message_api_channel_id = ENV["LINE_CHANNEL_ID"]
36
+ end
37
+
38
+ def self.line_message_api_channel_secret
39
+ @@line_message_api_channel_secret = ENV["LINE_CHANNEL_SECRET"]
40
+ end
41
+
42
+ def self.line_message_api_channel_token
43
+ @@line_message_api_channel_token = ENV["LINE_CHANNEL_TOKEN"]
44
+ end
45
+
46
+ class << self
47
+ delegate :line_login_channel_id, :line_login_channel_id=, to: :Kamiliff
48
+ delegate :line_login_channel_secret, :line_login_channel_secret=, to: :Kamiliff
49
+ delegate :line_login_redirect_uri, :line_login_redirect_uri=, to: :Kamiliff
50
+ delegate :liff_url_compact, :liff_url_compact=, to: :Kamiliff
51
+ delegate :liff_url_tall, :liff_url_tall=, to: :Kamiliff
52
+ delegate :liff_url_full, :liff_url_full=, to: :Kamiliff
53
+ end
54
+
29
55
  def self.setup
30
56
  yield self
31
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamigo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - etrex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.29'
33
+ version: '0.33'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.29.0
36
+ version: 0.33.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0.29'
43
+ version: '0.33'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.29.0
46
+ version: 0.33.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: kamiflex
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.1.2
150
+ rubygems_version: 3.1.6
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: a chatbot framework based on rails