openstax_accounts 8.0.1 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f7776ce8e75c51c3a8b3435712dc37aab19225584f25c99f82ce6bd92042350
|
4
|
+
data.tar.gz: fac871ea9ca585e3b5e02d46bd37fe6b462ed80283cf23881e551c92d25e9297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90ed74a62cb7a299c8ef064accfc52e295a3baa334a110ac8020e02bebf61408f846e3b278124ebb0feb921bf3f32ea4d2551e01a4fb42a9e14b30d9b1169720
|
7
|
+
data.tar.gz: 882b93e2e815f42e1942fafaca8754787b1a86538ba46bb5604dc313b5da8a370fd2708c7cd268a24ee434de0961691af336dd30b45b5b5bbd9440f0a38ee6ed
|
@@ -4,7 +4,7 @@ module OpenStax
|
|
4
4
|
module V1
|
5
5
|
class UnclaimedAccountRepresenter < Roar::Decorator
|
6
6
|
|
7
|
-
# This representer is used to
|
7
|
+
# This representer is used to read from Accounts
|
8
8
|
# and so must allow read/write on all properties
|
9
9
|
# Do not use it in create/update APIs!
|
10
10
|
|
@@ -30,12 +30,6 @@ module OpenStax
|
|
30
30
|
description: "The unclaimed account's support_identifier"
|
31
31
|
}
|
32
32
|
|
33
|
-
property :is_test,
|
34
|
-
type: :boolean,
|
35
|
-
schema_info: {
|
36
|
-
description: "Whether or not this is a test account"
|
37
|
-
}
|
38
|
-
|
39
33
|
end
|
40
34
|
end
|
41
35
|
end
|
@@ -6,12 +6,13 @@ module OpenStax
|
|
6
6
|
|
7
7
|
protected
|
8
8
|
|
9
|
-
def exec(email: nil, username: nil, password: nil,
|
10
|
-
|
11
|
-
|
12
|
-
raise
|
13
|
-
|
14
|
-
|
9
|
+
def exec(email: nil, username: nil, password: nil, first_name: nil, last_name: nil,
|
10
|
+
full_name: nil, title: nil, salesforce_contact_id: nil, faculty_status: nil,
|
11
|
+
role: nil, school_type: nil, is_test: nil)
|
12
|
+
raise(
|
13
|
+
ArgumentError,
|
14
|
+
'You must specify either an email address or a username (and an optional password)'
|
15
|
+
) if email.nil? && username.nil?
|
15
16
|
|
16
17
|
if OpenStax::Accounts.configuration.enable_stubbing
|
17
18
|
# We can only stub finding by username b/c accounts-rails doesn't persist emails
|
@@ -24,7 +25,7 @@ module OpenStax
|
|
24
25
|
email: email, username: username, password: password,
|
25
26
|
first_name: first_name, last_name: last_name, full_name: full_name,
|
26
27
|
salesforce_contact_id: salesforce_contact_id, faculty_status: faculty_status,
|
27
|
-
role: role, school_type: school_type)
|
28
|
+
role: role, school_type: school_type, is_test: is_test)
|
28
29
|
fatal_error(code: :invalid_inputs) unless (200..202).include?(response.status)
|
29
30
|
|
30
31
|
struct = OpenStruct.new
|
@@ -32,7 +33,6 @@ module OpenStax
|
|
32
33
|
id = struct.id
|
33
34
|
uuid = struct.uuid
|
34
35
|
support_identifier = struct.support_identifier
|
35
|
-
is_test = struct.is_test
|
36
36
|
end
|
37
37
|
|
38
38
|
account = Account.find_or_initialize_by(openstax_uid: id)
|
@@ -57,7 +57,7 @@ module OpenStax
|
|
57
57
|
end
|
58
58
|
|
59
59
|
transfer_errors_from(account, {type: :verbatim}, true)
|
60
|
-
outputs
|
60
|
+
outputs.account = account
|
61
61
|
end
|
62
62
|
|
63
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.0
|
4
|
+
version: 8.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -399,7 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
399
|
- !ruby/object:Gem::Version
|
400
400
|
version: '0'
|
401
401
|
requirements: []
|
402
|
-
rubygems_version: 3.0.
|
402
|
+
rubygems_version: 3.0.3
|
403
403
|
signing_key:
|
404
404
|
specification_version: 4
|
405
405
|
summary: Rails common code and bindings for the 'accounts' API
|