Skip to content

Commit f749b81

Browse files
authored
Merge pull request #812 from adamruzicka/fix-repo-layout
Move edge bits from lib-edge to lib/concurrent-edge
2 parents 8b8a8a3 + 4c34810 commit f749b81

File tree

352 files changed

+3223
-3540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+3223
-3540
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
/spec/examples.txt
2929

3030
# Compiled files
31-
/lib/concurrent/concurrent_ruby.jar
32-
/lib/concurrent/**/concurrent_ruby_ext.*
33-
/lib/concurrent/concurrent_ruby_ext.*
31+
/lib/concurrent-ruby/concurrent/concurrent_ruby.jar
32+
/lib/concurrent-ruby/concurrent/**/concurrent_ruby_ext.*
33+
/lib/concurrent-ruby/concurrent/concurrent_ruby_ext.*

Gemfile

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

3-
require File.join(File.dirname(__FILE__), 'lib/concurrent/version')
4-
require File.join(File.dirname(__FILE__ ), 'lib-edge/concurrent/edge/version')
3+
require File.join(File.dirname(__FILE__), 'lib/concurrent-ruby/concurrent/version')
4+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby-edge/concurrent/edge/version')
55

66
no_path = ENV['NO_PATH']
77
options = no_path ? {} : { path: '.' }

Rakefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require_relative 'lib/concurrent/version'
2-
require_relative 'lib-edge/concurrent/edge/version'
3-
require_relative 'lib/concurrent/utility/engine'
1+
require_relative 'lib/concurrent-ruby/concurrent/version'
2+
require_relative 'lib/concurrent-ruby-edge/concurrent/edge/version'
3+
require_relative 'lib/concurrent-ruby/concurrent/utility/engine'
44

55
if Concurrent.ruby_version :<, 2, 0, 0
66
# @!visibility private
@@ -19,15 +19,15 @@ require 'rake/javaextensiontask'
1919

2020
Rake::JavaExtensionTask.new('concurrent_ruby', core_gemspec) do |ext|
2121
ext.ext_dir = 'ext/concurrent-ruby'
22-
ext.lib_dir = 'lib/concurrent'
22+
ext.lib_dir = 'lib/concurrent-ruby/concurrent'
2323
end
2424

2525
unless Concurrent.on_jruby?
2626
require 'rake/extensiontask'
2727

2828
Rake::ExtensionTask.new('concurrent_ruby_ext', ext_gemspec) do |ext|
2929
ext.ext_dir = 'ext/concurrent-ruby-ext'
30-
ext.lib_dir = 'lib/concurrent'
30+
ext.lib_dir = 'lib/concurrent-ruby/concurrent'
3131
ext.source_pattern = '*.{c,h}'
3232

3333
ext.cross_compile = true
@@ -44,7 +44,7 @@ namespace :repackage do
4444
sh 'bundle package'
4545

4646
# build only the jar file not the whole gem for java platform, the jar is part the concurrent-ruby-x.y.z.gem
47-
Rake::Task['lib/concurrent/concurrent_ruby.jar'].invoke
47+
Rake::Task['lib/concurrent-ruby/concurrent/concurrent_ruby.jar'].invoke
4848

4949
# build all gem files
5050
RakeCompilerDock.sh 'bundle install --local && bundle exec rake cross native package --trace'
@@ -59,7 +59,7 @@ Gem::PackageTask.new(core_gemspec) {} if core_gemspec
5959
Gem::PackageTask.new(ext_gemspec) {} if ext_gemspec && !Concurrent.on_jruby?
6060
Gem::PackageTask.new(edge_gemspec) {} if edge_gemspec
6161

62-
CLEAN.include('lib/concurrent/2.*', 'lib/concurrent/*.jar')
62+
CLEAN.include('lib/concurrent-ruby/concurrent/2.*', 'lib/concurrent-ruby/concurrent/*.jar')
6363

6464
begin
6565
require 'rspec'
@@ -164,8 +164,8 @@ begin
164164
'--output-dir', output_dir,
165165
'--main', 'tmp/README.md',
166166
*common_yard_options)
167-
yard.files = ['./lib/**/*.rb',
168-
'./lib-edge/**/*.rb',
167+
yard.files = ['./lib/concurrent-ruby/**/*.rb',
168+
'./lib/concurrent-ruby-edge/**/*.rb',
169169
'./ext/concurrent_ruby_ext/**/*.c',
170170
'-',
171171
'docs-source/thread_pools.md',

concurrent-ruby-edge.gemspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
require File.join(File.dirname(__FILE__ ), 'lib-edge/concurrent/edge/version')
1+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/version')
2+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby-edge/concurrent/edge/version')
23

34
Gem::Specification.new do |s|
45
git_files = `git ls-files`.split("\n")
@@ -12,9 +13,9 @@ Gem::Specification.new do |s|
1213
s.summary = 'Edge features and additions to the concurrent-ruby gem.'
1314
s.license = 'MIT'
1415
s.date = Time.now.strftime('%Y-%m-%d')
15-
s.files = Dir['lib-edge/**/*.rb'] & git_files
16+
s.files = Dir['lib/concurrent-ruby-edge/**/*.rb'] & git_files
1617
s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*']
17-
s.require_paths = ['lib-edge']
18+
s.require_paths = ['lib/concurrent-ruby-edge']
1819
s.description = <<-TXT
1920
These features are under active development and may change frequently. They are expected not to
2021
keep backward compatibility (there may also lack tests and documentation). Semantic versions will

concurrent-ruby-ext.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require File.join(File.dirname(__FILE__ ), 'lib/concurrent/version')
1+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/version')
22

33
Gem::Specification.new do |s|
44
s.name = 'concurrent-ruby-ext'

concurrent-ruby.gemspec

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require File.join(File.dirname(__FILE__ ), 'lib/concurrent/version')
2-
require File.join(File.dirname(__FILE__ ), 'lib/concurrent/utility/engine')
1+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/version')
2+
require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/utility/engine')
33

44
Gem::Specification.new do |s|
55
git_files = `git ls-files`.split("\n")
@@ -13,13 +13,14 @@ Gem::Specification.new do |s|
1313
s.summary = 'Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.'
1414
s.license = 'MIT'
1515
s.date = Time.now.strftime('%Y-%m-%d')
16-
s.files = [*Dir['lib/**/*.rb'] & git_files,
16+
s.files = [*Dir['lib/concurrent-ruby/**/*.rb'] & git_files,
1717
*Dir['ext/concurrent-ruby/**/*'] & git_files,
18-
'Rakefile', 'Gemfile',
19-
'lib/concurrent/concurrent_ruby.jar'
18+
'Rakefile',
19+
'Gemfile',
20+
'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'
2021
]
2122
s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*']
22-
s.require_paths = ['lib']
23+
s.require_paths = ['lib/concurrent-ruby']
2324
s.description = <<-TXT.gsub(/^ +/, '')
2425
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more.
2526
Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns.

docs-source/channel.out.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,17 @@ log
204204
# "producer 0 pushing 2",
205205
# "producer 1 pushing 0",
206206
# "consumer 0 got 0. payload 0 from producer 0",
207-
# "producer 0 pushing 3",
208207
# "consumer 1 got 0. payload 1 from producer 0",
209-
# "producer 1 pushing 1",
210208
# "consumer 2 got 0. payload 2 from producer 0",
211209
# "consumer 3 got 0. payload 0 from producer 1",
210+
# "producer 0 pushing 3",
211+
# "producer 1 pushing 1",
212212
# "producer 1 pushing 2",
213-
# "consumer 0 got 1. payload 3 from producer 0",
213+
# "consumer 1 got 1. payload 3 from producer 0",
214214
# "producer 1 pushing 3",
215-
# "consumer 3 got 1. payload 1 from producer 1",
216-
# "consumer 1 got 1. payload 2 from producer 1",
217-
# "consumer 2 got 1. payload 3 from producer 1"]
215+
# "consumer 0 got 1. payload 1 from producer 1",
216+
# "consumer 2 got 1. payload 2 from producer 1",
217+
# "consumer 3 got 1. payload 3 from producer 1"]
218218
```
219219

220220
The producers are much faster than consumers
@@ -268,20 +268,20 @@ consumers.map(&:value!) # => [:done, :done, :done, :done]
268268
# investigate log
269269
log
270270
# => ["producer 0 pushing 0",
271-
# "producer 0 pushing 1",
272271
# "producer 1 pushing 0",
273-
# "consumer 1 got 0. payload 1 from producer 0",
274-
# "producer 0 pushing 2",
275-
# "producer 0 pushing 3",
272+
# "producer 0 pushing 1",
276273
# "producer 1 pushing 1",
277274
# "consumer 0 got 0. payload 0 from producer 0",
278-
# "consumer 2 got 0. payload 0 from producer 1",
275+
# "consumer 1 got 0. payload 0 from producer 1",
276+
# "consumer 2 got 0. payload 1 from producer 0",
277+
# "producer 0 pushing 2",
278+
# "consumer 3 got 0. payload 1 from producer 1",
279279
# "producer 1 pushing 2",
280-
# "consumer 3 got 0. payload 2 from producer 0",
280+
# "producer 0 pushing 3",
281281
# "producer 1 pushing 3",
282-
# "consumer 1 got 1. payload 3 from producer 0",
283-
# "consumer 0 got 1. payload 1 from producer 1",
282+
# "consumer 1 got 1. payload 2 from producer 0",
284283
# "consumer 2 got 1. payload 2 from producer 1",
284+
# "consumer 0 got 1. payload 3 from producer 0",
285285
# "consumer 3 got 1. payload 3 from producer 1"]
286286
```
287287

0 commit comments

Comments
 (0)