hey guys question. Suppose I have an object instance, one of the methods takes a couple of parameters which I want to have "checked". I created another method to "sanitize" the params and I'm using .map!. All good there, the problem is that the original method that calls sanize does not see the modified object.
anybody in here have any experience with sockets? I'm trying to read from one, more specifically from an SMTP server. I can see the server sending me everything but when I do a socket.read I'm hung.
I can use the same code and point it to say google.com and I get something back no problem
You said you wanted to keep versioning of your REST API that you are building?
git would be good for keeping track of changes in the code. (maybe I misunderstood your question?)
There are many ways of creating versions in git, some people might disagree with what I'm going to say here. But what I've done in the past is keep the "master" branch with the latest changes once I'm satisfied I create a new branch with the name "version-XX.YY". I tell people they can get that branch for that specific version or "master" for bleeding edge.
I'm not saying go read the full RFC22616 (HTTP) in order to understand basic HTTP methods, but some minor reading of documentation is always useful to have at least a basic understanding of how things work, as as shevy said, you will end up being a smarter more capable person.
only a handful of books that I've read, like Shellcoder's Handbook (just the first one, I got too lazy on the second one), Hacking: The art of exploitation, and How to program C++. I was forced to read some Java stuff at school but that was about it for Java, I felt dirty.
Allenom: I'm not sure I understand, if you know rails really well, you can get up and running very fast with little issue.
You could also use a regex to validate that the different things that you want to allow are in place and nothing else
If you are talking about Rails then there are a few methods, in Sinatra you got some methods deriving from Rack. For ruby itlself I would do the regex and compare that to your string in a boolean type method
that is correct, do if you want to validate the whole URL then you want to first validate that it has the correct protocol, then fqdn, then URI
Wouldn't the web server validate "structurally correct but invalid" URIs?