clickwrap 0.0.0 → 0.1.0
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/.rubocop.yml +90 -0
- data/CHANGELOG.md +612 -0
- data/README.md +830 -1204
- data/SECURITY.md +33 -0
- data/app/assets/stylesheets/clickwrap.css +241 -0
- data/app/controllers/clickwrap/application_controller.rb +79 -0
- data/app/controllers/clickwrap/captures_controller.rb +145 -0
- data/app/controllers/clickwrap/document_versions_controller.rb +71 -0
- data/app/controllers/clickwrap/receipts_controller.rb +115 -0
- data/app/controllers/clickwrap/withdrawals_controller.rb +60 -0
- data/app/helpers/clickwrap/engine_helper.rb +97 -0
- data/app/views/clickwrap/captures/show.html.erb +34 -0
- data/app/views/clickwrap/receipts/index.html.erb +38 -0
- data/app/views/clickwrap/receipts/show.html.erb +91 -0
- data/app/views/clickwrap/shared/_error_summary.html.erb +39 -0
- data/app/views/clickwrap/shared/_fields.html.erb +100 -0
- data/app/views/clickwrap/shared/_statement.html.erb +105 -0
- data/app/views/clickwrap/withdrawals/new.html.erb +30 -0
- data/config/locales/en.yml +160 -0
- data/config/locales/es.yml +138 -0
- data/config/routes.rb +41 -0
- data/exe/clickwrap +374 -0
- data/guides/README.md +30 -0
- data/guides/accessibility.md +249 -0
- data/guides/consent-and-lifecycle.md +299 -0
- data/guides/integrating.md +610 -0
- data/guides/integrity.md +212 -0
- data/guides/migrating.md +335 -0
- data/guides/naming.md +320 -0
- data/guides/organizations.md +320 -0
- data/guides/receipts-and-verification.md +415 -0
- data/guides/request-evidence.md +512 -0
- data/guides/retention-and-legal-holds.md +438 -0
- data/lib/clickwrap/actor_proxy.rb +147 -0
- data/lib/clickwrap/anonymous_actor.rb +47 -0
- data/lib/clickwrap/authority.rb +174 -0
- data/lib/clickwrap/canonical_json.rb +216 -0
- data/lib/clickwrap/capture/event_builder.rb +220 -0
- data/lib/clickwrap/capture/presentation_verifier.rb +521 -0
- data/lib/clickwrap/capture.rb +650 -0
- data/lib/clickwrap/configuration.rb +1129 -0
- data/lib/clickwrap/controller_helpers.rb +758 -0
- data/lib/clickwrap/current_state.rb +282 -0
- data/lib/clickwrap/digest.rb +125 -0
- data/lib/clickwrap/doctor.rb +418 -0
- data/lib/clickwrap/document_definition.rb +255 -0
- data/lib/clickwrap/document_renderer.rb +83 -0
- data/lib/clickwrap/document_renderers/markdown.rb +175 -0
- data/lib/clickwrap/document_renderers/markdown_rails.rb +126 -0
- data/lib/clickwrap/dsl/policy_builder.rb +462 -0
- data/lib/clickwrap/dsl/retention_builder.rb +89 -0
- data/lib/clickwrap/durable_commit_callback.rb +37 -0
- data/lib/clickwrap/engine.rb +184 -0
- data/lib/clickwrap/errors.rb +181 -0
- data/lib/clickwrap/form_builder_extensions.rb +341 -0
- data/lib/clickwrap/front_matter.rb +67 -0
- data/lib/clickwrap/identifier.rb +112 -0
- data/lib/clickwrap/import/external_receipt.rb +241 -0
- data/lib/clickwrap/import/fine_print.rb +290 -0
- data/lib/clickwrap/import/legacy.rb +450 -0
- data/lib/clickwrap/integrations/organizations_authority.rb +81 -0
- data/lib/clickwrap/integrity/anchor.rb +130 -0
- data/lib/clickwrap/integrity/attestation_reconciler.rb +114 -0
- data/lib/clickwrap/integrity/attestor.rb +221 -0
- data/lib/clickwrap/integrity/chain.rb +313 -0
- data/lib/clickwrap/integrity/timestamp.rb +143 -0
- data/lib/clickwrap/ip_geolocation/location.rb +112 -0
- data/lib/clickwrap/ip_geolocation/null_resolver.rb +35 -0
- data/lib/clickwrap/ip_geolocation/resolver.rb +97 -0
- data/lib/clickwrap/ip_geolocation/static_resolver.rb +107 -0
- data/lib/clickwrap/ip_geolocation/trackdown_resolver.rb +330 -0
- data/lib/clickwrap/ip_geolocation.rb +16 -0
- data/lib/clickwrap/lifecycle.rb +534 -0
- data/lib/clickwrap/linter.rb +382 -0
- data/lib/clickwrap/localized_text.rb +101 -0
- data/lib/clickwrap/macros.rb +203 -0
- data/lib/clickwrap/models/application_record.rb +20 -0
- data/lib/clickwrap/models/chain_head.rb +79 -0
- data/lib/clickwrap/models/concerns/has_clickwraps.rb +55 -0
- data/lib/clickwrap/models/disposition_plan.rb +208 -0
- data/lib/clickwrap/models/document.rb +46 -0
- data/lib/clickwrap/models/document_version.rb +163 -0
- data/lib/clickwrap/models/event.rb +743 -0
- data/lib/clickwrap/models/event_document.rb +79 -0
- data/lib/clickwrap/models/event_statement.rb +92 -0
- data/lib/clickwrap/models/external_action.rb +150 -0
- data/lib/clickwrap/models/integrity_attestation.rb +90 -0
- data/lib/clickwrap/models/legal_hold.rb +81 -0
- data/lib/clickwrap/models/policy_revision.rb +115 -0
- data/lib/clickwrap/models/presentation.rb +59 -0
- data/lib/clickwrap/models/receipt_access.rb +53 -0
- data/lib/clickwrap/models/recording_sequence.rb +21 -0
- data/lib/clickwrap/models/request_evidence.rb +378 -0
- data/lib/clickwrap/models/statement_identity_lock.rb +38 -0
- data/lib/clickwrap/models/statement_state.rb +130 -0
- data/lib/clickwrap/pending_receipt.rb +177 -0
- data/lib/clickwrap/policy.rb +283 -0
- data/lib/clickwrap/presentation_manifest.rb +210 -0
- data/lib/clickwrap/presenter.rb +716 -0
- data/lib/clickwrap/privacy.rb +419 -0
- data/lib/clickwrap/protected_outcome.rb +120 -0
- data/lib/clickwrap/receipt.rb +606 -0
- data/lib/clickwrap/receipt_html.rb +235 -0
- data/lib/clickwrap/receipt_verifier.rb +978 -0
- data/lib/clickwrap/reference.rb +44 -0
- data/lib/clickwrap/registration.rb +236 -0
- data/lib/clickwrap/registry.rb +54 -0
- data/lib/clickwrap/remediation_token.rb +155 -0
- data/lib/clickwrap/request_evidence_extractor.rb +590 -0
- data/lib/clickwrap/request_evidence_policy.rb +261 -0
- data/lib/clickwrap/retention/applier.rb +231 -0
- data/lib/clickwrap/retention/disposition.rb +221 -0
- data/lib/clickwrap/retention/planner.rb +502 -0
- data/lib/clickwrap/retention_class.rb +97 -0
- data/lib/clickwrap/reviewed_text.rb +28 -0
- data/lib/clickwrap/schema_requirements.rb +196 -0
- data/lib/clickwrap/services/authorize_external_action.rb +149 -0
- data/lib/clickwrap/services/load_policies.rb +69 -0
- data/lib/clickwrap/services/publish_documents.rb +251 -0
- data/lib/clickwrap/services/validate_policy_references.rb +166 -0
- data/lib/clickwrap/statement.rb +248 -0
- data/lib/clickwrap/subject_fingerprint.rb +28 -0
- data/lib/clickwrap/submission.rb +169 -0
- data/lib/clickwrap/system_actor.rb +31 -0
- data/lib/clickwrap/test_helpers.rb +676 -0
- data/lib/clickwrap/testing.rb +211 -0
- data/lib/clickwrap/trusted_proxy_configuration.rb +92 -0
- data/lib/clickwrap/verification.rb +504 -0
- data/lib/clickwrap/version.rb +12 -1
- data/lib/clickwrap/view_helpers.rb +190 -0
- data/lib/clickwrap/vocabulary.rb +294 -0
- data/lib/clickwrap.rb +497 -7
- data/lib/generators/clickwrap/document_generator.rb +164 -0
- data/lib/generators/clickwrap/hardening_generator.rb +177 -0
- data/lib/generators/clickwrap/install_generator.rb +1287 -0
- data/lib/generators/clickwrap/link_generator.rb +56 -0
- data/lib/generators/clickwrap/policy_generator.rb +118 -0
- data/lib/generators/clickwrap/templates/clickwrap_hardening.rb.erb +256 -0
- data/lib/generators/clickwrap/templates/clickwrap_policies.rb.erb +192 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_external_action_tables.rb.erb +128 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_integrity_tables.rb.erb +157 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_presentation_tables.rb.erb +160 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_request_evidence_tables.rb.erb +180 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_retention_tables.rb.erb +174 -0
- data/lib/generators/clickwrap/templates/create_clickwrap_tables.rb.erb +568 -0
- data/lib/generators/clickwrap/templates/initializer.rb.erb +439 -0
- data/lib/generators/clickwrap/templates/link_clickwrap_event_migration.rb.erb +12 -0
- data/lib/generators/clickwrap/templates/policy.rb.erb +31 -0
- data/lib/generators/clickwrap/templates/policy_test.rb.erb +56 -0
- data/lib/generators/clickwrap/templates/privacy.md.erb +58 -0
- data/lib/generators/clickwrap/templates/terms.md.erb +49 -0
- data/lib/generators/clickwrap/upgrade_generator.rb +50 -0
- data/lib/generators/clickwrap/views_generator.rb +101 -0
- data/lib/tasks/clickwrap.rake +569 -0
- metadata +311 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98648fe84ac49eb6e6f0aa31206529051b15a13317c28ea8405d1b78f49b6668
|
|
4
|
+
data.tar.gz: f3dd9f393dcd3b0ced96de1fa320608e631962c8531edd2365110d7825c88d85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d5ccebc49daf312d199a0d0eede813f80966dadb04654ea49345d408b4708b520208e3dd5018dba99eacb815c93ac735fd562691f5a0ddbb88acb725ea86221
|
|
7
|
+
data.tar.gz: dcdcd70b597f09f91ccf43efed3f7ebd55e1389275e9701598e015e47a759089ed8003933e17c56fbe643cbcf26df69399eca1472c3be9ba06585e3f2ffdaddc
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# MERGE our excludes with rubocop's defaults (vendor/, node_modules/, …) —
|
|
2
|
+
# a bare Exclude key would REPLACE them.
|
|
3
|
+
inherit_mode:
|
|
4
|
+
merge:
|
|
5
|
+
- Exclude
|
|
6
|
+
|
|
7
|
+
AllCops:
|
|
8
|
+
TargetRubyVersion: 3.2
|
|
9
|
+
NewCops: enable
|
|
10
|
+
SuggestExtensions: false
|
|
11
|
+
Exclude:
|
|
12
|
+
# The dummy host app mirrors what a real application looks like, including
|
|
13
|
+
# migrations copied verbatim from the install generator's templates —
|
|
14
|
+
# don't lint a generated-code mirror against the gem's own style.
|
|
15
|
+
- test/dummy/**/*
|
|
16
|
+
# Generator templates are emitted into HOST apps (host style, and some
|
|
17
|
+
# carry ERB tags rubocop can't parse as Ruby).
|
|
18
|
+
- lib/generators/clickwrap/templates/**/*
|
|
19
|
+
# Appraisal-generated Gemfiles.
|
|
20
|
+
- gemfiles/*
|
|
21
|
+
|
|
22
|
+
Style/StringLiterals:
|
|
23
|
+
EnforcedStyle: double_quotes
|
|
24
|
+
|
|
25
|
+
Style/StringLiteralsInInterpolation:
|
|
26
|
+
EnforcedStyle: double_quotes
|
|
27
|
+
|
|
28
|
+
# Hard size metrics fight readable, well-commented domain code and thorough
|
|
29
|
+
# test classes; we optimize for the latter. A policy compiler that explains
|
|
30
|
+
# every refusal in a full sentence is longer than one that raises "invalid",
|
|
31
|
+
# and the long version is the product.
|
|
32
|
+
Metrics:
|
|
33
|
+
Enabled: false
|
|
34
|
+
|
|
35
|
+
# Evidence code carries short, standard names for the things it records.
|
|
36
|
+
Naming/MethodParameterName:
|
|
37
|
+
AllowedNames: [at, by, id, ip, to, ua, key]
|
|
38
|
+
|
|
39
|
+
# `has_clickwraps` is the macro and the product — it matches the ecosystem
|
|
40
|
+
# grammar (has_sessions, has_credits, has_api_keys), not a predicate.
|
|
41
|
+
Naming/PredicatePrefix:
|
|
42
|
+
AllowedMethods: [has_clickwraps, has_clickwrap_evidence]
|
|
43
|
+
|
|
44
|
+
# Receipt and verification predicates read as questions about a recorded fact:
|
|
45
|
+
# `recorded_ip_address?`, `ip_geolocation_was_estimated?`,
|
|
46
|
+
# `browser_user_agent_was_client_supplied?`. Renaming them to satisfy a
|
|
47
|
+
# prefix cop would break the plain-English naming contract these methods exist
|
|
48
|
+
# to honor.
|
|
49
|
+
Naming/PredicateMethod:
|
|
50
|
+
Enabled: false
|
|
51
|
+
|
|
52
|
+
# %{policy} / %{document} are I18n interpolation tokens — annotated tokens
|
|
53
|
+
# aren't a thing in I18n templates.
|
|
54
|
+
Style/FormatStringToken:
|
|
55
|
+
EnforcedStyle: template
|
|
56
|
+
|
|
57
|
+
# Adapter contracts (IP geolocation resolvers, anchors, timestamp providers)
|
|
58
|
+
# fix keyword names even where a no-op implementation ignores them. The names
|
|
59
|
+
# ARE the documented interface.
|
|
60
|
+
Lint/UnusedMethodArgument:
|
|
61
|
+
AllowUnusedKeywordArguments: true
|
|
62
|
+
|
|
63
|
+
Lint/UnusedBlockArgument:
|
|
64
|
+
AllowUnusedKeywordArguments: true
|
|
65
|
+
|
|
66
|
+
# The codebase consistently names a rescued exception `error` — it reads as a
|
|
67
|
+
# noun in the sentences these rescue blocks are written as.
|
|
68
|
+
Naming/RescuedExceptionsVariableName:
|
|
69
|
+
PreferredName: error
|
|
70
|
+
|
|
71
|
+
# Configuration's readers are grouped by section, matching the order and shape
|
|
72
|
+
# of the generated initializer — which is the main thing a host ever reads
|
|
73
|
+
# about this gem. Collapsing them into one declaration produces a single
|
|
74
|
+
# thousand-character line and loses that structure entirely.
|
|
75
|
+
Style/AccessorGrouping:
|
|
76
|
+
Exclude:
|
|
77
|
+
- lib/clickwrap/configuration.rb
|
|
78
|
+
|
|
79
|
+
# `->(http_request) { http_request.remote_ip }` keeps the parameter name, and
|
|
80
|
+
# the parameter name is the point: the naming contract says `http_request`, not
|
|
81
|
+
# a bare `&:remote_ip` whose receiver is anybody's guess when a host overrides
|
|
82
|
+
# the reader.
|
|
83
|
+
Style/SymbolProc:
|
|
84
|
+
Exclude:
|
|
85
|
+
- lib/clickwrap/configuration.rb
|
|
86
|
+
|
|
87
|
+
Layout/LineLength:
|
|
88
|
+
Max: 120
|
|
89
|
+
Exclude:
|
|
90
|
+
- clickwrap.gemspec # the long-form rubygems description is one line by design
|