qismo 0.17.6 → 0.17.9
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 +4 -4
- data/Rakefile +2 -0
- data/lib/qismo/version.rb +1 -1
- data/lib/qismo.rb +13 -0
- data/lib/tasks/vscode-snippet.rake +17 -0
- data/qismo.gemspec +4 -3
- data/vscode-snippet/qismo.code-snippets +35 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8260840932bcba50d8c29097ecdb86182d53d34337fdddb624a9f60708fb0a6
|
4
|
+
data.tar.gz: a474e1ce7cad0d6c9529f32a9a58abb01ad76798227f9b43c8825a561038e18f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bfcfcd390b1cea3ee31fc67ac5649f518327bea9c7c09471f1b3f36b2cab36ca9e4a19798f07d512fdb2b58960ceaf5e2c7b070849a737dc0e395362064f97b
|
7
|
+
data.tar.gz: a3f990481404e878c7504e3e71e5ecb9191ba7cb753643f4d7cd225b1f501e42f068ac2d0aeba4acedb0a66ef302a4615d9fde535bcb2724c2256e52be185150
|
data/Rakefile
CHANGED
data/lib/qismo/version.rb
CHANGED
data/lib/qismo.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "pathname"
|
3
4
|
require "active_support/all"
|
4
5
|
require "dry-struct"
|
5
6
|
require "http"
|
@@ -47,4 +48,16 @@ require "qismo/client"
|
|
47
48
|
# Qismo ruby root module
|
48
49
|
#
|
49
50
|
module Qismo
|
51
|
+
# @return [Pathname]
|
52
|
+
def self.root_path
|
53
|
+
Pathname.new(File.expand_path(__dir__))
|
54
|
+
end
|
55
|
+
|
56
|
+
# @return [Pathname]
|
57
|
+
def self.gem_path
|
58
|
+
loaded_specs = Gem.loaded_specs["qismo"]
|
59
|
+
raise ArgumentError.new("qismo not loaded yet") if loaded_specs.nil?
|
60
|
+
|
61
|
+
Pathname.new(loaded_specs.full_gem_path)
|
62
|
+
end
|
50
63
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "fileutils"
|
2
|
+
require "qismo"
|
3
|
+
|
4
|
+
desc "Generate Vscode snippets of this gem"
|
5
|
+
namespace :qismo do
|
6
|
+
task :generate_vscode_snippets do
|
7
|
+
code_snippet_file = Qismo.gem_path.join("..", "..", "vscode-snippet", "qismo.code-snippets")
|
8
|
+
|
9
|
+
destination_folder = Qismo.root_path.join(".vscode")
|
10
|
+
if defined?(Rails)
|
11
|
+
destination_folder = Rails.root.join(".vscode")
|
12
|
+
end
|
13
|
+
|
14
|
+
FileUtils.mkdir(destination_folder.to_s) unless Dir.exist?(destination_folder.to_s)
|
15
|
+
FileUtils.cp(code_snippet_file.to_s, destination_folder.to_s)
|
16
|
+
end
|
17
|
+
end
|
data/qismo.gemspec
CHANGED
@@ -16,9 +16,10 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.license = "MIT"
|
17
17
|
|
18
18
|
spec.metadata = {
|
19
|
-
"source_code_uri" => "https://bitbucket.org/qiscus/qismo-rb",
|
20
|
-
"documentation_uri" => "https://www.rubydoc.info/gems/qismo",
|
21
|
-
"homepage_uri" => spec.homepage
|
19
|
+
"source_code_uri" => "https://bitbucket.org/qiscus/qismo-rb/src/v#{spec.version}",
|
20
|
+
"documentation_uri" => "https://www.rubydoc.info/gems/qismo/#{spec.version}",
|
21
|
+
"homepage_uri" => spec.homepage,
|
22
|
+
"rubygems_mfa_required" => "true"
|
22
23
|
}
|
23
24
|
|
24
25
|
ignored = Regexp.union(
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"Initiate Qismo client": {
|
3
|
+
"prefix": "Qismo",
|
4
|
+
"body": [
|
5
|
+
"client = Qismo::Client.new(",
|
6
|
+
" app_id: \"${1:app_id}\",",
|
7
|
+
" secret_key: \"${2:secret_key}\",",
|
8
|
+
" url: \"https://qismo.qiscus.com\",",
|
9
|
+
" logger: Logger.new($stdout),",
|
10
|
+
" timeout: {connect: 5, write: 2, read: 10},",
|
11
|
+
" proxy: [\"proxy-hostname.local\", 8080, \"username\", \"password\"]",
|
12
|
+
")"
|
13
|
+
],
|
14
|
+
"description": "Initiate Qismo client"
|
15
|
+
},
|
16
|
+
"List rooms": {
|
17
|
+
"prefix": "client.rooms",
|
18
|
+
"body": [
|
19
|
+
"rooms = client.rooms(",
|
20
|
+
" channels: [{ source: \"wa\", channel_id: 716171 }],",
|
21
|
+
" status: \"unresolved\",",
|
22
|
+
" serve_status: \"served\",",
|
23
|
+
" is_handled_by_bot: false,",
|
24
|
+
" name: \"Qiscus\",",
|
25
|
+
" limit: 50,",
|
26
|
+
" tag_ids: [1,2,3],",
|
27
|
+
" user_ids: [5,6,7],",
|
28
|
+
" order: \"desc\",",
|
29
|
+
" cursor_before: \"\",",
|
30
|
+
" cursor_after: \"\"",
|
31
|
+
")"
|
32
|
+
],
|
33
|
+
"description": "List rooms"
|
34
|
+
}
|
35
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qismo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qiscus Integration
|
@@ -112,14 +112,17 @@ files:
|
|
112
112
|
- lib/qismo/webhook_requests/on_message_for_bot_sent.rb
|
113
113
|
- lib/qismo/webhook_requests/on_new_session_initiated.rb
|
114
114
|
- lib/qismo/webhook_requests/on_room_resolved.rb
|
115
|
+
- lib/tasks/vscode-snippet.rake
|
115
116
|
- qismo.gemspec
|
117
|
+
- vscode-snippet/qismo.code-snippets
|
116
118
|
homepage: https://bitbucket.org/qiscus/qismo-rb
|
117
119
|
licenses:
|
118
120
|
- MIT
|
119
121
|
metadata:
|
120
|
-
source_code_uri: https://bitbucket.org/qiscus/qismo-rb
|
121
|
-
documentation_uri: https://www.rubydoc.info/gems/qismo
|
122
|
+
source_code_uri: https://bitbucket.org/qiscus/qismo-rb/src/v0.17.9
|
123
|
+
documentation_uri: https://www.rubydoc.info/gems/qismo/0.17.9
|
122
124
|
homepage_uri: https://bitbucket.org/qiscus/qismo-rb
|
125
|
+
rubygems_mfa_required: 'true'
|
123
126
|
post_install_message:
|
124
127
|
rdoc_options: []
|
125
128
|
require_paths:
|