libvirt_async 0.3.2 → 0.4.0
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/.github/workflows/tests.yml +24 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/lib/libvirt_async/error.rb +2 -0
- data/lib/libvirt_async/handle.rb +2 -0
- data/lib/libvirt_async/implementations.rb +9 -1
- data/lib/libvirt_async/log_formatter.rb +2 -0
- data/lib/libvirt_async/stream_read.rb +2 -0
- data/lib/libvirt_async/timer.rb +2 -0
- data/lib/libvirt_async/util.rb +2 -0
- data/lib/libvirt_async/version.rb +3 -1
- data/lib/libvirt_async/with_dbg.rb +2 -0
- data/lib/libvirt_async.rb +4 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a09af72032f53f8c42c5b94d07545ea1d83162f27b43cc37bf7b76299c09bce3
|
4
|
+
data.tar.gz: 36871662bf7af1a333a0e5209ee280b992bb65c4eca5d57dd9f540b046137f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826e01d8be353bc9dbb9e920ebc4c879970218c6c8808d1db77d3fbd2145ef1a77b894ac5ffb0232381ff45f45a0d667ccd84b9d885c8198c014bc78a0c99123
|
7
|
+
data.tar.gz: 3d85a9f6c6eb9bc7b8c9eec53c9880c79892cc74bf2798473469397c750a9e0d6e589eb42c63901c3984b5f109567df7ce7d5d78ec9830bbd7c8111e5b1db29f
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Tests
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: [ '2.6', '2.7', '3.0' ]
|
14
|
+
name: Tests with Ruby ${{ matrix.ruby }}
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- uses: actions/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
- name: Run tests
|
21
|
+
run: |
|
22
|
+
gem install bundler
|
23
|
+
bundle install
|
24
|
+
bundle exec rake
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
File without changes
|
data/bin/setup
CHANGED
File without changes
|
data/lib/libvirt_async/error.rb
CHANGED
data/lib/libvirt_async/handle.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'async'
|
2
4
|
require 'libvirt_async/with_dbg'
|
3
5
|
require 'libvirt_async/util'
|
@@ -68,10 +70,16 @@ module LibvirtAsync
|
|
68
70
|
remove_handle: method(:remove_handle).to_proc,
|
69
71
|
add_timer: method(:add_timer).to_proc,
|
70
72
|
update_timer: method(:update_timer).to_proc,
|
71
|
-
remove_timer: method(:remove_timer).to_proc
|
73
|
+
remove_timer: method(:remove_timer).to_proc,
|
74
|
+
schedule: method(:schedule).to_proc
|
72
75
|
)
|
73
76
|
end
|
74
77
|
|
78
|
+
def schedule(&block)
|
79
|
+
t = Async::Task.new(Async::Task.current.reactor, nil, &block)
|
80
|
+
t.reactor << t.fiber
|
81
|
+
end
|
82
|
+
|
75
83
|
def add_handle(fd, events, opaque)
|
76
84
|
# add a handle to be tracked by this object. The application is
|
77
85
|
# expected to maintain a list of internal handle IDs (integers); this
|
data/lib/libvirt_async/timer.rb
CHANGED
data/lib/libvirt_async/util.rb
CHANGED
data/lib/libvirt_async.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'logger'
|
2
4
|
require 'libvirt_async/version'
|
3
5
|
require 'libvirt_async/error'
|
@@ -44,8 +46,8 @@ module LibvirtAsync
|
|
44
46
|
|
45
47
|
module_function :build_logger
|
46
48
|
|
47
|
-
def use_logger!(io = STDOUT, options
|
48
|
-
self.logger = build_logger(io, options)
|
49
|
+
def use_logger!(io = STDOUT, **options)
|
50
|
+
self.logger = build_logger(io, **options)
|
49
51
|
end
|
50
52
|
|
51
53
|
module_function :use_logger!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libvirt_async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Talakevich
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libvirt_ffi
|
@@ -60,6 +60,7 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- ".github/workflows/tests.yml"
|
63
64
|
- ".gitignore"
|
64
65
|
- ".travis.yml"
|
65
66
|
- CHANGELOG.md
|
@@ -103,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
107
|
+
rubygems_version: 3.2.32
|
107
108
|
signing_key:
|
108
109
|
specification_version: 4
|
109
110
|
summary: Libvirt event async implementation.
|