qismo 0.17.7 → 0.17.10

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: 331d89d712f3c4690bf10beeaa06f205d9c0247a17ff20d117af7268f2e51050
4
- data.tar.gz: 3e6ecee81e00a6b41e1e6444bd963b21a31447e02b896fe5b3724f4cac0d48f6
3
+ metadata.gz: 438e37ba8805d97e8cc2265c11929b274b8fa5387293b2e2f20fe5add2b54c9f
4
+ data.tar.gz: acb21b8465d43cbadb921578df6f6332ef660d55fd907e03508491074c36cbce
5
5
  SHA512:
6
- metadata.gz: 27e4673e0031fd434534750eaa4df4f4b3624b5e14df7e44fead5f45b907fa5403cad78c195c2c73b5d693422522d3cc0a180c97c8e4b1e89532a2a58761aa9a
7
- data.tar.gz: 5f92c7dadace05329d0f05f1fb7e0f3da055c1abd45a684e95e433f70a3d4e6d45cc3219a3e67af459ed3e48363aba997b13b38710d9416ee03b3d416b26e369
6
+ metadata.gz: b7ed4f10abe1da26a27ebe6994075e0346abcbbe56175f5d81a465e4514a98095775d21bb508ee46e67f027040b6276104eb3500f6011764507a4905d0122653
7
+ data.tar.gz: 29e8e66f501de53c1f9264827dd0105b18594c9d183e97476f040666c456ce66347f513150e7db1e46459b312af3da4e79ee2a2d95bd14994dee2702ccf4d4db
data/Rakefile CHANGED
@@ -10,5 +10,3 @@ require "rubocop/rake_task"
10
10
  RuboCop::RakeTask.new
11
11
 
12
12
  task default: %i[spec rubocop]
13
-
14
- import "./lib/tasks/vscode-snippet.rake"
data/lib/qismo/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Qismo
4
4
  # @return [String]
5
- VERSION = "0.17.7"
5
+ VERSION = "0.17.10"
6
6
  end
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"
@@ -44,6 +45,8 @@ require "qismo/webhook_requests/on_room_resolved"
44
45
  require "qismo/api"
45
46
  require "qismo/client"
46
47
 
48
+ require "railtie" if defined?(Rails)
49
+
47
50
  # Qismo ruby root module
48
51
  #
49
52
  module Qismo
data/lib/railtie.rb ADDED
@@ -0,0 +1,13 @@
1
+ require "qismo"
2
+ require "rails"
3
+
4
+ module Qismo
5
+ class Railtie < Rails::Railtie
6
+ railtie_name :qismo
7
+
8
+ rake_tasks do
9
+ path = File.expand_path(__dir__)
10
+ Dir.glob("#{path}/tasks/*.rake").each { |f| load f }
11
+ end
12
+ end
13
+ end
@@ -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
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(
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.7
4
+ version: 0.17.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qiscus Integration
@@ -112,16 +112,18 @@ 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
+ - 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
123
- documentation_uri: https://www.rubydoc.info/gems/qismo
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
126
+ rubygems_mfa_required: 'true'
125
127
  post_install_message:
126
128
  rdoc_options: []
127
129
  require_paths:
@@ -1,12 +0,0 @@
1
- require "fileutils"
2
-
3
- desc "Generate Vscode snippets of this gem"
4
- namespace :qismo do
5
- task :generate_vscode_snippets do
6
- code_snippet_file = File.join(File.dirname(__FILE__), "..", "..", "vscode-snippet", "qismo.code-snippets")
7
- destination_folder = File.join(File.dirname(__FILE__), "..", "..", ".vscode")
8
-
9
- FileUtils.mkdir(destination_folder) unless Dir.exist?(destination_folder)
10
- FileUtils.cp(code_snippet_file, destination_folder)
11
- end
12
- end