infopark_reactor 1.23.1 → 1.24.0

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: 08035464db14fa312c183892e385dded7f593935
4
- data.tar.gz: c79cfb46fa6a49138785633696fbd6ee0dd0a790
3
+ metadata.gz: f1e0ac63427fdf3e2431003fea33736910da7900
4
+ data.tar.gz: d00ae780a93b2b1be15ecf749a18065f8bd8f5a7
5
5
  SHA512:
6
- metadata.gz: e852cb39588abd78a769221656645b5ace2bcf5206203a3f0f8679df7a1ec5cc9f53c6bf4db6f1bc91069e713fc22a886a3c05e4c83e3cf596ead9e8a1afb408
7
- data.tar.gz: 777b9ee8e8a4471a17f4b8bfd9dcc5c856f097994c01979d2a26753f1d0042fcee48206bf638cc6493c3da062d98a479e03cc283847ce3bec9451881140d1a8d
6
+ metadata.gz: 5ea0d75fe981bbfb78d9e7e44ab80ddcdb2c343757e8ba8fad08141d5555a13de510ec7a48cae20f4b2ab02c366f83e70bbd7a39792ccc83f8a2efdca3853731
7
+ data.tar.gz: e3ebce08f0c559a1c67713faef6c7214a4b896164479610f34571355a66aed7f17e1f9958596ffa696ecded5e3a8fb279219e015cfa6ca1a21f3c7fd06066b30
@@ -21,6 +21,7 @@ module Reactor
21
21
  attribute :default_group, :name => :defaultGroup
22
22
  attribute :groups, :type => :list
23
23
  attribute :real_name, :name => :realName
24
+ attribute :email
24
25
 
25
26
  include Permissions
26
27
 
@@ -67,7 +68,7 @@ module Reactor
67
68
  attribute :name
68
69
  attribute :groups, :type => :list
69
70
  attribute :global_permissions, :name => :globalPermissions, :type => :list
70
-
71
+ attribute :email
71
72
 
72
73
  primary_key 'login'
73
74
 
@@ -127,6 +128,19 @@ module Reactor
127
128
  self.class.response_handler.get(response, xml_attribute)
128
129
  end
129
130
 
131
+ def email
132
+ xml_attribute = self.class.xml_attribute(:email)
133
+
134
+ request = XmlRequest.prepare do |xml|
135
+ xml.where_key_tag!(base_name, self.class.primary_key, self.name)
136
+ xml.get_key_tag!(base_name, xml_attribute.name)
137
+ end
138
+
139
+ response = request.execute!
140
+
141
+ self.class.response_handler.get(response, xml_attribute)
142
+ end
143
+
130
144
  protected
131
145
  def base_name
132
146
  'userProxy'
@@ -11,13 +11,14 @@ module Reactor
11
11
  @groups = user.groups
12
12
  @language = user.language
13
13
  @superuser= user.is_root?
14
+ @email = user.email
14
15
  end
15
16
 
16
17
  def to_s
17
18
  @user_name
18
19
  end
19
20
 
20
- attr_reader :user_name, :groups, :language
21
+ attr_reader :user_name, :groups, :language, :email
21
22
 
22
23
  def superuser?
23
24
  @superuser == true
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Reactor
3
- VERSION = "1.23.1"
3
+ VERSION = "1.24.0"
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.23.1
4
+ version: 1.24.0
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-01-05 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails