utter 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utter/service.rb +8 -7
- data/lib/utter.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 811ce779b4f538b4feaba16ab8d827f21c3e54e3
|
4
|
+
data.tar.gz: 420e5f77099a2ae1263085e8353f4c0a605018f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11e7031c7f6db13112a8ff1c7adbaaf4e14485e39c97304d9239dd59414694a14cd1a558b47dd15ecec510fe2d7c30173a7b6759516d0331627d1f6bf450d1fa
|
7
|
+
data.tar.gz: 9fb75ed1f76fe6b800c09b438ef34a90dd45140212f5836b2dae6be7346f82ade886bbcb69c4a97a2842c698f4868d2b830d03594f3e35269cdda42db78c81f9
|
data/lib/utter/service.rb
CHANGED
@@ -3,7 +3,7 @@ require 'fileutils'
|
|
3
3
|
require 'sinatra'
|
4
4
|
require "sinatra/json"
|
5
5
|
require 'securerandom'
|
6
|
-
require 'sinatra/cross_origin'
|
6
|
+
#require 'sinatra/cross_origin'
|
7
7
|
require 'json'
|
8
8
|
#require 'net/http' #TODO not needed as calling other services is done in Utter Domain Extensions, Net::HTTP.get('example.com', '/index.html') # => String
|
9
9
|
|
@@ -20,12 +20,13 @@ module Utter
|
|
20
20
|
#TODO set a flag to disable this in production for security
|
21
21
|
# this helps testing APIs on localmachines as CORS fucks developers time.
|
22
22
|
# But not recommended to be set while in production enviroments
|
23
|
-
before do
|
24
|
-
response.headers["Access-Control-Allow-Origin"] = "*"
|
25
|
-
response.headers["Access-Control-Allow-Methods"] = "
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
#before do
|
24
|
+
# response.headers["Access-Control-Allow-Origin"] = "*"
|
25
|
+
# response.headers["Access-Control-Allow-Methods"] = "*"
|
26
|
+
# #response.headers["Access-Control-Allow-Methods"] = "POST"
|
27
|
+
# p response.headers.inspect
|
28
|
+
# end
|
29
|
+
#
|
29
30
|
# Makes sure that any response Utter gives back is in JSON format
|
30
31
|
#TODO check if streaming needs a different class if this mechanism doesn't work with it
|
31
32
|
def route(verb, path, options = {}, &block)
|
data/lib/utter.rb
CHANGED
@@ -16,7 +16,7 @@ module Utter
|
|
16
16
|
# MAJOR version when you make incompatible API changes
|
17
17
|
# MINOR version when you add functionality in a backwards-compatible manner
|
18
18
|
# PATCH version when you make backwards-compatible bug fixes.
|
19
|
-
VERSION = "1.
|
19
|
+
VERSION = "1.2.0"
|
20
20
|
|
21
21
|
$log = Logger.new(STDOUT)
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zotherstupidguy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|