qismo 0.17.9 → 0.17.10
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 +0 -2
- data/lib/qismo/version.rb +1 -1
- data/lib/qismo.rb +2 -12
- data/lib/railtie.rb +13 -0
- data/lib/tasks/vscode_snippet.rake +22 -0
- metadata +5 -4
- data/lib/tasks/vscode-snippet.rake +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 438e37ba8805d97e8cc2265c11929b274b8fa5387293b2e2f20fe5add2b54c9f
|
|
4
|
+
data.tar.gz: acb21b8465d43cbadb921578df6f6332ef660d55fd907e03508491074c36cbce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7ed4f10abe1da26a27ebe6994075e0346abcbbe56175f5d81a465e4514a98095775d21bb508ee46e67f027040b6276104eb3500f6011764507a4905d0122653
|
|
7
|
+
data.tar.gz: 29e8e66f501de53c1f9264827dd0105b18594c9d183e97476f040666c456ce66347f513150e7db1e46459b312af3da4e79ee2a2d95bd14994dee2702ccf4d4db
|
data/Rakefile
CHANGED
data/lib/qismo/version.rb
CHANGED
data/lib/qismo.rb
CHANGED
|
@@ -45,19 +45,9 @@ require "qismo/webhook_requests/on_room_resolved"
|
|
|
45
45
|
require "qismo/api"
|
|
46
46
|
require "qismo/client"
|
|
47
47
|
|
|
48
|
+
require "railtie" if defined?(Rails)
|
|
49
|
+
|
|
48
50
|
# Qismo ruby root module
|
|
49
51
|
#
|
|
50
52
|
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
|
|
63
53
|
end
|
data/lib/railtie.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
namespace :qismo do
|
|
2
|
+
namespace :vscode_snippet do
|
|
3
|
+
desc "Generate Qismo VSCode snippet"
|
|
4
|
+
task :create do
|
|
5
|
+
source_file = Pathname.new(Gem.loaded_specs["qismo"]&.full_gem_path).join("vscode-snippet", "qismo.code-snippets")
|
|
6
|
+
destination_folder = Rails.root.join(".vscode")
|
|
7
|
+
|
|
8
|
+
FileUtils.mkdir(destination_folder.to_s) unless Dir.exist?(destination_folder.to_s)
|
|
9
|
+
FileUtils.cp(source_file.to_s, destination_folder.to_s)
|
|
10
|
+
|
|
11
|
+
puts "Successfully created Qismo vscode snippet"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
desc "Delete Qismo VSCode snippet"
|
|
15
|
+
task :delete do
|
|
16
|
+
destination_file = Rails.root.join(".vscode", "qismo.code-snippets")
|
|
17
|
+
FileUtils.rm_f(destination_file)
|
|
18
|
+
|
|
19
|
+
puts "Successfully deleted Qismo vscode snippet"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
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.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Qiscus Integration
|
|
@@ -112,15 +112,16 @@ 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/
|
|
115
|
+
- lib/railtie.rb
|
|
116
|
+
- lib/tasks/vscode_snippet.rake
|
|
116
117
|
- qismo.gemspec
|
|
117
118
|
- vscode-snippet/qismo.code-snippets
|
|
118
119
|
homepage: https://bitbucket.org/qiscus/qismo-rb
|
|
119
120
|
licenses:
|
|
120
121
|
- MIT
|
|
121
122
|
metadata:
|
|
122
|
-
source_code_uri: https://bitbucket.org/qiscus/qismo-rb/src/v0.17.
|
|
123
|
-
documentation_uri: https://www.rubydoc.info/gems/qismo/0.17.
|
|
123
|
+
source_code_uri: https://bitbucket.org/qiscus/qismo-rb/src/v0.17.10
|
|
124
|
+
documentation_uri: https://www.rubydoc.info/gems/qismo/0.17.10
|
|
124
125
|
homepage_uri: https://bitbucket.org/qiscus/qismo-rb
|
|
125
126
|
rubygems_mfa_required: 'true'
|
|
126
127
|
post_install_message:
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|