threadparty 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/lib/threadparty.rb +99 -0
- data/lib/threadparty/partyproxies/processqueue.rb +51 -0
- data/lib/threadparty/partyproxy.rb +81 -0
- data/lib/threadparty/queue.rb +9 -0
- data/lib/threadparty/threadpartyproxy.rb +34 -0
- data/test/helper.rb +31 -0
- data/test/test_threadparty.rb +70 -0
- data/threadparty.gemspec +67 -0
- metadata +130 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e2008a46041e0acd641a6eb250faca96603775ea
|
4
|
+
data.tar.gz: c56d4247d5380cb4aad0855152f43036fe956d86
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a0217fd0dab1b3dbeda22ae827c7019ce9f49085f0004a068ec90a350c33a90c2e1eee69bafea4bc1469d158562f7a54d6975d549a39779a7b97ce91116a9d7f
|
7
|
+
data.tar.gz: 3e961f8948163c0c704498cfb33b2e2978d5932b8fb2e7954089e498e2bc5fd0c88d3982f6dd606ba3a983ef7f8665fdd858d50c9342e898b1a1c70bb07821cc
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "rspec", "~> 3.4"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.10"
|
12
|
+
gem "juwelier", "~> 2.1.0"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2016 Aaron Haaf
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= threadparty
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to threadparty
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2016 Aaron Haaf. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'juwelier'
|
15
|
+
Juwelier::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "threadparty"
|
18
|
+
gem.homepage = "http://github.com/Everspace/threadparty"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{A ruby DSL to make multithreading just happen.}
|
21
|
+
gem.description = %Q{it does the dsl and things for Thread}
|
22
|
+
gem.email = "aabonh@gmail.com"
|
23
|
+
gem.authors = ["Aaron Haaf"]
|
24
|
+
|
25
|
+
# dependencies defined in Gemfile
|
26
|
+
end
|
27
|
+
Juwelier::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:test) do |test|
|
32
|
+
test.pattern = FileList['test/**/test_*.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "threadparty #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/lib/threadparty.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'threadparty/threadpartyproxy'
|
2
|
+
require 'threadparty/partyproxies/processqueue'
|
3
|
+
|
4
|
+
##
|
5
|
+
#Handles the connection between PartyProxy classes,
|
6
|
+
#and how data is passed between them.
|
7
|
+
#
|
8
|
+
#Thanks to Gabe Berke-Williams and his article at
|
9
|
+
# https://robots.thoughtbot.com/writing-a-domain-specific-language-in-ruby
|
10
|
+
#for providing the examples and groundwork.
|
11
|
+
class ThreadParty
|
12
|
+
|
13
|
+
##
|
14
|
+
#A list of PartyProxies that need to happen
|
15
|
+
attr_accessor :to_process
|
16
|
+
|
17
|
+
def initialize(&block)
|
18
|
+
@to_process = Array.new
|
19
|
+
add(&block) if block
|
20
|
+
self
|
21
|
+
end
|
22
|
+
|
23
|
+
##
|
24
|
+
#Append a series PartyProxies to the to_process list.
|
25
|
+
def add(&block)
|
26
|
+
proxy = ThreadPartyProxy.new(self)
|
27
|
+
proxy.instance_eval(&block)
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
#Perform XYZ one after another, returning nothing.
|
32
|
+
def sequentially
|
33
|
+
result = []
|
34
|
+
@to_process.each do |party|
|
35
|
+
result << party.execute
|
36
|
+
end
|
37
|
+
result.flatten
|
38
|
+
end
|
39
|
+
alias :conga :sequentially
|
40
|
+
|
41
|
+
##
|
42
|
+
#Perform XYZ in different threads for maximum threadability.
|
43
|
+
def pooled
|
44
|
+
#WHY NOT USE OURSELF?
|
45
|
+
#BWAHAHAHAHAHA
|
46
|
+
ThreadParty.new do
|
47
|
+
ProcessQueue do
|
48
|
+
collection to_process
|
49
|
+
threads to_process.length
|
50
|
+
perform do |partyproxy|
|
51
|
+
partyproxy.execute()
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end.sequentially
|
55
|
+
end
|
56
|
+
|
57
|
+
##
|
58
|
+
#Perform all XYZ using the products of X to call Y to call Z,
|
59
|
+
#chaining and iterating on the resultes.
|
60
|
+
#
|
61
|
+
#Example:
|
62
|
+
# ThreadParty.new do
|
63
|
+
# ProcessQueue do
|
64
|
+
# queue s3_objects
|
65
|
+
# perform do |obj|
|
66
|
+
# download(obj)
|
67
|
+
# end
|
68
|
+
# end
|
69
|
+
#
|
70
|
+
# ProcessQueue do
|
71
|
+
# perform fiddle_method
|
72
|
+
# end
|
73
|
+
#
|
74
|
+
# ProcessQueue do
|
75
|
+
# #implicit "queue downloaded_and_fiddled_s3_objects"
|
76
|
+
# perform do |obj|
|
77
|
+
# upload_after_fiddle(obj)
|
78
|
+
# end
|
79
|
+
# end
|
80
|
+
# end
|
81
|
+
def iteratively
|
82
|
+
#lets get the party rolling
|
83
|
+
result = @to_process.first.execute()
|
84
|
+
#Now after the party is started,
|
85
|
+
#do everything else.
|
86
|
+
@to_process[1..-1].each do |party|
|
87
|
+
#If a PartyProxy doesn't implement :queue,
|
88
|
+
#it's not a party we want to give our innards to.
|
89
|
+
if party.respond_to?(:queue)
|
90
|
+
result = party.execute(result)
|
91
|
+
else
|
92
|
+
result = party.execute()
|
93
|
+
end
|
94
|
+
end
|
95
|
+
result
|
96
|
+
end
|
97
|
+
alias :polka :iteratively
|
98
|
+
|
99
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'threadparty/partyproxy'
|
2
|
+
require 'threadparty/queue'
|
3
|
+
|
4
|
+
class ProcessQueue < PartyProxy
|
5
|
+
is_proxy
|
6
|
+
dsl_method :perform, :ensure
|
7
|
+
dsl_accessor :queue, :modify_queue
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
super
|
11
|
+
@modify_queue = false
|
12
|
+
end
|
13
|
+
|
14
|
+
def execute(queue_override = nil)
|
15
|
+
raise ArgumentError, 'I don\'t have a perform' unless @perform
|
16
|
+
|
17
|
+
process_queue = Queue.new()
|
18
|
+
result_queue = Queue.new()
|
19
|
+
|
20
|
+
#Oldstuff gets pushed in first
|
21
|
+
[queue_override, @queue].each do |possible_things|
|
22
|
+
case possible_things
|
23
|
+
when Queue
|
24
|
+
possible_things.to_a!
|
25
|
+
else
|
26
|
+
possible_things.to_a
|
27
|
+
end.each do |thing|
|
28
|
+
process_queue.push(thing)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
threaded do |number|
|
33
|
+
while item = process_queue.pop(true)
|
34
|
+
case @perform.arity
|
35
|
+
when 0
|
36
|
+
result_queue << @perform.call()
|
37
|
+
when 1
|
38
|
+
result_queue << @perform.call(
|
39
|
+
@modify_queue ? process_queue : item
|
40
|
+
)
|
41
|
+
else
|
42
|
+
result_queue << @perform.call(
|
43
|
+
@modify_queue ? process_queue : item,
|
44
|
+
*item
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
result_queue.to_a!
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'thread'
|
2
|
+
require 'threadparty/threadpartyproxy'
|
3
|
+
|
4
|
+
class PartyProxy
|
5
|
+
|
6
|
+
# Allow for for an easy way to add dsl words that are simply
|
7
|
+
# setters.
|
8
|
+
#
|
9
|
+
# class PartyProxyChild < PartyProxy
|
10
|
+
# dsl_accessor :set_this
|
11
|
+
# end
|
12
|
+
#
|
13
|
+
# PartyProxyChild do
|
14
|
+
# set_this value
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# This also defines get_#{symbol} to allow for
|
18
|
+
# "normal" access to the variable outside of dsl context.
|
19
|
+
def self.dsl_accessor(*symbols)
|
20
|
+
symbols.each do |symbol|
|
21
|
+
instance_symbol = "@#{symbol}".to_sym
|
22
|
+
define_method(symbol) do |value|
|
23
|
+
instance_variable_set(instance_symbol, value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Method that is a nice way to say that I'm going to be
|
30
|
+
# a proxy.
|
31
|
+
def self.is_proxy
|
32
|
+
ThreadPartyProxy.add_proxy_reciever self
|
33
|
+
end
|
34
|
+
|
35
|
+
# Allow for for an easy way to add dsl methods that are blocks.
|
36
|
+
#
|
37
|
+
# class PartyProxyChild < PartyProxy
|
38
|
+
# dsl_method :do_this
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# PartyProxyChild do
|
42
|
+
# collection ["left", "right"]
|
43
|
+
# do_this {|hand| puts "your #{hand} in!"}
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
def self.dsl_method(*symbols)
|
47
|
+
symbols.each do |symbol|
|
48
|
+
instance_symbol = "@#{symbol}".to_sym
|
49
|
+
define_method symbol do |&block|
|
50
|
+
instance_variable_set instance_symbol, block
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
dsl_accessor :abort_on_exception, :threads, :join
|
56
|
+
|
57
|
+
def initialize
|
58
|
+
@abort_on_exception = false
|
59
|
+
@join = true
|
60
|
+
@threads = 8
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
def threaded
|
65
|
+
threads = (0...@threads).collect do |number|
|
66
|
+
Thread.new do
|
67
|
+
Thread.current.abort_on_exception = @abort_on_exception
|
68
|
+
begin
|
69
|
+
yield number
|
70
|
+
rescue ThreadError
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
threads.each(&:join) if @join
|
75
|
+
end
|
76
|
+
|
77
|
+
#Execute should return the results of each thread's to-do.
|
78
|
+
def execute
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'objspace'
|
2
|
+
require 'threadparty/partyproxy'
|
3
|
+
|
4
|
+
##
|
5
|
+
#The DSL resolver for ThreadParty.
|
6
|
+
#
|
7
|
+
#It handles adding classes that inherited PartyProxy to the DSL,
|
8
|
+
#and executing them
|
9
|
+
class ThreadPartyProxy
|
10
|
+
@thread_party
|
11
|
+
@@proxables = {}
|
12
|
+
|
13
|
+
def initialize(pool_party)
|
14
|
+
@thread_party = pool_party
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.add_proxy_reciever(klass)
|
18
|
+
@@proxables[klass.name.to_sym] = klass
|
19
|
+
end
|
20
|
+
|
21
|
+
def method_missing(name, *args, &block)
|
22
|
+
if @@proxables.has_key?(name) then
|
23
|
+
perform_proxy(name, &block)
|
24
|
+
else
|
25
|
+
raise ArgumentError, "The bouncer says \"#{name}\" is not allowed at the thread party.\nIt is not inherited from PartyProxy"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def perform_proxy(a_class, &block)
|
30
|
+
party = @@proxables[a_class].new
|
31
|
+
party.instance_eval(&block)
|
32
|
+
@thread_party.to_process << party
|
33
|
+
end
|
34
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
module SimpleCov::Configuration
|
4
|
+
def clean_filters
|
5
|
+
@filters = []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.configure do
|
10
|
+
clean_filters
|
11
|
+
load_profile 'test_frameworks'
|
12
|
+
end
|
13
|
+
|
14
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
+
add_filter "/.rvm/"
|
16
|
+
end
|
17
|
+
require 'rubygems'
|
18
|
+
require 'bundler'
|
19
|
+
begin
|
20
|
+
Bundler.setup(:default, :development)
|
21
|
+
rescue Bundler::BundlerError => e
|
22
|
+
$stderr.puts e.message
|
23
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
24
|
+
exit e.status_code
|
25
|
+
end
|
26
|
+
#require 'test/unit'
|
27
|
+
require 'rspec'
|
28
|
+
|
29
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
30
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
31
|
+
require 'threadparty'
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require_relative 'helper'
|
2
|
+
|
3
|
+
RSpec.describe ThreadParty, '#init' do
|
4
|
+
context "regardless on how you call it" do
|
5
|
+
number_work = Proc.new {|i| sleep((i % 4) * 0.01); i * 2}
|
6
|
+
string_work = Proc.new {|s| s}
|
7
|
+
partyA = ThreadParty.new()
|
8
|
+
partyA.add do
|
9
|
+
ProcessQueue do
|
10
|
+
queue 0..20
|
11
|
+
perform &number_work
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
partyA.add do
|
16
|
+
ProcessQueue do
|
17
|
+
queue 'A'..'Q'
|
18
|
+
perform &string_work
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
partyB = ThreadParty.new()
|
23
|
+
partyB.add do
|
24
|
+
ProcessQueue do
|
25
|
+
queue 0..20
|
26
|
+
perform &number_work
|
27
|
+
end
|
28
|
+
ProcessQueue do
|
29
|
+
queue 'A'..'Q'
|
30
|
+
perform &string_work
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
pAs = partyA.sequentially.group_by{|i| i.class}
|
35
|
+
pAi = partyA.iteratively.group_by{|i| i.class}
|
36
|
+
|
37
|
+
pBs = partyB.sequentially.group_by{|i| i.class}
|
38
|
+
pBi = partyB.iteratively.group_by{|i| i.class}
|
39
|
+
|
40
|
+
pCs = ThreadParty.new{
|
41
|
+
ProcessQueue do
|
42
|
+
queue 0..20
|
43
|
+
perform &number_work
|
44
|
+
end
|
45
|
+
ProcessQueue do
|
46
|
+
queue 'A'..'Q'
|
47
|
+
perform &string_work
|
48
|
+
end
|
49
|
+
}.sequentially.group_by{|i| i.class}
|
50
|
+
|
51
|
+
pCi = ThreadParty.new{
|
52
|
+
ProcessQueue do
|
53
|
+
queue 0..20
|
54
|
+
perform &number_work
|
55
|
+
end
|
56
|
+
ProcessQueue do
|
57
|
+
queue 'A'..'Q'
|
58
|
+
perform &string_work
|
59
|
+
end
|
60
|
+
}.iteratively.group_by{|i| i.class}
|
61
|
+
|
62
|
+
|
63
|
+
it "the results are the same when sorted" do
|
64
|
+
expect(pAs[Fixnum].sort).to eq pBs[Fixnum].sort
|
65
|
+
expect(pAs[Fixnum].sort).to eq pCs[Fixnum].sort
|
66
|
+
expect(pAi[Fixnum].sort).to eq pBi[Fixnum].sort
|
67
|
+
expect(pAi[Fixnum].sort).to eq pCi[Fixnum].sort
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/threadparty.gemspec
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: threadparty 0.1.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "threadparty".freeze
|
9
|
+
s.version = "0.1.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["Aaron Haaf".freeze]
|
14
|
+
s.date = "2016-10-11"
|
15
|
+
s.description = "it does the dsl and things for Thread".freeze
|
16
|
+
s.email = "aabonh@gmail.com".freeze
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"lib/threadparty.rb",
|
30
|
+
"lib/threadparty/partyproxies/processqueue.rb",
|
31
|
+
"lib/threadparty/partyproxy.rb",
|
32
|
+
"lib/threadparty/queue.rb",
|
33
|
+
"lib/threadparty/threadpartyproxy.rb",
|
34
|
+
"test/helper.rb",
|
35
|
+
"test/test_threadparty.rb",
|
36
|
+
"threadparty.gemspec"
|
37
|
+
]
|
38
|
+
s.homepage = "http://github.com/Everspace/threadparty".freeze
|
39
|
+
s.licenses = ["MIT".freeze]
|
40
|
+
s.rubygems_version = "2.6.7".freeze
|
41
|
+
s.summary = "A ruby DSL to make multithreading just happen.".freeze
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
s.specification_version = 4
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.4"])
|
48
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
49
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.10"])
|
50
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
51
|
+
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.4"])
|
54
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
55
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.10"])
|
56
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
57
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
58
|
+
end
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.4"])
|
61
|
+
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>.freeze, ["~> 1.10"])
|
63
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
64
|
+
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: threadparty
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aaron Haaf
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.4'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: juwelier
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.1.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: it does the dsl and things for Thread
|
84
|
+
email: aabonh@gmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files:
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.rdoc
|
90
|
+
files:
|
91
|
+
- ".document"
|
92
|
+
- ".rspec"
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE.txt
|
95
|
+
- README.rdoc
|
96
|
+
- Rakefile
|
97
|
+
- VERSION
|
98
|
+
- lib/threadparty.rb
|
99
|
+
- lib/threadparty/partyproxies/processqueue.rb
|
100
|
+
- lib/threadparty/partyproxy.rb
|
101
|
+
- lib/threadparty/queue.rb
|
102
|
+
- lib/threadparty/threadpartyproxy.rb
|
103
|
+
- test/helper.rb
|
104
|
+
- test/test_threadparty.rb
|
105
|
+
- threadparty.gemspec
|
106
|
+
homepage: http://github.com/Everspace/threadparty
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.6.7
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: A ruby DSL to make multithreading just happen.
|
130
|
+
test_files: []
|