You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Antoine Toulme (JIRA)" <ji...@apache.org> on 2009/03/11 18:08:50 UTC

[jira] Created: (BUILDR-266) puts with no message triggers a warning.

puts with no message triggers a warning.
----------------------------------------

                 Key: BUILDR-266
                 URL: https://issues.apache.org/jira/browse/BUILDR-266
             Project: Buildr
          Issue Type: Bug
            Reporter: Antoine Toulme
            Priority: Minor


We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue when running rake features, the default task to run all the cucumber .feature files, it shows this message:


./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values for a block parameter (0 for 1)
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41

cucumber actually outputs a few empty lines: @io.puts

That doesn't seem to do too well with your code here:

 define_method severity do |message|
          $messages ||= {}
          ($messages[severity] ||= []) << message
        end

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-266) puts with no message triggers a warning.

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680970#action_12680970 ] 

Antoine Toulme commented on BUILDR-266:
---------------------------------------

Here is how we work around the problem:

Cucumber::Broadcaster.class_eval do
  alias :safe_puts :puts
end

require File.join(File.dirname(__FILE__), "/../../buildr/spec/spec_helpers.rb")

Cucumber::Broadcaster.class_eval do
  alias :puts :safe_puts
end

That way the only one that uses puts is the broadcaster. All the others using puts will be redirected to the buildr trap so the output of methods may be tested.

> puts with no message triggers a warning.
> ----------------------------------------
>
>                 Key: BUILDR-266
>                 URL: https://issues.apache.org/jira/browse/BUILDR-266
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Antoine Toulme
>            Priority: Minor
>
> We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue when running rake features, the default task to run all the cucumber .feature files, it shows this message:
> ./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values for a block parameter (0 for 1)
> 	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41
> cucumber actually outputs a few empty lines: @io.puts
> That doesn't seem to do too well with your code here:
>  define_method severity do |message|
>           $messages ||= {}
>           ($messages[severity] ||= []) << message
>         end

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-266) puts with no message triggers a warning.

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680932#action_12680932 ] 

Antoine Toulme commented on BUILDR-266:
---------------------------------------

Ketan had removed this method before from our mirror of Buildr:

http://github.com/eclipse/buildr4eclipse/commit/2d2d9bbd8ea80d2f008dbd5948c9ea265887744c

> puts with no message triggers a warning.
> ----------------------------------------
>
>                 Key: BUILDR-266
>                 URL: https://issues.apache.org/jira/browse/BUILDR-266
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Antoine Toulme
>            Priority: Minor
>
> We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue when running rake features, the default task to run all the cucumber .feature files, it shows this message:
> ./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values for a block parameter (0 for 1)
> 	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41
> cucumber actually outputs a few empty lines: @io.puts
> That doesn't seem to do too well with your code here:
>  define_method severity do |message|
>           $messages ||= {}
>           ($messages[severity] ||= []) << message
>         end

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (BUILDR-266) puts with no message triggers a warning.

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme closed BUILDR-266.
---------------------------------

    Resolution: Won't Fix

The work around in our code should do. Patching Object is evil but it is for testing only, so.

> puts with no message triggers a warning.
> ----------------------------------------
>
>                 Key: BUILDR-266
>                 URL: https://issues.apache.org/jira/browse/BUILDR-266
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Antoine Toulme
>            Priority: Minor
>
> We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue when running rake features, the default task to run all the cucumber .feature files, it shows this message:
> ./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values for a block parameter (0 for 1)
> 	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41
> cucumber actually outputs a few empty lines: @io.puts
> That doesn't seem to do too well with your code here:
>  define_method severity do |message|
>           $messages ||= {}
>           ($messages[severity] ||= []) << message
>         end

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-266) puts with no message triggers a warning.

Posted by "Antoine Toulme (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Toulme updated BUILDR-266:
----------------------------------

    Affects Version/s: 1.3.4

That happens on the current trunk.

> puts with no message triggers a warning.
> ----------------------------------------
>
>                 Key: BUILDR-266
>                 URL: https://issues.apache.org/jira/browse/BUILDR-266
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.3.4
>            Reporter: Antoine Toulme
>            Priority: Minor
>
> We use buildr in conjunction with Cucumber. We run our tests with it. We face an issue when running rake features, the default task to run all the cucumber .feature files, it shows this message:
> ./features/step_definitions/../../buildr/spec/spec_helpers.rb:49: warning: multiple values for a block parameter (0 for 1)
> 	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/formatters/pretty_formatter.rb:41
> cucumber actually outputs a few empty lines: @io.puts
> That doesn't seem to do too well with your code here:
>  define_method severity do |message|
>           $messages ||= {}
>           ($messages[severity] ||= []) << message
>         end

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.