You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/08 14:07:02 UTC
[whimsy] branch master updated: chdir so that the right version of
whimsy/asf is picked up
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new fa68eb7 chdir so that the right version of whimsy/asf is picked up
fa68eb7 is described below
commit fa68eb7f9a2f122045432a1072cbff66d43fc04f
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue May 8 10:06:27 2018 -0400
chdir so that the right version of whimsy/asf is picked up
---
www/board/agenda/daemon/channel.rb | 4 +---
www/board/agenda/daemon/wss.rb | 1 +
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb
index 49d567b..8441897 100644
--- a/www/board/agenda/daemon/channel.rb
+++ b/www/board/agenda/daemon/channel.rb
@@ -16,9 +16,7 @@ class Channel
@@sockets = Concurrent::Map.new
@@users = Concurrent::Map.new {|map,key| map[key]=[]}
- # As this tool doesn't load the full whimsy libraries, it can't make use
- # of niceties like short names... so specify the full path to repository.
- FOUNDATION_BOARD = ASF::SVN['private/foundation/board']
+ FOUNDATION_BOARD = ASF::SVN['foundation_board']
# add a new socket/userid pair
def self.add(ws, id)
diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb
index 02ff1d6..716b62e 100755
--- a/www/board/agenda/daemon/wss.rb
+++ b/www/board/agenda/daemon/wss.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+Dir.chdir __dir__
require 'bundler/setup'
require 'websocket-eventmachine-server'
require 'listen'
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.
Re: [whimsy] branch master updated: chdir so that the right version
of whimsy/asf is picked up
Posted by sebb <se...@gmail.com>.
On 8 May 2018 at 15:54, Sam Ruby <ru...@intertwingly.net> wrote:
> On Tue, May 8, 2018 at 10:21 AM, sebb <se...@gmail.com> wrote:
>> On 8 May 2018 at 15:07, <ru...@apache.org> wrote:
>>> This is an automated email from the ASF dual-hosted git repository.
>>>
>>> rubys pushed a commit to branch master
>>> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>>>
>>>
>>> The following commit(s) were added to refs/heads/master by this push:
>>> new fa68eb7 chdir so that the right version of whimsy/asf is picked up
>>> fa68eb7 is described below
>>>
>>> commit fa68eb7f9a2f122045432a1072cbff66d43fc04f
>>> Author: Sam Ruby <ru...@intertwingly.net>
>>> AuthorDate: Tue May 8 10:06:27 2018 -0400
>>>
>>> chdir so that the right version of whimsy/asf is picked up
>>> ---
>>> www/board/agenda/daemon/channel.rb | 4 +---
>>> www/board/agenda/daemon/wss.rb | 1 +
>>> 2 files changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb
>>> index 49d567b..8441897 100644
>>> --- a/www/board/agenda/daemon/channel.rb
>>> +++ b/www/board/agenda/daemon/channel.rb
>>> @@ -16,9 +16,7 @@ class Channel
>>> @@sockets = Concurrent::Map.new
>>> @@users = Concurrent::Map.new {|map,key| map[key]=[]}
>>>
>>> - # As this tool doesn't load the full whimsy libraries, it can't make use
>>> - # of niceties like short names... so specify the full path to repository.
>>> - FOUNDATION_BOARD = ASF::SVN['private/foundation/board']
>>> + FOUNDATION_BOARD = ASF::SVN['foundation_board']
>>>
>>> # add a new socket/userid pair
>>> def self.add(ws, id)
>>> diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb
>>> index 02ff1d6..716b62e 100755
>>> --- a/www/board/agenda/daemon/wss.rb
>>> +++ b/www/board/agenda/daemon/wss.rb
>>> @@ -1,4 +1,5 @@
>>> #!/usr/bin/env ruby
>>> +Dir.chdir __dir__
>>
>> I don't understand why it should matter what the starting directory is.
>
> Apparently, bundler/setup uses the working directory to find the
> Gemfile. Doesn't seem to be well documented.
>
AFAICT the nearest Gemfile is in the parent folder.
Maybe bundler looks up a level as well.
>> Is the same incantation needed elsewhere?
>
> Should not be needed by any passenger application. Nor any CGI.
> Should only be required for standalone applications that explicitly
> require bunder/setup.
In which case we just need to document such cases.
Or maybe ignore bundler/require and require the gems directly?
Does the daemon code really need all the gems listed in the Gemfile?
If not, local requires should be OK.
>> It seems like a fragile fix.
>
> Suggestions?
>
> - Sam Ruby
>
>>> require 'bundler/setup'
>>> require 'websocket-eventmachine-server'
>>> require 'listen'
>>>
>>> --
>>> To stop receiving notification emails like this one, please contact
>>> rubys@apache.org.
Re: [whimsy] branch master updated: chdir so that the right version
of whimsy/asf is picked up
Posted by Sam Ruby <ru...@intertwingly.net>.
On Tue, May 8, 2018 at 10:21 AM, sebb <se...@gmail.com> wrote:
> On 8 May 2018 at 15:07, <ru...@apache.org> wrote:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> rubys pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>> new fa68eb7 chdir so that the right version of whimsy/asf is picked up
>> fa68eb7 is described below
>>
>> commit fa68eb7f9a2f122045432a1072cbff66d43fc04f
>> Author: Sam Ruby <ru...@intertwingly.net>
>> AuthorDate: Tue May 8 10:06:27 2018 -0400
>>
>> chdir so that the right version of whimsy/asf is picked up
>> ---
>> www/board/agenda/daemon/channel.rb | 4 +---
>> www/board/agenda/daemon/wss.rb | 1 +
>> 2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb
>> index 49d567b..8441897 100644
>> --- a/www/board/agenda/daemon/channel.rb
>> +++ b/www/board/agenda/daemon/channel.rb
>> @@ -16,9 +16,7 @@ class Channel
>> @@sockets = Concurrent::Map.new
>> @@users = Concurrent::Map.new {|map,key| map[key]=[]}
>>
>> - # As this tool doesn't load the full whimsy libraries, it can't make use
>> - # of niceties like short names... so specify the full path to repository.
>> - FOUNDATION_BOARD = ASF::SVN['private/foundation/board']
>> + FOUNDATION_BOARD = ASF::SVN['foundation_board']
>>
>> # add a new socket/userid pair
>> def self.add(ws, id)
>> diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb
>> index 02ff1d6..716b62e 100755
>> --- a/www/board/agenda/daemon/wss.rb
>> +++ b/www/board/agenda/daemon/wss.rb
>> @@ -1,4 +1,5 @@
>> #!/usr/bin/env ruby
>> +Dir.chdir __dir__
>
> I don't understand why it should matter what the starting directory is.
Apparently, bundler/setup uses the working directory to find the
Gemfile. Doesn't seem to be well documented.
> Is the same incantation needed elsewhere?
Should not be needed by any passenger application. Nor any CGI.
Should only be required for standalone applications that explicitly
require bunder/setup.
> It seems like a fragile fix.
Suggestions?
- Sam Ruby
>> require 'bundler/setup'
>> require 'websocket-eventmachine-server'
>> require 'listen'
>>
>> --
>> To stop receiving notification emails like this one, please contact
>> rubys@apache.org.
Re: [whimsy] branch master updated: chdir so that the right version
of whimsy/asf is picked up
Posted by sebb <se...@gmail.com>.
On 8 May 2018 at 15:07, <ru...@apache.org> wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> rubys pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
> new fa68eb7 chdir so that the right version of whimsy/asf is picked up
> fa68eb7 is described below
>
> commit fa68eb7f9a2f122045432a1072cbff66d43fc04f
> Author: Sam Ruby <ru...@intertwingly.net>
> AuthorDate: Tue May 8 10:06:27 2018 -0400
>
> chdir so that the right version of whimsy/asf is picked up
> ---
> www/board/agenda/daemon/channel.rb | 4 +---
> www/board/agenda/daemon/wss.rb | 1 +
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb
> index 49d567b..8441897 100644
> --- a/www/board/agenda/daemon/channel.rb
> +++ b/www/board/agenda/daemon/channel.rb
> @@ -16,9 +16,7 @@ class Channel
> @@sockets = Concurrent::Map.new
> @@users = Concurrent::Map.new {|map,key| map[key]=[]}
>
> - # As this tool doesn't load the full whimsy libraries, it can't make use
> - # of niceties like short names... so specify the full path to repository.
> - FOUNDATION_BOARD = ASF::SVN['private/foundation/board']
> + FOUNDATION_BOARD = ASF::SVN['foundation_board']
>
> # add a new socket/userid pair
> def self.add(ws, id)
> diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb
> index 02ff1d6..716b62e 100755
> --- a/www/board/agenda/daemon/wss.rb
> +++ b/www/board/agenda/daemon/wss.rb
> @@ -1,4 +1,5 @@
> #!/usr/bin/env ruby
> +Dir.chdir __dir__
I don't understand why it should matter what the starting directory is.
Is the same incantation needed elsewhere?
It seems like a fragile fix.
> require 'bundler/setup'
> require 'websocket-eventmachine-server'
> require 'listen'
>
> --
> To stop receiving notification emails like this one, please contact
> rubys@apache.org.