qismo 0.17.7 → 0.17.9

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: c8260840932bcba50d8c29097ecdb86182d53d34337fdddb624a9f60708fb0a6
4
+ data.tar.gz: a474e1ce7cad0d6c9529f32a9a58abb01ad76798227f9b43c8825a561038e18f
5
5
  SHA512:
6
- metadata.gz: 27e4673e0031fd434534750eaa4df4f4b3624b5e14df7e44fead5f45b907fa5403cad78c195c2c73b5d693422522d3cc0a180c97c8e4b1e89532a2a58761aa9a
7
- data.tar.gz: 5f92c7dadace05329d0f05f1fb7e0f3da055c1abd45a684e95e433f70a3d4e6d45cc3219a3e67af459ed3e48363aba997b13b38710d9416ee03b3d416b26e369
6
+ metadata.gz: 7bfcfcd390b1cea3ee31fc67ac5649f518327bea9c7c09471f1b3f36b2cab36ca9e4a19798f07d512fdb2b58960ceaf5e2c7b070849a737dc0e395362064f97b
7
+ data.tar.gz: a3f990481404e878c7504e3e71e5ecb9191ba7cb753643f4d7cd225b1f501e42f068ac2d0aeba4acedb0a66ef302a4615d9fde535bcb2724c2256e52be185150
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.9"
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"
@@ -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
@@ -1,12 +1,17 @@
1
1
  require "fileutils"
2
+ require "qismo"
2
3
 
3
4
  desc "Generate Vscode snippets of this gem"
4
5
  namespace :qismo do
5
6
  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")
7
+ code_snippet_file = Qismo.gem_path.join("..", "..", "vscode-snippet", "qismo.code-snippets")
8
8
 
9
- FileUtils.mkdir(destination_folder) unless Dir.exist?(destination_folder)
10
- FileUtils.cp(code_snippet_file, destination_folder)
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)
11
16
  end
12
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(
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.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qiscus Integration
@@ -119,9 +119,10 @@ homepage: https://bitbucket.org/qiscus/qismo-rb
119
119
  licenses:
120
120
  - MIT
121
121
  metadata:
122
- source_code_uri: https://bitbucket.org/qiscus/qismo-rb
123
- 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
124
124
  homepage_uri: https://bitbucket.org/qiscus/qismo-rb
125
+ rubygems_mfa_required: 'true'
125
126
  post_install_message:
126
127
  rdoc_options: []
127
128
  require_paths: