faastruby-rpc 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3549d86d75838deeb0ee5ab553304ae42471c35b588ca0193053f8e3d96d1aea
4
- data.tar.gz: cfcd04067a0eea97c821ee10d1783fd6e8f8d7738edfb88ed210c863fd97ac33
3
+ metadata.gz: 383470c554e6aa94b4735e03ed92d06d1b77cbc6dc47ed3c275e48b9d3674a3a
4
+ data.tar.gz: 82348f64c96d71bd23e9d7b1da964ac393a46bbf91c75fe93410f9469192d037
5
5
  SHA512:
6
- metadata.gz: c7a2897bb1c884105668b0ec7a6f9247c1e31f9e2fb230ca0b4078f80fbff5ed0124a7041906c3a50e212c1033e0043d3ad60d2368de17efa4ef3e5d5e954a0b
7
- data.tar.gz: eb69a1bcc203c6eeb4733e1898e5218b8ddcd6b9f0c9e1ddc8ac938bdbaf86fffb00fe6fb16d6bd6fd8d858da56f9dd4a85120d23c56bbb7a0786d6c5b35c577
6
+ metadata.gz: 444b6b1aaa348adb6cb575d9e9d1ca1bef07cd9a927812dc10b9f055b73cfe7d23c3678d3e7e6c36d7e4b2dd5caa5bb35fd0bb648c6d37bae7cad89b9a58aa78
7
+ data.tar.gz: b95350721e8390ba5e6a1e6f900c3d6fa3f198efe909e3c08882eb66e848cf1eb84e4decff435da71304e56ee0c0681a4fe2521dd9c9307b73c2ff66c9235372
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.3 - Mar 11 2019
4
+ - Add support for faastruby 0.5
5
+
3
6
  ## 0.2.2 - Mar 8 2019
4
7
  - Improved response string from invoked function when there's an error.
5
8
  - Catch method missing calls and try them against the result once it arrives
@@ -1,5 +1,4 @@
1
1
  module FaaStRuby
2
- FAASTRUBY_WORKSPACE_BASE_HOST = ENV['FAASTRUBY_WORKSPACE_BASE_HOST']
3
2
  module RPC
4
3
  class ExecutionError < StandardError
5
4
  end
@@ -16,6 +15,11 @@ module FaaStRuby
16
15
  end
17
16
  end
18
17
  class Function
18
+ @@region = ENV['REGION']
19
+ @@endpoint_base_host = ENV['ENDPOINT_BASE_HOST']
20
+ def self.workspace=(workspace)
21
+ @@workspace = workspace
22
+ end
19
23
  def initialize(path, raise_errors: true)
20
24
  @response = nil
21
25
  @path = path
@@ -38,7 +42,7 @@ module FaaStRuby
38
42
  end
39
43
 
40
44
  def get_endpoint(query_params)
41
- return "https://#{FAASTRUBY_WORKSPACE_BASE_HOST}/#{@path}#{query_params}" if FAASTRUBY_WORKSPACE_BASE_HOST
45
+ return "https://#{@@workspace}.#{@@region}.#{@@endpoint_base_host}/#{@path}#{query_params}" if @@endpoint_base_host && @@region && @@workspace
42
46
  return "http://localhost:3000/#{@path}#{query_params}"
43
47
  end
44
48
 
@@ -1,5 +1,5 @@
1
1
  module FaaStRuby
2
2
  module RPC
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby-rpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2019-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj