st_tools 0.3.14 → 0.3.15
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/lib/st_tools/countries.rb +3 -1
- data/lib/st_tools/progress_bar.rb +6 -1
- data/lib/st_tools/version.rb +1 -1
- data/test/countries_lib_spec.rb +1 -0
- 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: 67eaf920a767607db3dfe8295a59ba9c4195c4b0
|
4
|
+
data.tar.gz: c3ade73e304da2503d94c096e79b7075f0318460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeba709f894d04efe22c0a545e9c03bfe4288ae9209cdbd878d71e466a963280cb5dc3784564089502e496923293a9597187c1c1eae4adac6727f8cbeb0591ba
|
7
|
+
data.tar.gz: e65dd5a86d4733729d8731ede634de5f7ad64c7d655243db4f86a4db448748e223798fe9899ea6be3f1ec72f351f704fc2aa7d1bdceb2b7fa1d77addc109b7f0
|
data/lib/st_tools/countries.rb
CHANGED
@@ -52,7 +52,9 @@ module StTools
|
|
52
52
|
code = ::StTools::Countries::AOGUIDS.keys.include?(id.to_sym) ? id.to_sym : :zz
|
53
53
|
end
|
54
54
|
|
55
|
-
::StTools::Countries::COUNTRIES[code].merge(::StTools::Countries::GEO[code])
|
55
|
+
res = ::StTools::Countries::COUNTRIES[code].merge(::StTools::Countries::GEO[code])
|
56
|
+
res[:aoguid] = ::StTools::Countries::AOGUIDS[code]
|
57
|
+
res
|
56
58
|
end
|
57
59
|
|
58
60
|
|
@@ -39,7 +39,6 @@ module StTools
|
|
39
39
|
# @return [Object] нет
|
40
40
|
def progress=(val)
|
41
41
|
return if val > @max
|
42
|
-
return if val == @max
|
43
42
|
return if val == @value
|
44
43
|
return if val % @step != 0 && (@max - val) >= @step
|
45
44
|
|
@@ -52,6 +51,12 @@ module StTools
|
|
52
51
|
end
|
53
52
|
end
|
54
53
|
|
54
|
+
# Метод финализирует значение прогресс-бара
|
55
|
+
#
|
56
|
+
# @return [Object] нет
|
57
|
+
def complete
|
58
|
+
@pbar.progress = @max if @pbar.progress < @max
|
59
|
+
end
|
55
60
|
|
56
61
|
private
|
57
62
|
|
data/lib/st_tools/version.rb
CHANGED
data/test/countries_lib_spec.rb
CHANGED
@@ -32,6 +32,7 @@ describe 'Проверка методов StTool::Countries.*' do
|
|
32
32
|
it 'country success by code :ru' do
|
33
33
|
test = ::StTools::Countries.country(:ru)
|
34
34
|
expect(test[:code]).to eq 'ru'
|
35
|
+
expect(test[:aoguid]).to eq 'ea70abb2-ccc2-46c8-9b15-d42cac1ecd7f'
|
35
36
|
end
|
36
37
|
|
37
38
|
it 'country success by code ru' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: st_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Zhuravlev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|