openstax_accounts 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/representers/openstax/accounts/api/v1/application_user_representer.rb +24 -0
- data/app/representers/openstax/accounts/api/v1/contact_info_representer.rb +23 -0
- data/app/representers/openstax/accounts/api/v1/email_address_representer.rb +9 -0
- data/app/representers/openstax/accounts/api/v1/user_representer.rb +35 -0
- data/app/representers/openstax/accounts/api/v1/user_search_representer.rb +29 -0
- data/lib/openstax/accounts/engine.rb +2 -0
- data/lib/openstax/accounts/version.rb +1 -1
- metadata +30 -9
@@ -0,0 +1,24 @@
|
|
1
|
+
module OpenStax
|
2
|
+
module Accounts
|
3
|
+
module Api
|
4
|
+
module V1
|
5
|
+
class ApplicationUserRepresenter < Roar::Decorator
|
6
|
+
include Roar::Representer::JSON
|
7
|
+
|
8
|
+
property :id,
|
9
|
+
type: Integer
|
10
|
+
|
11
|
+
property :application_id,
|
12
|
+
type: Integer
|
13
|
+
|
14
|
+
property :user_id,
|
15
|
+
type: Integer
|
16
|
+
|
17
|
+
property :default_contact_info_id,
|
18
|
+
type: Integer
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module OpenStax
|
2
|
+
module Accounts
|
3
|
+
module Api
|
4
|
+
module V1
|
5
|
+
class ContactInfoRepresenter < Roar::Decorator
|
6
|
+
include Roar::Representer::JSON
|
7
|
+
|
8
|
+
property :id,
|
9
|
+
type: Integer
|
10
|
+
|
11
|
+
property :type,
|
12
|
+
type: String
|
13
|
+
|
14
|
+
property :value,
|
15
|
+
type: String
|
16
|
+
|
17
|
+
property :verified
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module OpenStax
|
2
|
+
module Accounts
|
3
|
+
module Api
|
4
|
+
module V1
|
5
|
+
class UserRepresenter < Roar::Decorator
|
6
|
+
include Roar::Representer::JSON
|
7
|
+
|
8
|
+
property :id,
|
9
|
+
type: Integer
|
10
|
+
|
11
|
+
property :username,
|
12
|
+
type: String
|
13
|
+
|
14
|
+
property :first_name,
|
15
|
+
type: String
|
16
|
+
|
17
|
+
property :last_name,
|
18
|
+
type: String
|
19
|
+
|
20
|
+
property :full_name,
|
21
|
+
type: String
|
22
|
+
|
23
|
+
property :title,
|
24
|
+
type: String
|
25
|
+
|
26
|
+
# TODO: Not yet implemented in this gem
|
27
|
+
# collection :contact_infos,
|
28
|
+
# class: OpenStax::Accounts::ContactInfo,
|
29
|
+
# decorator: ContactInfoRepresenter
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module OpenStax
|
2
|
+
module Accounts
|
3
|
+
module Api
|
4
|
+
module V1
|
5
|
+
class UserSearchRepresenter < Roar::Decorator
|
6
|
+
include Roar::Representer::JSON
|
7
|
+
|
8
|
+
property :num_matching_users,
|
9
|
+
type: Integer
|
10
|
+
|
11
|
+
property :page,
|
12
|
+
type: Integer
|
13
|
+
|
14
|
+
property :per_page,
|
15
|
+
type: Integer
|
16
|
+
|
17
|
+
property :order_by,
|
18
|
+
type: String
|
19
|
+
|
20
|
+
|
21
|
+
collection :users,
|
22
|
+
class: OpenStax::Accounts::User,
|
23
|
+
decorator: UserRepresenter
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -92,13 +92,13 @@ dependencies:
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: roar
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
99
99
|
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
101
|
+
version: '0.8'
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,15 +106,15 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '0.8'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
111
|
+
name: lev
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '2.0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: sass-rails
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,6 +155,22 @@ dependencies:
|
|
155
155
|
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '1.0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: openstax_utilities
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '1.2'
|
166
|
+
type: :runtime
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '1.2'
|
158
174
|
- !ruby/object:Gem::Dependency
|
159
175
|
name: sqlite3
|
160
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,6 +285,11 @@ files:
|
|
269
285
|
- app/handlers/openstax/accounts/sessions_omniauth_authenticated.rb
|
270
286
|
- app/helpers/openstax/accounts/application_helper.rb
|
271
287
|
- app/models/openstax/accounts/user.rb
|
288
|
+
- app/representers/openstax/accounts/api/v1/application_user_representer.rb
|
289
|
+
- app/representers/openstax/accounts/api/v1/contact_info_representer.rb
|
290
|
+
- app/representers/openstax/accounts/api/v1/email_address_representer.rb
|
291
|
+
- app/representers/openstax/accounts/api/v1/user_representer.rb
|
292
|
+
- app/representers/openstax/accounts/api/v1/user_search_representer.rb
|
272
293
|
- app/routines/openstax/accounts/dev/create_user.rb
|
273
294
|
- app/routines/openstax/accounts/search_users.rb
|
274
295
|
- app/views/layouts/openstax/accounts/application.html.erb
|
@@ -347,7 +368,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
347
368
|
version: '0'
|
348
369
|
segments:
|
349
370
|
- 0
|
350
|
-
hash:
|
371
|
+
hash: 1165617575040691803
|
351
372
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
352
373
|
none: false
|
353
374
|
requirements:
|
@@ -356,7 +377,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
356
377
|
version: '0'
|
357
378
|
segments:
|
358
379
|
- 0
|
359
|
-
hash:
|
380
|
+
hash: 1165617575040691803
|
360
381
|
requirements: []
|
361
382
|
rubyforge_project:
|
362
383
|
rubygems_version: 1.8.25
|