mailbox 0.2.6 → 0.2.7

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 6
4
+ :patch: 7
5
5
  :build:
@@ -56,6 +56,10 @@ module Mailbox
56
56
  __queue_counter__.get
57
57
  end
58
58
 
59
+ def __thread_name__
60
+ @__thread_name__ ||= "#{self.class.name} #{self.object_id} Mailbox"
61
+ end
62
+
59
63
  private
60
64
  def self.included(base)
61
65
  base.extend(Mailbox::ClassMethods)
@@ -80,7 +84,7 @@ module Mailbox
80
84
 
81
85
  def __create_fiber__
82
86
  return self.class.__fiber_factory__.create if self.class.__fiber_factory__
83
- JRL::Fibers::ThreadFiber.new( JRL::RunnableExecutorImpl.new, "#{self.class.name} #{self.object_id} Mailbox", true )
87
+ JRL::Fibers::ThreadFiber.new( JRL::RunnableExecutorImpl.new, __thread_name__, true )
84
88
  end
85
89
 
86
90
  def __started_fiber__
@@ -1,57 +1,49 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mailbox}
8
- s.version = "0.2.6"
8
+ s.version = "0.2.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joel Friedman", "Patrick Farley"]
12
- s.date = %q{2011-04-19}
12
+ s.date = %q{2011-05-16}
13
13
  s.description = %q{Mailbox is a JRuby module that simplifies concurrency and is backed by JVM threads.}
14
14
  s.email = %q{asher.friedman@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README"
17
17
  ]
18
18
  s.files = [
19
- ".gitignore",
20
- "README",
21
- "Rakefile",
22
- "VERSION.yml",
23
- "example/channel_based_log_example.rb",
24
- "example/i_can_has_cheese_burger_example.rb",
25
- "example/log_example.rb",
26
- "example/parallel_each_example.rb",
27
- "example/ping_pong_example.rb",
28
- "lib/daemon_thread_factory.rb",
29
- "lib/mailbox.rb",
30
- "lib/synchronized.rb",
31
- "mailbox.gemspec",
32
- "mailbox.iml",
33
- "mailbox.ipr",
34
- "test/mailbox_test.rb",
35
- "test/synchronized_test.rb",
36
- "test/test_helper.rb"
19
+ "README",
20
+ "Rakefile",
21
+ "VERSION.yml",
22
+ "example/channel_based_log_example.rb",
23
+ "example/i_can_has_cheese_burger_example.rb",
24
+ "example/log_example.rb",
25
+ "example/parallel_each_example.rb",
26
+ "example/ping_pong_example.rb",
27
+ "lib/daemon_thread_factory.rb",
28
+ "lib/mailbox.rb",
29
+ "lib/synchronized.rb",
30
+ "mailbox.gemspec",
31
+ "mailbox.iml",
32
+ "mailbox.ipr",
33
+ "test/mailbox_test.rb",
34
+ "test/synchronized_test.rb",
35
+ "test/test_helper.rb"
37
36
  ]
38
37
  s.homepage = %q{http://joelash.github.com/mailbox}
39
- s.rdoc_options = ["--charset=UTF-8"]
40
38
  s.require_paths = ["lib"]
41
39
  s.rubyforge_project = %q{mailbox}
42
- s.rubygems_version = %q{1.3.6}
40
+ s.rubygems_version = %q{1.5.1}
43
41
  s.summary = %q{Mailbox is a JRuby module that simplifies concurrency and is backed by JVM threads.}
44
- s.test_files = [
45
- "test/mailbox_test.rb",
46
- "test/synchronized_test.rb",
47
- "test/test_helper.rb"
48
- ]
49
42
 
50
43
  if s.respond_to? :specification_version then
51
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
44
  s.specification_version = 3
53
45
 
54
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
47
  s.add_runtime_dependency(%q<jretlang>, [">= 0"])
56
48
  s.add_development_dependency(%q<jeweler>, [">= 0"])
57
49
  else
@@ -356,6 +356,16 @@ class MailboxTest < Test::Unit::TestCase
356
356
  assert_equal expected, test_agent.msg_info
357
357
  end
358
358
 
359
+ class NamedMailbox
360
+ include Mailbox
361
+ end
362
+
363
+ def test_thread_name
364
+ box = NamedMailbox.new
365
+
366
+ assert_equal "MailboxTest::NamedMailbox #{box.object_id} Mailbox", box.__thread_name__
367
+ end
368
+
359
369
  def test_dispose
360
370
  klass = Class.new do
361
371
  include Mailbox
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailbox
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 6
9
- version: 0.2.6
4
+ prerelease:
5
+ version: 0.2.7
10
6
  platform: ruby
11
7
  authors:
12
8
  - Joel Friedman
@@ -15,18 +11,17 @@ autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2011-04-19 00:00:00 -05:00
14
+ date: 2011-05-16 00:00:00 -05:00
19
15
  default_executable:
20
16
  dependencies:
21
17
  - !ruby/object:Gem::Dependency
22
18
  name: jretlang
23
19
  prerelease: false
24
20
  requirement: &id001 !ruby/object:Gem::Requirement
21
+ none: false
25
22
  requirements:
26
23
  - - ">="
27
24
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
25
  version: "0"
31
26
  type: :runtime
32
27
  version_requirements: *id001
@@ -34,11 +29,10 @@ dependencies:
34
29
  name: jeweler
35
30
  prerelease: false
36
31
  requirement: &id002 !ruby/object:Gem::Requirement
32
+ none: false
37
33
  requirements:
38
34
  - - ">="
39
35
  - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
36
  version: "0"
43
37
  type: :development
44
38
  version_requirements: *id002
@@ -51,7 +45,6 @@ extensions: []
51
45
  extra_rdoc_files:
52
46
  - README
53
47
  files:
54
- - .gitignore
55
48
  - README
56
49
  - Rakefile
57
50
  - VERSION.yml
@@ -74,32 +67,28 @@ homepage: http://joelash.github.com/mailbox
74
67
  licenses: []
75
68
 
76
69
  post_install_message:
77
- rdoc_options:
78
- - --charset=UTF-8
70
+ rdoc_options: []
71
+
79
72
  require_paths:
80
73
  - lib
81
74
  required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
82
76
  requirements:
83
77
  - - ">="
84
78
  - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
79
  version: "0"
88
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
+ none: false
89
82
  requirements:
90
83
  - - ">="
91
84
  - !ruby/object:Gem::Version
92
- segments:
93
- - 0
94
85
  version: "0"
95
86
  requirements: []
96
87
 
97
88
  rubyforge_project: mailbox
98
- rubygems_version: 1.3.6
89
+ rubygems_version: 1.5.1
99
90
  signing_key:
100
91
  specification_version: 3
101
92
  summary: Mailbox is a JRuby module that simplifies concurrency and is backed by JVM threads.
102
- test_files:
103
- - test/mailbox_test.rb
104
- - test/synchronized_test.rb
105
- - test/test_helper.rb
93
+ test_files: []
94
+
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- pkg/*
2
- rdoc/*
3
- **/*.swp
4
- mailbox.iws
5
- .rakeTasks
6
- TAGS
7
- tags
8
- run_tags.rb