I am trying to include HTML validity to our suite of tests (RSpec) with the w3c_validator gems. One problem is the lag between my machine and the W3C servers (the gem uses remote validation). Another problem is that I would like the HTML errors to be displayed as some kind of warning instead of spec failures.
What would be the proper way of achieving this?
Versions:
RSpec 2.7
Rails 3.0.4
Ruby 1.8.7
Ubuntu Linux (11.04)
One way: use v.Nu.
For example:
Install vnu.jar on your computer to reduce the lag.
Run vnu.jar as a standalone web service.
Write your own code (say, in Ruby) to use the v.Nu HTTP interface and display the errors as you like.
Depending on what you mean by "proper", which can include requirements that are specific to your needs and circumstances, v.Nu has a strong case for being the proper way to validate (X)HTML(5). For links to information that support this case, and an example use of the v.Nu HTTP interface, see linter-vnu.
Related
I am a rails backend developer and I am now working in a team with an HTML coder and I have some problems with information exchange.
I want him to generate all the HTML templates (haml, erb, whatever) and css files. But he has actually no clue on how to install ruby (and rails).
So, we are working now in this ugly workcycle when he puts all html's and css's in public, test them, and then I (myself) move them to correct place.
Is there a tool (for HTML codes) that mimics Rails rendering part so he will run this tool, which must be easy, and when the server starts, he can put all the templates to app/ and test them?
I see this as a small easy installable subset of rails, that only deal with page rendering.
If your coder still doesn't know how to install ruby or how to configure stuff for works , then I can say this is quite problematic . You either can try any cloud based IDE . Or , tools like git to get only raw stuff.
But , you also can look for someone who in minimum way will try to make the whole process possible by learning and installing ruby in their pc .
I had a similiar problem where a copywriter needed to play with the html and we ended up using Cloud9.
Cloud9 is a collaborative IDE in the cloud, IMHO It's pretty decent for small scale projects and can really get the job done.
I simply installed rails once and ran a local dev server and she did all the modifications and watced the preview.
Another option is to create a vagrant environment and preisntall rails there. This means the HTML coder would have to install a VM on his machine and run the vagrant there.
I am experimenting JRuby on Rails and need some guidance/tips in choosing the server. I have used nginx (and passenger) for my RoR in the past. JRuby wiki page Servers provide a lot of options and I have no experience in any of them.
What I am looking for is a simple to install, easy to scale server or the one widely used (so that I can find solutions if I am stuck)
I do realize this might be a broad question and the answer would be "it depends..." but would appreciate some pointers.
I might be biased being on the Trinidad team, but I still think it's top ... esp. as it handles high concurrency well while still being much lighter than TorqueBox (which I would also recommend if you do want something beyond just a web server e.g. built-in jobs but be aware that some of it is TB/JRuby specific). Most other options mentioned are Java web servers, which you can rule out if you do not want to install a Java server, warbling your application and deploying it as a .war file.
p.s. for the (next) version 1.5.0 re-deploys are to be revisited and one should be able to do some (memory leak-free) zero-down time deployments.
mysql2 gem have "Not supported on Windows" note.
I need a simple solution to do async calls to mysql database on windows. No need for ORM support.
Preferably not with Eventmachine as I'd rather not have my whole app packed inside EM.run block.
There is this, but doesn't seem to have been any changes in the past 2 years.
Perhaps it will give you what you need and I'm sure you can contact the author.
https://github.com/chrismoos/async-mysql
I often find the quote "InstallUtil.exe" is an ugly pattern or "Don't use InstallUtil.exe" and that I should use native WIX or Installation package patterns and I still don't understood why.
I stepped away from using InstallUtil to install a .NET service as I finally learnt that writing registry keys for such an action should be an un-install-able action - and I've come to terms with this as correct.
As I've been working through my WIX installer for a relatively complex product, I have found myself in need of creating or updating SQL Server databases, creating or updating IIS Applications and finally updating or creating configuration files.
Each of my components (features) are optional, but they all share the same configuration file. As my product uses unity, its important to note that this library contains strong support for reading/updating/removing components from the Unity Configuration block, therefore it seems fairly smart to me that I should take advantages of these blocks via Installation Components (i.e. InstallUtil) to create or update my configuration file at installation time.
Just to be clear here, my installer does not natively contain a configuration file for my application: at installation time, the installer has no idea as to the shape of it as its based on the features selected. Surely I should be embedding this knowledge into each of the modules that are to be deployed and not in the remit of the installer which is now a completely independent project? Wouldn't this break O-O principals even if we are talking about installation?
I'd really appreciate some guidance as to whether this is good practise or not? Am I reading 'InstallUtil' is bad for installing services, or is it that using 'InstallUtil' is bad full-stop? If so, what are my options for smart updating of configuration files?
The main reason for avoiding InstallUtil is that it runs outside of the installation transaction, so Windows Installer cannot keep track of what it's done.
I have used InstallUtil on a few occasions, when I just couldn't get Wix to do what I needed and didn't have time to write a custom action. In this case I called the InstallUtilLib version as I feel this is a cleaner approach.
I used the this blog as a guide as to how to achieve this.
I am looking into using Hudson to perform continuous integration testing for developing apache modules using mod_perl. Does anyone have any best practices or recommended strategies for utilizing these kinds of CI systems with apache modules?
I believe most CI systems are as simple as just accepting some common test output format, or even as basic as a true or false result from an external script.
You can easily wrap checking out code, starting a server, running tests against the server, stop the server and output in TAP format and either convert to corresponding format, or simply use the TAP output as the result against most CIs out there.
If using Test::Unit, the XML output is compatible with Hudson; check the JUnit option in the post-build section and point it at any XML files produced and you will have pretty nice test reporting.
We do this as well as using Devel::Cover and using the htmlpublisher plugin to archive and publish this.