From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from mail-vk0-x23a.google.com (mail-vk0-x23a.google.com [IPv6:2607:f8b0:400c:c05::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E5D721F406 for ; Wed, 3 Jan 2018 20:01:56 +0000 (UTC) Received: by mail-vk0-x23a.google.com with SMTP id x205sf1081528vkx.8 for ; Wed, 03 Jan 2018 12:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=Mkv700mh+5U6Wbd+3Agu/xn51bikqHitkU5L7qffO+M=; b=CTtBGtpVSSYOMeLC/UoWpwT6JckxKHBNSSUi8x1YleUwECDl0hoqNpBAjn+BSZLzPv ZcmbQuvxL1vtP/eLMDz2JmUkmjAaD824UuxYy6kkNJJXKrFO0GbMWu9uNoPItIHFQXU8 aV1f+PtCBC+hYutJDOT3FxqhWXrd7tzk8OBnsfHVOy5+5Qf/0pb61K3AG7boo/pIjZs4 XlhswUOPy/tBGZB1r+CffjWo10vBV/X2yQ5UkgGxOl2zOFkMEIGRFXB3fZ1luCK58h8D KlbyiD45DEALp/Y2zGGrqax0GllSrkVKUn2uDW4igAPGOPL72kbEMS5WIXfprQZ3DxzI 6pfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=Mkv700mh+5U6Wbd+3Agu/xn51bikqHitkU5L7qffO+M=; b=VnFU/rvgr3JeWJZhrM3SMfGUPcTVYEX8Z+KtML8aSItFL55ik21cnOJdRCJF8AD6MC xYbvvo0vAsZ20GqnAmoHZJd2DJqq7vyO2VH8DXUgp8u310kPQkgDRmJeDSp/gUI5ewAe XbhlIEuhW3/OhKDVFpiEpcygXG0NfDD1JB88lpUASvnt+KDJ3EcJ98+UO38fTHk+7dsR b5vBmYoDW4uMWBcT76/hhjYSIwIcmt+ute2vBwXFKr6NGt3dPH4hUZVJg/Q53qFwmA2+ miCvNGu/7mkbIwqB9X9l23Ca08pK3iXzoGT7crKSyqsQN6dXDJLWuAiBtRUE7en1MpzU 7COg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=Mkv700mh+5U6Wbd+3Agu/xn51bikqHitkU5L7qffO+M=; b=sCDWrEyu0+AE4ebHi5SI6T4xdL7K7dsnG+qNgUs3L0y/pqadgd+cyuy7ndtLznYWJV T71jkKkNs8eLPxbBMFvPNfctBG/upDpMI5ayfCrbLa6SUeEPgO4u01+GTG1+O7OiJbWs k1qBZYu9EHrmiY8xhVEGPC297eFpjcXgS9vrdibeWcqas8vWVTfsJzYNOnATvqR47SoC ooJVN4q9/V/KLxd5Pe+ylQt/TktlSZOLUEUA3MqVve3hvyIsjVaoWgrFiQ5XrLmWutHL ymo9/eVcxwATdAAZ8UgsiI4AJ7XykJx3bzSMvwVMKRewVRO+U6dkl3oCDLHeuFJBuWXl Ia0g== Sender: rack-devel@googlegroups.com X-Gm-Message-State: AKGB3mLMMI9L0Q3827ZV+23zaSsWhmbvHUK/vFtJmI093+HzawK3t5MM RM+63+7ckBwnf3gjjXVkL7s= X-Google-Smtp-Source: ACJfBoutQEXhvL8Und5iszdYrLjc2BG81bEmsO48Q2a9oQC/ngKdTpOsnoHrOiY7TuNYGAxI6/AS7Q== X-Received: by 10.31.171.73 with SMTP id u70mr265784vke.10.1515009715889; Wed, 03 Jan 2018 12:01:55 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.176.12.2 with SMTP id a2ls4892146uak.7.gmail; Wed, 03 Jan 2018 12:01:55 -0800 (PST) X-Received: by 10.31.61.149 with SMTP id k143mr263461vka.7.1515009715164; Wed, 03 Jan 2018 12:01:55 -0800 (PST) Date: Wed, 3 Jan 2018 12:01:54 -0800 (PST) From: =?UTF-8?Q?Rafael_Mendon=C3=A7a_Fran=C3=A7a?= To: Rack Development Message-Id: <3a08eb86-58a2-44fc-8bda-2af521c8dd0f@googlegroups.com> In-Reply-To: <20171229063427.GA30037@starla> References: <20171229063427.GA30037@starla> Subject: Re: [PATCH] webrick: remove concurrent-ruby dev dependency MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6_185419601.1515009714583" X-Original-Sender: rafaelmfranca@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , ------=_Part_6_185419601.1515009714583 Content-Type: multipart/alternative; boundary="----=_Part_7_1560003757.1515009714584" ------=_Part_7_1560003757.1515009714584 Content-Type: text/plain; charset="UTF-8" Thank you Eric. This patch was applied at 2e92a25342b5d51f4094366c3b8dd797cbd208a4. On Friday, December 29, 2017 at 1:34:30 AM UTC-5, Eric Wong wrote: > > Using the Queue class in stdlib is sufficient for this test, > so there's no need for a new development dependency. > > And one big reason I like webrick is it's bundled with > Ruby and has no 3rd-party C ext dependencies; so having > to download and install one is a bummer. > --- > If you prefer to use "git pull": > > The following changes since commit > ab008307cbb805585449145966989d5274fbe1e4: > > Add test to make sure `Rack::Builder#call` always create a new app > (2017-11-06 23:27:12 -0500) > > are available in the Git repository at: > > git://80x24.org/rack.git webrick-devdep > > for you to fetch changes up to 64349662ac18f52849cc215494d77e3719dfa2a7: > > webrick: remove concurrent-ruby dev dependency (2017-12-29 06:25:29 > +0000) > > ---------------------------------------------------------------- > Eric Wong (1): > webrick: remove concurrent-ruby dev dependency > > rack.gemspec | 1 - > test/spec_webrick.rb | 11 +++++------ > 2 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/rack.gemspec b/rack.gemspec > index ec2b79f6..d8374287 100644 > --- a/rack.gemspec > +++ b/rack.gemspec > @@ -30,6 +30,5 @@ EOF > > s.add_development_dependency 'minitest', "~> 5.0" > s.add_development_dependency 'minitest-sprint' > - s.add_development_dependency 'concurrent-ruby' > s.add_development_dependency 'rake' > end > diff --git a/test/spec_webrick.rb b/test/spec_webrick.rb > index e3050f6f..855fa9eb 100644 > --- a/test/spec_webrick.rb > +++ b/test/spec_webrick.rb > @@ -1,6 +1,6 @@ > require 'minitest/autorun' > require 'rack/mock' > -require 'concurrent/atomic/event' > +require 'thread' > require File.expand_path('../testrequest', __FILE__) > > Thread.abort_on_exception = true > @@ -119,7 +119,7 @@ describe Rack::Handler::WEBrick do > end > > it "provide a .run" do > - latch = Concurrent::Event.new > + queue = Queue.new > > t = Thread.new do > Rack::Handler::WEBrick.run(lambda {}, > @@ -129,13 +129,12 @@ describe Rack::Handler::WEBrick do > :Logger => WEBrick::Log.new(nil, > WEBrick::BasicLog::WARN), > :AccessLog => []}) { |server| > assert_kind_of WEBrick::HTTPServer, server > - @s = server > - latch.set > + queue.push(server) > } > end > > - latch.wait > - @s.shutdown > + server = queue.pop > + server.shutdown > t.join > end > > -- > EW > -- --- You received this message because you are subscribed to the Google Groups "Rack Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to rack-devel+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_7_1560003757.1515009714584 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you Eric. This patch was applied at=C2=A02e92a2534= 2b5d51f4094366c3b8dd797cbd208a4.

On Friday, December 29, 201= 7 at 1:34:30 AM UTC-5, Eric Wong wrote:
Using the Queue class in stdlib is sufficient for this test,
so there's no need for a new development dependency.

And one big reason I like webrick is it's bundled with
Ruby and has no 3rd-party C ext dependencies; so having
to download and install one is a bummer.
---
=C2=A0 If you prefer to use "git pull":

=C2=A0 The following changes since commit ab008307cbb805585449145966989= d5274fbe1e4:

=C2=A0 =C2=A0 Add test to make sure `Rack::Builder#call` always create = a new app (2017-11-06 23:27:12 -0500)

=C2=A0 are available in the Git repository at:

=C2=A0 =C2=A0 git://80x24.org/rack.git webrick-devdep

=C2=A0 for you to fetch changes up to 64349662ac18f52849cc215494d77e3719dfa2a7:

=C2=A0 =C2=A0 webrick: remove concurrent-ruby dev dependency (2017-12-2= 9 06:25:29 +0000)

=C2=A0 -----------------------------------------------------------= -----
=C2=A0 Eric Wong (1):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 webrick: remove concurrent-ruby dev depende= ncy

=C2=A0 =C2=A0rack.gemspec =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A01 -
=C2=A0 =C2=A0test/spec_webrick.rb | 11 +++++------
=C2=A0 =C2=A02 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/rack.gemspec b/rack.gemspec
index ec2b79f6..d8374287 100644
--- a/rack.gemspec
+++ b/rack.gemspec
@@ -30,6 +30,5 @@ EOF
=C2=A0
=C2=A0 =C2=A0s.add_development_dependency 'minitest', "~&g= t; 5.0"
=C2=A0 =C2=A0s.add_development_dependency 'minitest-sprint'
- =C2=A0s.add_development_dependency 'concurrent-ruby'
=C2=A0 =C2=A0s.add_development_dependency 'rake'
=C2=A0end
diff --git a/test/spec_webrick.rb b/test/spec_webrick.rb
index e3050f6f..855fa9eb 100644
--- a/test/spec_webrick.rb
+++ b/test/spec_webrick.rb
@@ -1,6 +1,6 @@
=C2=A0require 'minitest/autorun'
=C2=A0require 'rack/mock'
-require 'concurrent/atomic/event'
+require 'thread'
=C2=A0require File.expand_path('../testrequest', __FILE__)
=C2=A0
=C2=A0Thread.abort_on_exception =3D true
@@ -119,7 +119,7 @@ describe Rack::Handler::WEBrick do
=C2=A0 =C2=A0end
=C2=A0
=C2=A0 =C2=A0it "provide a .run" do
- =C2=A0 =C2=A0latch =3D Concurrent::Event.new
+ =C2=A0 =C2=A0queue =3D Queue.new
=C2=A0
=C2=A0 =C2=A0 =C2=A0t =3D Thread.new do
=C2=A0 =C2=A0 =C2=A0 =C2=A0Rack::Handler::WEBrick.run(lambda {},
@@ -129,13 +129,12 @@ describe Rack::Handler::WEBrick do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :Logger =3D> WEB= rick::Log.new(nil, WEBrick::BasicLog::WARN),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :AccessLog =3D> = []}) { |server|
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0assert_kind_of WEBrick::HTTPServer, s= erver
- =C2=A0 =C2=A0 =C2=A0 =C2=A0@s =3D server
- =C2=A0 =C2=A0 =C2=A0 =C2=A0latch.set
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0queue.push(server)
=C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0end
=C2=A0
- =C2=A0 =C2=A0latch.wait
- =C2=A0 =C2=A0@s.shutdown
+ =C2=A0 =C2=A0server =3D queue.pop
+ =C2=A0 =C2=A0server.shutdown
=C2=A0 =C2=A0 =C2=A0t.join
=C2=A0 =C2=A0end
=C2=A0
--=20
EW

--

---
You received this message because you are subscribed to the Google Groups &= quot;Rack Development" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to rack-dev= el+unsubscribe@googlegroups.com.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_7_1560003757.1515009714584-- ------=_Part_6_185419601.1515009714583--