Commit 5a355fc
Changed files (7)
lib
scim
kit
v2
templates
spec
scim
kit
lib/scim/kit/v2/templates/attribute.json.jbuilder
@@ -3,7 +3,7 @@
json.key_format! camelize: :lower
if _type.complex? && !_type.multi_valued
json.set! _type.name do
- dynamic_attributes.values.each do |attribute|
+ dynamic_attributes.each_value do |attribute|
render attribute, json: json
end
end
lib/scim/kit/v2/attribute_type.rb
@@ -108,7 +108,7 @@ module Scim
def valid_complex?(item)
return false unless item.is_a?(Hash)
- item.keys.each do |key|
+ item.each_key do |key|
return false unless type_for(key)&.valid?(item[key])
end
end
lib/scim/kit/v2.rb
@@ -68,7 +68,7 @@ module Scim
false
end
},
- reference: ->(x) { x =~ /\A#{URI.regexp(%w[http https])}\z/ },
+ reference: ->(x) { x =~ /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/ },
string: ->(x) { x.is_a?(String) }
}.freeze
spec/scim/kit/v2/resource_spec.rb
@@ -49,7 +49,7 @@ RSpec.describe Scim::Kit::V2::Resource do
end
end
- context 'with attribute named "type"' do
+ context 'with attribute named "members"' do
before do
schema.add_attribute(name: 'members') do |attribute|
attribute.mutability = :read_only
.rubocop.yml
@@ -9,19 +9,49 @@ AllCops:
- 'vendor/**/*'
TargetRubyVersion: 2.5
+Layout/ArgumentAlignment:
+ EnforcedStyle: with_fixed_indentation
+
+Layout/EndOfLine:
+ EnforcedStyle: lf
+
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
+Layout/LineLength:
+ Exclude:
+ - 'spec/**/*.rb'
+ IgnoredPatterns:
+ - '^#*'
+
+Layout/MultilineMethodCallIndentation:
+ Enabled: true
+ EnforcedStyle: indented
+
+Layout/ParameterAlignment:
+ Enabled: true
+ EnforcedStyle: with_fixed_indentation
+ IndentationWidth: 2
+
+Lint/AmbiguousBlockAssociation:
+ Exclude:
+ - 'spec/**/*.rb'
+
+Lint/RaiseException:
+ Enabled: true
+
+Lint/StructNewOverride:
+ Enabled: true
+
Metrics/BlockLength:
Exclude:
- '*.gemspec'
+ - 'Rakefile'
- 'spec/**/*.rb'
-Metrics/LineLength:
+Metrics/ModuleLength:
Exclude:
- 'spec/**/*.rb'
- IgnoredPatterns:
- - '^#*'
Naming/FileName:
Exclude:
@@ -30,6 +60,30 @@ Naming/FileName:
Naming/RescuedExceptionsVariableName:
PreferredName: error
+Style/Documentation:
+ Enabled: false
+
+Style/HashEachMethods:
+ Enabled: true
+
+Style/HashTransformKeys:
+ Enabled: true
+
+Style/HashTransformValues:
+ Enabled: true
+
+Style/StringLiterals:
+ EnforcedStyle: 'single_quotes'
+
+Style/TrailingCommaInArrayLiteral:
+ Enabled: false
+
+Style/TrailingCommaInHashLiteral:
+ Enabled: false
+
+RSpec/FilePath:
+ Enabled: false
+
RSpec/NamedSubject:
Enabled: false
Gemfile.lock
@@ -11,62 +11,62 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- activemodel (6.0.2.1)
- activesupport (= 6.0.2.1)
- activesupport (6.0.2.1)
+ activemodel (6.0.3.1)
+ activesupport (= 6.0.3.1)
+ activesupport (6.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
- zeitwerk (~> 2.2)
+ zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.0)
bundler-audit (0.6.1)
bundler (>= 1.2.0, < 3)
thor (~> 0.18)
- byebug (11.1.0)
- concurrent-ruby (1.1.5)
+ byebug (11.1.3)
+ concurrent-ruby (1.1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
- ffaker (2.13.0)
- hashdiff (1.0.0)
+ ffaker (2.14.0)
+ hashdiff (1.0.1)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
- jaro_winkler (1.5.4)
- jbuilder (2.9.1)
- activesupport (>= 4.2.0)
- minitest (5.14.0)
- net-hippie (0.3.1)
+ jbuilder (2.10.0)
+ activesupport (>= 5.0.0)
+ minitest (5.14.1)
+ net-hippie (0.3.2)
parallel (1.19.1)
- parser (2.7.0.2)
+ parser (2.7.1.2)
ast (~> 2.4.0)
parslet (1.8.2)
- public_suffix (4.0.3)
+ public_suffix (4.0.5)
rainbow (3.0.0)
rake (13.0.1)
+ rexml (3.2.4)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
- rspec-core (3.9.1)
- rspec-support (~> 3.9.1)
- rspec-expectations (3.9.0)
+ rspec-core (3.9.2)
+ rspec-support (~> 3.9.3)
+ rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
- rspec-support (3.9.2)
- rubocop (0.79.0)
- jaro_winkler (~> 1.5.1)
+ rspec-support (3.9.3)
+ rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
+ rexml
ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 1.7)
- rubocop-rspec (1.37.1)
+ unicode-display_width (>= 1.4.0, < 2.0)
+ rubocop-rspec (1.39.0)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
safe_yaml (1.0.5)
@@ -76,20 +76,20 @@ GEM
tilt-jbuilder (0.7.1)
jbuilder
tilt (>= 1.3.0, < 3)
- tzinfo (1.2.6)
+ tzinfo (1.2.7)
thread_safe (~> 0.1)
- unicode-display_width (1.6.1)
- webmock (3.8.0)
+ unicode-display_width (1.7.0)
+ webmock (3.8.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
- zeitwerk (2.2.2)
+ zeitwerk (2.3.0)
PLATFORMS
ruby
DEPENDENCIES
- bundler (~> 1.17)
+ bundler (~> 2.0)
bundler-audit (~> 0.6)
byebug
ffaker (~> 2.7)
@@ -101,4 +101,4 @@ DEPENDENCIES
webmock (~> 3.5)
BUNDLED WITH
- 1.17.3
+ 2.1.4
scim-kit.gemspec
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'parslet', '~> 1.8'
spec.add_dependency 'tilt', '~> 2.0'
spec.add_dependency 'tilt-jbuilder', '~> 0.7'
- spec.add_development_dependency 'bundler', '~> 1.17'
+ spec.add_development_dependency 'bundler', '~> 2.0'
spec.add_development_dependency 'bundler-audit', '~> 0.6'
spec.add_development_dependency 'byebug'
spec.add_development_dependency 'ffaker', '~> 2.7'