1. 10 May, 2018 2 commits
  2. 04 May, 2018 1 commit
  3. 02 May, 2018 1 commit
  4. 25 Apr, 2018 1 commit
    • Elias Perez's avatar
      [Params] [Bug] To hash method not returning correct value (#745) · ae906b7d
      Elias Perez authored
      Resolves https://github.com/amberframework/amber/issues/730
      
      When form submission with repeated form input names it returns the last
      value of the list.
      
      Example:
      
      ```html
      <input name="cat" value="1" type="checkbox" checked>
      <input name="cat" value="0" type="checkbox">
      ```
      
      Actual
      
      ```crystal
      params.raw_params['cat'] == 1
      params.raw_params.to_h['cat'] == 0
      params['cat'] == 1
      ```
      
      Expected
      
      ```crystal
      Params.raw_params['cat'] == 1
      Params.raw_params.to_h['cat'] == 1
      params['cat'] == 1
      ```
      
      Removes the used of `.merge()` method in favor of manually merging the
      hash.
      
      This slows down the hash generation of the params
      ae906b7d
  5. 19 Apr, 2018 1 commit
  6. 18 Apr, 2018 2 commits
    • Elias Perez's avatar
      [CORS] Fixes Cors Headers with Case Insensitive Matching (#758) · 1729fd58
      Elias Perez authored
      * [CORS] Fixes Cors Headers Match Case Insensitive
      
      Resolves https://github.com/amberframework/amber/issues/757
      
      This solves two issues with CORS:
      
      Headers currently are not checking case-insensitive values for
      `Access-Control-Request-Headers`. Allowed headers should match
      against `Access-Control-Request-Headers` values.
      
      There was the belief that `response.flush` writes the contents of the
      response halting the request, this is not true, instead the request is
      continuing the pipeline.
      
      - Adds case insensitive check to `Access-Control-Request-Headers`
      - Validates that `Access-Control-Request-Headers` values match against
      ALLOWED_HEADERS
      - Adds invalid preflight specs.
      - Prevents call next for preflight requests
      
      With these changes in the event of preflight requests should
      respond to case insensitive preflight headers and the `call_next`
      should not be called.
      
      * fixup! [CORS] Fixes Cors Headers Match Case Insensitive
      1729fd58
    • Elias Perez's avatar
      [CLI] DB Seed Command (#754) · 5219ffd8
      Elias Perez authored
      Resolves https://github.com/amberframework/amber/issues/753
      
      Allows to shows Granite logger output when running `db seed` command
      this gives feedback to the user of which actions has been performed against
      the database without using puts.
      
      This does not fix the case when using `puts` inside the `db/seeds.cr` file, instead
      `Amber.logger.info` can be used in its place
      
      Example
      
      ```crystal
      require "../config/application.cr"
      
      user = User.new
      
      user.email = "admin@example.com"
      user.password = "password"
      user.save
      
      Amber.logger.info user.to_h
      ```
      Gives the following output
      ```bash
       ± bin/amber db seed
      07:15:27 Granite    | (INFO) SELECT users.id, users.firstname, users.lastname, users.email, users.hashed_password, users.created_at, users.updated_at FROM users WHERE email=$1 LIMIT 1: admin@example.com
      07:15:27 Granite    | (INFO) INSERT INTO users (firstname, lastname, email, hashed_password, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, $6): [nil, nil, "admin@example.com", "$2a$10$qnUcrAHYW2dJ6HgRsGU9x.PtNAv6KLJGq9.HZQ69WkBwsGlRQ6R4e", "2018-04-14 23:15:27", "2018-04-14 23:15:27"]
      07:15:27 Server     | (INFO) {"id" => 1_i64, "firstname" => nil, "lastname" => nil, "email" => "admin@example.com", "hashed_password" => "$2a$10$qnUcrAHYW2dJ6HgRsGU9x.PtNAv6KLJGq9.HZQ69WkBwsGlRQ6R4e", "created_at" => "2018-04-14 23:15:27", "updated_at" => "2018-04-14 23:15:27"}
      07:15:27 Database   | (INFO) Seeded database
      ```
      5219ffd8
  7. 12 Apr, 2018 1 commit
  8. 10 Apr, 2018 4 commits
    • Faustino Aguilar's avatar
    • Elias Perez's avatar
      [CI] Attempts to fix Build Spec For Consistency (#740) · a695996d
      Elias Perez authored
      * [CI] Attempts to fix Build Spec For Consistency
      
      - Removes the Prepare DB YAML, this was use for when CI used to run on a
      docker image which is no longer the case
      - Renames the Postgres Travis CI service to Postgresql
      - Run regrssion tests only if is master
      
      * fixup! [CI] Attempts to fix Build Spec For Consistency
      a695996d
    • Elias Perez's avatar
      [Formatting] Applies Crystal Tool Format (#744) · 2f9871d5
      Elias Perez authored
      Recipes and some other source files had extra lines and bad formatting
      this corrects the format by apply the `crystal tool format` to the
      source code.
      
      This formats the source code and keeps things neat.
      2f9871d5
    • Damian Hamill's avatar
      [CLI] remove temporary filters (#743) · 6028f001
      Damian Hamill authored
      * remove the filters which have been merged into liquid.cr shard
      
          - specify a minimum version of TechMagister/liquid.cr
          - remove the liquid filters file
      
          This change removes the recipe filters (which were temporary) as they
          have been merged into the TechMagister/liquid.cr master branch
          and are thus no longer required here.
      6028f001
  9. 09 Apr, 2018 4 commits
    • Faustino Aguilar's avatar
      Small README adjustments (#734) · 55d5e511
      Faustino Aguilar authored
      * Add links in Contributing section
      
      * Add codetriage badge
      
      * Fix codetriage badge
      
      * Add missing period
      
      * Use Contributors  instead of Helpers
      
      * Moves Philosophy to his own section
      
      * Move community section to the top
      55d5e511
    • Elias Perez's avatar
      [Fix] point shard.yml at liquid commit until liquid can re-release (#736) · c6223118
      Elias Perez authored
      Depends on: https://github.com/TechMagister/liquid.cr/issues/29
      
      - Cleans the shard.yml improving readability
      - Adds missing version number for the liquid shard
      c6223118
    • Faustino Aguilar's avatar
      Add StackOverflow advice to github template (#735) · ed2b3975
      Faustino Aguilar authored
      * Add stack-overflow advice
      * Review edits
      ed2b3975
    • Damian Hamill's avatar
      [CLI] add support for Recipes (squashed commits) (#728) · ba70289c
      Damian Hamill authored
      * [CLI] add support for recipes
      
      * add a recipe option to amber new|generate to create applications and
        scaffolding from recipes
      
      Issue: https://github.com/amberframework/amber/issues/629
      
      - adds TechMagister/liquid template language to shards
      - adds a recipes folder to amber/cli
      - adds recipe option to cli and saves the recipe name|path in .amber.yml
      - adds support for recipes to amber/cli/commands/[new|generate].cr
      - adds to_json method to amber/cli/templates/field.cr
      
      This adds the ability to generate applications and scaffolding from a recipe
      given as a recipe name or a file system path.  Recipes given as a recipe name
      are downloaded from amberframework/recipes repository.
      
      * [CLI] enhancements to add support for recipes
      * improvements to enhance the recipes feature
      
      - recipe cache in $HOME/.amber/recipe_cache
      - app generator views filter only blocks .ecr or .slang
      - fix a typo, class_name is a method
      - add uppercase filter
      
      This places the recipe cache in the user's home folder so there will be a
      single instance of the cache rather than multiple instances. The app generator
      is changed so that it only filters out views for the template language that
      is not being generated to allow any other type of file in views e.g.
      javascript. Some generators where using @class_name instead of class_name,
      this typo is fixed.  A filter has been added to uppercase a string using
      upcase or uppercase.
      ba70289c
  10. 02 Apr, 2018 6 commits
  11. 31 Mar, 2018 1 commit
  12. 30 Mar, 2018 6 commits
  13. 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
  14. 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
  15. 20 Mar, 2018 1 commit
  16. 19 Mar, 2018 1 commit
  17. 18 Mar, 2018 3 commits
  18. 15 Mar, 2018 1 commit
  19. 14 Mar, 2018 1 commit
  20. 11 Mar, 2018 1 commit