Skip to content

v0.13

Compare
Choose a tag to compare
@janfoeh janfoeh released this 09 Mar 16:36
· 8 commits to master since this release

New features

  • more flexible action URLs with placeholders

    In addition to the existing abilities - setting an actions URL as a String, modifying URI parts or supplying a Proc that receives the base URL and the current request - you can now use the actions parameters as placeholders:

        class GetUserRepos < Apidiesel::Action
          url path: '/users/%{username}/repos'
    
          expects do
            string :username, submit: false
          end
        end
  • prevent action arguments from being submitted with submit: false

    As seen above, arguments with the submit: false flag are not included in the request body.

  • new boolean response type

    boolean :is_required, truthy: 1, falsy: 0
  • code examples

    I've added a small example for listing a users Github repos. Hopefully there are more varied examples to come in the future.

Changes

  • Request#action_arguments vs. Request#parameters

    We now preserve the action arguments, so even if you removed one in format_parameters, it's still available for URL substitution and in Request#action_arguments.

  • bin/console now uses Pry

  • Documentation

    yard is now a dev dependency, and I've started to clean up the documentation. While developing, run yard server --reload in order to access the docs at http://localhost:8088