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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -5
- data/lib/rule-interface/configuartion.rb +6 -0
- data/lib/rule-interface/version.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: d7e5858d066a001d5a9301380f5c1ef88e6a2160
|
4
|
+
data.tar.gz: 327c30867fe439cacb91c8898040c01770b60bc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c001b63c1dacd5de0daeb5a332079ab7827487ef50f9ad1cb419ad322c3c42acff972658894822659f10af2d631e3f1607315aec6aa3c2b836d01ab3d2ecb7f8
|
7
|
+
data.tar.gz: 015d6b53a782f8602eb7d91deb880c42395f2d5eb9b72ff20c2fb8ea67d0eeff0089ed88adf050d43e88d6d11711208552f9587f6eb7e9e71f90a8a461b73b8b
|
data/Gemfile.lock
CHANGED
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
|
50
|
-
|
51
|
-
|
52
|
-
|
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
|
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.
|
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:
|
11
|
+
date: 2018-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|