scim-kit 0.2.8 → 0.2.9

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: f75f4c446b2aab438c47e461cf65e278dbf934868393ee622dadd45f24139c8a
4
- data.tar.gz: bec6fa39b2a1a3b128c851031328cba6d5e06b5caebc5d584ff15d53f87dbe8b
3
+ metadata.gz: 79f02299047002221e07cbb5b8329134fa92d510c1851bd06fd1653b55a9d72e
4
+ data.tar.gz: b4f80a7b6480db73b6227da7bfa1b2e06fe274d8536df9e0c48db40a1e34ff5e
5
5
  SHA512:
6
- metadata.gz: f0663b870f54731c0928db9b585e487286ba31dddc2d8ebcc915ed5635f200251c2377d291e7c5312a8b753c54ad7996d316743b3d11a67571dd8aa99b55809b
7
- data.tar.gz: f5d631e8b5621f54e32766573b1e606cea14d8551125516cc4f448edc82bd84c1ab1c25ddd68b127b141d294aec4acae86a7b99e9d24cd610e9677cb472f917d
6
+ metadata.gz: b7539e5af3e80ccd8ec44118cfdb66ede3740cd5544c91ff7085454e9c841e326a616390bddbd0c69a37867e931d7ebfb0e2f9560f8e07dcdc56c0c51a430b2c
7
+ data.tar.gz: 6a442adc9bdcc3c558441727a6f4648d3d1c235420860e36fcb2cad94938353eae27540ce55ac1dd7c5187ab181decfefa4954cbfbe5297cbde39351106fe2bc
@@ -17,6 +17,10 @@ module Scim
17
17
  @created = @last_modified = Time.now
18
18
  @version = @created.to_i
19
19
  end
20
+
21
+ def disable_timestamps
22
+ @version = @created = @last_modified = nil
23
+ end
20
24
  end
21
25
  end
22
26
  end
@@ -16,8 +16,9 @@ module Scim
16
16
  validates_presence_of :id
17
17
  validate :schema_validations
18
18
 
19
- def initialize(schemas:, location:)
19
+ def initialize(schemas:, location: nil)
20
20
  @meta = Meta.new(schemas[0].name, location)
21
+ @meta.disable_timestamps
21
22
  @schemas = schemas
22
23
  schemas.each do |schema|
23
24
  define_attributes_for(schema.attributes)
@@ -1,12 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  json.key_format! camelize: :lower
4
- json.meta do
5
- render meta, json: json
4
+ if meta.location
5
+ json.meta do
6
+ render meta, json: json
7
+ end
6
8
  end
7
9
  json.schemas schemas.map(&:id)
8
- json.id id
9
- json.external_id external_id
10
+ json.id id if id
11
+ json.external_id external_id if external_id
10
12
  schemas.each do |schema|
11
13
  if schema.core?
12
14
  schema.attributes.each do |type|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Scim
4
4
  module Kit
5
- VERSION = '0.2.8'
5
+ VERSION = '0.2.9'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scim-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-11 00:00:00.000000000 Z
11
+ date: 2019-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel