evropochta 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -2
- data/exe/evropochta +1 -1
- data/lib/evropochta/addresses/search4.rb +7 -0
- data/lib/evropochta/postal/delivery_time.rb +1 -1
- data/lib/evropochta/postal/group_order.rb +1 -1
- data/lib/evropochta/version.rb +1 -1
- data/lib/evropochta.rb +2 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caf3f8d1e579d691f47a8a489515c97ef94150e408652dc0f901d1df51bdb22c
|
4
|
+
data.tar.gz: e725a4422aee1d748333f1aa1db97b9d4abeda242943940251506440e337b5f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3a0405a76a1a011d8f59e1fceb300bf65998034f07198f0cad744ef33f48d27107b09509fe7a30d03c9aa5f3f91378aad13c9cb857cad858b9ac0e421c51ba5
|
7
|
+
data.tar.gz: f6c0a453f5afbb5d5ea427375e6cd26eb9f133eca50b23bd0060cb748142090f52edaad61fe6038fd632e85c8861aec7e54c1447df63e30466d54e86c42025f3
|
data/README.md
CHANGED
@@ -1,2 +1,29 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
## Quick start
|
2
|
+
|
3
|
+
```
|
4
|
+
gem install evropochta
|
5
|
+
```
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
require "evropochta"
|
9
|
+
```
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem "evropochta"
|
13
|
+
```
|
14
|
+
|
15
|
+
## Support
|
16
|
+
|
17
|
+
If you want to report a bug, or have ideas, feedback or questions about the gem, [let me know via GitHub issues](https://github.com/mattbrictson/gem/issues/new) and I will do my best to provide a helpful answer. Happy hacking!
|
18
|
+
|
19
|
+
## License
|
20
|
+
|
21
|
+
The gem is available as open source under the terms of the [MIT License](LICENSE.txt).
|
22
|
+
|
23
|
+
## Code of conduct
|
24
|
+
|
25
|
+
Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
|
26
|
+
|
27
|
+
## Contribution guide
|
28
|
+
|
29
|
+
Pull requests are welcome!
|
data/exe/evropochta
CHANGED
@@ -3,7 +3,14 @@ module Evropochta
|
|
3
3
|
module Search4
|
4
4
|
module_function
|
5
5
|
|
6
|
+
MAX_LIMIT = 50
|
7
|
+
|
6
8
|
def call(address: "", limit_addresses: 10, address4_id: 0)
|
9
|
+
if limit_addresses.zero? || limit_addresses > MAX_LIMIT
|
10
|
+
LOG.error("Incorrect limit addresses (#{limit_addresses}). Should be in range 1 to 50")
|
11
|
+
return []
|
12
|
+
end
|
13
|
+
|
7
14
|
Services::Shared.request(
|
8
15
|
"Addresses.Search4",
|
9
16
|
{
|
data/lib/evropochta/version.rb
CHANGED
data/lib/evropochta.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "dotenv/load"
|
2
|
+
require "logger"
|
2
3
|
require_relative "evropochta/version"
|
3
4
|
require_relative "evropochta/config"
|
4
5
|
require_relative "evropochta/services/api_service"
|
@@ -24,4 +25,5 @@ require_relative "evropochta/postal/group_order"
|
|
24
25
|
require_relative "evropochta/postal/delivery_time"
|
25
26
|
|
26
27
|
module Evropochta
|
28
|
+
LOG = Logger.new($stdout, level: :warn)
|
27
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evropochta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Grahovskiy
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-11-02 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logger
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description:
|
14
28
|
email:
|
15
29
|
- kuberlite@gmail.com
|