code_ownership 2.1.0 → 2.1.1
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 +4 -4
- data/Cargo.lock +8 -14
- data/ext/cargo-vendor/magnus-0.8.2/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/magnus-0.8.2/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/CHANGELOG.md +66 -1
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Cargo.lock +243 -9
- data/ext/cargo-vendor/magnus-0.8.2/Cargo.toml +277 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Cargo.toml.orig +11 -6
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/README.md +75 -23
- data/ext/cargo-vendor/magnus-0.8.2/build.rs +15 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/test/temperature_test.rb +4 -4
- data/ext/cargo-vendor/magnus-0.8.2/examples/inheritance.rs +66 -0
- data/ext/cargo-vendor/magnus-0.8.2/examples/mut_point.rs +116 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/api.rs +4 -3
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/class.rs +9 -7
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/encoding.rs +5 -5
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/error.rs +12 -3
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/fiber.rs +5 -5
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/gc.rs +3 -3
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/integer.rs +134 -0
- data/ext/cargo-vendor/magnus-0.8.2/src/io.rs +230 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/lib.rs +53 -54
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/macros.rs +2 -2
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/method.rs +14 -100
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/module.rs +1 -1
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/mutex.rs +1 -1
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_array.rs +2 -2
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_bignum.rs +100 -3
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_hash.rs +63 -1
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_string.rs +31 -231
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_typed_data.rs +6 -9
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/rb_sys.rs +4 -4
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/scan_args.rs +3 -3
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/thread.rs +16 -10
- data/ext/cargo-vendor/magnus-0.8.2/src/time.rs +462 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/try_convert.rs +64 -2
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/typed_data.rs +113 -11
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/value/flonum.rs +1 -1
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/value.rs +83 -6
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/test +1 -1
- data/ext/cargo-vendor/magnus-0.8.2/tests/hash.rs +44 -0
- data/ext/cargo-vendor/magnus-0.8.2/tests/io.rs +62 -0
- data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/return_iter.rs +1 -1
- data/ext/cargo-vendor/magnus-0.8.2/tests/string.rs +23 -0
- data/ext/cargo-vendor/magnus-0.8.2/tests/time.rs +71 -0
- data/ext/cargo-vendor/magnus-macros-0.8.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/magnus-macros-0.8.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/magnus-macros-0.8.0/Cargo.lock +47 -0
- data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/Cargo.toml +10 -1
- data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/Cargo.toml.orig +1 -1
- data/ext/cargo-vendor/magnus-macros-0.8.0/src/lib.rs +545 -0
- data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/typed_data.rs +3 -3
- data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/util.rs +1 -1
- data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo-checksum.json +1 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo_vcs_info.json +6 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.lock +77 -75
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.toml +3 -3
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.toml.orig +7 -4
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/README.md +8 -5
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/array_deserializer.rs +12 -8
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/array_enumerator.rs +12 -7
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/deserializer.rs +21 -18
- data/ext/cargo-vendor/serde_magnus-0.10.0/src/de/enum_deserializer.rs +35 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/hash_deserializer.rs +18 -11
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/mod.rs +76 -76
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/variant_deserializer.rs +10 -9
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/error.rs +10 -4
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/lib.rs +6 -5
- data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/enums.rs +11 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/map_serializer.rs +11 -12
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/mod.rs +53 -50
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/seq_serializer.rs +11 -10
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/serializer.rs +50 -34
- data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/struct_serializer.rs +40 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/struct_variant_serializer.rs +45 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/tuple_variant_serializer.rs +38 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_arrays.rs +3 -3
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_booleans.rs +15 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_enums.rs +39 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_floats.rs +12 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_integers.rs +18 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_maps.rs +3 -2
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_options.rs +15 -0
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_results.rs +17 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_strings.rs +7 -7
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_structs.rs +9 -9
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_tuples.rs +27 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_vecs.rs +3 -3
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_arrays.rs +3 -3
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_booleans.rs +15 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_enums.rs +9 -7
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_floats.rs +2 -2
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_integers.rs +4 -4
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_maps.rs +3 -2
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_options.rs +3 -3
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_results.rs +5 -4
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_strings.rs +30 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_structs.rs +15 -7
- data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_tuples.rs +35 -0
- data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_vecs.rs +3 -3
- data/ext/code_ownership/Cargo.toml +2 -2
- data/ext/code_ownership/extconf.rb +2 -1
- data/ext/code_ownership/src/lib.rs +16 -16
- data/lib/code_ownership/cli.rb +1 -0
- data/lib/code_ownership/private/file_path_finder.rb +3 -7
- data/lib/code_ownership/private/file_path_team_cache.rb +5 -9
- data/lib/code_ownership/private/for_file_output_builder.rb +0 -1
- data/lib/code_ownership/private/team_finder.rb +8 -14
- data/lib/code_ownership/version.rb +2 -2
- data/lib/code_ownership.rb +12 -17
- metadata +182 -186
- data/ext/cargo-vendor/magnus-0.7.1/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/magnus-0.7.1/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/magnus-0.7.1/Cargo.toml +0 -95
- data/ext/cargo-vendor/magnus-0.7.1/build.rs +0 -5
- data/ext/cargo-vendor/magnus-0.7.1/examples/mut_point.rs +0 -60
- data/ext/cargo-vendor/magnus-0.7.1/src/time.rs +0 -190
- data/ext/cargo-vendor/magnus-0.7.1/tests/hash.rs +0 -25
- data/ext/cargo-vendor/magnus-0.7.1/tests/string.rs +0 -13
- data/ext/cargo-vendor/magnus-macros-0.6.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/magnus-macros-0.6.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/magnus-macros-0.6.0/src/lib.rs +0 -401
- data/ext/cargo-vendor/rb-sys-env-0.1.2/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/rb-sys-env-0.1.2/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/rb-sys-env-0.1.2/Cargo.toml +0 -25
- data/ext/cargo-vendor/rb-sys-env-0.1.2/Cargo.toml.orig +0 -14
- data/ext/cargo-vendor/rb-sys-env-0.1.2/LICENSE-APACHE +0 -190
- data/ext/cargo-vendor/rb-sys-env-0.1.2/LICENSE-MIT +0 -21
- data/ext/cargo-vendor/rb-sys-env-0.1.2/readme.md +0 -119
- data/ext/cargo-vendor/rb-sys-env-0.1.2/src/defines.rs +0 -37
- data/ext/cargo-vendor/rb-sys-env-0.1.2/src/lib.rs +0 -180
- data/ext/cargo-vendor/rb-sys-env-0.1.2/src/rb_env.rs +0 -110
- data/ext/cargo-vendor/rb-sys-env-0.1.2/src/ruby_version.rs +0 -163
- data/ext/cargo-vendor/rb-sys-env-0.1.2/src/utils.rs +0 -6
- data/ext/cargo-vendor/serde_magnus-0.9.0/.cargo-checksum.json +0 -1
- data/ext/cargo-vendor/serde_magnus-0.9.0/.cargo_vcs_info.json +0 -6
- data/ext/cargo-vendor/serde_magnus-0.9.0/src/de/enum_deserializer.rs +0 -30
- data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/enums.rs +0 -11
- data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/struct_serializer.rs +0 -36
- data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/struct_variant_serializer.rs +0 -37
- data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/tuple_variant_serializer.rs +0 -33
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_booleans.rs +0 -18
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_enums.rs +0 -39
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_floats.rs +0 -12
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_integers.rs +0 -18
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_options.rs +0 -15
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_results.rs +0 -17
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_tuples.rs +0 -31
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_booleans.rs +0 -15
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_strings.rs +0 -30
- data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_tuples.rs +0 -27
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/.cargo/config.toml +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Gemfile +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/LICENSE +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/Rakefile +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/lib/temperature.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/Rakefile +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/lib/ahriman/error.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/lib/ahriman.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/test/error_test.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/Rakefile +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/lib/ahriman.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/test/error_test.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/fibonacci.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/hello_world.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/point.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/Rakefile +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/lib/rust_blank.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/test/bench.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/test/blank_test.rb +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/block.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/embed.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/enumerator.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/exception.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/float.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/into_value.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/numeric.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/object.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/process.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_complex.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_file.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_float.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_match.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_object.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_rational.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_regexp.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_struct.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/range.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/symbol.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/allocate_before_init.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/array_slice.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/block_call.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/bytes.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/call_proc.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/classname.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/clone.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/codepoints.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/debug_exception.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/encoding_capable.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/enumerator.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/enumeratorize.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/float_convert_from_value.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/float_convert_to_value.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/fmt.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/freeze.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/integer_convert_to_value.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/integer_traits.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/ivar.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/lazy_id.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/make_proc.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/proc_new.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/range.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/return_custom_error.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/scan_args.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/str.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/struct.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/symbol.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/try_convert_array.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/tuple_to_array.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_obj.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_subclass.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_subclass_from_ruby.rs +0 -0
- /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/yield.rs +0 -0
- /data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/LICENSE +0 -0
- /data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/init.rs +0 -0
- /data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/LICENSE +0 -0
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
//! Derive and proc macros for magnus.
|
|
2
|
-
//!
|
|
3
|
-
//! ```
|
|
4
|
-
//! #[magnus::wrap(class = "RbPoint", free_immediately, size)]
|
|
5
|
-
//! struct Point {
|
|
6
|
-
//! x: isize,
|
|
7
|
-
//! y: isize,
|
|
8
|
-
//! }
|
|
9
|
-
//!
|
|
10
|
-
//! #[magnus::init]
|
|
11
|
-
//! fn init() -> Result<(), magnus::Error> {
|
|
12
|
-
//! magnus::define_class("RbPoint", magnus::class::object())?;
|
|
13
|
-
//! Ok(())
|
|
14
|
-
//! }
|
|
15
|
-
//! ```
|
|
16
|
-
|
|
17
|
-
#![warn(missing_docs)]
|
|
18
|
-
|
|
19
|
-
use proc_macro::TokenStream;
|
|
20
|
-
use syn::parse_macro_input;
|
|
21
|
-
|
|
22
|
-
mod init;
|
|
23
|
-
mod typed_data;
|
|
24
|
-
mod util;
|
|
25
|
-
|
|
26
|
-
/// Mark a function as the 'init' function to be run for a library when it is
|
|
27
|
-
/// `require`d by Ruby code.
|
|
28
|
-
///
|
|
29
|
-
/// The init function is used to define your Ruby modules & classes, bind
|
|
30
|
-
/// functions as Ruby methods, etc.
|
|
31
|
-
///
|
|
32
|
-
/// # Attributes
|
|
33
|
-
///
|
|
34
|
-
/// * `name = "..."` - sets the name of the init function exported for Ruby.
|
|
35
|
-
/// This default's to the current crate's name. The name will be prepended
|
|
36
|
-
/// with `Init_` and `-` will be replaced with `_`. This (minus the `Init_`
|
|
37
|
-
/// prefix) must match the name of the final `.so`/`.bundle` file.
|
|
38
|
-
///
|
|
39
|
-
/// # Examples
|
|
40
|
-
///
|
|
41
|
-
/// ```
|
|
42
|
-
/// fn distance(a: (f64, f64), b: (f64, f64)) -> f64 {
|
|
43
|
-
/// ((b.0 - a.0).powi(2) + (b.1 - a.1).powi(2)).sqrt()
|
|
44
|
-
/// }
|
|
45
|
-
///
|
|
46
|
-
/// #[magnus::init]
|
|
47
|
-
/// fn init() {
|
|
48
|
-
/// magnus::define_global_function("distance", magnus::function!(distance, 2));
|
|
49
|
-
/// }
|
|
50
|
-
/// ```
|
|
51
|
-
/// The init function can also return `Result<(), magnus::Error>`.
|
|
52
|
-
/// ```
|
|
53
|
-
/// use magnus::{class, define_module, function, method, prelude::*, Error};
|
|
54
|
-
///
|
|
55
|
-
/// #[magnus::wrap(class = "Euclid::Point", free_immediately, size)]
|
|
56
|
-
/// struct Point {
|
|
57
|
-
/// x: isize,
|
|
58
|
-
/// y: isize,
|
|
59
|
-
/// }
|
|
60
|
-
///
|
|
61
|
-
/// impl Point {
|
|
62
|
-
/// fn new(x: isize, y: isize) -> Self {
|
|
63
|
-
/// Self { x, y }
|
|
64
|
-
/// }
|
|
65
|
-
///
|
|
66
|
-
/// fn x(&self) -> isize {
|
|
67
|
-
/// self.x
|
|
68
|
-
/// }
|
|
69
|
-
///
|
|
70
|
-
/// fn y(&self) -> isize {
|
|
71
|
-
/// self.y
|
|
72
|
-
/// }
|
|
73
|
-
/// }
|
|
74
|
-
///
|
|
75
|
-
/// #[magnus::init]
|
|
76
|
-
/// fn init() -> Result<(), Error> {
|
|
77
|
-
/// let module = define_module("Euclid")?;
|
|
78
|
-
/// let class = module.define_class("Point", class::object())?;
|
|
79
|
-
/// class.define_singleton_method("new", function!(Point::new, 2))?;
|
|
80
|
-
/// class.define_method("x", method!(Point::x, 0))?;
|
|
81
|
-
/// class.define_method("y", method!(Point::y, 0))?;
|
|
82
|
-
/// Ok(())
|
|
83
|
-
/// }
|
|
84
|
-
/// ```
|
|
85
|
-
/// Setting the name.
|
|
86
|
-
/// ```
|
|
87
|
-
/// #[magnus::init(name = "example")]
|
|
88
|
-
/// fn init() {
|
|
89
|
-
/// ()
|
|
90
|
-
/// }
|
|
91
|
-
/// ```
|
|
92
|
-
#[proc_macro_attribute]
|
|
93
|
-
pub fn init(attrs: TokenStream, item: TokenStream) -> TokenStream {
|
|
94
|
-
let mut name = None;
|
|
95
|
-
if !attrs.is_empty() {
|
|
96
|
-
let attr_parser = syn::meta::parser(|meta| {
|
|
97
|
-
if meta.path.is_ident("name") {
|
|
98
|
-
name = Some(meta.value()?.parse::<syn::LitStr>()?.value());
|
|
99
|
-
Ok(())
|
|
100
|
-
} else {
|
|
101
|
-
Err(meta.error("unsupported attribute"))
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
parse_macro_input!(attrs with attr_parser);
|
|
105
|
-
}
|
|
106
|
-
match init::expand(name, parse_macro_input!(item)) {
|
|
107
|
-
Ok(tokens) => tokens,
|
|
108
|
-
Err(e) => e.into_compile_error(),
|
|
109
|
-
}
|
|
110
|
-
.into()
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/// Allow a Rust type to be passed to Ruby, automatically wrapped as a Ruby
|
|
114
|
-
/// object.
|
|
115
|
-
///
|
|
116
|
-
/// For more control over the wrapped object, see [`TypedData`].
|
|
117
|
-
///
|
|
118
|
-
/// # Attributes
|
|
119
|
-
///
|
|
120
|
-
/// * `class = "..."` - required, sets the Ruby class to wrap the Rust type.
|
|
121
|
-
/// Supports module paths, e.g. `Foo::Bar::Baz`.
|
|
122
|
-
/// * `name = "..."` - debug name for the type, must be unique. Defaults to the
|
|
123
|
-
/// class name.
|
|
124
|
-
/// * `free_immediately` - Drop the Rust type as soon as the Ruby object has
|
|
125
|
-
/// been garbage collected. This is only safe to set if the type's [`Drop`]
|
|
126
|
-
/// implmentation does not call Ruby.
|
|
127
|
-
/// * `size` - Report the [`std::mem::size_of_val`] of the type to Ruby, used
|
|
128
|
-
/// to aid in deciding when to run the garbage collector.
|
|
129
|
-
/// * `unsafe_generics` - The derived implementation of [`TypedData`] is not
|
|
130
|
-
/// guaranteed to be correct for types with generics. If you are sure it is
|
|
131
|
-
/// for your type this attribute can be used to override the compile time
|
|
132
|
-
/// error usually generated for types with generics.
|
|
133
|
-
///
|
|
134
|
-
/// # Variant Attributes
|
|
135
|
-
///
|
|
136
|
-
/// The `#[magnus(...)]` attribute can be set on enum variants with the
|
|
137
|
-
/// following values:
|
|
138
|
-
///
|
|
139
|
-
/// * `class = "..."` - sets the Ruby class to wrap the variant. Supports
|
|
140
|
-
/// module paths, e.g. `Foo::Bar::Baz`.
|
|
141
|
-
///
|
|
142
|
-
/// # Examples
|
|
143
|
-
///
|
|
144
|
-
/// ```
|
|
145
|
-
/// #[magnus::wrap(class = "RbPoint", free_immediately, size)]
|
|
146
|
-
/// struct Point {
|
|
147
|
-
/// x: isize,
|
|
148
|
-
/// y: isize,
|
|
149
|
-
/// }
|
|
150
|
-
///
|
|
151
|
-
/// // the `Point` struct is automatically wrapped in a Ruby `RbPoint` object
|
|
152
|
-
/// // when returned to Ruby.
|
|
153
|
-
/// fn point(x: isize, y: isize) -> Point {
|
|
154
|
-
/// Point { x, y }
|
|
155
|
-
/// }
|
|
156
|
-
///
|
|
157
|
-
/// // Ruby `RbPoint` objects are automatically unwrapped to references to the
|
|
158
|
-
/// // `Point` structs they are wrapping when this function is called from Ruby.
|
|
159
|
-
/// fn distance(a: &Point, b: &Point) -> f64 {
|
|
160
|
-
/// (((b.x - a.x).pow(2) + (b.y - a.y).pow(2)) as f64).sqrt()
|
|
161
|
-
/// }
|
|
162
|
-
///
|
|
163
|
-
/// #[magnus::init]
|
|
164
|
-
/// fn init() {
|
|
165
|
-
/// magnus::define_global_function("point", magnus::function!(point, 2));
|
|
166
|
-
/// magnus::define_global_function("distance", magnus::function!(distance, 2));
|
|
167
|
-
/// }
|
|
168
|
-
/// ```
|
|
169
|
-
///
|
|
170
|
-
/// With subclasses for enum variants:
|
|
171
|
-
///
|
|
172
|
-
/// ```
|
|
173
|
-
/// use std::f64::consts::PI;
|
|
174
|
-
///
|
|
175
|
-
/// use magnus::{class, define_class, function, method, prelude::*};
|
|
176
|
-
///
|
|
177
|
-
/// #[magnus::wrap(class = "Shape")]
|
|
178
|
-
/// enum Shape {
|
|
179
|
-
/// #[magnus(class = "Circle")]
|
|
180
|
-
/// Circle { r: f64 },
|
|
181
|
-
/// #[magnus(class = "Rectangle")]
|
|
182
|
-
/// Rectangle { x: f64, y: f64 },
|
|
183
|
-
/// }
|
|
184
|
-
///
|
|
185
|
-
/// impl Shape {
|
|
186
|
-
/// fn area(&self) -> f64 {
|
|
187
|
-
/// match self {
|
|
188
|
-
/// Shape::Circle { r } => PI * r * r,
|
|
189
|
-
/// Shape::Rectangle { x, y } => x * y,
|
|
190
|
-
/// }
|
|
191
|
-
/// }
|
|
192
|
-
/// }
|
|
193
|
-
///
|
|
194
|
-
/// #[magnus::init]
|
|
195
|
-
/// fn init() -> Result<(), magnus::Error> {
|
|
196
|
-
/// let shape = define_class("Shape", class::object())?;
|
|
197
|
-
/// shape.define_method("area", method!(Shape::area, 0))?;
|
|
198
|
-
///
|
|
199
|
-
/// let circle = define_class("Circle", shape)?;
|
|
200
|
-
/// circle.define_singleton_method("new", function!(|r| Shape::Circle { r }, 1))?;
|
|
201
|
-
///
|
|
202
|
-
/// let rectangle = define_class("Rectangle", shape)?;
|
|
203
|
-
/// rectangle.define_singleton_method("new", function!(|x, y| Shape::Rectangle { x, y }, 2))?;
|
|
204
|
-
///
|
|
205
|
-
/// Ok(())
|
|
206
|
-
/// }
|
|
207
|
-
/// ```
|
|
208
|
-
#[proc_macro_attribute]
|
|
209
|
-
pub fn wrap(attrs: TokenStream, item: TokenStream) -> TokenStream {
|
|
210
|
-
typed_data::expand(parse_macro_input!(attrs), parse_macro_input!(item)).into()
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/// Derives `DataTypeFunctions` with default implementations, for simple uses
|
|
214
|
-
/// of [`TypedData`].
|
|
215
|
-
///
|
|
216
|
-
/// For cases where no custom `DataTypeFunctions` are required a default
|
|
217
|
-
/// implementation can be derived. The [`macro@wrap`] macro may be a simpler
|
|
218
|
-
/// alternative in this use case.
|
|
219
|
-
#[proc_macro_derive(DataTypeFunctions)]
|
|
220
|
-
pub fn derive_data_type_functions(input: TokenStream) -> TokenStream {
|
|
221
|
-
typed_data::expand_derive_data_type_functions(parse_macro_input!(input)).into()
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/// Derives `TypedData`, allowing the type to be passed to Ruby automatically
|
|
225
|
-
/// wrapped as a Ruby object.
|
|
226
|
-
///
|
|
227
|
-
/// For simple cases, see [`macro@wrap`].
|
|
228
|
-
///
|
|
229
|
-
/// # Attributes
|
|
230
|
-
///
|
|
231
|
-
/// The `#[magnus(...)]` attribute can be set with the following values:
|
|
232
|
-
///
|
|
233
|
-
/// * `class = "..."` - required, sets the Ruby class to wrap the Rust type.
|
|
234
|
-
/// Supports module paths, e.g. `Foo::Bar::Baz`.
|
|
235
|
-
/// * `name = "..."` - debug name for the type, must be unique. Defaults to the
|
|
236
|
-
/// class name.
|
|
237
|
-
/// * `free_immediately` - Drop the Rust type as soon as the Ruby object has
|
|
238
|
-
/// been garbage collected. This is only safe to set if the type's [`Drop`]
|
|
239
|
-
/// and `DataTypeFunctions::free` implementations do not call Ruby.
|
|
240
|
-
/// * `mark` - Enable Ruby calling the `DataTypeFunctions::mark` function.
|
|
241
|
-
/// * `size` - Enable Ruby calling the `DataTypeFunctions::size` function.
|
|
242
|
-
/// * `compact` - Enable Ruby calling the `DataTypeFunctions::compact` function.
|
|
243
|
-
/// * `wb_protected` - Enable the `wb_protected` flag.
|
|
244
|
-
/// * `frozen_shareable` - Enable the `frozen_shareable` flag.
|
|
245
|
-
/// * `unsafe_generics` - The derived implementation of [`TypedData`] is not
|
|
246
|
-
/// guaranteed to be correct for types with generics. If you are sure it is
|
|
247
|
-
/// for your type this attribute can be used to override the compile time
|
|
248
|
-
/// error usually generated for types with generics.
|
|
249
|
-
///
|
|
250
|
-
/// # Field Attributes
|
|
251
|
-
///
|
|
252
|
-
/// The `#[magnus(...)]` attribute can be set on struct fields with the
|
|
253
|
-
/// following values:
|
|
254
|
-
///
|
|
255
|
-
/// * `opaque_attr_reader` - For a Ruby value wrapped in `Opaque`, creates a
|
|
256
|
-
/// accessor method that returns the unwrapped Ruby value.
|
|
257
|
-
///
|
|
258
|
-
/// # Variant Attributes
|
|
259
|
-
///
|
|
260
|
-
/// The `#[magnus(...)]` attribute can be set on enum variants with the
|
|
261
|
-
/// following values:
|
|
262
|
-
///
|
|
263
|
-
/// * `class = "..."` - sets the Ruby class to wrap the variant. Supports
|
|
264
|
-
/// module paths, e.g. `Foo::Bar::Baz`.
|
|
265
|
-
///
|
|
266
|
-
/// # Examples
|
|
267
|
-
///
|
|
268
|
-
/// ```
|
|
269
|
-
/// use magnus::{DataTypeFunctions, TypedData};
|
|
270
|
-
///
|
|
271
|
-
/// #[derive(DataTypeFunctions, TypedData)]
|
|
272
|
-
/// #[magnus(class = "RbPoint", size, free_immediately)]
|
|
273
|
-
/// struct Point {
|
|
274
|
-
/// x: isize,
|
|
275
|
-
/// y: isize,
|
|
276
|
-
/// }
|
|
277
|
-
///
|
|
278
|
-
/// // the `Point` struct is automatically wrapped in a Ruby `RbPoint` object
|
|
279
|
-
/// // when returned to Ruby.
|
|
280
|
-
/// fn point(x: isize, y: isize) -> Point {
|
|
281
|
-
/// Point { x, y }
|
|
282
|
-
/// }
|
|
283
|
-
///
|
|
284
|
-
/// // Ruby `RbPoint` objects are automatically unwrapped to references to the
|
|
285
|
-
/// // `Point` structs they are wrapping when this function is called from Ruby.
|
|
286
|
-
/// fn distance(a: &Point, b: &Point) -> f64 {
|
|
287
|
-
/// (((b.x - a.x).pow(2) + (b.y - a.y).pow(2)) as f64).sqrt()
|
|
288
|
-
/// }
|
|
289
|
-
///
|
|
290
|
-
/// #[magnus::init]
|
|
291
|
-
/// fn init() {
|
|
292
|
-
/// magnus::define_global_function("point", magnus::function!(point, 2));
|
|
293
|
-
/// magnus::define_global_function("distance", magnus::function!(distance, 2));
|
|
294
|
-
/// }
|
|
295
|
-
/// ```
|
|
296
|
-
///
|
|
297
|
-
/// With subclasses for enum variants:
|
|
298
|
-
///
|
|
299
|
-
/// ```
|
|
300
|
-
/// use magnus::{class, define_class};
|
|
301
|
-
///
|
|
302
|
-
/// #[magnus::wrap(class = "Shape")]
|
|
303
|
-
/// enum Shape {
|
|
304
|
-
/// #[magnus(class = "Circle")]
|
|
305
|
-
/// Circle { r: f64 },
|
|
306
|
-
/// #[magnus(class = "Rectangle")]
|
|
307
|
-
/// Rectangle { x: f64, y: f64 },
|
|
308
|
-
/// }
|
|
309
|
-
///
|
|
310
|
-
/// #[magnus::init]
|
|
311
|
-
/// fn init() -> Result<(), magnus::Error> {
|
|
312
|
-
/// let shape = define_class("Shape", class::object())?;
|
|
313
|
-
/// define_class("Circle", shape)?;
|
|
314
|
-
/// define_class("Rectangle", shape)?;
|
|
315
|
-
/// Ok(())
|
|
316
|
-
/// }
|
|
317
|
-
/// ```
|
|
318
|
-
///
|
|
319
|
-
/// Defining a custom `DataType` function:
|
|
320
|
-
///
|
|
321
|
-
/// ```
|
|
322
|
-
/// use std::mem::size_of_val;
|
|
323
|
-
///
|
|
324
|
-
/// use magnus::{DataTypeFunctions, TypedData};
|
|
325
|
-
///
|
|
326
|
-
/// #[derive(TypedData)]
|
|
327
|
-
/// #[magnus(class = "Name", size, free_immediately)]
|
|
328
|
-
/// struct Name {
|
|
329
|
-
/// first: String,
|
|
330
|
-
/// last: String,
|
|
331
|
-
/// }
|
|
332
|
-
///
|
|
333
|
-
/// impl DataTypeFunctions for Name {
|
|
334
|
-
/// fn size(&self) -> usize {
|
|
335
|
-
/// size_of_val(&self.first) + size_of_val(&self.last)
|
|
336
|
-
/// }
|
|
337
|
-
/// }
|
|
338
|
-
/// ```
|
|
339
|
-
///
|
|
340
|
-
/// A struct containing Ruby values.
|
|
341
|
-
///
|
|
342
|
-
/// ```
|
|
343
|
-
/// use magnus::{
|
|
344
|
-
/// class, define_class, function, gc, method, prelude::*, typed_data::Obj, value::Opaque,
|
|
345
|
-
/// DataTypeFunctions, TypedData,
|
|
346
|
-
/// };
|
|
347
|
-
///
|
|
348
|
-
/// # #[magnus::wrap(class = "Point", free_immediately, size)]
|
|
349
|
-
/// # struct Point {
|
|
350
|
-
/// # x: isize,
|
|
351
|
-
/// # y: isize,
|
|
352
|
-
/// # }
|
|
353
|
-
/// #
|
|
354
|
-
/// #[derive(TypedData)]
|
|
355
|
-
/// #[magnus(class = "Line", free_immediately, mark)]
|
|
356
|
-
/// struct Line {
|
|
357
|
-
/// #[magnus(opaque_attr_reader)]
|
|
358
|
-
/// start: Opaque<Obj<Point>>,
|
|
359
|
-
/// #[magnus(opaque_attr_reader)]
|
|
360
|
-
/// end: Opaque<Obj<Point>>,
|
|
361
|
-
/// }
|
|
362
|
-
///
|
|
363
|
-
/// impl Line {
|
|
364
|
-
/// fn new(start: Obj<Point>, end: Obj<Point>) -> Self {
|
|
365
|
-
/// Self {
|
|
366
|
-
/// start: start.into(),
|
|
367
|
-
/// end: end.into(),
|
|
368
|
-
/// }
|
|
369
|
-
/// }
|
|
370
|
-
///
|
|
371
|
-
/// fn length(&self) -> f64 {
|
|
372
|
-
/// let start = self.start();
|
|
373
|
-
/// let end = self.end();
|
|
374
|
-
///
|
|
375
|
-
/// (((end.x - start.x).pow(2) + (end.y - start.y).pow(2)) as f64).sqrt()
|
|
376
|
-
/// }
|
|
377
|
-
/// }
|
|
378
|
-
///
|
|
379
|
-
/// impl DataTypeFunctions for Line {
|
|
380
|
-
/// fn mark(&self, marker: &gc::Marker) {
|
|
381
|
-
/// marker.mark(self.start);
|
|
382
|
-
/// marker.mark(self.end);
|
|
383
|
-
/// }
|
|
384
|
-
/// }
|
|
385
|
-
///
|
|
386
|
-
/// #[magnus::init]
|
|
387
|
-
/// fn init() -> Result<(), magnus::Error> {
|
|
388
|
-
/// let line = define_class("Line", class::object())?;
|
|
389
|
-
/// line.define_singleton_method("new", function!(Line::new, 2))?;
|
|
390
|
-
/// line.define_method("length", method!(Line::length, 0))?;
|
|
391
|
-
/// Ok(())
|
|
392
|
-
/// }
|
|
393
|
-
/// ```
|
|
394
|
-
#[proc_macro_derive(TypedData, attributes(magnus))]
|
|
395
|
-
pub fn derive_typed_data(input: TokenStream) -> TokenStream {
|
|
396
|
-
match typed_data::expand_derive_typed_data(parse_macro_input!(input)) {
|
|
397
|
-
Ok(tokens) => tokens,
|
|
398
|
-
Err(e) => e.into_compile_error(),
|
|
399
|
-
}
|
|
400
|
-
.into()
|
|
401
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"files":{".cargo_vcs_info.json":"cf06c4a96aae0de375f117e11656fc0abc043dd9ef8c5deb469ba16a02af8f4c","Cargo.toml":"0bdf8da530dfbb9ec2a957ca0b22fced1568aa2612be36bfd58574eb1b92bbb8","Cargo.toml.orig":"186ef4dee766f74315845d068abbfe2151c18f9c11830479726260c98a5c82b5","LICENSE-APACHE":"110a4b771805962e964448aed69e868cc3e9aec91e89c88b8598f8bd726d1d6a","LICENSE-MIT":"3edf6db4f22b0da400397c3ffe917b3330f6cff051753ba02de9b40b4b8ccb24","readme.md":"f9528fc30c1d746ca1b60a63702fc0abb8c2c8a4873d83105f3fc97b93050f9f","src/defines.rs":"d49000cd06fcea16e5fd4439655de67d96b46302f802dd8421c52e9d40ad0d3e","src/lib.rs":"3b14f905373add7eadd90ead5a71fa8360fbbabeb91eaa217a9a06576488e799","src/rb_env.rs":"7f7eb195ae9ea81c57830365d209fa8dd2549aa614425a7c320a1ef0c84a1944","src/ruby_version.rs":"ac3b58d9f377c530d9617cc83ac49ea7deece9184def1f188d1dc7f981ca8d1a","src/utils.rs":"7728e7245f1223051025a6cc95f7a43fb87af887c91a174ea8e6a8598475d9ef"},"package":"a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
|
2
|
-
#
|
|
3
|
-
# When uploading crates to the registry Cargo will automatically
|
|
4
|
-
# "normalize" Cargo.toml files for maximal compatibility
|
|
5
|
-
# with all versions of Cargo and also rewrite `path` dependencies
|
|
6
|
-
# to registry (e.g., crates.io) dependencies.
|
|
7
|
-
#
|
|
8
|
-
# If you are reading this file be aware that the original Cargo.toml
|
|
9
|
-
# will likely look very different (and much more reasonable).
|
|
10
|
-
# See Cargo.toml.orig for the original contents.
|
|
11
|
-
|
|
12
|
-
[package]
|
|
13
|
-
edition = "2018"
|
|
14
|
-
rust-version = "1.51"
|
|
15
|
-
name = "rb-sys-env"
|
|
16
|
-
version = "0.1.2"
|
|
17
|
-
description = "Integrates rb-sys into high level frameworks"
|
|
18
|
-
homepage = "https://github.com/oxidize-rb/rb-sys"
|
|
19
|
-
readme = "readme.md"
|
|
20
|
-
license = "MIT OR Apache-2.0"
|
|
21
|
-
repository = "https://github.com/oxidize-rb/rb-sys"
|
|
22
|
-
|
|
23
|
-
[lib]
|
|
24
|
-
doctest = false
|
|
25
|
-
bench = false
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[package]
|
|
2
|
-
name = "rb-sys-env"
|
|
3
|
-
version = "0.1.2"
|
|
4
|
-
edition = "2018"
|
|
5
|
-
description = "Integrates rb-sys into high level frameworks"
|
|
6
|
-
homepage = "https://github.com/oxidize-rb/rb-sys"
|
|
7
|
-
license = "MIT OR Apache-2.0"
|
|
8
|
-
repository = "https://github.com/oxidize-rb/rb-sys"
|
|
9
|
-
readme = "readme.md"
|
|
10
|
-
rust-version = "1.51"
|
|
11
|
-
|
|
12
|
-
[lib]
|
|
13
|
-
bench = false
|
|
14
|
-
doctest = false
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
Copyright 2021-2022 Ian Ker-Seymer
|
|
179
|
-
|
|
180
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
-
you may not use this file except in compliance with the License.
|
|
182
|
-
You may obtain a copy of the License at
|
|
183
|
-
|
|
184
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
-
|
|
186
|
-
Unless required by applicable law or agreed to in writing, software
|
|
187
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
-
See the License for the specific language governing permissions and
|
|
190
|
-
limitations under the License.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021-2022 Ian Ker-Seymer
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|