snapi 0.0.2 → 0.0.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.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.0.3
2
+ -- Modify how the return values behave for the sinatra extension
1
3
  0.0.2
2
4
  -- Added SinatraExtension
3
5
  0.0.1
@@ -85,9 +85,7 @@ module Snapi
85
85
  def to_hash
86
86
  fn_hash = {}
87
87
  functions.each {|k,v| fn_hash[k] = v.to_hash } if functions
88
- {
89
- self.namespace => fn_hash
90
- }
88
+ fn_hash
91
89
  end
92
90
 
93
91
  # Helper to check if a function call to the capability would
@@ -7,7 +7,11 @@ module Snapi
7
7
  extend Sinatra::Extension
8
8
 
9
9
  get "/?" do
10
- JSON.generate(Snapi.capabilities)
10
+ capabilities = Snapi.capabilities
11
+ capabilities.keys.each do |key|
12
+ capabilities[key] = capabilities[key].to_hash
13
+ end
14
+ JSON.generate(capabilities)
11
15
  end
12
16
 
13
17
  get "/:capability/?" do
data/lib/snapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Snapi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: