CSV fixtures striping needed whitespace #2137

Closed
pivotal-awesome-couches opened this Issue Jul 18, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@pivotal-awesome-couches

This line is stripping whitespace we need for our test data. It is effecting our Rspec tests.

https://github.com/rails/rails/blob/3-0-9/activerecord/lib/active_record/fixtures.rb#L745

Was there a reasoning for this?

@franckverrot

This comment has been minimized.

Show comment
Hide comment
@franckverrot

franckverrot Jul 19, 2011

Contributor

I think strip is just there to sanitize the input. I'm curious about your use case now :)

Contributor

franckverrot commented Jul 19, 2011

I think strip is just there to sanitize the input. I'm curious about your use case now :)

@pivotal-awesome-couches

This comment has been minimized.

Show comment
Hide comment
@pivotal-awesome-couches

pivotal-awesome-couches Jul 19, 2011

We have a string providing day information in a format "SMTWTFS". Each day is represented with the character in the string position, if the day is not active it is replace with a space, so for Monday and Friday we have " M F ". We are working with a rather large dataset, so changing the format of the data wasn't an option. We just kept running into a problem where Sunday was active with Monday, etc.

We have a string providing day information in a format "SMTWTFS". Each day is represented with the character in the string position, if the day is not active it is replace with a space, so for Monday and Friday we have " M F ". We are working with a rather large dataset, so changing the format of the data wasn't an option. We just kept running into a problem where Sunday was active with Monday, etc.

@franckverrot

This comment has been minimized.

Show comment
Hide comment
@franckverrot

franckverrot Jul 20, 2011

Contributor

strip-ing in https://github.com/rails/rails/blob/3-0-9/activerecord/lib/active_record/fixtures.rb#L745 was added a long time ago. So is it a regression (and if so, compared to what version?) or are you effectively using CSV fixtures for the first time?

Contributor

franckverrot commented Jul 20, 2011

strip-ing in https://github.com/rails/rails/blob/3-0-9/activerecord/lib/active_record/fixtures.rb#L745 was added a long time ago. So is it a regression (and if so, compared to what version?) or are you effectively using CSV fixtures for the first time?

@pivotal-awesome-couches

This comment has been minimized.

Show comment
Hide comment
@pivotal-awesome-couches

pivotal-awesome-couches Jul 20, 2011

This was started on a greenfield project, so using CSV fixtures for the first time. We started directly on Rails 3.0.7.

This was started on a greenfield project, so using CSV fixtures for the first time. We started directly on Rails 3.0.7.

@franckverrot

This comment has been minimized.

Show comment
Hide comment
@franckverrot

franckverrot Jul 20, 2011

Contributor

CSV fixtures have been deprecated and support for them removed in 3-1.

Contributor

franckverrot commented Jul 20, 2011

CSV fixtures have been deprecated and support for them removed in 3-1.

lsylvester pushed a commit to lsylvester/rails that referenced this issue Jul 27, 2011

making rake:migrate VERSION=0 a noop called in succession. [#2137 sta…
…te:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>

@vijaydev vijaydev closed this Nov 22, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment