draper 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +16 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +24 -0
- data/.gitignore +3 -1
- data/.rubocop.yml +11 -0
- data/.travis.yml +3 -7
- data/CHANGELOG.md +26 -0
- data/Gemfile +4 -5
- data/Guardfile +5 -5
- data/README.md +61 -11
- data/Rakefile +1 -1
- data/draper.gemspec +12 -10
- data/lib/draper.rb +8 -3
- data/lib/draper/automatic_delegation.rb +5 -3
- data/lib/draper/collection_decorator.rb +1 -11
- data/lib/draper/compatibility/api_only.rb +23 -0
- data/lib/draper/configuration.rb +15 -0
- data/lib/draper/decoratable.rb +3 -4
- data/lib/draper/decorator.rb +4 -24
- data/lib/draper/finders.rb +0 -0
- data/lib/draper/helper_proxy.rb +1 -8
- data/lib/draper/railtie.rb +12 -21
- data/lib/draper/tasks/test.rake +2 -15
- data/lib/draper/test/devise_helper.rb +1 -8
- data/lib/draper/test/minitest_integration.rb +0 -0
- data/lib/draper/test/rspec_integration.rb +1 -5
- data/lib/draper/test_case.rb +4 -8
- data/lib/draper/undecorate.rb +8 -0
- data/lib/draper/version.rb +1 -1
- data/lib/draper/view_context.rb +3 -19
- data/lib/draper/view_context/build_strategy.rb +11 -2
- data/lib/generators/controller_override.rb +2 -2
- data/lib/generators/draper/install_generator.rb +14 -0
- data/lib/generators/draper/templates/application_decorator.rb +8 -0
- data/lib/generators/mini_test/decorator_generator.rb +1 -1
- data/lib/generators/rails/decorator_generator.rb +1 -8
- data/lib/generators/rspec/templates/decorator_spec.rb +2 -2
- data/spec/draper/collection_decorator_spec.rb +11 -26
- data/spec/draper/configuration_spec.rb +25 -0
- data/spec/draper/decoratable_spec.rb +29 -16
- data/spec/draper/decorated_association_spec.rb +9 -9
- data/spec/draper/decorates_assigned_spec.rb +6 -6
- data/spec/draper/decorator_spec.rb +112 -89
- data/spec/draper/draper_spec.rb +24 -0
- data/spec/draper/factory_spec.rb +26 -26
- data/spec/draper/finders_spec.rb +21 -21
- data/spec/draper/helper_proxy_spec.rb +3 -3
- data/spec/draper/lazy_helpers_spec.rb +2 -2
- data/spec/draper/undecorate_chain_spec.rb +20 -0
- data/spec/draper/view_context/build_strategy_spec.rb +26 -10
- data/spec/draper/view_context_spec.rb +49 -21
- data/spec/dummy/app/controllers/base_controller.rb +4 -0
- data/spec/dummy/app/controllers/posts_controller.rb +2 -2
- data/spec/dummy/app/decorators/post_decorator.rb +0 -0
- data/spec/dummy/app/views/posts/_post.html.erb +8 -6
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/initializers/draper.rb +3 -0
- data/spec/dummy/config/mongoid.yml +104 -41
- data/spec/dummy/db/schema.rb +4 -4
- data/spec/dummy/fast_spec/post_decorator_spec.rb +1 -1
- data/spec/dummy/lib/tasks/test.rake +1 -1
- data/spec/dummy/spec/decorators/active_model_serializers_spec.rb +4 -8
- data/spec/dummy/spec/decorators/devise_spec.rb +0 -9
- data/spec/dummy/spec/decorators/post_decorator_spec.rb +2 -4
- data/spec/dummy/spec/mailers/post_mailer_spec.rb +0 -8
- data/spec/dummy/spec/shared_examples/decoratable.rb +0 -2
- data/spec/dummy/test/decorators/minitest/devise_test.rb +0 -9
- data/spec/dummy/test/decorators/minitest/view_context_test.rb +3 -3
- data/spec/dummy/test/decorators/test_unit/devise_test.rb +0 -9
- data/spec/dummy/test/decorators/test_unit/view_context_test.rb +1 -1
- data/spec/generators/controller/controller_generator_spec.rb +3 -3
- data/spec/generators/decorator/decorator_generator_spec.rb +14 -12
- data/spec/generators/install/install_generator_spec.rb +19 -0
- data/spec/integration/integration_spec.rb +11 -8
- data/spec/performance/benchmark.rb +1 -1
- data/spec/spec_helper.rb +4 -4
- data/spec/support/matchers/have_text.rb +2 -2
- data/spec/support/shared_examples/view_helpers.rb +8 -8
- metadata +71 -29
- data/gemfiles/4.0.gemfile +0 -3
- data/gemfiles/4.1.gemfile +0 -3
- data/gemfiles/4.2.gemfile +0 -3
- data/spec/dummy/app/controllers/application_controller.rb +0 -4
data/gemfiles/4.0.gemfile
DELETED
data/gemfiles/4.1.gemfile
DELETED
data/gemfiles/4.2.gemfile
DELETED