Skip to content
This repository was archived by the owner on Mar 15, 2022. It is now read-only.

Commit e14f383

Browse files
committed
Merge pull request #11 from ruby-concurrency/prep-release-0-3-5
Prep release 0.3.5
2 parents 0ef5835 + 2685781 commit e14f383

File tree

9 files changed

+76
-30
lines changed

9 files changed

+76
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Gemfile.lock
2+
test/*.jar
23
.rspec-local
34
*.gem
45
lib/1.8

.travis.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
language: ruby
22
rvm:
3-
- jruby-18mode
4-
- jruby-19mode
5-
- rbx-2
6-
- 1.8.7
7-
- 1.9.3
3+
- 2.2.0
4+
- 2.1.5
5+
- 2.1.4
86
- 2.0.0
9-
- 2.1.0
7+
- 1.9.3
8+
- ruby-head
9+
- jruby-1.7.18
10+
- jruby-head
11+
- rbx-2
1012
jdk: # for JRuby only
1113
- openjdk7
1214
- oraclejdk8
1315
matrix:
1416
exclude:
15-
- rvm: rbx-2
17+
- rvm: 2.2.0
18+
jdk: openjdk7
1619
jdk: oraclejdk8
17-
- rvm: 1.8.7
20+
- rvm: 2.1.5
21+
jdk: openjdk7
1822
jdk: oraclejdk8
19-
- rvm: 1.9.3
23+
- rvm: 2.1.4
24+
jdk: openjdk7
2025
jdk: oraclejdk8
2126
- rvm: 2.0.0
27+
jdk: openjdk7
2228
jdk: oraclejdk8
23-
- rvm: 2.1.0
24-
jdk: oraclejdk8
29+
- rvm: 1.9.3
30+
jdk: openjdk7
31+
jdk: oraclejdk8
32+
- rvm: ruby-head
33+
jdk: openjdk7
34+
jdk: oraclejdk8
35+
- rvm: rbx-2
36+
jdk: openjdk7
37+
jdk: oraclejdk8
38+
allow_failures:
39+
- rvm: ruby-head
40+
- rvm: jruby-head
41+
- rvm: 1.9.3
42+
43+
script: "rake TESTOPTS='--seed=1'"

Gemfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
source 'https://rubygems.org'
22

3-
# Specify your gem's dependencies in thread_safe.gemspec
43
gemspec
54

5+
group :development, :test do
6+
gem 'minitest', '~> 5.5.1'
7+
gem 'minitest-reporters', '~> 1.0.11'
8+
gem 'simplecov', '~> 0.9.2', :require => false
9+
gem 'coveralls', '~> 0.7.11', :require => false
10+
end
11+
612
group :documentation do
713
gem 'countloc', '~> 0.4.0', :platforms => :mri, :require => false
8-
gem 'rubycritic', '~> 1.0.2', :platforms => :mri, require: false
9-
gem 'yard', '~> 0.8.7.4', :require => false
10-
gem 'inch', '~> 0.4.6', :platforms => :mri, :require => false
11-
gem 'redcarpet', '~> 3.1.2', platforms: :mri # understands github markdown
14+
gem 'yard', '~> 0.8.7.6', :require => false
15+
gem 'inch', '~> 0.5.10', :platforms => :mri, :require => false
16+
gem 'redcarpet', '~> 3.2.2', platforms: :mri # understands github markdown
1217
end

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Threadsafe
22

3-
[![Build Status](https://travis-ci.org/headius/thread_safe.png)](https://travis-ci.org/headius/thread_safe)
3+
[![Gem Version](https://badge.fury.io/rb/thread_safe.svg)](http://badge.fury.io/rb/thread_safe) [![Build Status](https://travis-ci.org/ruby-concurrency/thread_safe.svg?branch=master)](https://travis-ci.org/ruby-concurrency/thread_safe) [![Coverage Status](https://img.shields.io/coveralls/ruby-concurrency/thread_safe/master.svg)](https://coveralls.io/r/ruby-concurrency/thread_safe) [![Code Climate](https://codeclimate.com/github/ruby-concurrency/thread_safe.svg)](https://codeclimate.com/github/ruby-concurrency/thread_safe) [![Dependency Status](https://gemnasium.com/ruby-concurrency/thread_safe.svg)](https://gemnasium.com/ruby-concurrency/thread_safe) [![License](https://img.shields.io/badge/license-apache-green.svg)](http://opensource.org/licenses/MIT) [![Gitter chat](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/ruby-concurrency/concurrent-ruby)
44

55
A collection of thread-safe versions of common core Ruby classes.
66

test/test_array.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class TestArray < Minitest::Test
55
def test_concurrency
66
ary = ThreadSafe::Array.new
7-
(1..100).map do |i|
7+
(1..THREADS).map do |i|
88
Thread.new do
99
1000.times do
1010
ary << i

test/test_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def setup
1111

1212
def test_concurrency
1313
cache = @cache
14-
(1..100).map do |i|
14+
(1..THREADS).map do |i|
1515
Thread.new do
1616
1000.times do |j|
1717
key = i*1000+j

test/test_hash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class TestHash < Minitest::Test
55
def test_concurrency
66
hsh = ThreadSafe::Hash.new
7-
(1..100).map do |i|
7+
(1..THREADS).map do |i|
88
Thread.new do
99
1000.times do |j|
1010
hsh[i*1000+j] = i

test/test_helper.rb

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
1-
require 'thread'
2-
require 'rubygems'
3-
gem 'minitest', '>= 4'
1+
unless defined?(JRUBY_VERSION)
2+
require 'simplecov'
3+
require 'coveralls'
4+
5+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6+
SimpleCov::Formatter::HTMLFormatter,
7+
Coveralls::SimpleCov::Formatter
8+
]
9+
10+
SimpleCov.start do
11+
project_name 'thread_safe'
12+
13+
add_filter '/examples/'
14+
add_filter '/pkg/'
15+
add_filter '/test/'
16+
add_filter '/tasks/'
17+
add_filter '/yard-template/'
18+
add_filter '/yardoc/'
19+
20+
command_name 'Mintest'
21+
end
22+
end
23+
424
require 'minitest/autorun'
525

6-
if Minitest.const_defined?('Test')
7-
# We're on Minitest 5+. Nothing to do here.
8-
else
9-
# Minitest 4 doesn't have Minitest::Test yet.
10-
Minitest::Test = MiniTest::Unit::TestCase
11-
end
26+
require 'minitest/reporters'
27+
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new(color: true)
28+
29+
require 'thread'
30+
require 'thread_safe'
31+
32+
THREADS = (RUBY_ENGINE == 'ruby' ? 100 : 10)
1233

1334
if defined?(JRUBY_VERSION) && ENV['TEST_NO_UNSAFE']
1435
# to be used like this: rake test TEST_NO_UNSAFE=true

thread_safe.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
2020
gem.version = ThreadSafe::VERSION
2121
gem.license = "Apache-2.0"
2222

23-
gem.add_development_dependency 'atomic', ['>= 1.1.7', '< 2']
23+
gem.add_development_dependency 'atomic', '= 1.1.16'
2424
gem.add_development_dependency 'rake'
2525
gem.add_development_dependency 'minitest', '>= 4'
2626
end

0 commit comments

Comments
 (0)