pycall_thread 0.1.2 → 0.1.3

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: 5f06a9a4d8b09d14190d2001b9463bdd9101df77ced43e4cf898247718d69b1a
4
- data.tar.gz: 0e0121315ee956037688ad7016621dc3f667c4ec99e05f7541a3a74b4ea61b2c
3
+ metadata.gz: de04a7790f025c9450436bf4258476136b2a9e55732fa0adcbfc9671ecdf2840
4
+ data.tar.gz: db51f2e173305c25bff70add0a291e442c3beb1eee425b5d0aeef1a74a522a5e
5
5
  SHA512:
6
- metadata.gz: 168d6a9aa3c30ece2692ee3bb92502dbabd766097c3e2a90849f3d7d61384806b1e658cb8008c34714a2617c83ca416c395da55c44d2da4d62318d30062385a8
7
- data.tar.gz: fc32925321e4ea1812ecde6416ef6d90130bbc6254a72beaeb265710ed18fc6f44fd1ebc0bf9fcdf7b7eb8d01829ab126cb2f0676c72b86039dda5e0c4c39683
6
+ metadata.gz: 2aa5641cc051976e0cddd405bf98960881ab2ee698c1c35bdbf9fff6cf11bd57ed2cf6515ba140ffce0972e544d4eecce724fcd2a2db83491ec0424319d692c8
7
+ data.tar.gz: 4156c6dbaafbd74ccca113e44aff8fe4760336c12b0965c05b4e805031d0cb5b133a782c3ccd690e6d70a0b875f25bccb557eb8fbd1c751570073ab42beafadb
data/Gemfile CHANGED
@@ -5,11 +5,11 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in pycall_thread.gemspec
6
6
  gemspec
7
7
 
8
- gem "rake", "~> 13.0"
9
8
  gem "minitest", "~> 5.0"
9
+ gem "rake", "~> 13.0"
10
10
  gem "rubocop", "~> 1.21"
11
11
 
12
12
  # To use the local pycall, you must also run things with e.g.:
13
13
  # bundle exec ruby -I/Users/seth/src/pycall.rb/ext/pycall
14
- #
15
- # gem 'pycall', path: '/Users/seth/src/pycall.rb', require: false
14
+ #
15
+ # gem 'pycall', path: '/Users/seth/src/pycall.rb', require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pycall_thread (0.1.2)
4
+ pycall_thread (0.1.3)
5
5
  pycall
6
6
 
7
7
  GEM
@@ -1,4 +1,4 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "puma", "~> 6.4.2"
4
- gem "pycall_thread", "~> 0.1.2"
4
+ gem "pycall_thread", "~> 0.1.3"
@@ -5,15 +5,15 @@ GEM
5
5
  puma (6.4.2)
6
6
  nio4r (~> 2.0)
7
7
  pycall (1.5.2)
8
- pycall_thread (0.1.0)
8
+ pycall_thread (0.1.2)
9
9
  pycall
10
10
 
11
11
  PLATFORMS
12
12
  arm64-darwin-23
13
13
 
14
14
  DEPENDENCIES
15
- puma
16
- pycall_thread
15
+ puma (~> 6.4.2)
16
+ pycall_thread (~> 0.1.2)
17
17
 
18
18
  BUNDLED WITH
19
19
  2.2.33
data/examples/puma/app.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "pycall_thread"
1
+ # require "pycall_thread"
2
+ require_relative "../../lib/pycall_thread"
2
3
 
3
4
  PyCallThread.init do
4
5
  # Setup our local venv (using pdm, in .venv)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PycallThread
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
data/lib/pycall_thread.rb CHANGED
@@ -12,14 +12,13 @@ module PyCallThread
12
12
 
13
13
  # Start the thread we will use to run code invoked with PyCallThread.run
14
14
  @py_thread = Thread.new { pycall_thread_loop }
15
+ @initialized = true
15
16
 
16
17
  # If we've been passed a require_pycall_block, use that to require 'pycall'
17
18
  # instead of doing it directly.
18
19
  require_pycall(&require_pycall_block)
19
20
 
20
21
  at_exit { stop_pycall_thread }
21
-
22
- @initialized = true
23
22
  end
24
23
 
25
24
  def self.require_pycall(&require_pycall_block)
@@ -53,7 +52,7 @@ module PyCallThread
53
52
  run_result(result_queue.pop)
54
53
  end
55
54
 
56
- def self.run_result
55
+ def self.run_result(result)
57
56
  if result[:exception]
58
57
  raise result[:exception]
59
58
  elsif python_object?(result[:retval])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pycall_thread
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Nickell