infopark_reactor 1.25.1 → 1.25.2

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: 3d40fe2943bd6bfe353a937c452f84060f9c547e
4
- data.tar.gz: f67692fbad30ecfb8b863d35393473a69190de1d
3
+ metadata.gz: f5fe22d047c28119b038630ede2cab3db454b1aa
4
+ data.tar.gz: 2b2d152d58786ab1086c78962979152791f5eab0
5
5
  SHA512:
6
- metadata.gz: 9c07ae4b0a112464fdb40ecf5e0a35658755aa871032e9fd72940feccc11a910244b1e5426593aea2f4803d25b08a484af1191344fe68cb59520f19d96c9e9de
7
- data.tar.gz: 554d3c5324edad802b305e63d98f3839536ef11b07e836710c599523683af585761513c3aaf20000746a3ff30523da11b6e16c69220b07ed2de09e2f44950eea
6
+ metadata.gz: a7c4efb8d818031e76806fe8c33ee5d878e44d47e16e702bdacf059928874f1c70f0fe68e4f3d671fcdbbd5b2f88daa9b074bd2105c409beb9c11bffc3602912
7
+ data.tar.gz: bfbf1acc50a644209b00ae2dcffce61ac6c14d5920f65a7b99c3dae63957355b653d2afd262a62b82addab181e1fd0d4ff004d71508f05c7ded963eadea49e3e
@@ -115,6 +115,9 @@ module Reactor
115
115
  end
116
116
 
117
117
  def global_permissions
118
+ val = self.instance_variable_get(:@global_permissions)
119
+ return val unless val.nil?
120
+
118
121
  xml_attribute = self.class.xml_attribute(:global_permissions)
119
122
 
120
123
  request = XmlRequest.prepare do |xml|
@@ -128,6 +131,9 @@ module Reactor
128
131
  end
129
132
 
130
133
  def groups
134
+ val = self.instance_variable_get(:@groups)
135
+ return val unless val.nil?
136
+
131
137
  xml_attribute = self.class.xml_attribute(:groups)
132
138
 
133
139
  request = XmlRequest.prepare do |xml|
@@ -141,6 +147,9 @@ module Reactor
141
147
  end
142
148
 
143
149
  def email
150
+ val = self.instance_variable_get(:@email)
151
+ return val unless val.nil?
152
+
144
153
  xml_attribute = self.class.xml_attribute(:email)
145
154
 
146
155
  request = XmlRequest.prepare do |xml|
@@ -153,6 +162,22 @@ module Reactor
153
162
  self.class.response_handler.get(response, xml_attribute)
154
163
  end
155
164
 
165
+ def real_name
166
+ val = self.instance_variable_get(:@real_name)
167
+ return val unless val.nil?
168
+
169
+ xml_attribute = self.class.xml_attribute(:real_name)
170
+
171
+ request = XmlRequest.prepare do |xml|
172
+ xml.where_key_tag!(base_name, self.class.primary_key, self.login)
173
+ xml.get_key_tag!(base_name, xml_attribute.name)
174
+ end
175
+
176
+ response = request.execute!
177
+
178
+ self.class.response_handler.get(response, xml_attribute)
179
+ end
180
+
156
181
  protected
157
182
  def base_name
158
183
  self.class.base_name
@@ -25,7 +25,9 @@ module Reactor
25
25
  values = self.response_handler.multiple(elem, self.attributes.values)
26
26
  instance = self.new
27
27
  values.each do |name, value|
28
- instance.instance_variable_set(:"@#{name}", value)
28
+ pair = self.attributes.find {|n, a| a.name.to_sym == name.to_sym }
29
+ attribute = pair[0]
30
+ instance.send(:"#{attribute}=", value)
29
31
  end
30
32
  instance
31
33
  end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Reactor
3
- VERSION = "1.25.1"
3
+ VERSION = "1.25.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_reactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.1
4
+ version: 1.25.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Przedmojski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails