├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ ├── docs.yml │ ├── feature-request.yml │ └── question-support.yml ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yaml └── workflows │ ├── auto-assign-author.yaml │ ├── codeql.yaml │ ├── release.yaml │ ├── stale.yaml │ └── test.yaml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── EMERITUS.md ├── Gemfile ├── LICENSE.md ├── README.md ├── Rakefile ├── SECURITY.md ├── bin └── console ├── blueprinter.gemspec ├── blueprinter_logo.svg ├── lib ├── blueprinter.rb ├── blueprinter │ ├── association.rb │ ├── base.rb │ ├── blueprint_validator.rb │ ├── blueprinter_error.rb │ ├── configuration.rb │ ├── deprecation.rb │ ├── empty_types.rb │ ├── errors.rb │ ├── errors │ │ ├── invalid_blueprint.rb │ │ ├── invalid_root.rb │ │ └── meta_requires_root.rb │ ├── extension.rb │ ├── extensions.rb │ ├── extractor.rb │ ├── extractors │ │ ├── association_extractor.rb │ │ ├── auto_extractor.rb │ │ ├── block_extractor.rb │ │ ├── hash_extractor.rb │ │ └── public_send_extractor.rb │ ├── field.rb │ ├── formatters │ │ └── date_time_formatter.rb │ ├── helpers │ │ └── type_helpers.rb │ ├── reflection.rb │ ├── rendering.rb │ ├── transformer.rb │ ├── version.rb │ ├── view.rb │ └── view_collection.rb └── generators │ └── blueprinter │ ├── blueprint_generator.rb │ └── templates │ └── blueprint.erb └── spec ├── activerecord_helper.rb ├── benchmark_helper.rb ├── benchmarks ├── active_record_big_o_test.rb ├── active_record_ips_test.rb ├── big_o_test.rb └── ips_test.rb ├── factories └── model_factories.rb ├── generator_helper.rb ├── generators ├── blueprint_generator_spec.rb └── shared.rb ├── integrations ├── base_spec.rb └── shared │ └── base_render_examples.rb ├── spec_helper.rb ├── support └── mock_field.rb └── units ├── association_spec.rb ├── blueprint_validator_spec.rb ├── configuration_spec.rb ├── date_time_formatter_spec.rb ├── deprecation_spec.rb ├── extensions_spec.rb ├── reflection_spec.rb ├── view_collection_spec.rb └── view_spec.rb /.github/CODEOWNERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/CODEOWNERS -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/ISSUE_TEMPLATE/bug.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/docs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/ISSUE_TEMPLATE/docs.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/ISSUE_TEMPLATE/feature-request.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question-support.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/ISSUE_TEMPLATE/question-support.yml -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/PULL_REQUEST_TEMPLATE.md -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/dependabot.yaml -------------------------------------------------------------------------------- /.github/workflows/auto-assign-author.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/workflows/auto-assign-author.yaml -------------------------------------------------------------------------------- /.github/workflows/codeql.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/workflows/codeql.yaml -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/workflows/release.yaml -------------------------------------------------------------------------------- /.github/workflows/stale.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/workflows/stale.yaml -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.github/workflows/test.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.gitignore -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | --format documentation 3 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/.rubocop.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /EMERITUS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/EMERITUS.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/Gemfile -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/Rakefile -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/SECURITY.md -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/bin/console -------------------------------------------------------------------------------- /blueprinter.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/blueprinter.gemspec -------------------------------------------------------------------------------- /blueprinter_logo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/blueprinter_logo.svg -------------------------------------------------------------------------------- /lib/blueprinter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter.rb -------------------------------------------------------------------------------- /lib/blueprinter/association.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/association.rb -------------------------------------------------------------------------------- /lib/blueprinter/base.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/base.rb -------------------------------------------------------------------------------- /lib/blueprinter/blueprint_validator.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/blueprint_validator.rb -------------------------------------------------------------------------------- /lib/blueprinter/blueprinter_error.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/blueprinter_error.rb -------------------------------------------------------------------------------- /lib/blueprinter/configuration.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/configuration.rb -------------------------------------------------------------------------------- /lib/blueprinter/deprecation.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/deprecation.rb -------------------------------------------------------------------------------- /lib/blueprinter/empty_types.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/empty_types.rb -------------------------------------------------------------------------------- /lib/blueprinter/errors.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/errors.rb -------------------------------------------------------------------------------- /lib/blueprinter/errors/invalid_blueprint.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/errors/invalid_blueprint.rb -------------------------------------------------------------------------------- /lib/blueprinter/errors/invalid_root.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/errors/invalid_root.rb -------------------------------------------------------------------------------- /lib/blueprinter/errors/meta_requires_root.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/errors/meta_requires_root.rb -------------------------------------------------------------------------------- /lib/blueprinter/extension.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extension.rb -------------------------------------------------------------------------------- /lib/blueprinter/extensions.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extensions.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractors/association_extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractors/association_extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractors/auto_extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractors/auto_extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractors/block_extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractors/block_extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractors/hash_extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractors/hash_extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/extractors/public_send_extractor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/extractors/public_send_extractor.rb -------------------------------------------------------------------------------- /lib/blueprinter/field.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/field.rb -------------------------------------------------------------------------------- /lib/blueprinter/formatters/date_time_formatter.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/formatters/date_time_formatter.rb -------------------------------------------------------------------------------- /lib/blueprinter/helpers/type_helpers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/helpers/type_helpers.rb -------------------------------------------------------------------------------- /lib/blueprinter/reflection.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/reflection.rb -------------------------------------------------------------------------------- /lib/blueprinter/rendering.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/rendering.rb -------------------------------------------------------------------------------- /lib/blueprinter/transformer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/transformer.rb -------------------------------------------------------------------------------- /lib/blueprinter/version.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/version.rb -------------------------------------------------------------------------------- /lib/blueprinter/view.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/view.rb -------------------------------------------------------------------------------- /lib/blueprinter/view_collection.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/blueprinter/view_collection.rb -------------------------------------------------------------------------------- /lib/generators/blueprinter/blueprint_generator.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/generators/blueprinter/blueprint_generator.rb -------------------------------------------------------------------------------- /lib/generators/blueprinter/templates/blueprint.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/lib/generators/blueprinter/templates/blueprint.erb -------------------------------------------------------------------------------- /spec/activerecord_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/activerecord_helper.rb -------------------------------------------------------------------------------- /spec/benchmark_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/benchmark_helper.rb -------------------------------------------------------------------------------- /spec/benchmarks/active_record_big_o_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/benchmarks/active_record_big_o_test.rb -------------------------------------------------------------------------------- /spec/benchmarks/active_record_ips_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/benchmarks/active_record_ips_test.rb -------------------------------------------------------------------------------- /spec/benchmarks/big_o_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/benchmarks/big_o_test.rb -------------------------------------------------------------------------------- /spec/benchmarks/ips_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/benchmarks/ips_test.rb -------------------------------------------------------------------------------- /spec/factories/model_factories.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/factories/model_factories.rb -------------------------------------------------------------------------------- /spec/generator_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/generator_helper.rb -------------------------------------------------------------------------------- /spec/generators/blueprint_generator_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/generators/blueprint_generator_spec.rb -------------------------------------------------------------------------------- /spec/generators/shared.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/generators/shared.rb -------------------------------------------------------------------------------- /spec/integrations/base_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/integrations/base_spec.rb -------------------------------------------------------------------------------- /spec/integrations/shared/base_render_examples.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/integrations/shared/base_render_examples.rb -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/spec_helper.rb -------------------------------------------------------------------------------- /spec/support/mock_field.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/support/mock_field.rb -------------------------------------------------------------------------------- /spec/units/association_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/association_spec.rb -------------------------------------------------------------------------------- /spec/units/blueprint_validator_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/blueprint_validator_spec.rb -------------------------------------------------------------------------------- /spec/units/configuration_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/configuration_spec.rb -------------------------------------------------------------------------------- /spec/units/date_time_formatter_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/date_time_formatter_spec.rb -------------------------------------------------------------------------------- /spec/units/deprecation_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/deprecation_spec.rb -------------------------------------------------------------------------------- /spec/units/extensions_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/extensions_spec.rb -------------------------------------------------------------------------------- /spec/units/reflection_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/reflection_spec.rb -------------------------------------------------------------------------------- /spec/units/view_collection_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/view_collection_spec.rb -------------------------------------------------------------------------------- /spec/units/view_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/procore-oss/blueprinter/HEAD/spec/units/view_spec.rb --------------------------------------------------------------------------------