openstax_accounts 8.0.1 → 8.1.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
  SHA256:
3
- metadata.gz: cffdcff66072c257c996272b7b5f9a917bd21a1c84589bca889cf0bcd2a676b2
4
- data.tar.gz: de71b20116cd513ccba5de4cfa5e0add95420798466cda35a5ebfc3f68123db7
3
+ metadata.gz: 5f7776ce8e75c51c3a8b3435712dc37aab19225584f25c99f82ce6bd92042350
4
+ data.tar.gz: fac871ea9ca585e3b5e02d46bd37fe6b462ed80283cf23881e551c92d25e9297
5
5
  SHA512:
6
- metadata.gz: f3e0d6fa0b11e901f1b4bfa6006b6f4520d2a98f41b8c7cf8a1b403bf51509cd13d4081bd0d15195178f7338f5fdab50324da2fef5d92b67c1287e6c395df1e1
7
- data.tar.gz: ae14f2812c59b8a3e75a3c46bcbb661d08d74cc4c8be1f10fad7a87f1a35b91d3eb64769a06bdaf66fa6515de1bf49294001f6b9288a1dd2ac9698c67365aec7
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 communicate with Accounts
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
- first_name: nil, last_name: nil, full_name: nil, title: nil,
11
- salesforce_contact_id: nil, faculty_status: nil, role: nil, school_type: nil)
12
- raise ArgumentError,
13
- 'You must specify either an email address or a username (and an optional password)' \
14
- if email.nil? && username.nil?
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[:account] = account
60
+ outputs.account = account
61
61
  end
62
62
 
63
63
  end
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Accounts
3
- VERSION = "8.0.1"
3
+ VERSION = "8.1.0"
4
4
  end
5
5
  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.1
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-07-15 00:00:00.000000000 Z
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.4
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