Displaying 20 results from an estimated 59 matches for "optparse".
2007 Mar 01
4
RC1, Rails, and problems with multiple options in spec.opts
I am having inconsistent output with multiple options in the
spec.opts file. I can, for instance, pass --color or --colour, or,
separately, use --drb. But when combining them I get:
/opt/local/lib/ruby/1.8/optparse.rb:1381:in `complete'': invalid
option: --options --color --drb (OptionParser::InvalidOption)
from /opt/local/lib/ruby/1.8/optparse.rb:1379:in `catch''
from /opt/local/lib/ruby/1.8/optparse.rb:1379:in `complete''
from /opt/local/lib/ruby/1.8/optp...
2012 Feb 09
1
Autorun Picks Up Options
Hi,
I was trying to use the autorun feature of rspec but noticed that when I
run the command to kick off the ruby scripts it picks up the options that I
give to the command.
''myRubyBin -j optionValue''
This then fails with this error,
/usr/lib/ruby/1.8/optparse.rb:1448:in `complete''
:
invalid option: -j
(
OptionParser::InvalidOption
)
from /usr/lib/ruby/1.8/optparse.rb:1446:in `catch''
from /usr/lib/ruby/1.8/optparse.rb:1446:in `complete''
from /usr/lib/ruby/1.8/optparse.rb:1285:in `parse_in_order''
from /usr/lib/ruby/1.8...
2007 Nov 19
1
Capistrano in InstaRails bombs?
Following the book, I try:
cap --apply-to C:\CapPlanner\trunk\Source capplanner
And get in reply:
C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1443:in `complete'':
invalid option: --apply-to (OptionParser::InvalidOption)
from C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1441:in
`catch''
from C:/InstantRails/ruby/lib/ruby/1.8/optparse.rb:1441:in
`complete''
from C:/InstantRails/ruby/lib/r...
2007 Jan 12
2
spec_ui problems
...spec/spec_helper.rb:7
from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.5/lib/spec/
runner/option_parser.rb:107:in `require''
from /opt/local/lib/ruby/gems/1.8/gems/rspec-0.7.5/lib/spec/
runner/option_parser.rb:107:in `parse''
from /opt/local/lib/ruby/1.8/optparse.rb:1218:in `call''
from /opt/local/lib/ruby/1.8/optparse.rb:1218:in `order!''
from /opt/local/lib/ruby/1.8/optparse.rb:1205:in `catch''
from /opt/local/lib/ruby/1.8/optparse.rb:1205:in `order!''
from /opt/local/lib/ruby/1.8/optpars...
2012 Feb 08
1
optparse::parse_args, using equals sign or not
...found that when using parse_args(..., positional_arguments=FALSE),
it is permissible to invoke our script with either "--myfoo=bar" or
"--myfoo bar"; that is, whether or not the equals sign is present makes
no difference, and in fact both usage forms are demonstrated in the
optparse vignette.
However, we've found that when using parse_args(...,
positional_arguments=TRUE), it is no longer possible to use the equals
sign; that is, "--myfoo=bar" will show up as a positional argument, with
"myfoo" set to its default value instead.
Wondering if this is...
2007 Nov 28
6
textmate bundle
...ebuilder/vendor/plugins/rspec/lib/spec/runner/options.rb:137:in
`parse_format'' from
/Users/zdennis/source/ao_projects/circlebuilder/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:93:in
`initialize'' from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1260:in
`call'' from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1260:in
`parse_in_order'' from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1247:in
`catch'' from
/System/Library/Frameworks/Rub...
2009 Mar 31
7
[Cucumber] Running single feature from command line
.../Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/
option_parser.rb:143:in `invoke_requires''
from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/
option_parser.rb:104:in `initialize''
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/optparse.rb:1291:in `call''
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/optparse.rb:1291:in `parse_in_order''
... 31 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/
cli/main.rb:20:in `execute''
from /Library/Ruby...
2007 Mar 06
10
Windows rspec "gem install win32console"
Hi,
Hi I am trying to use RSPEC on windows and i keep getting the following
error
"You must gem install win32console to use colour on Windows"
I have installed this Gem but i am still getting the same error. The
file that error is coming from is:
C:\ruby\lib\ruby\gems\1.8\gems\rspec-0.8.2\lib\spec\runner\formatter\base_text_formatter.rb
Do i need to put this line of code in? Where
2017 Oct 20
1
Rscript Bug Report (improper parsing of [args])
Hi,
A user of my `optparse` package discovered a bug in Rscript's parsing of
[args]. (https://github.com/trevorld/optparse/issues/24)
I've reproduced the bug on my machine including compiling and checking the
development version of R. I couldn't find a mention of it in the Bug
Tracker or New Features.
Can be m...
2007 Sep 16
4
"Not Implemented" doesn''t show
...PeepCode do
it "should be awsome" do
end
end
So running spec spec/simple_spec.rb should produce according to his screen
cast:
1 example, 0 failures, 1 not implemented
but I only recieve:
1 example, 0 failures
Also spec spec/simple_spec.rb --format will fail
/usr/local/lib/ruby/1.8/optparse.rb:451:in `parse'': missing argument:
--format (OptionParser::MissingArgument)
RSpec 1.0.8
ZenTest 3.6.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070916/7a5765c4/attachment.html
2024 Jun 06
1
Failed to bind to uuid NT_STATUS_LOGON_FAILURE
...patibility
> fallback)
>
> Server role: ROLE_ACTIVE_DIRECTORY_DC
>
> Press enter to see a dump of your service definitions
>
> private dir = /opt/samba/private
>
> its code scripts again
> __docformat__ = "restructuredText"
>
>
> import optparse
> import sys
> # Allow to run from s4 source directory (without installing samba)
> sys.path.insert(0, "bin/python")
>
> import samba.getopt as options
> from samba.credentials import DONT_USE_KERBEROS
> from samba.auth import system_session
> from samba import pa...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 4/7] userspace virtio
...other NIC vendors than rtl8139.
Use --nictype=xxx, the ddefault is rtl8139.
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
---
kvm | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/kvm b/kvm
index 0374fbc..2a7dc85 100755
--- a/kvm
+++ b/kvm
@@ -55,6 +55,12 @@ optparser.add_option('--no-tap',
default = not privileged,
)
+optparser.add_option('--nictype',
+ help = 'use this specific nic type (vendor)',
+ dest = 'nictype',
+ defa...
2008 Jan 16
3
Application generation
Hi All,
Is anyone seeing this?
$ merb merb_paste
/usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:69:in
`parse_args'': uninitialized constant Merb::RELEASE (NameError)
from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize''
from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:67:in
`new''
from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:67:in
`parse_args''
from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/server.rb:32:in
`r...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 4/7] userspace virtio
...other NIC vendors than rtl8139.
Use --nictype=xxx, the ddefault is rtl8139.
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
---
kvm | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/kvm b/kvm
index 0374fbc..2a7dc85 100755
--- a/kvm
+++ b/kvm
@@ -55,6 +55,12 @@ optparser.add_option('--no-tap',
default = not privileged,
)
+optparser.add_option('--nictype',
+ help = 'use this specific nic type (vendor)',
+ dest = 'nictype',
+ defa...
2011 Mar 23
1
How identify args into R, sent from a command line.
Hi,
For example, I have several variables in php, like
var1 = 1, 2, 3, 5, 6
var2 = 3, 1, 8
var3 = 8, 10, 4, 0, 9, 1
I sent the arguments to R, with this line:
'/usr/bin/R --vanilla --slave --args '.$var1.' '.$var2.' '.$var3.' < script.r'
In my "script.r" I can read the arguments whit this line:
args=(commandArgs(TRUE))
args=as.numeric(args)
args
2024 Jun 06
1
Failed to bind to uuid NT_STATUS_LOGON_FAILURE
...ole: ROLE_ACTIVE_DIRECTORY_DC
> >
> > Press enter to see a dump of your service definitions
> >
> > private dir = /opt/samba/private
> >
> > its code scripts again
> > __docformat__ = "restructuredText"
> >
> >
> > import optparse
> > import sys
> > # Allow to run from s4 source directory (without installing samba)
> > sys.path.insert(0, "bin/python")
> >
> > import samba.getopt as options
> > from samba.credentials import DONT_USE_KERBEROS
> > from samba.auth import system...
2012 Apr 25
3
R shell script
Hey guys,
Does anyone have an example of a REALLY simple shell script in R.
Basically i want to run this command:
library(MASS)
wilcox.test(list1,list2,paired=TRUE,alternative=c("greater"),correct=TRUE,exact=FALSE)
in a shell script something like this:
#!/bin/bash
R
library(MASS)
for i in *.out
do
wilcox.test($i,${i/out}.out2,paired=TRUE) >> $i.out
done
that i can run on a
2024 Jun 06
1
Failed to bind to uuid NT_STATUS_LOGON_FAILURE
...ces file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_ACTIVE_DIRECTORY_DC
Press enter to see a dump of your service definitions
private dir = /opt/samba/private
its code scripts again
__docformat__ = "restructuredText"
import optparse
import sys
# Allow to run from s4 source directory (without installing samba)
sys.path.insert(0, "bin/python")
import samba.getopt as options
from samba.credentials import DONT_USE_KERBEROS
from samba.auth import system_session
from samba import param
from samba.provision import find_pro...
2006 Mar 20
1
I need some help with OptionsParser
Hey all,
I must be doing something wrong here. Im calling the following file this way:
ruby script.rb -s 1234
or
ruby script.rb -s1111
#Code snip
require ''optparse''
opts = OptionParser.new
opts.on("-s", "--size VAL", Integer) do |val|
puts "-s #{val}"
puts val
end
But..no matter what I do, I don''t get any values out. I must be doing something wrong??
Help!
THanks all,
Brian
-------------- next part ---------...
2010 Jul 01
2
Command Line Arguments
Do you know to pass named command line arguments into an R script?
I have used littler and argv to pass a vector of arguments, but this
requires you to maintain the order of the arguments.
I'm wondering if there is a way to do this when you do not know the
order of the arguments being passed in.
Thanks,
Andrew Bierbryer
[[alternative HTML version deleted]]