similar to: Testing cookies

Displaying 20 results from an estimated 7000 matches similar to: "Testing cookies"

2007 Nov 30
4
Rendering a view and passing a variable
Hello all, I have a view which display html based on the value of a variable. Here''s the code : <% if @language == ''e'' %> <%= link_to "Fran&ccedil;ais", :action => :index, :id => "f" %> <% end %> In my test, I''m trying to set the value of the variable first, but that just doesn''t seem to work : it
2008 Apr 11
4
request.params causing errors
Hello, I have a rhtml file that goes through the request.params. One of my test generates that file, but rspec pops an error saying : undefined method ''params'' for ... I''m not sure what to do with this, since request.params actually works with rails. Any idea? Thank you Olivier Dupuis -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Oct 04
1
Cookies in RSpec
So how do you work with cookies properly in rspec now? I noticed in the docs that it mentions session, assigns, and flash, but nothing of cookie. I''m using edge rails so I''m concerned about changes to the cookie mechanisms. I need to assign values into the cookie (a remember token for restful authentication) so that I can have it log in by cookie. here is my spec
2007 Jan 29
2
rspec and cookies
Hello can anyone tell me how to test cookies using rspec? specifically, I''d like to be able to set a cookie before a get/post request and also to test the cookies which have been set by a get/post request I know I can use cookies[:name] = ''value'' to set a cookie but how would I set expiry information on such a cookie? when i try to pass a hash {:value =>
2006 Jan 07
2
can store array or hash in cookies?
Hi According to rdoc: value - the cookie''s value or list of values (as an array). So, I can use arrays, briliant. But.... It does not work (at least on webrick) I wrote a controller: def check_cookies_first cookies[:chef] = {:value => ["first", "second"], :expires => Time.local (2020)} render_text ":)" end def
2012 Jun 07
1
How to set cookies in RCurl
Hi, I am trying to access a website and read its content. The website is a restricted access website that I access through a proxy server (which therefore requires me to enable cookies). I have problems in allowing Rcurl to receive and send cookies. The following lines give me: library(RCurl) library(XML) url <- "http://www.theurl.com" content <- readHTMLTable(url) content
2006 Jul 10
2
cookies rendering in view
...i don''t know what to do! obviously, this is probably more simple than what i''m going through now(at least i can say i dear hope so) but i''m having a terrible time trying to use cookies[:something]... explination: i have already implement a nice working cute forum, and i was hoping to put the client/forum-user''s username and email into the corresponding
2001 Nov 15
2
X11 cookies and forwarding
I'm guess I wasn't following the whole cookies discussion completely (putting cookies in /tmp to avoid putting them on NFS, etc.), but I noticed today that with 2.9.9p2, if I use "ssh -X" to start a shell on the server, in that shell XAUTHORITY is set to /tmp/ssh-XXXXXXXX/cookies and there are cookies placed there there. These are the "fake" cookies for the
2006 Dec 01
2
Mongrel 0.3.18, rails 1.1.6 and cookies
I''ve run into an issue with my rails application being unable to properly set cookies on Mongrel 0.3.18. If I run the simplified code below in Mongrel 3.14.4, both cookies are properly sent to and saved by the browser. With the same code in 0.3.18, only the auth_token cookie is created (if I switch them, only the userid as it will only properly create the first cookie in the list.)
2001 Nov 15
1
X11 cookies and forwarding (fwd)
On Thu, 15 Nov 2001, Dan Astoorian wrote: > Date: Thu, 15 Nov 2001 16:09:20 -0500 > From: Dan Astoorian <djast at cs.toronto.edu> > To: Ed Phillips <ed at UDel.Edu> > Subject: Re: X11 cookies and forwarding > > On Thu, 15 Nov 2001 15:46:22 EST, Ed Phillips writes: > > I'm guess I wasn't following the whole cookies discussion completely > >
2010 Nov 14
1
RCurl and cookies in POST requests
Hello. I know that it's usually possible to write cookies to a cookie file by removing the curl handle and doing a gc() call. I can do this with getURL(), but I just can't obtain the same results with postForm(). If I use: curlHandle <- getCurlHandle(cookiefile=FILE, cookiejar=FILE) and then do: getURL(http://example.com/script.cgi, curl=curlHandle) rm(curlHandle) gc() it's
2013 Nov 20
2
Baking Cookies
I think my oven is broken, but maybe I have the recipe wrong. I've been trying to utilize the lwIP stack and dmi information to avoid iPXE use. I can do a SYSAPPEND 0x00080 and it shows up in /proc/cmdline after booting the kernel, but tcpdump is not revealing the cookies as described during HTTP calls in the documentation. Trying the magic "SENDCOOKIES" parameter outside of an
2008 May 17
4
Setting cookies in service overloader thingo
I''m implementing a simpler version of the Cookie Session Store in Rails 2.0. If you know what that is, skip the next paragraph. A cookie session store stores the session data inside cookies, on the client, and signs them using a secret string, hashed together. The user can decode the cookie easily if they know much about computers and see what''s inside, but they
2006 Mar 06
2
Cookies & gsub ?
I''m looking to store the current params into a/some cookie(s). This works: @params.each_pair do |this_index, this_param| cookies[this_index] = this_param end Except, I get session-only cookies. This doesn''t work: @params.each_pair do |this_index, this_param| cookies[this_index] = { :value => this_param, :expires => 30.days.from_now } end
2008 Mar 14
2
How to pass cookies to website??/??
Hi All, I wanna pass cookies with url.Suppose i have two website and both website have LDAP server for user authentication.if i authenticated in one website then i wanna pass that cookies to another website for authenticating the user. Is it possible for single sign on? If yes then please tell me how can i pass the cookies url. Need your help actually i wanna do single sign on i am able to
2009 Jul 02
2
Big help with shared subdomains cookies
Hi, i need that all the subdomains of an app (using subdomain_fu) use ''.domain.com'' as domain for all cookies. I''ve set ActionController::Base.session_options[:domain] = ''.domain.com'' and it works...for just the session... how can i set this also for common cookies ? (created with cookies[:name] = {:value => value, :expires => 6.months.from_now} )
2009 May 26
9
cookies are mandatory for Rails app?
is it true that Rails depend on cookies? It seems that flash is a part of session, and session uses cookies... so when i disable cookie in Firefox, what was working became ActionController::InvalidAuthenticityToken so is it true that for a RoR app to work, cookies are mandatory? -- Posted via http://www.ruby-forum.com/.
2008 May 18
1
Problem with cookies in CGI mode
So it took me ages to figure out how to get cookies set in my app, and here was the problem. I''m using camping''s built in CGI support, and with that you can have something like domain.com/blah/app.rb and that will go to your / route, which is okay, except that the path the cookies are set with is domain.com/blah/app.rb/ So if you try to use that url, none of your
2012 Apr 25
8
showing error (gsub) when switching from session to cookies
I am newbie to rail. Trying to develop social networking site so working with railspace application. Everything is working fine but I stuck in the problem when i am giving the authorization tocken to the user to remember him/her. My Error and controller code is below Error:- private method `gsub'' called for 4:Fixnum C:/Users/Amir/Downloads/IR/ruby/lib/ruby/1.8/cgi.rb:342:in
2006 Mar 09
4
cross domain cookies
Does anybody know how to access the domain of a cookie from inside rails? I am try to integrate phpbb forums into my site and one of the things phpbb does is store a cookie. The forums are at forums.domain.com and the site is www.domain.com so i needed to set the cookie domain in phpbb to just be ".domain.com" so both sites can access it. The trouble is when using cookies[] in rails,