cabbage_doc 0.0.4 → 0.0.5

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: f917cf99ef4214b287c6714f7e6d71d1a3f69b04
4
- data.tar.gz: aba8fdad553277c3bfed0c2554ea3179a9f3c9d9
3
+ metadata.gz: e4b43adfd8bf531f17482341b79a95ea38e3c917
4
+ data.tar.gz: 91f0e0290549d821440d28a4704bde1d95501004
5
5
  SHA512:
6
- metadata.gz: 5f080b355f30ac79ec7fc630f5179876fda59ae6e872c76ce120e19723f17da0e91ab074f5fc8d7f9d898f934d4aa14987a54077744d8fe27c6fd25545b19222
7
- data.tar.gz: 3da078b0c834baa3c8b0158166cb75f9029939c1782207a1f17857400d32fe56ee6e9df839482e1c70e8d877623174c3a70619beaabbdf9a43d223ef46afb3a1
6
+ metadata.gz: 9087d8adff634391a7dd6988ef983f24086752544902e5c84ed0bc30ff257d2a319790ea33fc7e0e1d369f64f5ab9d4ec22e213f1b3c30a81c5560aae39cb1c4
7
+ data.tar.gz: c367ee1d736d0f920cb07b1320d3491ddde056dc1631d54b519c7b2d4c298c9214d51681f8c8e363a44ea0d615b2bf125b687188ef1a99f3525ccb5b50ea66b2
@@ -1,4 +1,5 @@
1
1
  require 'yaml'
2
+ require 'ostruct'
2
3
  require 'digest/sha1'
3
4
 
4
5
  module CabbageDoc
@@ -11,7 +12,7 @@ module CabbageDoc
11
12
  def parse(s)
12
13
  variables = YAML.load(s)
13
14
 
14
- new(nil, Collection.instance).tap do |instance|
15
+ new(OpenStruct.new(params: {}, env: {}), Collection.instance).tap do |instance|
15
16
  [:@_id, :@_auth, :@_action, :@_method, :@_params].each_with_index do |k, i|
16
17
  instance.instance_variable_set(k, variables[i])
17
18
  end
@@ -1,3 +1,3 @@
1
1
  module CabbageDoc
2
- VERSION = "0.0.4".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
@@ -30,7 +30,7 @@ module CabbageDoc
30
30
  end
31
31
 
32
32
  post '/' do
33
- response = Configuration.instance.request.call(post_request)
33
+ response = Configuration.instance.request.call(post_request) if post_request.valid?
34
34
 
35
35
  if response.is_a?(Response)
36
36
  content_type :json
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cabbage_doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mihail Szabolcs