1. 30 Mar, 2018 3 commits
  2. 28 Mar, 2018 1 commit
    • Isaac Sloan's avatar
      released 0.7.0 (#714) · c9c859c0
      Isaac Sloan authored
      * Bumped version number to v0.7.0.
      
      * Setting amber version lock back to master after release of v0.7.0
      c9c859c0
  3. 21 Mar, 2018 1 commit
    • Jack's avatar
      [CLI] Add a command to open db connection. (#689) · 19794995
      Jack authored
      * Add a CLI option `amber db` to open connection to database
      
      This is an easy way to open a connection to your database.
      This is modeled off the Rails CLI.
      
      * Duplicate database connection command to `amber bd connect`
      19794995
  4. 20 Mar, 2018 1 commit
  5. 19 Mar, 2018 1 commit
  6. 18 Mar, 2018 3 commits
  7. 15 Mar, 2018 1 commit
  8. 14 Mar, 2018 1 commit
  9. 11 Mar, 2018 1 commit
  10. 09 Mar, 2018 1 commit
    • Elias Perez's avatar
      [CORS] Adds W3C Cors Specification Support (#665) · a8cda7a8
      Elias Perez authored
      * [CORS] Adds W3C Cors Specification Support
      
      Provides facilities for dealing with CORS requests and responses
      
      - A Plug (Handler) that handles CORS request and responses.
      
      \## How It Works
      
      This handler is compliant with the W3C CORS specification. As per
      this specification, It doesn’t put any CORS response headers
      in a connection that holds an invalid CORS request. To know what
      “invalid” CORS request means, have a look at the
      “Validity of CORS requests” section below.
      
      When some options that are not mandatory and have no default value
      (such :max_age) at intialization, the relative header will often not be
      sent at all. This is compliant with the specification and at the
      same time it reduces the size of the response, even if just by a handful
      of bytes.
      
      The following is a list of all the CORS response headers supported by
      the handler:
      
      - Access-Control-Allow-Origin
      - Access-Control-Allow-Methods
      - Access-Control-Allow-Headers
      - Access-Control-Allow-Credentials
      - Access-Control-Expose-Headers
      - Access-Control-Max-Age
      
      \## Validity of CORS requests
      
      “Invalid CORS request” can mean that a request doesn’t have an Origin
      header (so it’s not a CORS request at all) or that it’s a CORS request but:
      
        - The Origin request header doesn’t match any of the allowed origins
        - The request is a preflight request but it requests to use a method
          or some headers that are not allowed (via the Access-Control-Request-Method
          and Access-Control-Request-Headers headers)
      
      \## Responding to preflight requests
      
      When the request is a preflight request and is a valid one (valid origin, valid
      request method, and valid request headers), The CORS handler directly sends a
      response to that request instead of just adding headers to the connection.
      To do this, the handler halts the connection and sends a response.
      
      * fixup! [CORS] Adds W3C Cors Specification Support
      
      * fixup! [CORS] Adds W3C Cors Specification Support
      a8cda7a8
  11. 08 Mar, 2018 8 commits
    • Elias Perez's avatar
      Fix error generator (#685) · 65d040f8
      Elias Perez authored
      * Update src/handlers/error.cr.ecr and src/amber/pipes/error.cr
      
      The files /src/amber/cli/templates/error/src/handlers/error.cr.ecr
      and src/amber/pipes/error.cr are pretty similar but have desynced
      a little bit.
      
      This commit fixes the textual descriptions and adds a missing
      begin to make the files as similar as possible.
      
      The next step will be to change location from /handlers/ in the
      user application to /pipes/.
      
      * Update src/handlers/error.cr.ecr and src/amber/pipes/error.cr
      
      The files /src/amber/cli/templates/error/src/handlers/error.cr.ecr
      and src/amber/pipes/error.cr are pretty similar but have desynced
      a little bit.
      
      This commit fixes the textual descriptions and adds a missing
      begin to make the files as similar as possible.
      
      The next step will be to change location from /handlers/ in the
      user application to /pipes/.
      65d040f8
    • Elias Perez's avatar
      Revert "[CLI] Adds support for generating pages" (#687) · c7558cd5
      Elias Perez authored
      * Revert "[Generator] Remove raise from Template (#686)"
      
      This reverts commit a87e5853.
      
      * Revert "Use Inflector to pluralize model names (#673)"
      
      This reverts commit 10aa1658.
      
      * Revert "[Settings] Logger Builder (#684)"
      
      This reverts commit e216eb83.
      
      * Revert "[CLI] Adds support for generating pages (#674)"
      
      This reverts commit a9449dee.
      c7558cd5
    • Elias Perez's avatar
      [Generator] Remove raise from Template (#686) · a87e5853
      Elias Perez authored
      We do not raise errors in the CLI, instead we log a message to the
      console.
      a87e5853
    • jasonl99's avatar
      Use Inflector to pluralize model names (#673) · 10aa1658
      jasonl99 authored
      * Use Inflector library for pluralization of models
      
      * removed core_ext
      10aa1658
    • Elias Perez's avatar
      [Settings] Logger Builder (#684) · e216eb83
      Elias Perez authored
      Use logger builder logger method.
      e216eb83
    • David Patterson's avatar
      [CLI] Adds support for generating pages (#674) · a9449dee
      David Patterson authored
      Addresses #671
      a9449dee
    • Eloy Pérez's avatar
      Extract Logging and LoggingBuilder from Settings.cr file (#683) · 03ebb122
      Eloy Pérez authored
      * Style - Require crystal deps first
      
      * Move Logging into its own file
      
      * Move LoggerBuilder into its own file
      
      * Move LoggingType to Logging class under name OptionsType
      
      * Create Logging::DEFAULTS and reference it in Settings
      
      * Group logging methods && properties in Settings
      
      * Call property macro only one time
      
      * Use getter macro to generate logger method
      
      * Specify return type of severity method
      
      * Remove logger getter method not needed
      03ebb122
    • Faustino Aguilar's avatar
      Add missing make (#680) · 66d0b3fc
      Faustino Aguilar authored
      66d0b3fc
  12. 07 Mar, 2018 9 commits
  13. 05 Mar, 2018 1 commit
  14. 04 Mar, 2018 1 commit
  15. 02 Mar, 2018 7 commits
    • robacarp's avatar
      Merge pull request #667 from robacarp/update_router_shard · a3d7a135
      robacarp authored
      Updates pointer to router shard to numbered version
      a3d7a135
    • robacarp's avatar
      Merge branch 'master' into update_router_shard · ef4e333c
      robacarp authored
      ef4e333c
    • Robert L Carpenter's avatar
    • Mark's avatar
      BUGFIX: Fix bug where 'inspect_with_backtrace' raises an IndexError i… (#625) · d67e8b52
      Mark authored
      * BUGFIX: Fix bug where 'inspect_with_backtrace' raises an IndexError in some scenarios
      
      * Switch puts statement to code comment about exception
      
      * Simplify 'internal_error_message' and add catch-all
      
      * Add comment to prevent future refactor, report messages from unknown exception types
      d67e8b52
    • Robert L Carpenter's avatar
      a1fab42e
    • Elias Perez's avatar
      9e1c742f
    • Elias Perez's avatar
      [Params] Refactors Params into Modules (#642) · f84fe8c4
      Elias Perez authored
      * [Params] Adds Params Parser Class
      
      Issue  https://github.com/amberframework/amber/issues/592
      
      > As a developer I want to parse params and return an array of values
      for a given param key.
      
      The changes here introduces a Parser class that handles parsing query
      params. It organizes each parser into its own module.
      
      - Adds Params Specs
      - Adss Params class
      - Moves Amber::Router::Files::File to Amber::Router::File
      
      The params class will hold a Hash(String, Array(String) | String)
      this will allow to hold multiple values for a given key
      
      [Params] Adds Form Data Parser
      
      Allows to parse form data from request body
      
      - Adds Form Data specs
      - Adds FormData parser
      
      [Params] Adds Multipart Parser
      
      Allows for parsing form Multipart form data
      
      - Adds Multipart Parser
      - Adds Specs
      
      [Param] Adds JSON Parser
      
      Allows for JSON request body parsing
      
      - Adds Specs
      - Adds JSON parser
      
      [Params] Deletes ParamsParser
      
      Removes the original ParamsParser in favor of the new Params Class
      
      [Context] Removes specs from Context
      
      Specs from context have been moved to their respected files
      
      - Parse Params spec
      - Request spec
      
      [Request] Adds HTTP::Request
      
      Overwrites the HTTP::Request to acoomodate amber features
      This allows for request.method to return the correct http method
      when request method overrided in the HEADERS or Params
      
      - Cleans up the Context by moving methods to the HTTP::Request
      - Request has a new method params that parses params from URL, Form
      and route params.
      - Adds Route Params parser, this merges the params returned from the
      radis tree onto the params
      
      [Params] Converts Params to Struct
      
      - Convert Parsers to modules
      - Converts Params to struct
      - Removes route parser
      - Cleans Request.cr
      
      [Context] Removes Request Handler Method
      
      [Spec] Cleans up spec
      
      [Router] Repurpose invalid_route? to valid_route?
      
      [Route] Removes unsued method
      
      [Params] Adds parse state to memoize
      
      [Controller] Error fixes error controller
      
      [Router] Organize files
      
      [Params] Adds check when params has multiple values
      
      [Params] Removes parser
      
      * fixup! [Params] Adds Params Parser Class
      
      * fixup! Merge branch 'master' into ep/params-refactor
      
      * fixup! [Params] Adds Params Parser Class
      
      * fixup! [Params] Adds Params Parser Class
      f84fe8c4