seb_elink 0.9.0 → 0.9.1
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/Gemfile.lock +1 -1
- data/README.md +6 -2
- data/lib/seb_elink/communications.rb +15 -13
- data/lib/seb_elink/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9177c328b5fa9bd21d9a5602f05fa63383b0bbfb
|
4
|
+
data.tar.gz: 40cdb828d5b8404cefb963e3a01dd80846d86ae3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a189076c71d75ebd1842a1f50eb94a74f5fd55a60cb11330cf30bad306390cf7b5eff9859506d1fa66d1cdac6a506d059cf816c3e5fd9bbe994c29fe5c2dd090
|
7
|
+
data.tar.gz: 1ad05eec15892933d7c0df498c2a7708e6cebe4a03cd866297872f22731fa677e498a75cced3276a2838c9c318e74485b64322201b2ce7dafbb823744639cc0e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -14,7 +14,7 @@ gem 'seb_elink'
|
|
14
14
|
```
|
15
15
|
|
16
16
|
## Usage
|
17
|
-
Please note that for consistency in this gem all hash keys are constant-case __symbols__
|
17
|
+
Please note that for consistency in this gem all hash keys are constant-case __symbols__ like `:IB_VERSION`.
|
18
18
|
|
19
19
|
The gem has three elements represented as Ruby classes:
|
20
20
|
|
@@ -125,7 +125,11 @@ The project uses TDD approach to software development, follow these steps to set
|
|
125
125
|
6. Make a Pull Request in github
|
126
126
|
|
127
127
|
## Releasing a new version
|
128
|
-
|
128
|
+
|
129
|
+
```
|
130
|
+
gem push # to set credentials
|
131
|
+
rake release
|
132
|
+
```
|
129
133
|
|
130
134
|
## License
|
131
135
|
|
@@ -1,19 +1,21 @@
|
|
1
|
-
module SebElink
|
2
|
-
|
1
|
+
module SebElink
|
2
|
+
module Communications
|
3
|
+
private
|
3
4
|
|
4
|
-
|
5
|
-
|
5
|
+
def validate_message_code
|
6
|
+
message_codes = send(:class)::SUPPORTED_MESSAGES
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
raise ArgumentError.new(
|
9
|
+
"'#{message_code}' is not a supported message code. Supported ones are: #{message_codes}"
|
10
|
+
) unless message_codes.include?(message_code)
|
11
|
+
end
|
11
12
|
|
12
|
-
|
13
|
-
|
13
|
+
def validate_version
|
14
|
+
versions = send(:class)::SUPPORTED_VERSIONS
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
raise ArgumentError.new(
|
17
|
+
"'#{version}' is not a supported version. Supported ones are: #{versions}"
|
18
|
+
) unless versions.include?(version)
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/seb_elink/version.rb
CHANGED