├── .codeclimate.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .rubocop_todo.yml ├── .ruby-version ├── .travis.yml ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── Rakefile ├── bin └── rspec ├── lib ├── rectify.rb └── rectify │ ├── build_form_from_model.rb │ ├── command.rb │ ├── controller_helpers.rb │ ├── errors.rb │ ├── form.rb │ ├── form_attribute.rb │ ├── format_attributes_hash.rb │ ├── null_query.rb │ ├── presenter.rb │ ├── query.rb │ ├── rspec.rb │ ├── rspec │ ├── database_reporter │ │ ├── display.rb │ │ ├── query_info.rb │ │ ├── query_stats.rb │ │ └── reporter.rb │ ├── helpers.rb │ ├── matchers.rb │ ├── stub_form.rb │ └── stub_query.rb │ ├── sql_query.rb │ └── version.rb ├── readme.md ├── rectify.gemspec └── spec ├── config └── database.yml ├── db ├── migrate │ ├── 20160407175608_add_user.rb │ ├── 20160407192025_add_active_to_users.rb │ ├── 20160418221727_create_contacts.rb │ ├── 20160418230109_create_addresses.rb │ ├── 20160418230251_add_address_to_user.rb │ ├── 20160525115421_add_last_logged_in_to_user.rb │ └── 20180531090029_add_user_to_user.rb └── schema.rb ├── fixtures ├── command │ ├── args_command.rb │ ├── error_command.rb │ ├── no_args_command.rb │ ├── return_multi_event_multi_result_command.rb │ ├── return_multi_result_command.rb │ ├── return_single_result_command.rb │ └── success_command.rb ├── controllers │ ├── empty_controller.rb │ ├── helper_controller.rb │ └── my_presenter_controller.rb ├── forms │ ├── address_form.rb │ ├── before_validation_form.rb │ ├── child_form.rb │ ├── contact_form.rb │ ├── file_upload_form.rb │ ├── order_form.rb │ ├── phone_form.rb │ ├── product_form.rb │ ├── registration_form.rb │ ├── school_form.rb │ ├── teacher_form.rb │ └── user_form.rb ├── models │ ├── address.rb │ ├── contact.rb │ └── user.rb ├── presenters │ ├── helper_presenter.rb │ ├── layout_presenter.rb │ └── simple_presenter.rb └── queries │ ├── active_users.rb │ ├── all_users.rb │ ├── scoped_users_over.rb │ ├── users_over.rb │ ├── users_over_using_sql.rb │ ├── users_under.rb │ └── users_with_name_starting.rb ├── lib └── rectify │ ├── command_spec.rb │ ├── controller_spec.rb │ ├── form_spec.rb │ ├── presenter_spec.rb │ ├── query_spec.rb │ └── stub_form_spec.rb └── spec_helper.rb /.codeclimate.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/.codeclimate.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.sqlite3 3 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/.rubocop.yml -------------------------------------------------------------------------------- /.rubocop_todo.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/.rubocop_todo.yml -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.5.1 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/.travis.yml -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/Gemfile -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/Gemfile.lock -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/Rakefile -------------------------------------------------------------------------------- /bin/rspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/bin/rspec -------------------------------------------------------------------------------- /lib/rectify.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify.rb -------------------------------------------------------------------------------- /lib/rectify/build_form_from_model.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/build_form_from_model.rb -------------------------------------------------------------------------------- /lib/rectify/command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/command.rb -------------------------------------------------------------------------------- /lib/rectify/controller_helpers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/controller_helpers.rb -------------------------------------------------------------------------------- /lib/rectify/errors.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/errors.rb -------------------------------------------------------------------------------- /lib/rectify/form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/form.rb -------------------------------------------------------------------------------- /lib/rectify/form_attribute.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/form_attribute.rb -------------------------------------------------------------------------------- /lib/rectify/format_attributes_hash.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/format_attributes_hash.rb -------------------------------------------------------------------------------- /lib/rectify/null_query.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/null_query.rb -------------------------------------------------------------------------------- /lib/rectify/presenter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/presenter.rb -------------------------------------------------------------------------------- /lib/rectify/query.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/query.rb -------------------------------------------------------------------------------- /lib/rectify/rspec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/database_reporter/display.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/database_reporter/display.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/database_reporter/query_info.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/database_reporter/query_info.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/database_reporter/query_stats.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/database_reporter/query_stats.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/database_reporter/reporter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/database_reporter/reporter.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/helpers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/helpers.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/matchers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/matchers.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/stub_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/stub_form.rb -------------------------------------------------------------------------------- /lib/rectify/rspec/stub_query.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/rspec/stub_query.rb -------------------------------------------------------------------------------- /lib/rectify/sql_query.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/lib/rectify/sql_query.rb -------------------------------------------------------------------------------- /lib/rectify/version.rb: -------------------------------------------------------------------------------- 1 | module Rectify 2 | VERSION = "0.13.0".freeze 3 | end 4 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/readme.md -------------------------------------------------------------------------------- /rectify.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/rectify.gemspec -------------------------------------------------------------------------------- /spec/config/database.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/config/database.yml -------------------------------------------------------------------------------- /spec/db/migrate/20160407175608_add_user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160407175608_add_user.rb -------------------------------------------------------------------------------- /spec/db/migrate/20160407192025_add_active_to_users.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160407192025_add_active_to_users.rb -------------------------------------------------------------------------------- /spec/db/migrate/20160418221727_create_contacts.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160418221727_create_contacts.rb -------------------------------------------------------------------------------- /spec/db/migrate/20160418230109_create_addresses.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160418230109_create_addresses.rb -------------------------------------------------------------------------------- /spec/db/migrate/20160418230251_add_address_to_user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160418230251_add_address_to_user.rb -------------------------------------------------------------------------------- /spec/db/migrate/20160525115421_add_last_logged_in_to_user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20160525115421_add_last_logged_in_to_user.rb -------------------------------------------------------------------------------- /spec/db/migrate/20180531090029_add_user_to_user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/migrate/20180531090029_add_user_to_user.rb -------------------------------------------------------------------------------- /spec/db/schema.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/db/schema.rb -------------------------------------------------------------------------------- /spec/fixtures/command/args_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/args_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/error_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/error_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/no_args_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/no_args_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/return_multi_event_multi_result_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/return_multi_event_multi_result_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/return_multi_result_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/return_multi_result_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/return_single_result_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/return_single_result_command.rb -------------------------------------------------------------------------------- /spec/fixtures/command/success_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/command/success_command.rb -------------------------------------------------------------------------------- /spec/fixtures/controllers/empty_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/controllers/empty_controller.rb -------------------------------------------------------------------------------- /spec/fixtures/controllers/helper_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/controllers/helper_controller.rb -------------------------------------------------------------------------------- /spec/fixtures/controllers/my_presenter_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/controllers/my_presenter_controller.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/address_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/address_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/before_validation_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/before_validation_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/child_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/child_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/contact_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/contact_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/file_upload_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/file_upload_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/order_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/order_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/phone_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/phone_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/product_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/product_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/registration_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/registration_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/school_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/school_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/teacher_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/teacher_form.rb -------------------------------------------------------------------------------- /spec/fixtures/forms/user_form.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/forms/user_form.rb -------------------------------------------------------------------------------- /spec/fixtures/models/address.rb: -------------------------------------------------------------------------------- 1 | class Address < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /spec/fixtures/models/contact.rb: -------------------------------------------------------------------------------- 1 | class Contact < ActiveRecord::Base 2 | belongs_to :user 3 | end 4 | -------------------------------------------------------------------------------- /spec/fixtures/models/user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/models/user.rb -------------------------------------------------------------------------------- /spec/fixtures/presenters/helper_presenter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/presenters/helper_presenter.rb -------------------------------------------------------------------------------- /spec/fixtures/presenters/layout_presenter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/presenters/layout_presenter.rb -------------------------------------------------------------------------------- /spec/fixtures/presenters/simple_presenter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/presenters/simple_presenter.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/active_users.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/active_users.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/all_users.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/all_users.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/scoped_users_over.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/scoped_users_over.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/users_over.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/users_over.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/users_over_using_sql.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/users_over_using_sql.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/users_under.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/users_under.rb -------------------------------------------------------------------------------- /spec/fixtures/queries/users_with_name_starting.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/fixtures/queries/users_with_name_starting.rb -------------------------------------------------------------------------------- /spec/lib/rectify/command_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/command_spec.rb -------------------------------------------------------------------------------- /spec/lib/rectify/controller_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/controller_spec.rb -------------------------------------------------------------------------------- /spec/lib/rectify/form_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/form_spec.rb -------------------------------------------------------------------------------- /spec/lib/rectify/presenter_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/presenter_spec.rb -------------------------------------------------------------------------------- /spec/lib/rectify/query_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/query_spec.rb -------------------------------------------------------------------------------- /spec/lib/rectify/stub_form_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/lib/rectify/stub_form_spec.rb -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andypike/rectify/HEAD/spec/spec_helper.rb --------------------------------------------------------------------------------