salestation 0.7.0 → 0.8.0

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
  SHA1:
3
- metadata.gz: 52f5298fd3ea745f10632793d1197ffa3d47154d
4
- data.tar.gz: ba220dc9ef2142578dcfc7db2db132770114e79b
3
+ metadata.gz: b7ec7120bd30017ad7ce5b833aae2451e1b67f5b
4
+ data.tar.gz: 6da402233e35203097665131db24d00fda8fa54c
5
5
  SHA512:
6
- metadata.gz: ad6b4e9c211ac7dfcce4bbf6d4d62117d6c942456ef27ca2708a51d3542f28eb1ece76325e550381c8c25894babbfa5498ac82954210f3193b5a13877bba538a
7
- data.tar.gz: 7f8005c58d50a81a4fbc8f74a7e5b821fbdcbd172fc6035e41526fa3fadad853afa11064f9b4eca3f1843e5629aaba9a2eb3ddbdba15d0539563e5ac5932b36e
6
+ metadata.gz: 4b2c7d3d43681d192b38fcec9a0f21b490ac8adca0ca77e86c2896fa742b6984672aa786b1bd4750df9b8f66358382371651446712d03e056827dc26bf0c51aa
7
+ data.tar.gz: 34502d64faa59213839343fc9da8871e5e31ef87f298a754a95fc42ab9fa848a3edf16b61bf84c023d1113b775aec96328a0221d8fe1f0c425db4fca747546c9
@@ -72,6 +72,7 @@ module Salestation
72
72
  def parse_body(body, env)
73
73
  begin
74
74
  # Rack body is an array
75
+ return {} if body.empty?
75
76
  JSON.parse(body.join)
76
77
  rescue Exception
77
78
  {error: 'Failed to parse response body'}
@@ -13,6 +13,10 @@ module Salestation
13
13
  -> (object) { Deterministic::Result::Success(Responses::OK.new(body: object)) }
14
14
  end
15
15
 
16
+ def self.to_no_content
17
+ -> (*) { Deterministic::Result::Success(Responses::NoContent.new(body: {})) }
18
+ end
19
+
16
20
  module Response
17
21
  def with_code(code)
18
22
  Class.new(self) do
data/salestation.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "salestation"
7
- spec.version = "0.7.0"
7
+ spec.version = "0.8.0"
8
8
  spec.authors = ["SaleMove TechMovers"]
9
9
  spec.email = ["techmovers@salemove.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salestation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SaleMove TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-02 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler