drb 2.0.5 → 2.1.1

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: 4b68293dd84190a08ac73a379656520507f0480e6d1fe665cb742f3c142d0113
4
- data.tar.gz: c94550c6e25cf1d4aabe3ac5262a39cec8284c883cd48d5b765fea53e6d06181
3
+ metadata.gz: dbef5362ded411302c246ad1e692b0653d949cae852d6f70399352530400c117
4
+ data.tar.gz: 9a40103cba6d502dcdcc053e7fbdf32b74d3f6bcdd161c10a663ce24b30dc0ba
5
5
  SHA512:
6
- metadata.gz: 203b34f0122bc435f0a3d36f56943e8f0d090dc8ae7ccff2d301a5be77cb3fa31a8792157b78365715c65f55f91dd3f42ed94ba551b5ce41e769b68a77485f8f
7
- data.tar.gz: 2f3e92afafee70cc7771c56ab74ee24702372bf4ac9b7297e02afc238f493976ee7d0b33ea8f03da27d0bf097fcce3cded152f02b2e1d4a24b4ccd57a893ff6a
6
+ metadata.gz: 13b306094ed3815c264828904f22df319630e044587717561e9bb91f09f729b2b329de551d613c9327f8691777a9733cdd845d4c85308034b4a103c39e3def1d
7
+ data.tar.gz: 74104ebea97bd19a3a74b6729cdca80305eb061e268c89f66ae3cd29a1959c6299775b75d0bb0a9d780fcb2cf65a2e51d876be19a058ad674ad68494569fa42a
data/drb.gemspec CHANGED
@@ -13,18 +13,31 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = %q{Distributed object system for Ruby}
14
14
  spec.description = %q{Distributed object system for Ruby}
15
15
  spec.homepage = "https://github.com/ruby/drb"
16
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
16
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
17
17
  spec.licenses = ["Ruby", "BSD-2-Clause"]
18
18
 
19
19
  spec.metadata["homepage_uri"] = spec.homepage
20
20
  spec.metadata["source_code_uri"] = spec.homepage
21
21
 
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.files = %w[
23
+ LICENSE.txt
24
+ drb.gemspec
25
+ lib/drb.rb
26
+ lib/drb/acl.rb
27
+ lib/drb/drb.rb
28
+ lib/drb/eq.rb
29
+ lib/drb/extserv.rb
30
+ lib/drb/extservm.rb
31
+ lib/drb/gw.rb
32
+ lib/drb/invokemethod.rb
33
+ lib/drb/observer.rb
34
+ lib/drb/ssl.rb
35
+ lib/drb/timeridconv.rb
36
+ lib/drb/unix.rb
37
+ lib/drb/version.rb
38
+ lib/drb/weakidconv.rb
39
+ ]
29
40
  spec.require_paths = ["lib"]
41
+
42
+ spec.add_dependency "ruby2_keywords"
30
43
  end
data/lib/drb/drb.rb CHANGED
@@ -1627,9 +1627,12 @@ module DRb
1627
1627
  end
1628
1628
 
1629
1629
  def perform
1630
- @result = nil
1631
- @succ = false
1632
- setup_message
1630
+ begin
1631
+ setup_message
1632
+ ensure
1633
+ @result = nil
1634
+ @succ = false
1635
+ end
1633
1636
 
1634
1637
  if @block
1635
1638
  @result = perform_with_block
@@ -1718,6 +1721,7 @@ module DRb
1718
1721
  client_uri = client.uri
1719
1722
  @exported_uri << client_uri unless @exported_uri.include?(client_uri)
1720
1723
  end
1724
+ _last_invoke_method = nil
1721
1725
  loop do
1722
1726
  begin
1723
1727
  succ = false
@@ -1730,6 +1734,7 @@ module DRb
1730
1734
  rescue Exception => e
1731
1735
  error_print(e) if verbose
1732
1736
  ensure
1737
+ _last_invoke_method = invoke_method
1733
1738
  client.close unless succ
1734
1739
  if Thread.current['DRb']['stop_service']
1735
1740
  shutdown
data/lib/drb/extserv.rb CHANGED
@@ -18,7 +18,7 @@ module DRb
18
18
  @name = name
19
19
  ro = DRbObject.new(nil, there)
20
20
  synchronize do
21
- @invoker = ro.regist(name, DRbObject.new(self, @server.uri))
21
+ @invoker = ro.register(name, DRbObject.new(self, @server.uri))
22
22
  end
23
23
  end
24
24
  attr_reader :server
@@ -29,7 +29,7 @@ module DRb
29
29
 
30
30
  def stop_service
31
31
  synchronize do
32
- @invoker.unregist(@name)
32
+ @invoker.unregister(@name)
33
33
  server = @server
34
34
  @server = nil
35
35
  server.stop_service
data/lib/drb/extservm.rb CHANGED
@@ -44,19 +44,21 @@ module DRb
44
44
  end
45
45
  end
46
46
 
47
- def regist(name, ro)
47
+ def register(name, ro)
48
48
  synchronize do
49
49
  @servers[name] = ro
50
50
  @cond.signal
51
51
  end
52
52
  self
53
53
  end
54
+ alias regist register
54
55
 
55
- def unregist(name)
56
+ def unregister(name)
56
57
  synchronize do
57
58
  @servers.delete(name)
58
59
  end
59
60
  end
61
+ alias unregist unregister
60
62
 
61
63
  private
62
64
  def invoke_thread
data/lib/drb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DRb
2
- VERSION = "2.0.5"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masatoshi SEKI
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-14 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby2_keywords
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Distributed object system for Ruby
14
28
  email:
15
29
  - seki@ruby-lang.org
@@ -17,14 +31,7 @@ executables: []
17
31
  extensions: []
18
32
  extra_rdoc_files: []
19
33
  files:
20
- - ".gitignore"
21
- - ".travis.yml"
22
- - Gemfile
23
34
  - LICENSE.txt
24
- - README.md
25
- - Rakefile
26
- - bin/console
27
- - bin/setup
28
35
  - drb.gemspec
29
36
  - lib/drb.rb
30
37
  - lib/drb/acl.rb
@@ -55,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
55
62
  requirements:
56
63
  - - ">="
57
64
  - !ruby/object:Gem::Version
58
- version: 2.3.0
65
+ version: 2.7.0
59
66
  required_rubygems_version: !ruby/object:Gem::Requirement
60
67
  requirements:
61
68
  - - ">="
62
69
  - !ruby/object:Gem::Version
63
70
  version: '0'
64
71
  requirements: []
65
- rubygems_version: 3.2.22
72
+ rubygems_version: 3.4.0.dev
66
73
  signing_key:
67
74
  specification_version: 4
68
75
  summary: Distributed object system for Ruby
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.8.0
6
- before_install: gem install bundler -v 2.1.4
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake"
4
- gem "test-unit"
data/README.md DELETED
@@ -1,95 +0,0 @@
1
- # Distributed Ruby: dRuby
2
-
3
- dRuby is a distributed object system for Ruby. It allows an object in one
4
- Ruby process to invoke methods on an object in another Ruby process on the
5
- same or a different machine.
6
-
7
- The Ruby standard library contains the core classes of the dRuby package.
8
- However, the full package also includes access control lists and the
9
- Rinda tuple-space distributed task management system, as well as a
10
- large number of samples. The full dRuby package can be downloaded from
11
- the dRuby home page (see *References*).
12
-
13
- For an introduction and examples of usage see the documentation to the
14
- DRb module.
15
-
16
- ## Installation
17
-
18
- Add this line to your application's Gemfile:
19
-
20
- ```ruby
21
- gem 'drb'
22
- ```
23
-
24
- And then execute:
25
-
26
- $ bundle install
27
-
28
- Or install it yourself as:
29
-
30
- $ gem install drb
31
-
32
- ## Usage
33
-
34
- ### dRuby in client/server mode
35
-
36
- This illustrates setting up a simple client-server drb
37
- system. Run the server and client code in different terminals,
38
- starting the server code first.
39
-
40
- #### Server code
41
-
42
- ```
43
- require 'drb/drb'
44
-
45
- # The URI for the server to connect to
46
- URI="druby://localhost:8787"
47
-
48
- class TimeServer
49
-
50
- def get_current_time
51
- return Time.now
52
- end
53
-
54
- end
55
-
56
- # The object that handles requests on the server
57
- FRONT_OBJECT=TimeServer.new
58
-
59
- DRb.start_service(URI, FRONT_OBJECT)
60
- # Wait for the drb server thread to finish before exiting.
61
- DRb.thread.join
62
- ```
63
-
64
- #### Client code
65
-
66
- ```
67
- require 'drb/drb'
68
-
69
- # The URI to connect to
70
- SERVER_URI="druby://localhost:8787"
71
-
72
- # Start a local DRbServer to handle callbacks.
73
-
74
- # Not necessary for this small example, but will be required
75
- # as soon as we pass a non-marshallable object as an argument
76
- # to a dRuby call.
77
-
78
- # Note: this must be called at least once per process to take any effect.
79
- # This is particularly important if your application forks.
80
- DRb.start_service
81
-
82
- timeserver = DRbObject.new_with_uri(SERVER_URI)
83
- puts timeserver.get_current_time
84
- ```
85
-
86
- ## Development
87
-
88
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
89
-
90
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
91
-
92
- ## Contributing
93
-
94
- Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/drb.
95
-
data/Rakefile DELETED
@@ -1,17 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test/lib"
6
- t.ruby_opts << "-rhelper"
7
- t.test_files = FileList["test/**/test_*.rb"]
8
- end
9
-
10
- task :sync_tool do
11
- require 'fileutils'
12
- FileUtils.cp "../ruby/tool/lib/test/unit/core_assertions.rb", "./test/lib"
13
- FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
14
- FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
15
- end
16
-
17
- task :default => :test
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "drb"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here