simple_endpoint 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8d160bdac054393e08f0451d7117a710140cd02614d8bc7d212de43e8fe4caf
4
- data.tar.gz: e6af102683834cf488a5dce4589e27c356e0994485679722a94569cae8a2e258
3
+ metadata.gz: 55a2646d762faef9f9bd692892c9dc29837d1fb1a6683d776c4822a155ea15bc
4
+ data.tar.gz: 4e05da905deeed9b872a3ad816a09c0d94a3f619506342ef64f1995f24c8cfbe
5
5
  SHA512:
6
- metadata.gz: f20a4512bbce57067e072a6f7d67b73a88fd606b5b9e01af7d71ab7b4460d9e71c603e05e3205853506d4f05d8295eef121f07a7e730cad610ed4a878d038f04
7
- data.tar.gz: a46a439a455f21f4e83914210aeeb1d4b6fa29996cc4fbb1499484baee633bc58abf7f1b264f7cc767fe54e2d5f64dcc1969045a5f45879dc6dcbe1632f8feec
6
+ metadata.gz: 7a670e1db13967ebd1d89b6abc870cb206b63ed9688f8625b067e8300b6f4c84cbfb9bc67e6767d6e37a253abd64e1ee1d053302d3e6b4d20ff8895393bd66f7
7
+ data.tar.gz: 284851163ebf6ccf7168aa9787408721cbdf5a7d2a7b8a2fb712f357cc6c1d6d9843fbe1ab33d592942b689e247a99646f597a316e93c4191141390e48de7cf6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_endpoint (0.1.2)
4
+ simple_endpoint (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -6,8 +6,7 @@ Dry-matcher free implementation of trailblazer endpoint.
6
6
  Add this to your Gemfile:
7
7
 
8
8
  ```ruby
9
- gem 'simple_endpoint' # not released yet
10
- gem 'simple_endpoint', github: 'differencialx/simple_endpoint', :branch => 'master'
9
+ gem 'simple_endpoint'
11
10
  ```
12
11
 
13
12
  ## Getting Started
@@ -47,7 +46,7 @@ class ApplicationController < ActionController::Base
47
46
 
48
47
  def default_handler
49
48
  {
50
- success: -> (result) { render json: result['model'], **result['render_options'] status: 200 },
49
+ success: -> (result) { render json: result['model'], **result['render_options'], status: 200 },
51
50
  invalid: -> (result) { render json: result['contract.default'].errors, serializer: ErrorSerializer, status: :unprocessable_entity }
52
51
  }
53
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleEndpoint
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -4,10 +4,10 @@ require 'simple_endpoint/version'
4
4
 
5
5
  module SimpleEndpoint
6
6
  module Controller
7
- def endpoint(operation:, different_cases: {}, different_hander: {}, options: {}, before_response: {})
7
+ def endpoint(operation:, different_cases: {}, different_handler: {}, options: {}, before_response: {})
8
8
  Endpoint.call(
9
9
  operation,
10
- default_handler.merge(different_hander),
10
+ default_handler.merge(different_handler),
11
11
  default_cases.merge(different_cases),
12
12
  before_response,
13
13
  endpoint_options.merge(options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_endpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Bal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-10 00:00:00.000000000 Z
11
+ date: 2019-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler