karma 0.1.0 → 0.1.2

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: 56f3714acf48a27fd7815e001ae0db4d3f0620d88b5d56783d0e30f87ba466de
4
- data.tar.gz: 60fdd49cd456d5600a82aaa78570987dfc8e6daef337e12611d64b1f3b84ca16
3
+ metadata.gz: ece4fcc71dff9720e07830b8b6edbdf951338b8f15b95b5c72fe6945495ad748
4
+ data.tar.gz: 1022d07ed67ba6f46d95e1b2807d086000b0950d65b2e986289120a8c75f81e2
5
5
  SHA512:
6
- metadata.gz: 97227f14c1a966fc6d6668202954eb113938072fd38ac30a618c9da126359528ccf89174fc1f7b7f5abaa3622afef98408b45236e757acb018d5ecbfbfff9564
7
- data.tar.gz: 85c528d67cbdd9b4e19fcd87f76549ced9d8415e8bd1c3fd366e06fb39ff65cbdb1b0253aa0cc1bd9fb981bab7a0e8e8dbfa7187bd3b766b734a50173489e968
6
+ metadata.gz: ed2f81c6cb1ef0d4d8dd25d473338cb68d66f63e48c2e32c93bcb185cced7935f8721cfb720cc0f108b31d0e8b55cdb1236aee067715b76d25a2b3665fb846c4
7
+ data.tar.gz: 46d7ae0f5f2b47c7039687343b78d799c5e773cb6881314e7026637fa248c467dfd73898bdfaeb522516a6cec5eb2301689907b49cf1253e0bbe5b6b00271ea8
data/Gemfile.lock ADDED
@@ -0,0 +1,48 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ karma (0.1.2)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ json (2.6.3)
11
+ language_server-protocol (3.17.0.3)
12
+ minitest (5.18.1)
13
+ parallel (1.23.0)
14
+ parser (3.2.2.3)
15
+ ast (~> 2.4.1)
16
+ racc
17
+ racc (1.7.1)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.8.1)
21
+ rexml (3.2.5)
22
+ rubocop (1.54.1)
23
+ json (~> 2.3)
24
+ language_server-protocol (>= 3.17.0)
25
+ parallel (~> 1.10)
26
+ parser (>= 3.2.2.3)
27
+ rainbow (>= 2.2.2, < 4.0)
28
+ regexp_parser (>= 1.8, < 3.0)
29
+ rexml (>= 3.2.5, < 4.0)
30
+ rubocop-ast (>= 1.28.0, < 2.0)
31
+ ruby-progressbar (~> 1.7)
32
+ unicode-display_width (>= 2.4.0, < 3.0)
33
+ rubocop-ast (1.29.0)
34
+ parser (>= 3.2.1.0)
35
+ ruby-progressbar (1.13.0)
36
+ unicode-display_width (2.4.2)
37
+
38
+ PLATFORMS
39
+ x86_64-darwin-21
40
+
41
+ DEPENDENCIES
42
+ karma!
43
+ minitest (~> 5.0)
44
+ rake (~> 13.0)
45
+ rubocop (~> 1.21)
46
+
47
+ BUNDLED WITH
48
+ 2.4.6
data/karma.gemspec CHANGED
@@ -10,12 +10,12 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "Ruby client for the Karma key-counter database"
12
12
  spec.description = "Ruby client for the Karma key-counter database"
13
- spec.homepage = "https://github.com/creadone/karma-rb"
13
+ spec.homepage = "https://github.com/creadone/karmarb"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.6.0"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.com/creadone/karma-rb"
18
+ spec.metadata["source_code_uri"] = "https://github.com/creadone/karmarb"
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -4,11 +4,12 @@ module Karma
4
4
  @port = Karma.config.port
5
5
  @host = Karma.config.host
6
6
  @maxlen = 4096
7
-
8
- establish_connection!
9
7
  end
10
8
 
11
9
  def send_and_read(request)
10
+ unless defined?(@socket)
11
+ establish_connection!
12
+ end
12
13
  send(request)
13
14
  read
14
15
  end
@@ -48,8 +49,7 @@ module Karma
48
49
 
49
50
  def establish_connection!
50
51
  @socket = TCPSocket.new(
51
- @host,
52
- @port,
52
+ @host, @port,
53
53
  connect_timeout: 0.5
54
54
  )
55
55
  end
data/lib/karma/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Karma
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Fedorov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-04 00:00:00.000000000 Z
11
+ date: 2023-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client for the Karma key-counter database
14
14
  email:
@@ -19,6 +19,7 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - ".rubocop.yml"
21
21
  - Gemfile
22
+ - Gemfile.lock
22
23
  - LICENSE.txt
23
24
  - README.md
24
25
  - Rakefile
@@ -28,12 +29,12 @@ files:
28
29
  - lib/karma/connection.rb
29
30
  - lib/karma/tree.rb
30
31
  - lib/karma/version.rb
31
- homepage: https://github.com/creadone/karma-rb
32
+ homepage: https://github.com/creadone/karmarb
32
33
  licenses:
33
34
  - MIT
34
35
  metadata:
35
- homepage_uri: https://github.com/creadone/karma-rb
36
- source_code_uri: https://github.com/creadone/karma-rb
36
+ homepage_uri: https://github.com/creadone/karmarb
37
+ source_code_uri: https://github.com/creadone/karmarb
37
38
  post_install_message:
38
39
  rdoc_options: []
39
40
  require_paths: