opencomponents 0.3.0 → 0.4.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 +4 -4
- data/README.md +1 -1
- data/lib/opencomponents.rb +6 -3
- data/lib/opencomponents/component.rb +1 -1
- data/lib/opencomponents/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: 190e833112bbefb92019537387febb391512e0e2
|
|
4
|
+
data.tar.gz: 93599ce0ec1ca889785a595641101e65554b5640
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 817ce244a59fb0281ff254e66410f26f66b5b7cbcbb723e7416de17322273fbd57c3251d768ecfc6c3d701659919c7a4eb28d71e78828e0d2273e6f0a44f7660
|
|
7
|
+
data.tar.gz: 879765cee795349764cf1537229278377aa022b287aa3349b897684b41bcd7fb2bd831d5df23c544577d005f57322d9c6330158a34584cc5d29bab10be8232c0
|
data/README.md
CHANGED
data/lib/opencomponents.rb
CHANGED
|
@@ -10,17 +10,20 @@ module OpenComponents
|
|
|
10
10
|
# Public: Default OC registry URL (http://localhost:3030).
|
|
11
11
|
DEFAULT_REGISTRY = 'http://localhost:3030'
|
|
12
12
|
|
|
13
|
+
# Public: Default request timeout in seconds (5)
|
|
14
|
+
DEFAULT_TIMEOUT = 5
|
|
15
|
+
|
|
13
16
|
# Internal: Custom exception class to raise in the event a component cannot be
|
|
14
17
|
# found in the registry.
|
|
15
18
|
ComponentNotFound = Class.new(RuntimeError)
|
|
16
19
|
|
|
17
20
|
# Internal: Custom exception class to raise for response timeouts.
|
|
18
|
-
RegistryTimeout = Class.new(
|
|
21
|
+
RegistryTimeout = Class.new(RuntimeError)
|
|
19
22
|
|
|
20
23
|
# Internal: Stores configuration data.
|
|
21
24
|
#
|
|
22
25
|
# registry - String for the registry host.
|
|
23
|
-
Configuration = Struct.new(:registry)
|
|
26
|
+
Configuration = Struct.new(:registry, :timeout)
|
|
24
27
|
|
|
25
28
|
# Internal: Wrapper object for pre-rendered OC templates.
|
|
26
29
|
#
|
|
@@ -33,7 +36,7 @@ module OpenComponents
|
|
|
33
36
|
#
|
|
34
37
|
# Returns the Configuration if set, a default Configuration if not set.
|
|
35
38
|
def self.config
|
|
36
|
-
@@_config ||= Configuration.new(DEFAULT_REGISTRY)
|
|
39
|
+
@@_config ||= Configuration.new(DEFAULT_REGISTRY, DEFAULT_TIMEOUT)
|
|
37
40
|
end
|
|
38
41
|
|
|
39
42
|
# Public: Setter for Configuration.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opencomponents
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Todd Bealmear
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|