{"issue":{"milestone":{"title":"2.1","open_issues":15,"created_at":"2011-04-10T04:49:11Z","creator":{"id":5240,"login":"justinfrench","url":"https://api.github.com/users/justinfrench","avatar_url":"https://secure.gravatar.com/avatar/d21eafb0998a549a5821d130e03a0608?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d21eafb0998a549a5821d130e03a0608"},"state":"open","due_on":"2012-01-15T08:00:00Z","closed_issues":29,"number":8,"description":"","url":"https://api.github.com/repos/justinfrench/formtastic/milestones/8"},"user":{"id":18374,"login":"jcf","url":"https://api.github.com/users/jcf","avatar_url":"https://secure.gravatar.com/avatar/18c2795810ee15d41956e7f4cc5f3338?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"18c2795810ee15d41956e7f4cc5f3338"},"title":"Data attributes, RSpec profiling, Guard and more","created_at":"2011-09-01T22:59:08Z","updated_at":"2011-12-18T20:56:07Z","labels":[],"state":"open","id":1546840,"pull_request":{"patch_url":"https://github.com/justinfrench/formtastic/pull/673.patch","html_url":"https://github.com/justinfrench/formtastic/pull/673","diff_url":"https://github.com/justinfrench/formtastic/pull/673.diff"},"html_url":"https://github.com/justinfrench/formtastic/issues/673","closed_at":null,"body":"This is a reasonably large pull request that adds the ability to use…\r\n\r\n``` haml\r\n= f.input :name, data: {foo: 'bar'}\r\n```\r\n\r\n…rather than…\r\n\r\n``` haml\r\n= f.input :name input_html: {data: {foo: 'bar'}}\r\n```\r\n\r\n(Currently with the exception of with checkboxes, more on that below)\r\n\r\nThe reason it is large is because in the process of making this change I've also done the following.\r\n\r\n- Added RSpec profiling to make it easier to spot slow specs\r\n- Added Guard RSpec to support TDD\r\n- Moved Formtastic specs in to `spec/formtastic` to follow RSpec convention\r\n- Fixed `bundle console` by adding `require 'active_support'` to `lib/formtastic.rb`\r\n- Changed an I18n spec that I believe was testing something different to what was described\r\n- Removed some trailing whitespace in `lib/formtastic/inputs/base.rb`\r\n\r\nAll the changes are as atomic as I could make them. Naturally the small change I made to pass the `:data` straight through to Rails is somewhat dependent on the new location of the spec files.\r\n\r\nThere is one failing spec because of checkboxes and the non-standard approach to generating `input_html_options`. I plan to fix this but wanted to discuss the approach before proceeding as from the TODO I'm guessing you might already have thoughts on how you want to do this.\r\n\r\nI noticed the issue you created regarding speeding up tests and decided to not use `mock_everything` in the `data_attributes_spec`. The reason being `mock_everything` does a lot of work that isn't required in the new specs and creating less mocks and stubs should help speed things up.\r\n\r\nLet me know if you want this pull request broken up. I'm happy to rebase away commits and push new branches.\r\n\r\nRegards,\r\n\r\nJames","number":673,"url":"https://api.github.com/repos/justinfrench/formtastic/issues/673","comments":7,"assignee":null},"comment":{"user":{"id":18374,"login":"jcf","url":"https://api.github.com/users/jcf","avatar_url":"https://secure.gravatar.com/avatar/18c2795810ee15d41956e7f4cc5f3338?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"18c2795810ee15d41956e7f4cc5f3338"},"created_at":"2011-12-18T20:56:07Z","updated_at":"2011-12-18T20:56:07Z","id":3196878,"body":"I've rebased and fixed a couple of failing tests.\r\n\r\nIf you want me to break this pull request up I'm happy to do so. Maybe you could list the commits you want and the ones you don't and I'll get rid of the ones you don't.\r\n\r\n- I've fixed the `FormtasticInputs` helper I added. Essentially I've made it stricter in order to prevent testing objects that aren't inputs.\r\n- I've removed a couple of autoloads in `Formtastic::Inputs` as it appears the constants have gone. They were `Basic` and `NumericInput`. If this is wrong please let me know and I'll rip the commit out of this pull request.\r\n\r\nRegards.","url":"https://api.github.com/repos/justinfrench/formtastic/issues/comments/3196878"},"action":"created"}