auth-lh 0.8.2 → 0.9.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: a2292eed7dcc1d2b78d9d68cdb1cd58a2353f383
4
- data.tar.gz: c9386564157da1ec46f8a5a520a94237544af2c1
3
+ metadata.gz: 816c465c92d8a14b91895d532cf34b6a5ca9ad8e
4
+ data.tar.gz: 9aeb20d317f08c906b1d7a6b618138c5a24d28ea
5
5
  SHA512:
6
- metadata.gz: 59460412bec88dfa096b980849c3a8feb19cbe2c8e78ee427ab67b146776ae5077c990029697e4e7b5c485b62b5f3aed3cc577596373ae459d878c7aeaef3d11
7
- data.tar.gz: ba4e3b148cf7867c90d600fb14ba8f681daed88488c36722ca1c7ec83aa5199b7f1673b0a1bbb7b3ad64f413d78e4bcbc90658618b84316d4487b78b86182516
6
+ metadata.gz: 95002195749cbbb9663b1c3f0c937d4177984e2f5348fdb706270290e642ef25e58c73d289c79c3feb6600525fd801ef4d07dcb396c01f297ee13d38cf265a30
7
+ data.tar.gz: 40a1e3b932277f74b9d2e4b808ca9a5a079005e8afd46f911b74d482e81dfe8141ada7bf4a20ce0cefc9c42fd17fc8d8f107f5d54e5581845ececec30376462a
data/CHANGELOG.md CHANGED
@@ -118,6 +118,14 @@
118
118
 
119
119
  * Added has attendance control field
120
120
 
121
- ## v0.8.2
121
+ ## v0.8.1
122
122
 
123
123
  * Removed birthdate field
124
+
125
+ ## v0.8.2
126
+
127
+ * Refactored external apps fields
128
+
129
+ ## v0.9.0
130
+
131
+ * Added enabled apps for user.
data/lib/auth/lh.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'auth_lh'
2
2
  require 'auth_lh/authentication'
3
3
  require 'auth_lh/external_app'
4
+ require 'auth_lh/external_app_extended'
4
5
  require 'auth_lh/role'
5
6
  require 'auth_lh/session_response'
6
7
  require 'auth_lh/shop'
@@ -1,5 +1,5 @@
1
1
  module Auth
2
2
  module Lh
3
- VERSION = "0.8.2"
3
+ VERSION = "0.9.0"
4
4
  end
5
5
  end
data/lib/auth_lh.rb CHANGED
@@ -21,7 +21,7 @@ module AuthLh
21
21
 
22
22
  def self.get_external_apps
23
23
  results = get_request('/api/external_apps')
24
- results.map { |r| ExternalApp.new(r) }
24
+ results.map { |r| ExternalAppExtended.new(r) }
25
25
  end
26
26
 
27
27
  def self.get_roles
@@ -1,7 +1,6 @@
1
1
  module AuthLh
2
2
  class ExternalApp
3
- attr_accessor :code, :name, :description, :url, :send_notifications,
4
- :is_local, :notifications_url
3
+ attr_accessor :name, :description, :url, :is_local
5
4
 
6
5
  def initialize(attributes={})
7
6
  attributes.each do |k,v|
@@ -0,0 +1,13 @@
1
+ module AuthLh
2
+ class ExternalAppExtended
3
+ attr_accessor :code, :name, :description, :url, :send_notifications,
4
+ :is_local, :notifications_url
5
+
6
+ def initialize(attributes={})
7
+ attributes.each do |k,v|
8
+ self.send("#{k}=", v)
9
+ end
10
+ end
11
+ end
12
+ end
13
+
data/lib/auth_lh/user.rb CHANGED
@@ -1,12 +1,16 @@
1
1
  module AuthLh
2
2
  class User
3
3
  attr_accessor :code, :email, :jabber, :name, :login, :shop_code,
4
- :shop_id, :enabled, :role_codes, :password_expired, :dni,
5
- :has_attendance_control
4
+ :shop_id, :shop_name, :enabled, :role_codes, :password_expired,
5
+ :dni, :has_attendance_control, :external_apps
6
6
 
7
7
  def initialize(attributes={})
8
8
  attributes.each do |k,v|
9
- self.send("#{k}=", v)
9
+ if k.to_s == 'external_apps'
10
+ self.external_apps = v.map { |x| ExternalApp.new(x) }
11
+ else
12
+ self.send("#{k}=", v)
13
+ end
10
14
  end
11
15
  end
12
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth-lh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,6 +67,7 @@ files:
67
67
  - lib/auth_lh.rb
68
68
  - lib/auth_lh/authentication.rb
69
69
  - lib/auth_lh/external_app.rb
70
+ - lib/auth_lh/external_app_extended.rb
70
71
  - lib/auth_lh/role.rb
71
72
  - lib/auth_lh/session_response.rb
72
73
  - lib/auth_lh/shop.rb