flagger 3.0.3 → 3.1.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
  SHA256:
3
- metadata.gz: bd9956ef143bb5605293fc6f12e67baba91d7b96dc2fe6ca0c871ba743e20c5a
4
- data.tar.gz: 7644468ee3714fe8e6bcfe4108e5a45a96b131262010a6da685eae827265363c
3
+ metadata.gz: 00314edfbedcaf88b1d72b0aa419e3858c47f7cd05620371f27deff00c50b284
4
+ data.tar.gz: 7cc00294cfcfbcd38b9b0c608e5d62c26c4d5c387754f48f5bad54c115e2a83c
5
5
  SHA512:
6
- metadata.gz: 40acdf1094607a6df84f06fe8dfed5d8eae9529a9ce028e702f0cb7d5b0319d20527af3838f00665895f3745119ad6bbe803472a4e3b78a4950f44c72c133a50
7
- data.tar.gz: 5a6fdd88beaee4ef479a16d8449110b24dcfbd29912410b94e1f3768df0f91906490f9a66d198dcc4206cdd592824e5c439e24b86275df28047cc90f93f922a9
6
+ metadata.gz: a992f6e7aaa8f7b27d836fcd737771bc5b484e33d2fd0fa24fae470190b07d5f68e08ddc36de73150862a680c040f7c3ca1f45ab806f85b136fc87af39712881
7
+ data.tar.gz: d3d0e7ffdc792f4cb9db04c692a8af3a00ebb32cc592b1dc3ad9c08ea5ba994942825dc81f598e1e2fd24c4a8dc9dfc7a4fda7de750a70db98b28ad94b107f69
@@ -10,18 +10,35 @@ module Flagger
10
10
  # init method gets FlaggerConfiguration, establishes and maintains SSE connections and initializes Ingester
11
11
  # init must be called only once, at the start of your application.
12
12
  # Your program must wait for init to finish before using any other Flagger methods
13
- def Flagger.init(api_key, **args)
14
- request = {
15
- apiKey: api_key,
16
- sdkName: "ruby",
17
- sdkVersion: Flagger::VERSION,
18
- sourceURL: args[:source_url],
19
- backupSourceURL: args[:backup_source_url],
20
- sseURL: args[:sse_url],
21
- ingestionURL: args[:ingestion_url],
22
- logLevel: args[:log_level],
23
- }.compact.to_json
24
- ResponseParser::parse_error(FlaggerNative::Init(request))
13
+ def Flagger.init(*args)
14
+ case args.size
15
+ when 1
16
+ request = {
17
+ apiKey: args[0][:api_key],
18
+ sdkName: "ruby",
19
+ sdkVersion: Flagger::VERSION,
20
+ sourceURL: args[0][:source_url],
21
+ backupSourceURL: args[0][:backup_source_url],
22
+ sseURL: args[0][:sse_url],
23
+ ingestionURL: args[0][:ingestion_url],
24
+ logLevel: args[0][:log_level],
25
+ }.compact.to_json
26
+ ResponseParser::parse_error(FlaggerNative::Init(request))
27
+ when 2
28
+ request = {
29
+ apiKey: args[0],
30
+ sdkName: "ruby",
31
+ sdkVersion: Flagger::VERSION,
32
+ sourceURL: args[1][:source_url],
33
+ backupSourceURL: args[1][:backup_source_url],
34
+ sseURL: args[1][:sse_url],
35
+ ingestionURL: args[1][:ingestion_url],
36
+ logLevel: args[1][:log_level],
37
+ }.compact.to_json
38
+ ResponseParser::parse_error(FlaggerNative::Init(request))
39
+ else
40
+ raise "Invalid number of arguments, expected 1 or 2"
41
+ end
25
42
  end
26
43
 
27
44
  # Explicitly notify Airship about an Entity
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Flagger
2
- VERSION = '3.0.3'
2
+ VERSION = '3.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airdeploy Dev Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os