schemacop 3.0.0.rc5 → 3.0.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: 7fdf2a714534a94acf7c83e028fe7ce1e4b62c76266cc3e01786cd408d5c17c9
4
- data.tar.gz: 21ba336e330bf881d4f99cb63c4070dea7559813d7387faa0a2ee53c85fdbb1e
3
+ metadata.gz: eb25d83997e507cf7bf5e905143584e01b543c296f74e190eae487fe1a8bfdc0
4
+ data.tar.gz: 896f9bc4e14ac0e59831eacd83ae2e5a691a53e377f0b4895790b3686c24c2db
5
5
  SHA512:
6
- metadata.gz: 3636130ba0c0ee471e97e3ef9e259cc86840eaaf6b6435466fcaa17dafdb17aaff406b052e7e3eeffbbbb6e0f1fe3283feb5dda4dfcd5a008d3d60ee8c01f5bf
7
- data.tar.gz: 46fa1c3b015cfa725e9c624f74fc16f0bf07c6db64e74282e12136c17dc664ae02edb128fe3110516728fab47c2fd105068fb2d9b318f617db39f82dc6264b64
6
+ metadata.gz: 461b762ba18edeac632010db52d368978ead449c6de8a88f6b6883d0109cfa3ff3e8b9bf4c8f2780023b60624bfc80f6456a421a8044fdf4ed7b565d8779db5c
7
+ data.tar.gz: 693beb806323f0695fce4183ad65d65670d5cab8b76692d74b4a467e396a52540bbb4fa9b9c03bef9940a35c1f62a32fcd0e51ea435f450bc134b502ca5839df
data/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@
10
10
  ### Changes
11
11
  -->
12
12
 
13
+ ## 3.0.0 (2021-02-08)
14
+
15
+ * Setup Zeitwerk ignores for Rails applications
16
+
17
+ * Read previous `3.0.0.rcX` entries for all changes included
18
+ in this stable release
19
+
13
20
  ## 3.0.0.rc5 (2021-02-05)
14
21
 
15
22
  * Use `ruby2_keywords` for compatibility with ruby `2.6.2`
data/README_V3.md CHANGED
@@ -1191,14 +1191,17 @@ local schemas > context schemas > global schemas
1191
1191
 
1192
1192
  Where:
1193
1193
 
1194
- * local schemas: Defined by using the DSL method? `scm`
1194
+ * local schemas: Defined by using the DSL method `scm`
1195
1195
  * context schemas: Defined in the current context using `context.schema`
1196
1196
  * global schemas: Defined in a ruby file in the load path
1197
1197
 
1198
1198
  ### Rails applications
1199
1199
 
1200
- In Rails applications, your schemas are automatically eager-laoded from the load
1201
- path `'app/schemas'` when your application is started.
1200
+ In Rails applications, your schemas are automatically eager-loaded from the load
1201
+ path `'app/schemas'` when your application is started, unless your application
1202
+ is running in the `DEVELOPMENT` environment. In the `DEVELOPMENT` environment,
1203
+ schemas are loaded each time when they are used, and as such you can make changes
1204
+ to your external schemas without having to restart the server each time.
1202
1205
 
1203
1206
  After starting your application, you can reference them like normally defined
1204
1207
  reference schemas, with the name being relative to the load path.
@@ -1246,8 +1249,12 @@ schema.validate!({usr: {first_name: 'Joe', last_name: 'Doe', groups: [{name: 'fo
1246
1249
  ### Non-Rails applications
1247
1250
 
1248
1251
  Usage in non-Rails applications is the same as with usage in Rails applications,
1249
- however you need to eager load the schemas yourself:
1252
+ however you might need to eager load the schemas yourself:
1250
1253
 
1251
1254
  ```ruby
1252
1255
  Schemacop::V3::GlobalContext.eager_load!
1253
1256
  ```
1257
+
1258
+ As mentioned before, you can also use the external schemas without having to
1259
+ eager-load them, but if you use the schemas multiple times, it might be better
1260
+ to eager-load them on start of your application / script.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.rc5
1
+ 3.0.0
@@ -5,6 +5,13 @@ module Schemacop
5
5
  unless Rails.env.development?
6
6
  V3::GlobalContext.eager_load!
7
7
  end
8
+
9
+ # Tell Zeitwerk to ignore the files in our load path
10
+ if defined?(Rails) && defined?(Zeitwerk)
11
+ Schemacop.load_paths.each do |load_path|
12
+ Rails.autoloaders.main.ignore(Rails.root.join(load_path))
13
+ end
14
+ end
8
15
  end
9
16
  end
10
17
  end
data/schemacop.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: schemacop 3.0.0.rc5 ruby lib
2
+ # stub: schemacop 3.0.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "schemacop".freeze
6
- s.version = "3.0.0.rc5"
6
+ s.version = "3.0.0"
7
7
 
8
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version=
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2021-02-05"
11
+ s.date = "2021-02-08"
12
12
  s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "README_V2.md".freeze, "README_V3.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/base_schema.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/railtie.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/schema2.rb".freeze, "lib/schemacop/schema3.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/v2.rb".freeze, "lib/schemacop/v2/caster.rb".freeze, "lib/schemacop/v2/collector.rb".freeze, "lib/schemacop/v2/dupper.rb".freeze, "lib/schemacop/v2/field_node.rb".freeze, "lib/schemacop/v2/node.rb".freeze, "lib/schemacop/v2/node_resolver.rb".freeze, "lib/schemacop/v2/node_supporting_field.rb".freeze, "lib/schemacop/v2/node_supporting_type.rb".freeze, "lib/schemacop/v2/node_with_block.rb".freeze, "lib/schemacop/v2/validator/array_validator.rb".freeze, "lib/schemacop/v2/validator/boolean_validator.rb".freeze, "lib/schemacop/v2/validator/float_validator.rb".freeze, "lib/schemacop/v2/validator/hash_validator.rb".freeze, "lib/schemacop/v2/validator/integer_validator.rb".freeze, "lib/schemacop/v2/validator/nil_validator.rb".freeze, "lib/schemacop/v2/validator/number_validator.rb".freeze, "lib/schemacop/v2/validator/object_validator.rb".freeze, "lib/schemacop/v2/validator/string_validator.rb".freeze, "lib/schemacop/v2/validator/symbol_validator.rb".freeze, "lib/schemacop/v3.rb".freeze, "lib/schemacop/v3/all_of_node.rb".freeze, "lib/schemacop/v3/any_of_node.rb".freeze, "lib/schemacop/v3/array_node.rb".freeze, "lib/schemacop/v3/boolean_node.rb".freeze, "lib/schemacop/v3/combination_node.rb".freeze, "lib/schemacop/v3/context.rb".freeze, "lib/schemacop/v3/dsl_scope.rb".freeze, "lib/schemacop/v3/global_context.rb".freeze, "lib/schemacop/v3/hash_node.rb".freeze, "lib/schemacop/v3/integer_node.rb".freeze, "lib/schemacop/v3/is_not_node.rb".freeze, "lib/schemacop/v3/node.rb".freeze, "lib/schemacop/v3/node_registry.rb".freeze, "lib/schemacop/v3/number_node.rb".freeze, "lib/schemacop/v3/numeric_node.rb".freeze, "lib/schemacop/v3/object_node.rb".freeze, "lib/schemacop/v3/one_of_node.rb".freeze, "lib/schemacop/v3/reference_node.rb".freeze, "lib/schemacop/v3/result.rb".freeze, "lib/schemacop/v3/string_node.rb".freeze, "lib/schemacop/v3/symbol_node.rb".freeze, "schemacop.gemspec".freeze, "test/lib/test_helper.rb".freeze, "test/schemas/nested/group.rb".freeze, "test/schemas/user.rb".freeze, "test/unit/schemacop/v2/casting_test.rb".freeze, "test/unit/schemacop/v2/collector_test.rb".freeze, "test/unit/schemacop/v2/custom_check_test.rb".freeze, "test/unit/schemacop/v2/custom_if_test.rb".freeze, "test/unit/schemacop/v2/defaults_test.rb".freeze, "test/unit/schemacop/v2/empty_test.rb".freeze, "test/unit/schemacop/v2/nil_dis_allow_test.rb".freeze, "test/unit/schemacop/v2/node_resolver_test.rb".freeze, "test/unit/schemacop/v2/short_forms_test.rb".freeze, "test/unit/schemacop/v2/types_test.rb".freeze, "test/unit/schemacop/v2/validator_array_test.rb".freeze, "test/unit/schemacop/v2/validator_boolean_test.rb".freeze, "test/unit/schemacop/v2/validator_float_test.rb".freeze, "test/unit/schemacop/v2/validator_hash_test.rb".freeze, "test/unit/schemacop/v2/validator_integer_test.rb".freeze, "test/unit/schemacop/v2/validator_nil_test.rb".freeze, "test/unit/schemacop/v2/validator_number_test.rb".freeze, "test/unit/schemacop/v2/validator_object_test.rb".freeze, "test/unit/schemacop/v2/validator_string_test.rb".freeze, "test/unit/schemacop/v2/validator_symbol_test.rb".freeze, "test/unit/schemacop/v3/all_of_node_test.rb".freeze, "test/unit/schemacop/v3/any_of_node_test.rb".freeze, "test/unit/schemacop/v3/array_node_test.rb".freeze, "test/unit/schemacop/v3/boolean_node_test.rb".freeze, "test/unit/schemacop/v3/global_context_test.rb".freeze, "test/unit/schemacop/v3/hash_node_test.rb".freeze, "test/unit/schemacop/v3/integer_node_test.rb".freeze, "test/unit/schemacop/v3/is_not_node_test.rb".freeze, "test/unit/schemacop/v3/node_test.rb".freeze, "test/unit/schemacop/v3/number_node_test.rb".freeze, "test/unit/schemacop/v3/object_node_test.rb".freeze, "test/unit/schemacop/v3/one_of_node_test.rb".freeze, "test/unit/schemacop/v3/reference_node_test.rb".freeze, "test/unit/schemacop/v3/string_node_test.rb".freeze, "test/unit/schemacop/v3/symbol_node_test.rb".freeze]
13
13
  s.homepage = "https://github.com/sitrox/schemacop".freeze
14
14
  s.licenses = ["MIT".freeze]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemacop
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -288,9 +288,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  requirements:
291
- - - ">"
291
+ - - ">="
292
292
  - !ruby/object:Gem::Version
293
- version: 1.3.1
293
+ version: '0'
294
294
  requirements: []
295
295
  rubygems_version: 3.0.3
296
296
  signing_key: