ruby_isds 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54ede4561991fb53260b706dbddb06013979c899
4
- data.tar.gz: 937cee57008872648c4f70b7e38031c858cb9594
3
+ metadata.gz: fa7597e33a245e5330faf49246ae950f892d5178
4
+ data.tar.gz: 7a882f6993787dc5a423d3b0652f5acf93e885d2
5
5
  SHA512:
6
- metadata.gz: d005c35b9fbda580317430ffc37f50e2e6804da489396fa87e97ac67f8e0d571fb899974ecb389e337606601d1a4e37fa6e407282331c901c2319b8ad0b4958c
7
- data.tar.gz: 9f25f7db228a8f022054c13926c85d2d8c21632bf4e1cbe094feb369857c444134f51c63a1a29b0db33ca5e9fb0549c33f919a95de3bce7556d8ca9b3c8cf7d5
6
+ metadata.gz: 70d1df67407e6d04e49321ee53480e0879cf68f91aae49af3c84cb7897d1893494a230590df00b3964026acedca8d87afc4b1cfe6f4d90e6520a8582831cd9e1
7
+ data.tar.gz: 29d66d6a90474498084f5f3380919cba3a584dfdf470d82cecff2619017834e2a5fcc31bda8d3336ff6edb0e51c9caca46a86fb00a7c0f7571821b4361695a2e
@@ -2,6 +2,8 @@ module RubyIsds
2
2
  class Configuration
3
3
  attr_writer :data_box, :username, :password, :env, :api_url
4
4
 
5
+ ALLOWED_PRODUCTION_SYNTAX = [:production, 'production'].freeze
6
+
5
7
  def initialize
6
8
  @username = nil
7
9
  @password = nil
@@ -35,17 +37,17 @@ module RubyIsds
35
37
  end
36
38
 
37
39
  def api_domain
38
- case @env
39
- when :production then 'https://ws1.mojedatovaschranka.cz'
40
- else 'https://ws1.czebox.cz'
41
- end
40
+ return 'https://ws1.mojedatovaschranka.cz' if production?
41
+ 'https://ws1.czebox.cz'
42
42
  end
43
43
 
44
44
  def xml_url
45
- case @env
46
- when :production then 'mojedatovaschranka.cz'
47
- else 'czechpoint.cz'
48
- end
45
+ return 'mojedatovaschranka.cz' if production?
46
+ 'czechpoint.cz'
47
+ end
48
+
49
+ def production?
50
+ ALLOWED_PRODUCTION_SYNTAX.include?(@env)
49
51
  end
50
52
  end
51
53
  end
@@ -1,3 +1,3 @@
1
1
  module RubyIsds
2
- VERSION = '0.11.0'.freeze
2
+ VERSION = '0.11.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_isds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrej Antas