yamldb / yaml_db

Rails plugin for a database-independent dump format, data.yml .......... Seeking new maintainers! See https://github.com/yamldb/yaml_db/issues/143
https://rubygems.org/gems/yaml_db
949 stars 200 forks source link

Refactor and correction of convert_boolean(s) #10

Closed qnm closed 14 years ago

qnm commented 14 years ago

Hey guys,

I ran into a problem when dumping an Oracle DB into yml - booleans were always returned as false. This is because they are always stored as 1-bit integers (i.e. 1 or 0) in Oracle-land.

I've refactored convert_booleans to call convert_boolean to determine a given values boolean equivalent, added test cases for the code and allowing boolean true and integer 1 to be transformed to boolean true.

Hope there's enough for you to merge in!

Thanks for yaml_db, it's very helpful our team.

qnm commented 14 years ago

pls ignore - I've created a topic branch for less painful merging...