Posts tagged rubyonrails
Posts tagged rubyonrails
We are looking for #rubyonrails developers that want to improve #healthcareIT and loves #chs or #phl
Rico Sta. Cruz created an awesome converter js2coffee. If you are planning to get into CoffeeScript, you have to check this page out.
http://ricostacruz.com/js2coffee
It will not craft CoffeeScript as well as if you did it by hand, but it is great to take some existing javascript and paste it in and see how it renders the CoffeeScript.
I just went over the https://github.com/visionmedia and grabbed the javascript from “node-growl” js file and pasted it in the javascript editor at js2coffee. It converted it to CoffeeScript and the generated CoffeeScript code was functional and compiled back into JavaScript!
Ever need to pull a copy of your production data?
Ever need to create a demo sandbox for your sales team?
So we created a gem called Fakerize, it is currently going though some internal testing, but we will launch as open source as soon as we have all the issues worked out.
This Command Line Interface, makes it very easy to de-identify your database.
You simply create a config yaml file with a map of all your models and a list of fields that you want to fakerize.
---
:models:
-
:name: :patients
:options:
-
:field: :last_name
:fakerize: Name.last_name
Save as config.yml
Then install the fakerize gem
gem install fakerize
Then if you have a mysql database run:
fakerize database:convert mysql://user@localhost/mydb config.yml
And it will proceed to de-identify your database.
Now you can push your database to a demo app or just hack on your database locally, but feel better that you are not carrying around your clients liability in your computer.
We plan add a feature to allow you to use it for any data store.
Right now, it uses the Sequel Toolkit and can connect to any adapter that the Sequel toolkit uses, but we are planning to allow you to create adapters for any datastore.
Also we plan to add a “database:clean”, that will allow you to specify models that you want completely emptied!
Have you ever found yourself pulling your hair out at 3:00am, frustrated and challenged beyond all that is humanly possible, because your tests are unable to select any of the options from an AutoComplete?
But if you have, this quick jQuery snippet, once placed correctly, will hopefully make your late nights of frustration a little bit shorter.
We first find the text field label, “Name”, and fill it in with text that will cause the AutoComplete to show us a list of the result(s) so that we may select one.
fill_in 'Name', :with => 'Jack'
Moving to the next line, the sleep() is necessary so that the AutoComplete has time to load and have what we want selected. The time count may vary.
sleep 3
Lastly, we tell Capybara to run some script:
click on the selected field.
page.execute_script ” $(‘#{selector}’).trigger("mouseenter").click();”
Robert Pearce
Jack Russell Software Company