rule-interface 1.0.3 → 1.0.4

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
  SHA1:
3
- metadata.gz: 5fc3c07de9c4511d6a73debe9c7cef8041e1dc94
4
- data.tar.gz: 149ffd4045fa9e0ce2ac3d0be842fbb7f563cdf3
3
+ metadata.gz: d7e5858d066a001d5a9301380f5c1ef88e6a2160
4
+ data.tar.gz: 327c30867fe439cacb91c8898040c01770b60bc0
5
5
  SHA512:
6
- metadata.gz: 4aa10c32473c36e2d2b37692e160d6f5b6100b2c29f8c134107c4e15806c1061512542166ff7bceb01cd7699bc24423b2812432cede0a64319231e2e01770480
7
- data.tar.gz: 046c120e5223007d4b999f59fa19fe3e251462c5936179f94a8d6d42d11502924ef19ea90bdbb97e77d486f550114ba7eb76aa80fd7b549a5c62e1519c910192
6
+ metadata.gz: c001b63c1dacd5de0daeb5a332079ab7827487ef50f9ad1cb419ad322c3c42acff972658894822659f10af2d631e3f1607315aec6aa3c2b836d01ab3d2ecb7f8
7
+ data.tar.gz: 015d6b53a782f8602eb7d91deb880c42395f2d5eb9b72ff20c2fb8ea67d0eeff0089ed88adf050d43e88d6d11711208552f9587f6eb7e9e71f90a8a461b73b8b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rule-interface (1.0.3)
4
+ rule-interface (1.0.4)
5
5
  activesupport (~> 3)
6
6
  rest-client (~> 1)
7
7
 
data/README.md CHANGED
@@ -46,11 +46,13 @@ ENV variable can be used to configure KIE server details
46
46
  You can also configure the KIE server details programmatically
47
47
 
48
48
  ```ruby
49
- RuleInterface::Configuration::kiesever_config = {
50
- username: 'blah',
51
- password: 'blah',
52
- hostname: 'http://url',
53
- }
49
+ RuleInterface::Configuration.setup do |config|
50
+ config.kiesever_config = {
51
+ username: 'blah',
52
+ password: 'blah',
53
+ hostname: 'http://url',
54
+ }
55
+ end
54
56
  ```
55
57
 
56
58
  All the attribute specified in the above configuration is optional. If specified, it will overwrite ENV configuration for that attribute
@@ -3,6 +3,10 @@ module RuleInterface
3
3
 
4
4
  class << self
5
5
 
6
+ def setup *args, &block
7
+ @config_block = block
8
+ end
9
+
6
10
  # eg: {
7
11
  # username: 'blah',
8
12
  # password: 'blah',
@@ -16,6 +20,8 @@ module RuleInterface
16
20
  def kiesever_config
17
21
  return @kiesever_config if @cached
18
22
 
23
+ @config_block.call(self) if @config_block
24
+
19
25
  @kiesever_config ||= {}
20
26
 
21
27
  @kiesever_config[:username] ||= ENV['KIE_SERVER_USERNAME'].presence
@@ -1,3 +1,3 @@
1
1
  module RuleInterface
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rule-interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ranveer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport