├── .circleci
└── config.yml
├── .codeclimate.yml
├── .gitignore
├── .rubocop.yml
├── .rubocop_shared.yml
├── .ruby-version
├── .tool-versions
├── Gemfile
├── Gemfile.lock
├── KIT_VERSION
├── LICENSE.txt
├── MIT_LICENSE.md
├── README.md
├── Rakefile
├── apps
└── app-container
│ ├── .gitignore
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ ├── assets
│ │ ├── config
│ │ │ └── manifest.js
│ │ ├── images
│ │ │ └── .keep
│ │ └── stylesheets
│ │ │ └── application.css
│ ├── controllers
│ │ ├── application_controller.rb
│ │ └── concerns
│ │ │ └── .keep
│ ├── models
│ │ └── concerns
│ │ │ └── .keep
│ └── views
│ │ └── layouts
│ │ └── application.html.erb
│ ├── bin
│ ├── bundle
│ ├── rails
│ ├── rake
│ ├── setup
│ ├── update
│ └── yarn
│ ├── config.ru
│ ├── config
│ ├── application.rb
│ ├── boot.rb
│ ├── credentials.yml.enc
│ ├── environment.rb
│ ├── environments
│ │ ├── development.rb
│ │ ├── production.rb
│ │ └── test.rb
│ ├── initializers
│ │ ├── application_controller_renderer.rb
│ │ ├── backtrace_silencers.rb
│ │ ├── content_security_policy.rb
│ │ ├── cookies_serializer.rb
│ │ ├── filter_parameter_logging.rb
│ │ ├── inflections.rb
│ │ ├── mime_types.rb
│ │ └── wrap_parameters.rb
│ ├── locales
│ │ └── en.yml
│ ├── puma.rb
│ └── routes.rb
│ ├── package.json
│ ├── public
│ ├── 404.html
│ ├── 422.html
│ ├── 500.html
│ ├── apple-touch-icon-precomposed.png
│ ├── apple-touch-icon.png
│ ├── favicon.ico
│ └── robots.txt
│ └── vendor
│ └── .keep
├── docs
├── CNAME
├── VERSIONS
├── assets
│ └── images
│ │ ├── export_svg.txt
│ │ ├── rubykit-framework-logo.png
│ │ └── rubykit-framework-logo.svg
└── guides
│ ├── architecture
│ ├── databases.md
│ └── directory_structure.md
│ ├── braindumps
│ ├── kit_auth.md
│ └── kit_notification.md
│ ├── introduction
│ ├── installation.md
│ └── overview.md
│ ├── kit_development
│ ├── documentation_setup.md
│ ├── dummy_app_setup.md
│ └── rubocop_setup.md
│ └── various
│ ├── api.md
│ ├── profiling.md
│ └── ui.md
├── domains
├── kit-auth
│ ├── .env.template
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── actions
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── actions
│ │ │ │ ├── access_tokens
│ │ │ │ ├── create.rb
│ │ │ │ ├── create_for_email_confirmation.rb
│ │ │ │ ├── create_for_magic_link.rb
│ │ │ │ ├── create_for_password_reset.rb
│ │ │ │ ├── create_for_sign_in.rb
│ │ │ │ └── link_request_metadata.rb
│ │ │ │ ├── applications
│ │ │ │ ├── load_api.rb
│ │ │ │ └── load_web.rb
│ │ │ │ ├── oauth
│ │ │ │ ├── link_identity.rb
│ │ │ │ └── unlink_identity.rb
│ │ │ │ ├── request_metadata
│ │ │ │ └── create.rb
│ │ │ │ └── users
│ │ │ │ ├── confirm_email.rb
│ │ │ │ ├── create_with_password.rb
│ │ │ │ ├── create_without_password.rb
│ │ │ │ ├── ensure_active_token.rb
│ │ │ │ ├── identify_user.rb
│ │ │ │ ├── identify_user_for_conn.rb
│ │ │ │ ├── request_password_reset.rb
│ │ │ │ ├── request_sign_in_link.rb
│ │ │ │ ├── revoke_access_token.rb
│ │ │ │ ├── sign_in_api.rb
│ │ │ │ ├── sign_in_web.rb
│ │ │ │ ├── sign_out_web.rb
│ │ │ │ ├── update_password.rb
│ │ │ │ └── verify_password.rb
│ │ ├── admin
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ ├── admin.rb
│ │ │ │ └── admin
│ │ │ │ ├── attributes
│ │ │ │ ├── application.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ ├── user.rb
│ │ │ │ ├── user_oauth_identity.rb
│ │ │ │ ├── user_oauth_secret.rb
│ │ │ │ └── user_secret.rb
│ │ │ │ └── resources
│ │ │ │ ├── application.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ ├── user.rb
│ │ │ │ ├── user_oauth_identity.rb
│ │ │ │ ├── user_oauth_secret.rb
│ │ │ │ └── user_secret.rb
│ │ ├── assets
│ │ │ ├── config
│ │ │ │ └── kit_auth_manifest.js
│ │ │ ├── images
│ │ │ │ └── kit
│ │ │ │ │ └── auth
│ │ │ │ │ └── .keep
│ │ │ ├── javascripts
│ │ │ │ └── kit
│ │ │ │ │ └── auth
│ │ │ │ │ ├── application.js
│ │ │ │ │ └── components.js
│ │ │ └── stylesheets
│ │ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── application.scss
│ │ ├── components
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── components
│ │ │ │ ├── component.rb
│ │ │ │ ├── emails
│ │ │ │ ├── email_component.rb
│ │ │ │ └── users
│ │ │ │ │ ├── email_confirmation_component.html.liquid
│ │ │ │ │ ├── email_confirmation_component.rb
│ │ │ │ │ ├── password_reset_link_component.html.liquid
│ │ │ │ │ ├── password_reset_link_component.rb
│ │ │ │ │ ├── sign_in_link_component.html.liquid
│ │ │ │ │ ├── sign_in_link_component.rb
│ │ │ │ │ ├── sign_up_comonent.html.liquid
│ │ │ │ │ └── sign_up_component.rb
│ │ │ │ ├── forms
│ │ │ │ ├── magic_link_component.html.slim
│ │ │ │ ├── magic_link_component.rb
│ │ │ │ ├── password_reset_component.html.slim
│ │ │ │ ├── password_reset_component.rb
│ │ │ │ ├── password_reset_component.scss
│ │ │ │ ├── password_reset_request_component.html.slim
│ │ │ │ ├── password_reset_request_component.rb
│ │ │ │ ├── password_reset_request_component.scss
│ │ │ │ ├── sign_in_social_buttons_component.rb
│ │ │ │ ├── sign_up_social_buttons_component.rb
│ │ │ │ ├── signin_form_component.html.slim
│ │ │ │ ├── signin_form_component.rb
│ │ │ │ ├── signin_form_component.scss
│ │ │ │ ├── signup_form_component.html.slim
│ │ │ │ ├── signup_form_component.rb
│ │ │ │ └── signup_form_component.scss
│ │ │ │ ├── inputs
│ │ │ │ ├── email_component.html.slim
│ │ │ │ ├── email_component.rb
│ │ │ │ ├── input_component.js
│ │ │ │ ├── input_component.rb
│ │ │ │ ├── password_component.html.slim
│ │ │ │ ├── password_component.js
│ │ │ │ ├── password_component.rb
│ │ │ │ └── password_component.scss
│ │ │ │ ├── pages
│ │ │ │ ├── page_component.rb
│ │ │ │ └── users
│ │ │ │ │ ├── password_reset
│ │ │ │ │ ├── edit_component.html.slim
│ │ │ │ │ └── edit_component.rb
│ │ │ │ │ ├── password_reset_request
│ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ └── new_component.rb
│ │ │ │ │ ├── settings
│ │ │ │ │ ├── oauth
│ │ │ │ │ │ ├── index_component.html.slim
│ │ │ │ │ │ ├── index_component.rb
│ │ │ │ │ │ └── social_buttons_component.rb
│ │ │ │ │ └── sessions
│ │ │ │ │ │ ├── index_component.html.slim
│ │ │ │ │ │ └── index_component.rb
│ │ │ │ │ ├── sign_in
│ │ │ │ │ ├── with_magic_link
│ │ │ │ │ │ ├── after_component.html.slim
│ │ │ │ │ │ ├── after_component.rb
│ │ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ │ └── new_component.rb
│ │ │ │ │ ├── with_oauth
│ │ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ │ └── new_component.rb
│ │ │ │ │ └── with_password
│ │ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ │ └── new_component.rb
│ │ │ │ │ └── sign_up
│ │ │ │ │ ├── with_oauth
│ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ └── new_component.rb
│ │ │ │ │ └── with_password
│ │ │ │ │ ├── new_component.html.slim
│ │ │ │ │ └── new_component.rb
│ │ │ │ ├── shared
│ │ │ │ ├── email_services_component.html.slim
│ │ │ │ ├── email_services_component.rb
│ │ │ │ ├── settings
│ │ │ │ │ ├── wrapper_component.html.slim
│ │ │ │ │ └── wrapper_component.rb
│ │ │ │ ├── social_buttons_component.html.slim
│ │ │ │ └── social_buttons_component.rb
│ │ │ │ ├── stylesheet.scss
│ │ │ │ ├── users
│ │ │ │ ├── device_component.html.slim
│ │ │ │ ├── device_component.rb
│ │ │ │ ├── oauth_identity_component.html.slim
│ │ │ │ └── oauth_identity_component.rb
│ │ │ │ └── various
│ │ │ │ ├── alert_component.html.slim
│ │ │ │ ├── alert_component.rb
│ │ │ │ ├── alert_component.scss
│ │ │ │ ├── errors_alert_component.html.slim
│ │ │ │ └── errors_alert_component.rb
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── contracts
│ │ │ │ └── form
│ │ │ │ └── email.rb
│ │ ├── controllers
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── controllers
│ │ │ │ ├── api
│ │ │ │ └── concerns
│ │ │ │ │ └── default_route.rb
│ │ │ │ └── web
│ │ │ │ └── concerns
│ │ │ │ ├── default_route.rb
│ │ │ │ └── rails_current_user.rb
│ │ ├── endpoints
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ ├── endpoints.rb
│ │ │ │ └── endpoints
│ │ │ │ ├── api.rb
│ │ │ │ ├── api
│ │ │ │ ├── aliases.rb
│ │ │ │ ├── aliases
│ │ │ │ │ ├── api.rb
│ │ │ │ │ └── request_user.rb
│ │ │ │ ├── index.rb
│ │ │ │ └── show.rb
│ │ │ │ ├── events.rb
│ │ │ │ ├── events
│ │ │ │ ├── users.rb
│ │ │ │ └── users
│ │ │ │ │ ├── access_token_revoked.rb
│ │ │ │ │ ├── email_confirmation_request.rb
│ │ │ │ │ ├── email_confirmed.rb
│ │ │ │ │ ├── oauth
│ │ │ │ │ ├── link.rb
│ │ │ │ │ └── unlink.rb
│ │ │ │ │ ├── password_reset.rb
│ │ │ │ │ ├── password_reset_request.rb
│ │ │ │ │ ├── sign_in.rb
│ │ │ │ │ ├── sign_in_link_request.rb
│ │ │ │ │ ├── sign_out.rb
│ │ │ │ │ └── sign_up.rb
│ │ │ │ ├── mailers.rb
│ │ │ │ ├── mailers
│ │ │ │ ├── users.rb
│ │ │ │ └── users
│ │ │ │ │ ├── email_confirmation_link.rb
│ │ │ │ │ ├── password_reset_link.rb
│ │ │ │ │ ├── sign_in_link.rb
│ │ │ │ │ └── sign_up.rb
│ │ │ │ ├── web.rb
│ │ │ │ └── web
│ │ │ │ ├── aliases.rb
│ │ │ │ ├── aliases
│ │ │ │ ├── access_tokens.rb
│ │ │ │ ├── current_user.rb
│ │ │ │ ├── request_user.rb
│ │ │ │ └── session_user.rb
│ │ │ │ ├── users.rb
│ │ │ │ └── users
│ │ │ │ ├── confirm_email
│ │ │ │ └── update.rb
│ │ │ │ ├── oauth
│ │ │ │ ├── authentify.rb
│ │ │ │ ├── callback.rb
│ │ │ │ └── callback
│ │ │ │ │ ├── signed_in.rb
│ │ │ │ │ └── signed_out.rb
│ │ │ │ ├── password_reset
│ │ │ │ ├── edit.rb
│ │ │ │ └── update.rb
│ │ │ │ ├── password_reset_request
│ │ │ │ ├── create.rb
│ │ │ │ └── new.rb
│ │ │ │ ├── settings
│ │ │ │ ├── oauth
│ │ │ │ │ ├── destroy.rb
│ │ │ │ │ └── index.rb
│ │ │ │ └── sessions
│ │ │ │ │ ├── destroy.rb
│ │ │ │ │ └── index.rb
│ │ │ │ ├── sign_in
│ │ │ │ ├── link_request
│ │ │ │ │ ├── create.rb
│ │ │ │ │ └── new.rb
│ │ │ │ ├── with_magic_link
│ │ │ │ │ └── create.rb
│ │ │ │ ├── with_oauth
│ │ │ │ │ └── new.rb
│ │ │ │ └── with_password
│ │ │ │ │ ├── create.rb
│ │ │ │ │ └── new.rb
│ │ │ │ ├── sign_out
│ │ │ │ └── destroy.rb
│ │ │ │ └── sign_up
│ │ │ │ ├── with_oauth
│ │ │ │ └── new.rb
│ │ │ │ └── with_password
│ │ │ │ ├── create.rb
│ │ │ │ └── new.rb
│ │ ├── helpers
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── helpers
│ │ │ │ └── view_helpers.rb
│ │ ├── models
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── models
│ │ │ │ ├── application_record.rb
│ │ │ │ ├── base
│ │ │ │ ├── application.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ ├── user.rb
│ │ │ │ ├── user_email.rb
│ │ │ │ ├── user_oauth_identity.rb
│ │ │ │ ├── user_oauth_secret.rb
│ │ │ │ └── user_secret.rb
│ │ │ │ ├── engine_record.rb
│ │ │ │ ├── read
│ │ │ │ ├── application.rb
│ │ │ │ ├── country.rb
│ │ │ │ ├── ip_geolocation.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ ├── user.rb
│ │ │ │ ├── user_email.rb
│ │ │ │ ├── user_oauth_identity.rb
│ │ │ │ ├── user_oauth_secret.rb
│ │ │ │ └── user_secret.rb
│ │ │ │ ├── read_record.rb
│ │ │ │ ├── write
│ │ │ │ ├── application.rb
│ │ │ │ ├── doorkeeper_access_grant.rb
│ │ │ │ ├── doorkeeper_access_token.rb
│ │ │ │ ├── doorkeeper_application.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ ├── user.rb
│ │ │ │ ├── user_email.rb
│ │ │ │ ├── user_oauth_identity.rb
│ │ │ │ ├── user_oauth_secret.rb
│ │ │ │ └── user_secret.rb
│ │ │ │ └── write_record.rb
│ │ ├── resources
│ │ │ └── kit
│ │ │ │ └── auth
│ │ │ │ └── resources
│ │ │ │ └── api
│ │ │ │ ├── resource.rb
│ │ │ │ ├── user_auth.rb
│ │ │ │ └── user_email.rb
│ │ └── services
│ │ │ └── kit
│ │ │ └── auth
│ │ │ ├── log.rb
│ │ │ └── services
│ │ │ ├── access_token.rb
│ │ │ ├── access_token_request.rb
│ │ │ ├── api
│ │ │ ├── linker.rb
│ │ │ └── routing.rb
│ │ │ ├── contracts
│ │ │ ├── email.rb
│ │ │ ├── email_signup.rb
│ │ │ └── password.rb
│ │ │ ├── oauth.rb
│ │ │ ├── password.rb
│ │ │ ├── scopes.rb
│ │ │ ├── user_email.rb
│ │ │ ├── user_oauth_identity.rb
│ │ │ ├── user_oauth_secret.rb
│ │ │ └── web
│ │ │ └── routing.rb
│ ├── bin
│ │ └── rails
│ ├── config
│ │ ├── initializers
│ │ │ ├── doorkeeper.rb
│ │ │ ├── eager_load_endpoints.rb
│ │ │ ├── environments
│ │ │ │ ├── development.rb
│ │ │ │ └── test.rb
│ │ │ ├── locales.rb
│ │ │ └── omniauth.rb
│ │ ├── kit_runtime_config.rb
│ │ ├── locales
│ │ │ ├── emails.en.yml
│ │ │ ├── emails
│ │ │ │ ├── email_confirmation.en.yml
│ │ │ │ ├── password_reset_link.en.yml
│ │ │ │ └── sign_in_link.en.yml
│ │ │ ├── errors.en.yml
│ │ │ ├── kit_auth.en.yml
│ │ │ ├── notifications.en.yml
│ │ │ ├── pages
│ │ │ │ ├── header.en.yml
│ │ │ │ └── users
│ │ │ │ │ ├── _oauth.en.yml
│ │ │ │ │ ├── password.yml
│ │ │ │ │ ├── sign_in.en.yml
│ │ │ │ │ └── sign_up.en.yml
│ │ │ ├── passwords.en.yml
│ │ │ ├── references
│ │ │ │ ├── devise.en.yml
│ │ │ │ └── doorkeeper.en.yml
│ │ │ └── registrations.en.yml
│ │ └── routes.rb
│ ├── db
│ │ ├── migrate
│ │ │ ├── 20210912064735_create_applications.rb
│ │ │ ├── 20210915065010_create_users.rb
│ │ │ ├── 20210916066033_add_user_to_request_metadata.rb
│ │ │ ├── 20210918064752_create_user_secrets.rb
│ │ │ ├── 20210920064850_create_user_oauth_identities.rb
│ │ │ └── 20211025161054_create_user_oauth_secrets.rb
│ │ └── seeds
│ │ │ └── applications.seeds.rb
│ ├── docs
│ │ ├── VERSIONS
│ │ ├── assets
│ │ │ └── images
│ │ │ │ └── kit-auth.logo.svg
│ │ └── guides
│ │ │ ├── braindumps
│ │ │ ├── api.md
│ │ │ └── multi_emails.md
│ │ │ └── usage.md
│ ├── kit-auth.gemspec
│ ├── lib
│ │ ├── kit-auth.rb
│ │ └── kit
│ │ │ ├── auth.rb
│ │ │ └── auth
│ │ │ ├── engine.rb
│ │ │ ├── routes.rb
│ │ │ └── version.rb
│ ├── spec
│ │ ├── actions
│ │ │ └── create_with_password_spec.rb
│ │ ├── dummy
│ │ │ ├── .env.development
│ │ │ ├── .env.test
│ │ │ ├── .ruby-version
│ │ │ ├── app
│ │ │ │ ├── admin
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app_container
│ │ │ │ │ │ └── admin.rb
│ │ │ │ ├── assets
│ │ │ │ │ ├── javascripts
│ │ │ │ │ │ ├── kit_auth_dummy_application.js
│ │ │ │ │ │ └── kit_auth_dummy_vendor.js
│ │ │ │ │ └── stylesheets
│ │ │ │ │ │ ├── kit_auth_dummy_application.css
│ │ │ │ │ │ ├── kit_auth_dummy_emails.scss
│ │ │ │ │ │ └── kit_auth_dummy_vendor.scss
│ │ │ │ ├── components
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app
│ │ │ │ │ │ └── components
│ │ │ │ │ │ ├── navbar_component.html.slim
│ │ │ │ │ │ ├── navbar_component.rb
│ │ │ │ │ │ └── pages
│ │ │ │ │ │ ├── home_component.html.slim
│ │ │ │ │ │ ├── home_component.rb
│ │ │ │ │ │ ├── route_alias_component.html.slim
│ │ │ │ │ │ └── route_alias_component.rb
│ │ │ │ ├── controllers
│ │ │ │ │ ├── application_controller.rb
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app_container
│ │ │ │ │ │ └── controllers
│ │ │ │ │ │ ├── api_controller.rb
│ │ │ │ │ │ ├── web
│ │ │ │ │ │ ├── concerns
│ │ │ │ │ │ │ └── admin.rb
│ │ │ │ │ │ └── example_controller.rb
│ │ │ │ │ │ └── web_controller.rb
│ │ │ │ ├── endpoints
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app
│ │ │ │ │ │ ├── endpoints.rb
│ │ │ │ │ │ └── endpoints
│ │ │ │ │ │ └── web
│ │ │ │ │ │ ├── home.rb
│ │ │ │ │ │ ├── route_alias.rb
│ │ │ │ │ │ └── settings.rb
│ │ │ │ ├── jobs
│ │ │ │ │ └── application_job.rb
│ │ │ │ ├── mailers
│ │ │ │ │ └── application_mailer.rb
│ │ │ │ ├── models
│ │ │ │ │ └── application_record.rb
│ │ │ │ ├── services
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app
│ │ │ │ │ │ └── services
│ │ │ │ │ │ └── routing.rb
│ │ │ │ └── views
│ │ │ │ │ ├── kit
│ │ │ │ │ └── auth
│ │ │ │ │ │ └── dummy_app_container
│ │ │ │ │ │ └── controllers
│ │ │ │ │ │ └── web
│ │ │ │ │ │ └── example
│ │ │ │ │ │ └── example_rails_endpoint.html.slim
│ │ │ │ │ └── layouts
│ │ │ │ │ └── kit_auth_dummy_application.html.slim
│ │ │ ├── config
│ │ │ │ ├── environments
│ │ │ │ │ └── development.rb
│ │ │ │ ├── initializers
│ │ │ │ │ ├── admin.rb
│ │ │ │ │ ├── api_config.rb
│ │ │ │ │ ├── assets.rb
│ │ │ │ │ ├── bootstrap_email.rb
│ │ │ │ │ ├── eager_load_controllers.rb
│ │ │ │ │ ├── eager_load_endpoints.rb
│ │ │ │ │ ├── letter_opener.rb
│ │ │ │ │ └── omniauth.rb
│ │ │ │ └── routes.rb
│ │ │ └── db
│ │ │ │ ├── migrate
│ │ │ │ ├── 20210910140620_create_events.kit_domain.rb
│ │ │ │ ├── 20210916066020_create_request_metadata.kit_domain.rb
│ │ │ │ └── 20211115170903_create_request_metadata_links.kit_domain.rb
│ │ │ │ ├── primary_ops_schema.rb
│ │ │ │ ├── primary_readonly_schema.rb
│ │ │ │ ├── primary_write_schema.rb
│ │ │ │ └── schema.rb
│ │ ├── factories
│ │ │ ├── user.rb
│ │ │ ├── user_oauth_identity.rb
│ │ │ ├── user_oauth_secret.rb
│ │ │ └── user_secret.rb
│ │ ├── features
│ │ │ └── web
│ │ │ │ └── users
│ │ │ │ ├── confirm_email_spec.rb
│ │ │ │ ├── oauth
│ │ │ │ ├── intents
│ │ │ │ │ ├── sign_in.rb
│ │ │ │ │ └── sign_up.rb
│ │ │ │ ├── signed_in
│ │ │ │ │ ├── signed_in_with_identity_spec.rb
│ │ │ │ │ ├── signed_in_with_identity_user_mismatch_spec.rb
│ │ │ │ │ ├── signed_in_without_identity_spec.rb
│ │ │ │ │ └── signed_in_without_identity_user_mismatch_spec.rb
│ │ │ │ └── signed_out
│ │ │ │ │ ├── signed_out_with_identity_spec.rb
│ │ │ │ │ ├── signed_out_without_identity_existing_user_spec.rb
│ │ │ │ │ └── signed_out_without_identity_no_user_spec.rb
│ │ │ │ ├── password_reset_request_spec.rb
│ │ │ │ ├── password_update_spec.rb
│ │ │ │ ├── settings
│ │ │ │ ├── oauth
│ │ │ │ │ ├── destroy
│ │ │ │ │ │ ├── endpoint_spec.rb
│ │ │ │ │ │ └── page_spec.rb
│ │ │ │ │ └── index_spec.rb
│ │ │ │ └── sessions
│ │ │ │ │ ├── destroy
│ │ │ │ │ ├── endpoint_spec.rb
│ │ │ │ │ └── page_spec.rb
│ │ │ │ │ └── index_spec.rb
│ │ │ │ ├── sign_in
│ │ │ │ ├── link_request_spec.rb
│ │ │ │ ├── with_link_spec.rb
│ │ │ │ └── with_password_spec.rb
│ │ │ │ ├── sign_out_spec.rb
│ │ │ │ └── sign_up
│ │ │ │ └── with_password_spec.rb
│ │ ├── rails_helper.rb
│ │ ├── services
│ │ │ └── password_spec.rb
│ │ ├── spec_helper.rb
│ │ └── support
│ │ │ ├── capybara.rb
│ │ │ ├── database_cleaner.rb
│ │ │ ├── factory_bot_rails.rb
│ │ │ ├── helpers.rb
│ │ │ └── helpers
│ │ │ ├── applications.rb
│ │ │ ├── omniauth.rb
│ │ │ ├── omniauth
│ │ │ ├── facebook.rb
│ │ │ └── linkedin.rb
│ │ │ ├── users.rb
│ │ │ └── web_authentication.rb
│ └── tasks
│ │ ├── documentation.rake
│ │ └── router.rake
├── kit-geolocation
│ ├── .gitignore
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── admin
│ │ │ ├── country.rb
│ │ │ ├── ip_geolocation.rb
│ │ │ └── kit
│ │ │ │ └── geolocation
│ │ │ │ └── admin
│ │ │ │ └── tables
│ │ │ │ ├── base_table.rb
│ │ │ │ ├── country.rb
│ │ │ │ └── ip_geolocation.rb
│ │ ├── assets
│ │ │ ├── config
│ │ │ │ └── kit_payment_manifest.js
│ │ │ ├── javascripts
│ │ │ │ └── kit
│ │ │ │ │ └── geolocation
│ │ │ │ │ └── application.js
│ │ │ └── stylesheets
│ │ │ │ └── kit
│ │ │ │ └── geolocation
│ │ │ │ └── application.css
│ │ └── models
│ │ │ └── kit
│ │ │ └── geolocation
│ │ │ └── models
│ │ │ ├── application_record.rb
│ │ │ ├── engine_record.rb
│ │ │ ├── read
│ │ │ ├── country.rb
│ │ │ ├── currency.rb
│ │ │ └── ip_geolocation.rb
│ │ │ ├── read_record.rb
│ │ │ ├── write
│ │ │ ├── country.rb
│ │ │ └── ip_geolocation.rb
│ │ │ └── write_record.rb
│ ├── bin
│ │ └── rails
│ ├── config
│ │ ├── initializers
│ │ │ └── admin.rb
│ │ └── routes.rb
│ ├── db
│ │ ├── migrate
│ │ │ ├── 20190805114028_create_countries.rb
│ │ │ └── 20190805114041_create_ip_geolocations.rb
│ │ └── seeds
│ │ │ ├── countries.seeds.rb
│ │ │ ├── country-codes.datahub.io.json
│ │ │ ├── ip_geolocations.seeds.rb
│ │ │ └── seeds.ip_geolocations.dbip-country-lite-2019-08.csv
│ ├── kit-geolocation.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── geolocation.rb
│ │ │ └── geolocation
│ │ │ ├── engine.rb
│ │ │ ├── routes.rb
│ │ │ └── version.rb
│ └── spec
│ │ ├── dummy
│ │ ├── .env.development
│ │ ├── .ruby-version
│ │ ├── Rakefile
│ │ ├── app
│ │ │ ├── assets
│ │ │ │ ├── config
│ │ │ │ │ └── manifest.js
│ │ │ │ ├── javascripts
│ │ │ │ │ └── application.js
│ │ │ │ └── stylesheets
│ │ │ │ │ └── application.css
│ │ │ ├── components
│ │ │ │ └── components
│ │ │ │ │ ├── navbar.rb
│ │ │ │ │ └── navbar
│ │ │ │ │ └── template.slim
│ │ │ ├── controllers
│ │ │ │ ├── api_controller.rb
│ │ │ │ ├── application_controller.rb
│ │ │ │ ├── home_controller.rb
│ │ │ │ └── web_controller.rb
│ │ │ ├── models
│ │ │ │ └── application_record.rb
│ │ │ └── views
│ │ │ │ ├── home
│ │ │ │ └── index.html.slim
│ │ │ │ └── layouts
│ │ │ │ └── application.html.slim
│ │ ├── bin
│ │ │ ├── bundle
│ │ │ ├── rails
│ │ │ ├── rake
│ │ │ ├── setup
│ │ │ ├── update
│ │ │ └── yarn
│ │ ├── config.ru
│ │ ├── config
│ │ │ ├── application.rb
│ │ │ ├── boot.rb
│ │ │ ├── database.yml
│ │ │ ├── environment.rb
│ │ │ ├── environments
│ │ │ │ ├── development.rb
│ │ │ │ ├── production.rb
│ │ │ │ └── test.rb
│ │ │ ├── initializers
│ │ │ │ ├── application_controller_renderer.rb
│ │ │ │ ├── assets.rb
│ │ │ │ ├── backtrace_silencers.rb
│ │ │ │ ├── content_security_policy.rb
│ │ │ │ ├── cookies_serializer.rb
│ │ │ │ ├── filter_parameter_logging.rb
│ │ │ │ ├── inflections.rb
│ │ │ │ ├── mime_types.rb
│ │ │ │ └── wrap_parameters.rb
│ │ │ ├── puma.rb
│ │ │ ├── routes.rb
│ │ │ └── spring.rb
│ │ ├── db
│ │ │ └── schema.rb
│ │ ├── package.json
│ │ └── public
│ │ │ ├── 404.html
│ │ │ ├── 422.html
│ │ │ ├── 500.html
│ │ │ ├── apple-touch-icon-precomposed.png
│ │ │ ├── apple-touch-icon.png
│ │ │ └── favicon.ico
│ │ ├── factories
│ │ └── kit
│ │ │ └── geolocation
│ │ │ └── models
│ │ │ └── country.rb
│ │ ├── rails_helper.rb
│ │ ├── spec_helper.rb
│ │ └── support
│ │ └── database_cleaner.rb
└── kit-payment
│ ├── .gitignore
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ ├── admin
│ │ ├── currency.rb
│ │ └── kit
│ │ │ └── payment
│ │ │ └── admin
│ │ │ └── tables
│ │ │ ├── base_table.rb
│ │ │ └── currency.rb
│ ├── assets
│ │ ├── config
│ │ │ └── kit_payment_manifest.js
│ │ ├── javascripts
│ │ │ └── kit
│ │ │ │ └── payment
│ │ │ │ └── application.js
│ │ └── stylesheets
│ │ │ └── kit
│ │ │ └── payment
│ │ │ └── application.css
│ └── models
│ │ └── kit
│ │ └── payment
│ │ └── models
│ │ ├── application_record.rb
│ │ ├── engine_record.rb
│ │ ├── read
│ │ └── currency.rb
│ │ ├── read_record.rb
│ │ ├── write
│ │ └── currency.rb
│ │ └── write_record.rb
│ ├── bin
│ └── rails
│ ├── config
│ ├── initializers
│ │ └── admin.rb
│ └── routes.rb
│ ├── db
│ ├── migrate
│ │ └── 20190805114002_create_currencies.rb
│ └── seeds
│ │ ├── country-codes.datahub.io.json
│ │ └── currencies.seeds.rb
│ ├── kit-payment.gemspec
│ ├── lib
│ └── kit
│ │ ├── payment.rb
│ │ └── payment
│ │ ├── engine.rb
│ │ ├── routes.rb
│ │ └── version.rb
│ └── spec
│ ├── dummy
│ ├── .env.development
│ ├── .ruby-version
│ ├── Rakefile
│ ├── app
│ │ ├── assets
│ │ │ ├── config
│ │ │ │ └── manifest.js
│ │ │ ├── javascripts
│ │ │ │ └── application.js
│ │ │ └── stylesheets
│ │ │ │ └── application.css
│ │ ├── components
│ │ │ └── components
│ │ │ │ ├── navbar.rb
│ │ │ │ └── navbar
│ │ │ │ └── template.slim
│ │ ├── controllers
│ │ │ ├── api_controller.rb
│ │ │ ├── application_controller.rb
│ │ │ ├── home_controller.rb
│ │ │ └── web_controller.rb
│ │ ├── models
│ │ │ └── application_record.rb
│ │ └── views
│ │ │ ├── home
│ │ │ └── index.html.slim
│ │ │ └── layouts
│ │ │ └── application.html.slim
│ ├── bin
│ │ ├── bundle
│ │ ├── rails
│ │ ├── rake
│ │ ├── setup
│ │ ├── update
│ │ └── yarn
│ ├── config.ru
│ ├── config
│ │ ├── application.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── environment.rb
│ │ ├── environments
│ │ │ ├── development.rb
│ │ │ ├── production.rb
│ │ │ └── test.rb
│ │ ├── initializers
│ │ │ ├── application_controller_renderer.rb
│ │ │ ├── assets.rb
│ │ │ ├── backtrace_silencers.rb
│ │ │ ├── content_security_policy.rb
│ │ │ ├── cookies_serializer.rb
│ │ │ ├── filter_parameter_logging.rb
│ │ │ ├── inflections.rb
│ │ │ ├── mime_types.rb
│ │ │ └── wrap_parameters.rb
│ │ ├── puma.rb
│ │ ├── routes.rb
│ │ └── spring.rb
│ ├── db
│ │ └── schema.rb
│ ├── package.json
│ └── public
│ │ ├── 404.html
│ │ ├── 422.html
│ │ ├── 500.html
│ │ ├── apple-touch-icon-precomposed.png
│ │ ├── apple-touch-icon.png
│ │ └── favicon.ico
│ ├── rails_helper.rb
│ ├── spec_helper.rb
│ └── support
│ └── database_cleaner.rb
├── kit.gemspec
├── libraries
├── kit-active_admin
│ ├── .gitignore
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── helpers
│ │ │ └── active_admin
│ │ │ │ └── views_helper.rb
│ │ └── services
│ │ │ └── kit
│ │ │ └── admin
│ │ │ ├── attributes.rb
│ │ │ └── services
│ │ │ ├── active_admin.rb
│ │ │ ├── renderers.rb
│ │ │ └── renderers
│ │ │ ├── attributes.rb
│ │ │ ├── attributes
│ │ │ ├── amount.rb
│ │ │ ├── auto_link.rb
│ │ │ ├── boolean.rb
│ │ │ ├── code.rb
│ │ │ ├── code_link_to.rb
│ │ │ ├── code_with_color.rb
│ │ │ ├── color.rb
│ │ │ ├── date.rb
│ │ │ ├── img.rb
│ │ │ ├── img_link_to.rb
│ │ │ ├── json_readonly.rb
│ │ │ ├── link_to.rb
│ │ │ ├── model.rb
│ │ │ ├── model_color.rb
│ │ │ ├── model_id.rb
│ │ │ ├── model_verbose.rb
│ │ │ ├── percentage_bar.rb
│ │ │ ├── pre.rb
│ │ │ ├── pre_yaml.rb
│ │ │ └── status.rb
│ │ │ ├── csv.rb
│ │ │ ├── index.rb
│ │ │ ├── panel.rb
│ │ │ └── panel_list.rb
│ ├── bin
│ │ └── test
│ ├── config
│ │ ├── initializers
│ │ │ ├── arbre
│ │ │ │ ├── amount_tag.rb
│ │ │ │ ├── color_tag.rb
│ │ │ │ ├── date_tag.rb
│ │ │ │ └── pct_tag.rb
│ │ │ └── locales.rb
│ │ └── locales
│ │ │ └── active_admin.en.yml
│ ├── kit-active_admin.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── active_admin.rb
│ │ │ └── active_admin
│ │ │ ├── engine.rb
│ │ │ ├── overrides.rb
│ │ │ ├── overrides
│ │ │ ├── display
│ │ │ │ ├── auto_link_helper.rb
│ │ │ │ ├── display_helper.rb
│ │ │ │ ├── pages_base.rb
│ │ │ │ ├── resource_dsl_extension.rb
│ │ │ │ └── status_tag.rb
│ │ │ └── engines
│ │ │ │ ├── application.rb
│ │ │ │ ├── comments.rb
│ │ │ │ ├── extend_namespace_settings.rb
│ │ │ │ ├── extend_router.rb
│ │ │ │ ├── page.rb
│ │ │ │ ├── resource_controllers.rb
│ │ │ │ └── routes_helpers.rb
│ │ │ └── version.rb
│ └── vendor
│ │ └── assets
│ │ ├── config
│ │ └── kit-active_admin.js
│ │ ├── images
│ │ └── kit-active_admin
│ │ │ └── famfamfam-flags.png
│ │ ├── javascripts
│ │ └── kit-active_admin
│ │ │ ├── components
│ │ │ ├── confirm-dialog.js
│ │ │ ├── json-readonly.js
│ │ │ └── panel.js
│ │ │ ├── dependencies
│ │ │ ├── jquery-3.2.1.js
│ │ │ ├── lodash-4.17.4.js
│ │ │ └── sweetalert2-6.11.1.js
│ │ │ └── kit-active_admin.js
│ │ └── stylesheets
│ │ └── kit-active_admin
│ │ ├── active_admin_overides
│ │ ├── components.scss
│ │ ├── components
│ │ │ ├── _json.scss
│ │ │ └── _tabs.scss
│ │ ├── mixins.scss
│ │ ├── mixins
│ │ │ ├── _buttons.scss
│ │ │ ├── _rounded.scss
│ │ │ ├── _sections.scss
│ │ │ └── _shadows.scss
│ │ ├── structure.scss
│ │ └── structure
│ │ │ ├── _footer.scss
│ │ │ ├── _header.scss
│ │ │ ├── _main_structure.scss
│ │ │ ├── _title_bar.scss
│ │ │ └── _various.scss
│ │ ├── components
│ │ ├── colors.scss
│ │ ├── status_tag.scss
│ │ └── top_bar_environment.scss
│ │ ├── dependencies
│ │ ├── famfamfam-flags.css
│ │ └── sweetalert2-6.11.1.css
│ │ └── kit-active_admin.scss
├── kit-api
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── api
│ │ │ │ ├── contracts.rb
│ │ │ │ └── json_api
│ │ │ │ └── contracts.rb
│ │ ├── controllers
│ │ │ └── kit
│ │ │ │ └── api
│ │ │ │ └── json_api
│ │ │ │ └── controllers
│ │ │ │ └── concerns
│ │ │ │ └── default_route.rb
│ │ ├── resources
│ │ │ └── kit
│ │ │ │ └── api
│ │ │ │ ├── resources.rb
│ │ │ │ └── resources
│ │ │ │ └── active_record_resource.rb
│ │ └── services
│ │ │ └── kit
│ │ │ ├── api
│ │ │ ├── json_api
│ │ │ │ ├── services.rb
│ │ │ │ └── services
│ │ │ │ │ ├── endpoints.rb
│ │ │ │ │ ├── endpoints
│ │ │ │ │ ├── error.rb
│ │ │ │ │ ├── guards.rb
│ │ │ │ │ └── success.rb
│ │ │ │ │ ├── linkers.rb
│ │ │ │ │ ├── linkers
│ │ │ │ │ └── default_linker.rb
│ │ │ │ │ ├── paginators.rb
│ │ │ │ │ ├── paginators
│ │ │ │ │ ├── cursor.rb
│ │ │ │ │ ├── cursor
│ │ │ │ │ │ └── validation.rb
│ │ │ │ │ └── offset.rb
│ │ │ │ │ ├── request.rb
│ │ │ │ │ ├── request
│ │ │ │ │ ├── export.rb
│ │ │ │ │ ├── export
│ │ │ │ │ │ ├── filtering.rb
│ │ │ │ │ │ ├── pagination.rb
│ │ │ │ │ │ ├── related_resources.rb
│ │ │ │ │ │ ├── sorting.rb
│ │ │ │ │ │ └── sparse_fieldsets.rb
│ │ │ │ │ ├── import.rb
│ │ │ │ │ └── import
│ │ │ │ │ │ ├── filtering.rb
│ │ │ │ │ │ ├── pagination.rb
│ │ │ │ │ │ ├── related_resources.rb
│ │ │ │ │ │ ├── sorting.rb
│ │ │ │ │ │ └── sparse_fieldsets.rb
│ │ │ │ │ ├── schema_validation.rb
│ │ │ │ │ ├── serialization.rb
│ │ │ │ │ ├── serialization
│ │ │ │ │ ├── query.rb
│ │ │ │ │ ├── query_node.rb
│ │ │ │ │ ├── relationship.rb
│ │ │ │ │ └── resource_object.rb
│ │ │ │ │ ├── serializers.rb
│ │ │ │ │ ├── serializers
│ │ │ │ │ └── active_record.rb
│ │ │ │ │ └── url.rb
│ │ │ ├── log.rb
│ │ │ ├── services.rb
│ │ │ └── services
│ │ │ │ ├── config.rb
│ │ │ │ ├── debug.rb
│ │ │ │ ├── encryption.rb
│ │ │ │ ├── endpoints.rb
│ │ │ │ ├── query_builder.rb
│ │ │ │ ├── query_resolver.rb
│ │ │ │ ├── resolvers.rb
│ │ │ │ └── resolvers
│ │ │ │ ├── active_record.rb
│ │ │ │ ├── sql.rb
│ │ │ │ └── sql
│ │ │ │ ├── filtering.rb
│ │ │ │ ├── limit.rb
│ │ │ │ ├── sanitization.rb
│ │ │ │ └── sorting.rb
│ │ │ └── config.rb
│ ├── bin
│ │ └── rails
│ ├── config
│ │ ├── json_api_json_schema.json
│ │ └── kit_runtime_config.rb
│ ├── docs
│ │ ├── VERSIONS
│ │ └── guides
│ │ │ ├── apis.md
│ │ │ ├── architecture.md
│ │ │ ├── assets
│ │ │ └── images
│ │ │ │ └── api_gateway.png
│ │ │ ├── graphql_support.md
│ │ │ ├── jsonapi_support.md
│ │ │ ├── jsonapi_vs_graphql.md
│ │ │ └── testing.md
│ ├── kit-api.gemspec
│ ├── lib
│ │ ├── kit-api.rb
│ │ └── kit
│ │ │ ├── api.rb
│ │ │ └── api
│ │ │ ├── engine.rb
│ │ │ ├── railtie.rb
│ │ │ └── version.rb
│ ├── spec
│ │ ├── api
│ │ │ └── services
│ │ │ │ ├── config
│ │ │ │ └── resources_validation_spec.rb
│ │ │ │ ├── encryption_spec.rb
│ │ │ │ ├── query_builder_spec.rb
│ │ │ │ └── query_resolver_spec.rb
│ │ ├── dummy
│ │ │ ├── .env.development
│ │ │ ├── .env.test
│ │ │ ├── Rakefile
│ │ │ ├── app
│ │ │ │ ├── controllers
│ │ │ │ │ └── api_controller.rb
│ │ │ │ ├── endpoints
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── json_api_spec
│ │ │ │ │ │ ├── endpoints.rb
│ │ │ │ │ │ └── endpoints
│ │ │ │ │ │ ├── create.rb
│ │ │ │ │ │ ├── delete.rb
│ │ │ │ │ │ ├── index.rb
│ │ │ │ │ │ ├── show.rb
│ │ │ │ │ │ └── update.rb
│ │ │ │ ├── models
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── json_api_spec
│ │ │ │ │ │ └── models
│ │ │ │ │ │ ├── application_record.rb
│ │ │ │ │ │ ├── engine_record.rb
│ │ │ │ │ │ ├── read
│ │ │ │ │ │ ├── author.rb
│ │ │ │ │ │ ├── book.rb
│ │ │ │ │ │ ├── book_store.rb
│ │ │ │ │ │ ├── chapter.rb
│ │ │ │ │ │ ├── photo.rb
│ │ │ │ │ │ ├── serie.rb
│ │ │ │ │ │ └── store.rb
│ │ │ │ │ │ ├── read_record.rb
│ │ │ │ │ │ ├── write
│ │ │ │ │ │ ├── author.rb
│ │ │ │ │ │ ├── book.rb
│ │ │ │ │ │ ├── book_store.rb
│ │ │ │ │ │ ├── chapter.rb
│ │ │ │ │ │ ├── photo.rb
│ │ │ │ │ │ ├── serie.rb
│ │ │ │ │ │ └── store.rb
│ │ │ │ │ │ └── write_record.rb
│ │ │ │ ├── resources
│ │ │ │ │ └── kit
│ │ │ │ │ │ └── json_api_spec
│ │ │ │ │ │ └── resources
│ │ │ │ │ │ ├── author.rb
│ │ │ │ │ │ ├── book.rb
│ │ │ │ │ │ ├── book_store.rb
│ │ │ │ │ │ ├── chapter.rb
│ │ │ │ │ │ ├── photo.rb
│ │ │ │ │ │ ├── resource.rb
│ │ │ │ │ │ ├── serie.rb
│ │ │ │ │ │ └── store.rb
│ │ │ │ └── services
│ │ │ │ │ └── kit
│ │ │ │ │ └── json_api_spec
│ │ │ │ │ └── services
│ │ │ │ │ ├── linker.rb
│ │ │ │ │ └── routing.rb
│ │ │ ├── config
│ │ │ │ ├── initializers
│ │ │ │ │ ├── api_config.rb
│ │ │ │ │ └── eager_load_endpoints.rb
│ │ │ │ └── routes.rb
│ │ │ └── db
│ │ │ │ ├── migrate
│ │ │ │ └── 20191208143026_create_fantasy_tables.rb
│ │ │ │ ├── primary_ops_schema.rb
│ │ │ │ ├── schema.rb
│ │ │ │ └── seeds
│ │ │ │ └── fantasy_data
│ │ │ │ ├── authors.seeds.rb
│ │ │ │ ├── books.seeds.rb
│ │ │ │ ├── books_stores.seeds.rb
│ │ │ │ ├── chapters.seeds.rb
│ │ │ │ ├── empty.seeds.rb
│ │ │ │ ├── fantasy_data.json
│ │ │ │ ├── photos.seeds.rb
│ │ │ │ ├── series.seeds.rb
│ │ │ │ └── stores.seeds.rb
│ │ ├── factories
│ │ │ ├── factory_author.rb
│ │ │ ├── factory_book.rb
│ │ │ ├── factory_book_store.rb
│ │ │ ├── factory_chapter.rb
│ │ │ ├── factory_photo.rb
│ │ │ ├── factory_serie.rb
│ │ │ └── factory_store.rb
│ │ ├── json_api
│ │ │ ├── endpoints
│ │ │ │ ├── create_spec.rb
│ │ │ │ ├── delete_spec.rb
│ │ │ │ ├── headers_spec.rb
│ │ │ │ ├── index_spec.rb
│ │ │ │ ├── query_params_spec.rb
│ │ │ │ ├── show
│ │ │ │ │ └── errors_spec.rb
│ │ │ │ ├── show_spec.rb
│ │ │ │ └── update_spec.rb
│ │ │ └── services
│ │ │ │ ├── paginators
│ │ │ │ └── cursor_paginator_validation_spec.rb
│ │ │ │ ├── request
│ │ │ │ ├── export
│ │ │ │ │ ├── filtering_spec.rb
│ │ │ │ │ ├── pagination_spec.rb
│ │ │ │ │ ├── related_resources_spec.rb
│ │ │ │ │ ├── sorting_spec.rb
│ │ │ │ │ └── sparse_fieldsets_spec.rb
│ │ │ │ └── import
│ │ │ │ │ ├── filtering_spec.rb
│ │ │ │ │ ├── pagination_spec.rb
│ │ │ │ │ ├── related_resources_spec.rb
│ │ │ │ │ ├── sorting_spec.rb
│ │ │ │ │ └── sparse_fieldsets_spec.rb
│ │ │ │ └── serialization
│ │ │ │ ├── query_rs_collisions_spec.rb
│ │ │ │ └── query_spec.rb
│ │ ├── rails_helper.rb
│ │ ├── shared
│ │ │ ├── config_dummy_app.rb
│ │ │ ├── json_api.rb
│ │ │ └── url.rb
│ │ ├── spec_helper.rb
│ │ └── support
│ │ │ ├── database_cleaner.rb
│ │ │ └── factory_bot.rb
│ └── tasks
│ │ ├── documentation.rake
│ │ └── router.rake
├── kit-app_container
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ └── assets
│ │ │ ├── javascripts
│ │ │ └── active_admin.js
│ │ │ └── stylesheets
│ │ │ └── active_admin.css
│ ├── bin
│ │ └── rails
│ ├── config
│ │ ├── initializers
│ │ │ ├── .keep
│ │ │ └── inflectors.rb
│ │ └── routes.rb
│ ├── kit-app_container.gemspec
│ └── lib
│ │ ├── kit
│ │ ├── app_container.rb
│ │ └── app_container
│ │ │ ├── engine.rb
│ │ │ └── version.rb
│ │ └── tasks
│ │ └── kit
│ │ └── app
│ │ └── container_tasks.rake
├── kit-contract
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── contract
│ │ │ │ ├── built_in_contracts.rb
│ │ │ │ ├── built_in_contracts
│ │ │ │ ├── and.rb
│ │ │ │ ├── any.rb
│ │ │ │ ├── args.rb
│ │ │ │ ├── array.rb
│ │ │ │ ├── big_decimal.rb
│ │ │ │ ├── boolean.rb
│ │ │ │ ├── callable.rb
│ │ │ │ ├── complex.rb
│ │ │ │ ├── delayed.rb
│ │ │ │ ├── eq.rb
│ │ │ │ ├── false_class.rb
│ │ │ │ ├── float.rb
│ │ │ │ ├── hash.rb
│ │ │ │ ├── in.rb
│ │ │ │ ├── instantiable_contract.rb
│ │ │ │ ├── integer.rb
│ │ │ │ ├── is_a.rb
│ │ │ │ ├── nil.rb
│ │ │ │ ├── none.rb
│ │ │ │ ├── not.rb
│ │ │ │ ├── not_eq.rb
│ │ │ │ ├── numeric.rb
│ │ │ │ ├── optional.rb
│ │ │ │ ├── or.rb
│ │ │ │ ├── rational.rb
│ │ │ │ ├── respond_to.rb
│ │ │ │ ├── string.rb
│ │ │ │ ├── symbol.rb
│ │ │ │ ├── true_class.rb
│ │ │ │ └── tupple.rb
│ │ │ │ └── changeset
│ │ │ │ └── validations
│ │ │ │ ├── cast_to_boolean.rb
│ │ │ │ ├── cast_to_date_time.rb
│ │ │ │ ├── cast_to_integer.rb
│ │ │ │ ├── date_in_past.rb
│ │ │ │ ├── is_array.rb
│ │ │ │ ├── non_empty.rb
│ │ │ │ ├── non_empty_array.rb
│ │ │ │ ├── number_positive.rb
│ │ │ │ ├── success.rb
│ │ │ │ └── with_error.rb
│ │ ├── errors
│ │ │ └── kit
│ │ │ │ └── contract
│ │ │ │ └── error.rb
│ │ └── services
│ │ │ └── kit
│ │ │ └── contract
│ │ │ ├── mixin.rb
│ │ │ ├── services.rb
│ │ │ └── services
│ │ │ ├── changeset.rb
│ │ │ ├── method_wrapper.rb
│ │ │ ├── proc_wrapper.rb
│ │ │ ├── ruby_helpers.rb
│ │ │ ├── runtime.rb
│ │ │ ├── store.rb
│ │ │ └── validation.rb
│ ├── bin
│ │ └── rails
│ ├── docs
│ │ ├── VERSIONS
│ │ └── guides
│ │ │ ├── usage.md
│ │ │ └── why_contracts.md
│ ├── kit-contract.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── contract.rb
│ │ │ └── contract
│ │ │ ├── engine.rb
│ │ │ └── version.rb
│ ├── spec
│ │ ├── contract
│ │ │ ├── after_spec.rb
│ │ │ ├── before_spec.rb
│ │ │ ├── built_in_contracts
│ │ │ │ ├── and_spec.rb
│ │ │ │ ├── any_spec.rb
│ │ │ │ ├── array
│ │ │ │ │ ├── every_value_contracts_spec.rb
│ │ │ │ │ ├── index_contracts_spec.rb
│ │ │ │ │ └── instance_contracts_spec.rb
│ │ │ │ ├── array_signature_spec.rb
│ │ │ │ ├── big_decimal_spec.rb
│ │ │ │ ├── boolean_spec.rb
│ │ │ │ ├── callable_spec.rb
│ │ │ │ ├── complex_spec.rb
│ │ │ │ ├── delayed_spec.rb
│ │ │ │ ├── eq_spec.rb
│ │ │ │ ├── false_class_spec.rb
│ │ │ │ ├── float_spec.rb
│ │ │ │ ├── hash
│ │ │ │ │ ├── every_key_contracts_spec.rb
│ │ │ │ │ ├── every_key_value_contracts_spec.rb
│ │ │ │ │ ├── every_value_contracts_spec.rb
│ │ │ │ │ ├── instance_contracts_spec.rb
│ │ │ │ │ └── keyword_args_contracts_spec.rb
│ │ │ │ ├── in_spec.rb
│ │ │ │ ├── integer_spec.rb
│ │ │ │ ├── is_a_spec.rb
│ │ │ │ ├── numeric_spec.rb
│ │ │ │ ├── optional_spec.rb
│ │ │ │ ├── or_spec.rb
│ │ │ │ ├── rational_spec.rb
│ │ │ │ ├── string_spec.rb
│ │ │ │ ├── symbol_spec.rb
│ │ │ │ ├── true_class_spec.rb
│ │ │ │ └── tupple
│ │ │ │ │ └── index_contracts_spec.rb
│ │ │ ├── circular_reference_spec.rb
│ │ │ ├── contract_spec.rb
│ │ │ ├── organizer_like_signature_spec.rb
│ │ │ ├── rgb_spec.rb
│ │ │ ├── ruby_helpers
│ │ │ │ ├── generate_parameters_in_spec.rb
│ │ │ │ └── parameters_to_string_spec.rb
│ │ │ └── shared
│ │ │ │ ├── signature_exemples.rb
│ │ │ │ └── types_exemples.rb
│ │ ├── rails_helper.rb
│ │ └── spec_helper.rb
│ └── tasks
│ │ └── documentation.rake
├── kit-doc
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── LICENSES.md
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── assets
│ │ ├── dist
│ │ │ ├── css
│ │ │ │ └── app-c96f369f370ce6c6c062.css
│ │ │ ├── fonts
│ │ │ │ ├── icomoon.eot
│ │ │ │ ├── icomoon.svg
│ │ │ │ ├── icomoon.ttf
│ │ │ │ └── icomoon.woff
│ │ │ └── js
│ │ │ │ └── app-8922f842956a6779307c.js
│ │ ├── redirect.html
│ │ └── src
│ │ │ ├── .eslintignore
│ │ │ ├── .eslintrc
│ │ │ ├── README.md
│ │ │ ├── babel.config.js
│ │ │ ├── fonts
│ │ │ ├── icomoon.eot
│ │ │ ├── icomoon.svg
│ │ │ ├── icomoon.ttf
│ │ │ └── icomoon.woff
│ │ │ ├── js
│ │ │ ├── autocomplete
│ │ │ │ ├── display.js
│ │ │ │ └── suggestions.js
│ │ │ ├── events.js
│ │ │ ├── helpers.js
│ │ │ ├── highlight.js
│ │ │ │ └── languages
│ │ │ │ │ ├── bash.js
│ │ │ │ │ ├── kit-url.js
│ │ │ │ │ └── ruby.js
│ │ │ ├── html.js
│ │ │ ├── keyboard-shortcuts.js
│ │ │ ├── makeup.js
│ │ │ ├── night.js
│ │ │ ├── private-apis.js
│ │ │ ├── search.js
│ │ │ ├── sidebar.js
│ │ │ ├── template-helpers
│ │ │ │ ├── groupChanged.js
│ │ │ │ ├── isArray.js
│ │ │ │ ├── isLocal.js
│ │ │ │ ├── isNonEmptyArray.js
│ │ │ │ ├── nestingChanged.js
│ │ │ │ └── showSummary.js
│ │ │ ├── templates
│ │ │ │ ├── autocomplete-suggestions.handlebars
│ │ │ │ ├── keyboard-shortcuts-help-modal.handlebars
│ │ │ │ ├── search-results.handlebars
│ │ │ │ ├── sidebar-items.handlebars
│ │ │ │ ├── tooltip-body.handlebars
│ │ │ │ ├── tooltip-layout.handlebars
│ │ │ │ └── versions-dropdown.handlebars
│ │ │ ├── tooltips
│ │ │ │ ├── hints-extraction.js
│ │ │ │ ├── hints-page.js
│ │ │ │ └── tooltips.js
│ │ │ └── versions.js
│ │ │ ├── karma.conf.js
│ │ │ ├── less
│ │ │ ├── autocomplete.less
│ │ │ ├── code.less
│ │ │ ├── content.less
│ │ │ ├── content
│ │ │ │ ├── code.less
│ │ │ │ ├── footer.less
│ │ │ │ ├── functions.less
│ │ │ │ ├── general.less
│ │ │ │ └── summary.less
│ │ │ ├── entry
│ │ │ │ └── html-ruby.less
│ │ │ ├── fonts.css
│ │ │ ├── html.less
│ │ │ ├── icons.less
│ │ │ ├── keyboard-shortcuts.less
│ │ │ ├── kit.less
│ │ │ ├── kit
│ │ │ │ ├── code.less
│ │ │ │ ├── colors.less
│ │ │ │ ├── detail.less
│ │ │ │ ├── docstring-tags.less
│ │ │ │ ├── hr.less
│ │ │ │ ├── private-apis.less
│ │ │ │ ├── sidebar.less
│ │ │ │ └── summary.less
│ │ │ ├── layout.less
│ │ │ ├── mixins.less
│ │ │ ├── modal.less
│ │ │ ├── night
│ │ │ │ ├── content.less
│ │ │ │ ├── content
│ │ │ │ │ ├── code.less
│ │ │ │ │ ├── footer.less
│ │ │ │ │ ├── functions.less
│ │ │ │ │ └── general.less
│ │ │ │ ├── keyboard-shortcuts.less
│ │ │ │ ├── night.less
│ │ │ │ ├── sidebar.less
│ │ │ │ └── tooltips.less
│ │ │ ├── print.less
│ │ │ ├── screen-reader.less
│ │ │ ├── search.less
│ │ │ ├── sidebar.less
│ │ │ ├── tooltips.less
│ │ │ └── variables
│ │ │ │ ├── common.less
│ │ │ │ └── ruby.less
│ │ │ ├── postcss.config.js
│ │ │ ├── test
│ │ │ ├── .eslintrc
│ │ │ ├── autocomplete
│ │ │ │ └── suggestions.spec.js
│ │ │ ├── helpers.spec.js
│ │ │ └── tooltips
│ │ │ │ └── hints-extraction.spec.js
│ │ │ └── webpack.js
│ ├── docs
│ │ ├── VERSIONS
│ │ ├── assets
│ │ │ └── images
│ │ │ │ └── kit-doc.logo.svg
│ │ └── guides
│ │ │ ├── usage.md
│ │ │ └── writing_documentation.md
│ ├── kit-doc.gemspec
│ ├── lib
│ │ ├── kit-doc.rb
│ │ └── kit
│ │ │ ├── doc.rb
│ │ │ └── doc
│ │ │ ├── railtie.rb
│ │ │ ├── redcarpet.rb
│ │ │ ├── redcarpet
│ │ │ ├── overrides
│ │ │ │ └── redcarpet_compat.rb
│ │ │ └── redcarpet_render_custom.rb
│ │ │ ├── services.rb
│ │ │ ├── services
│ │ │ ├── config.rb
│ │ │ ├── docstring.rb
│ │ │ ├── extras.rb
│ │ │ ├── markdown_preprocessor.rb
│ │ │ ├── methods.rb
│ │ │ ├── modules.rb
│ │ │ ├── properties.rb
│ │ │ ├── search.rb
│ │ │ ├── sidebar.rb
│ │ │ ├── sidebar
│ │ │ │ ├── extras.rb
│ │ │ │ └── modules.rb
│ │ │ ├── tasks.rb
│ │ │ ├── tasks
│ │ │ │ └── helpers.rb
│ │ │ └── utils.rb
│ │ │ ├── version.rb
│ │ │ ├── yard.rb
│ │ │ └── yard
│ │ │ ├── custom_tags.rb
│ │ │ ├── file_serializer.rb
│ │ │ ├── handlers
│ │ │ └── kit_doc_contracts_handler.rb
│ │ │ ├── overrides
│ │ │ ├── base.rb
│ │ │ ├── extra_file_object.rb
│ │ │ ├── html_helper.rb
│ │ │ ├── logging.rb
│ │ │ └── yardoc.rb
│ │ │ └── templates
│ │ │ └── template_plugin_helper.rb
│ ├── package-lock.json
│ ├── package.json
│ ├── specs
│ │ ├── dummy
│ │ │ ├── docs
│ │ │ │ ├── VERSIONS
│ │ │ │ └── guides
│ │ │ │ │ ├── ab_colla_deus.md
│ │ │ │ │ ├── f1
│ │ │ │ │ ├── et_ignaro_cognita.md
│ │ │ │ │ └── neu_dixi_raptam.md
│ │ │ │ │ ├── f2
│ │ │ │ │ └── sub_si_sit_erat.md
│ │ │ │ │ └── linking.md
│ │ │ ├── kat.rb
│ │ │ ├── kat
│ │ │ │ ├── base_node.rb
│ │ │ │ ├── child_child_node.rb
│ │ │ │ ├── child_node.rb
│ │ │ │ ├── hidden_module.rb
│ │ │ │ └── service.rb
│ │ │ ├── mixins
│ │ │ │ ├── class_extend1.rb
│ │ │ │ ├── class_extend2.rb
│ │ │ │ ├── class_include1.rb
│ │ │ │ ├── class_include2.rb
│ │ │ │ └── module_extend.rb
│ │ │ └── tasks
│ │ │ │ └── documentation.rake
│ │ ├── kit-doc
│ │ │ └── services
│ │ │ │ └── markdown_preprocessor_spec.rb
│ │ └── spec_helper.rb
│ ├── tasks
│ │ └── documentation.rake
│ └── templates
│ │ └── default
│ │ ├── docstring
│ │ ├── html
│ │ │ ├── deprecated.erb
│ │ │ ├── docstring.erb
│ │ │ ├── docstring_tags.erb
│ │ │ ├── index.erb
│ │ │ ├── note.erb
│ │ │ ├── private.erb
│ │ │ ├── text.erb
│ │ │ └── todo.erb
│ │ └── setup.rb
│ │ ├── fulldoc
│ │ └── html
│ │ │ ├── docs_config.js.erb
│ │ │ ├── index_redirect.erb
│ │ │ ├── search.erb
│ │ │ ├── search_items.js.erb
│ │ │ ├── setup.rb
│ │ │ └── sidebar_items.js.erb
│ │ ├── layout
│ │ └── html
│ │ │ ├── extra.erb
│ │ │ ├── files.erb
│ │ │ ├── footer.erb
│ │ │ ├── headers.erb
│ │ │ ├── index.erb
│ │ │ ├── layout.erb
│ │ │ ├── listing.erb
│ │ │ ├── objects.erb
│ │ │ ├── setup.rb
│ │ │ └── sidebar.erb
│ │ ├── method
│ │ ├── html
│ │ │ └── header.erb
│ │ └── setup.rb
│ │ ├── method_details
│ │ ├── html
│ │ │ ├── docstring_wrapper.erb
│ │ │ ├── header.erb
│ │ │ └── method_signature.erb
│ │ └── setup.rb
│ │ └── module
│ │ ├── html
│ │ ├── _attributes_list.erb
│ │ ├── _signature.erb
│ │ ├── box_info.erb
│ │ ├── constant_details.erb
│ │ ├── header.erb
│ │ ├── item_summary.erb
│ │ ├── method_details.erb
│ │ ├── section_attributes_instance.erb
│ │ ├── section_constants.erb
│ │ ├── section_methods_class.erb
│ │ ├── section_methods_instance.erb
│ │ ├── section_moduledoc.erb
│ │ ├── section_summary.erb
│ │ ├── summary_attributes_instance.erb
│ │ ├── summary_attributes_instance_inherited.erb
│ │ ├── summary_classes.erb
│ │ ├── summary_constants.erb
│ │ ├── summary_constants_inherited.erb
│ │ ├── summary_methods_class.erb
│ │ ├── summary_methods_class_inherited.erb
│ │ ├── summary_methods_instance.erb
│ │ ├── summary_methods_instance_inherited.erb
│ │ ├── summary_modules.erb
│ │ └── summary_subclasses.erb
│ │ └── setup.rb
├── kit-domain
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── admin
│ │ │ └── kit
│ │ │ │ └── domain
│ │ │ │ ├── admin.rb
│ │ │ │ └── admin
│ │ │ │ ├── attributes
│ │ │ │ ├── event.rb
│ │ │ │ └── request_metadata.rb
│ │ │ │ └── resources
│ │ │ │ ├── event.rb
│ │ │ │ └── request_metadata.rb
│ │ ├── components
│ │ │ └── kit
│ │ │ │ └── domain
│ │ │ │ └── components
│ │ │ │ └── specs
│ │ │ │ ├── link_to_component.html.slim
│ │ │ │ └── link_to_component.rb
│ │ ├── endpoints
│ │ │ └── kit
│ │ │ │ └── domain
│ │ │ │ └── endpoints
│ │ │ │ ├── http.rb
│ │ │ │ ├── http
│ │ │ │ └── web.rb
│ │ │ │ ├── mailer.rb
│ │ │ │ ├── specs.rb
│ │ │ │ └── specs
│ │ │ │ ├── cookies.rb
│ │ │ │ └── link_to.rb
│ │ ├── models
│ │ │ └── kit
│ │ │ │ └── domain
│ │ │ │ └── models
│ │ │ │ ├── application_record.rb
│ │ │ │ ├── base
│ │ │ │ ├── event.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ └── request_metadata_link.rb
│ │ │ │ ├── concerns
│ │ │ │ ├── engine_record.rb
│ │ │ │ ├── read_record.rb
│ │ │ │ └── write_record.rb
│ │ │ │ ├── engine_record.rb
│ │ │ │ ├── read
│ │ │ │ ├── event.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ └── request_metadata_link.rb
│ │ │ │ ├── read_record.rb
│ │ │ │ ├── write
│ │ │ │ ├── event.rb
│ │ │ │ ├── request_metadata.rb
│ │ │ │ └── request_metadata_link.rb
│ │ │ │ └── write_record.rb
│ │ ├── services
│ │ │ └── kit
│ │ │ │ └── domain
│ │ │ │ └── services
│ │ │ │ ├── event.rb
│ │ │ │ └── specs
│ │ │ │ └── routing.rb
│ │ └── spec
│ │ │ └── kit
│ │ │ └── domain
│ │ │ └── spec
│ │ │ └── support
│ │ │ └── helpers
│ │ │ └── routes.rb
│ ├── config
│ │ └── initializers
│ │ │ ├── active_record_model_schema.rb
│ │ │ ├── eager_load_endpoints.rb
│ │ │ ├── i18n.rb
│ │ │ └── web_app_manifest.rb
│ ├── db
│ │ └── migrate
│ │ │ ├── 20210910140620_create_events.rb
│ │ │ ├── 20210916066020_create_request_metadata.rb
│ │ │ └── 20211115170903_create_request_metadata_links.rb
│ ├── kit-domain.gemspec
│ └── lib
│ │ └── kit
│ │ ├── domain.rb
│ │ └── domain
│ │ ├── engine.rb
│ │ └── version.rb
├── kit-dotenv
│ ├── .gitignore
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── kit-dotenv-rails.gemspec
│ ├── kit-dotenv.gemspec
│ └── lib
│ │ ├── kit-dotenv-rails.rb
│ │ ├── kit-dotenv.rb
│ │ └── kit
│ │ ├── dotenv.rb
│ │ └── dotenv
│ │ ├── rails-now.rb
│ │ ├── railtie.rb
│ │ └── version.rb
├── kit-dummy_app_container
│ ├── .env.development
│ ├── .env.template
│ ├── .env.test
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── assets
│ │ │ ├── config
│ │ │ │ └── manifest.js
│ │ │ ├── javascripts
│ │ │ │ └── kit
│ │ │ │ │ └── dummy_app_container
│ │ │ │ │ └── application.js
│ │ │ └── stylesheets
│ │ │ │ └── kit
│ │ │ │ └── dummy_app_container
│ │ │ │ └── application.css
│ │ ├── components
│ │ │ └── kit
│ │ │ │ └── dummy_app_container
│ │ │ │ └── components
│ │ │ │ ├── navbar.rb
│ │ │ │ └── navbar
│ │ │ │ └── template.slim
│ │ ├── controllers
│ │ │ ├── application_controller.rb
│ │ │ └── kit
│ │ │ │ └── dummy_app_container
│ │ │ │ └── controllers
│ │ │ │ ├── api_controller.rb
│ │ │ │ ├── web
│ │ │ │ └── home_controller.rb
│ │ │ │ └── web_controller.rb
│ │ ├── models
│ │ │ └── application_record.rb
│ │ └── views
│ │ │ ├── layouts
│ │ │ └── application.html.slim
│ │ │ └── web
│ │ │ └── home
│ │ │ └── index.html.slim
│ ├── config.ru
│ ├── config
│ │ ├── application.rb
│ │ ├── boot.rb
│ │ ├── database.yml
│ │ ├── environment.rb
│ │ ├── environments
│ │ │ ├── development.rb
│ │ │ ├── production.rb
│ │ │ └── test.rb
│ │ ├── initializers
│ │ │ ├── assets.rb
│ │ │ ├── content_security_policy.rb
│ │ │ ├── cookies_serializer.rb
│ │ │ ├── eager_load_controllers.rb
│ │ │ ├── inflectors.rb
│ │ │ ├── load_dummy_app_config_initializers.rb
│ │ │ ├── sidekiq.rb
│ │ │ ├── slim.rb
│ │ │ └── wrap_parameters.rb
│ │ ├── puma.rb
│ │ ├── routes.rb
│ │ ├── sidekiq.yml
│ │ └── spring.rb
│ ├── kit-dummy_app_container.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── dummy_app_container.rb
│ │ │ └── dummy_app_container
│ │ │ ├── rails_application.rb
│ │ │ ├── rails_binary.rb
│ │ │ ├── rails_rspec.rb
│ │ │ └── version.rb
│ └── public
│ │ └── favicon.ico
├── kit-engine
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── kit-engine.gemspec
│ └── lib
│ │ └── kit
│ │ ├── engine.rb
│ │ └── engine
│ │ └── version.rb
├── kit-error
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── kit-error.gemspec
│ └── lib
│ │ └── kit
│ │ ├── error.rb
│ │ └── error
│ │ ├── exception.rb
│ │ ├── format.rb
│ │ ├── format
│ │ ├── active_model.rb
│ │ ├── dry_validation.rb
│ │ └── json_api.rb
│ │ ├── log.rb
│ │ └── version.rb
├── kit-log
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── kit-log.gemspec
│ └── lib
│ │ └── kit
│ │ ├── log.rb
│ │ └── log
│ │ ├── backends.rb
│ │ ├── backends
│ │ └── shell.rb
│ │ └── version.rb
├── kit-organizer
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── organizer
│ │ │ │ ├── contracts.rb
│ │ │ │ └── contracts
│ │ │ │ └── result.rb
│ │ ├── errors
│ │ │ └── kit
│ │ │ │ └── organizer
│ │ │ │ └── error.rb
│ │ └── services
│ │ │ └── kit
│ │ │ └── organizer
│ │ │ ├── log.rb
│ │ │ ├── services.rb
│ │ │ └── services
│ │ │ ├── callable.rb
│ │ │ ├── callable
│ │ │ ├── alias.rb
│ │ │ ├── branch.rb
│ │ │ ├── ctx_call.rb
│ │ │ ├── local_ctx.rb
│ │ │ ├── method.rb
│ │ │ ├── nest.rb
│ │ │ └── wrap.rb
│ │ │ ├── context.rb
│ │ │ ├── organize.rb
│ │ │ └── results.rb
│ ├── bin
│ │ └── rails
│ ├── config
│ │ └── initializers
│ │ │ └── array_override.rb
│ ├── docs
│ │ ├── VERSIONS
│ │ ├── assets
│ │ │ └── images
│ │ │ │ └── kit-organizer.logo.svg
│ │ └── guides
│ │ │ ├── organizers.md
│ │ │ └── usage.md
│ ├── kit-organizer.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── organizer.rb
│ │ │ └── organizer
│ │ │ ├── engine.rb
│ │ │ └── version.rb
│ ├── spec
│ │ ├── organizer
│ │ │ ├── callable
│ │ │ │ ├── alias_spec.rb
│ │ │ │ ├── branch_spec.rb
│ │ │ │ ├── ctx_call_spec.rb
│ │ │ │ ├── local_ctx_spec.rb
│ │ │ │ ├── method_spec.rb
│ │ │ │ ├── nest_spec.rb
│ │ │ │ └── wrap_spec.rb
│ │ │ └── organizer_spec.rb
│ │ ├── rails_helper.rb
│ │ └── spec_helper.rb
│ └── tasks
│ │ └── documentation.rake
├── kit-pagination
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── docs
│ │ ├── VERSIONS
│ │ └── guides
│ │ │ ├── about_pagination.md
│ │ │ ├── absolute_pagination.md
│ │ │ ├── relative_pagination.md
│ │ │ └── usage.md
│ ├── kit-pagination.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── pagination.rb
│ │ │ └── pagination
│ │ │ ├── active_record.rb
│ │ │ ├── condition.rb
│ │ │ ├── cursor.rb
│ │ │ └── version.rb
│ ├── spec
│ │ ├── active_record_spec.rb
│ │ ├── pagination_spec.rb
│ │ ├── spec_helper.rb
│ │ └── support
│ │ │ ├── comparable.rb
│ │ │ └── spec_db.rb
│ └── tasks
│ │ └── documentation.rake
├── kit-router
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── adapters
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ └── adapters
│ │ │ │ ├── async_rails.rb
│ │ │ │ ├── http
│ │ │ │ ├── intent.rb
│ │ │ │ ├── intent
│ │ │ │ │ ├── actions
│ │ │ │ │ │ ├── consume.rb
│ │ │ │ │ │ └── save.rb
│ │ │ │ │ ├── store.rb
│ │ │ │ │ └── strategies.rb
│ │ │ │ └── mountpoints.rb
│ │ │ │ ├── http_rails.rb
│ │ │ │ ├── http_rails
│ │ │ │ ├── conn.rb
│ │ │ │ ├── conn
│ │ │ │ │ ├── export.rb
│ │ │ │ │ └── import.rb
│ │ │ │ └── routes.rb
│ │ │ │ ├── inline_base.rb
│ │ │ │ └── mailer_rails.rb
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ ├── contracts.rb
│ │ │ │ └── contracts
│ │ │ │ └── router_conn.rb
│ │ ├── controllers
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ └── controllers
│ │ │ │ └── concerns
│ │ │ │ ├── default_route.rb
│ │ │ │ └── router_conn.rb
│ │ ├── models
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ └── models
│ │ │ │ └── conn.rb
│ │ ├── services
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ ├── log.rb
│ │ │ │ ├── services.rb
│ │ │ │ └── services
│ │ │ │ ├── adapters.rb
│ │ │ │ ├── adapters
│ │ │ │ └── store.rb
│ │ │ │ ├── cli.rb
│ │ │ │ ├── cli
│ │ │ │ ├── aliases.rb
│ │ │ │ ├── aliases_graph.rb
│ │ │ │ └── mountpoints.rb
│ │ │ │ ├── router.rb
│ │ │ │ ├── store.rb
│ │ │ │ └── store
│ │ │ │ ├── alias.rb
│ │ │ │ ├── endpoint.rb
│ │ │ │ └── mountpoint.rb
│ │ ├── view_helpers
│ │ │ └── kit
│ │ │ │ └── router
│ │ │ │ ├── view_helpers.rb
│ │ │ │ └── view_helpers
│ │ │ │ ├── http_routes.rb
│ │ │ │ └── router_conn.rb
│ │ └── views
│ │ │ └── kit
│ │ │ └── router
│ │ │ ├── rescues
│ │ │ ├── _request_and_response.html.erb
│ │ │ ├── _trace.html.erb
│ │ │ ├── layout.erb
│ │ │ └── routing_error.html.erb
│ │ │ └── routes
│ │ │ ├── _route.html.erb
│ │ │ └── _table.html.erb
│ ├── assets
│ │ └── src
│ │ │ ├── aliases.html
│ │ │ ├── aliases_chart.js
│ │ │ └── aliases_style.css
│ ├── bin
│ │ └── rails
│ ├── config
│ │ └── initializers
│ │ │ ├── action_controller_log_subscriber.rb
│ │ │ ├── async_adapter.rb
│ │ │ └── html_table_formatter.rb
│ ├── docs
│ │ ├── VERSIONS
│ │ ├── assets
│ │ │ └── images
│ │ │ │ └── kit-router.logo.svg
│ │ └── guides
│ │ │ ├── about.md
│ │ │ ├── architecture.md
│ │ │ ├── questions.md
│ │ │ └── usage.md
│ ├── kit-router.gemspec
│ ├── lib
│ │ ├── kit
│ │ │ ├── router.rb
│ │ │ └── router
│ │ │ │ ├── engine.rb
│ │ │ │ ├── tasks.rb
│ │ │ │ └── version.rb
│ │ └── tasks
│ │ │ └── kit_router.rake
│ ├── spec
│ │ ├── rails_helper.rb
│ │ ├── router
│ │ │ └── alias_spec.rb
│ │ └── spec_helper.rb
│ └── tasks
│ │ └── documentation.rake
├── kit-rspec_formatter
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT_LICENSE.md
│ ├── README.md
│ ├── kit-rspec_formatter.gemspec
│ └── lib
│ │ └── kit
│ │ ├── rspec_formatter.rb
│ │ └── rspec_formatter
│ │ ├── formatter.rb
│ │ └── version.rb
├── kit-store
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ │ ├── contracts
│ │ │ └── kit
│ │ │ │ └── store
│ │ │ │ ├── contracts.rb
│ │ │ │ └── contracts
│ │ │ │ ├── callable_with_hash.rb
│ │ │ │ └── uniqueness.rb
│ │ └── services
│ │ │ └── kit
│ │ │ └── store
│ │ │ ├── services.rb
│ │ │ ├── services
│ │ │ ├── store.rb
│ │ │ ├── table.rb
│ │ │ └── table
│ │ │ │ ├── constraints.rb
│ │ │ │ ├── insertion.rb
│ │ │ │ ├── ordering.rb
│ │ │ │ ├── selection.rb
│ │ │ │ ├── series.rb
│ │ │ │ └── structure.rb
│ │ │ └── types.rb
│ ├── bin
│ │ └── rails
│ ├── kit-store.gemspec
│ ├── lib
│ │ └── kit
│ │ │ ├── store.rb
│ │ │ └── store
│ │ │ ├── railtie.rb
│ │ │ └── version.rb
│ └── spec
│ │ ├── rails_helper.rb
│ │ ├── spec_helper.rb
│ │ └── store
│ │ ├── contracts
│ │ └── callable_with_hash_spec.rb
│ │ └── services
│ │ ├── store_spec.rb
│ │ └── table
│ │ ├── insertion_spec.rb
│ │ ├── selection_spec.rb
│ │ └── structure_spec.rb
├── kit-support
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── kit-support.gemspec
│ └── lib
│ │ └── kit
│ │ ├── support.rb
│ │ └── support
│ │ ├── core.rb
│ │ ├── core
│ │ ├── array.rb
│ │ └── hash.rb
│ │ ├── railtie.rb
│ │ └── version.rb
└── kit-view_components
│ ├── .gitignore
│ ├── .rubocop.yml
│ ├── Gemfile
│ ├── MIT-LICENSE
│ ├── README.md
│ ├── Rakefile
│ ├── app
│ ├── components
│ │ └── kit
│ │ │ └── view_components
│ │ │ └── components
│ │ │ ├── analytics
│ │ │ ├── google_component.html.slim
│ │ │ ├── google_component.rb
│ │ │ ├── segment_component.html.slim
│ │ │ └── segment_component.rb
│ │ │ ├── base_component.rb
│ │ │ ├── favicon_component.html.slim
│ │ │ ├── favicon_component.rb
│ │ │ ├── flash_component.html.slim
│ │ │ ├── flash_component.rb
│ │ │ ├── form
│ │ │ ├── errors_feedback_component.html.slim
│ │ │ ├── errors_feedback_component.rb
│ │ │ ├── input_checkbox_component.html.slim
│ │ │ ├── input_checkbox_component.rb
│ │ │ ├── input_component.html.slim
│ │ │ ├── input_component.rb
│ │ │ ├── input_email_component.rb
│ │ │ ├── input_number_component.rb
│ │ │ ├── input_radio_blocks_component.html.slim
│ │ │ ├── input_radio_blocks_component.rb
│ │ │ ├── input_radio_group_component.html.slim
│ │ │ ├── input_radio_group_component.rb
│ │ │ ├── input_select_blocks_component.html.slim
│ │ │ ├── input_select_blocks_component.rb
│ │ │ ├── input_select_component.html.slim
│ │ │ ├── input_select_component.rb
│ │ │ ├── input_text_component.html.slim
│ │ │ ├── input_text_component.rb
│ │ │ ├── input_textarea_component.html.slim
│ │ │ └── input_textarea_component.rb
│ │ │ ├── form_component.html.slim
│ │ │ ├── form_component.rb
│ │ │ ├── js_env_component.html.slim
│ │ │ ├── js_env_component.rb
│ │ │ ├── meta
│ │ │ ├── content_component.html.slim
│ │ │ ├── content_component.rb
│ │ │ ├── default_component.html.slim
│ │ │ ├── default_component.rb
│ │ │ ├── open_graph_component.html.slim
│ │ │ ├── open_graph_component.rb
│ │ │ ├── twitter_component.html.slim
│ │ │ └── twitter_component.rb
│ │ │ ├── meta_component.html.slim
│ │ │ └── meta_component.rb
│ └── middlewares
│ │ └── kit
│ │ └── view_components
│ │ └── middlewares
│ │ ├── js_env.rb
│ │ └── meta.rb
│ ├── kit-view_components.gemspec
│ └── lib
│ └── kit
│ ├── view_components.rb
│ └── view_components
│ ├── engine.rb
│ └── version.rb
├── shared
└── kit_gems.gitignore
├── tasks
├── bundle_install.sh
├── bundle_update.sh
├── documentation.rake
└── generate_github_pages_documentation.sh
└── version.rb
/.ruby-version:
--------------------------------------------------------------------------------
1 | 3.0.2
--------------------------------------------------------------------------------
/.tool-versions:
--------------------------------------------------------------------------------
1 | ruby 3.0.2
2 | nodejs 16.6.2
3 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
6 | gem 'kit-doc', path: 'libraries/kit-doc' # GEMSPEC
7 |
--------------------------------------------------------------------------------
/KIT_VERSION:
--------------------------------------------------------------------------------
1 | 0.1.0.alpha
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | import 'tasks/documentation.rake'
10 |
--------------------------------------------------------------------------------
/apps/app-container/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/apps/app-container/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../stylesheets .css
3 |
--------------------------------------------------------------------------------
/apps/app-container/app/assets/images/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/app/assets/images/.keep
--------------------------------------------------------------------------------
/apps/app-container/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | end
3 |
--------------------------------------------------------------------------------
/apps/app-container/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/apps/app-container/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/app/models/concerns/.keep
--------------------------------------------------------------------------------
/apps/app-container/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | AppContainer
5 | <%= csrf_meta_tags %>
6 | <%= csp_meta_tag %>
7 |
8 | <%= stylesheet_link_tag 'application', media: 'all' %>
9 |
10 |
11 |
12 | <%= yield %>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/apps/app-container/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/apps/app-container/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/apps/app-container/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/apps/app-container/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | begin
5 | exec "yarnpkg", *ARGV
6 | rescue Errno::ENOENT
7 | $stderr.puts "Yarn executable was not detected in the system."
8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 | exit 1
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/app-container/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/apps/app-container/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 | #require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/apps/app-container/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/apps/app-container/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
--------------------------------------------------------------------------------
/apps/app-container/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | mount Kit::Auth::Engine, at: '/'
3 | end
4 |
--------------------------------------------------------------------------------
/apps/app-container/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "app_container",
3 | "private": true,
4 | "dependencies": {}
5 | }
6 |
--------------------------------------------------------------------------------
/apps/app-container/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/apps/app-container/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/apps/app-container/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/public/favicon.ico
--------------------------------------------------------------------------------
/apps/app-container/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/apps/app-container/vendor/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/apps/app-container/vendor/.keep
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | docs.rubykit.org
--------------------------------------------------------------------------------
/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/docs/assets/images/export_svg.txt:
--------------------------------------------------------------------------------
1 | inkscape -z -w 512 -h 512 --export-background-opacity=0 --export-type=png rubykit-framework-logo.svg
--------------------------------------------------------------------------------
/docs/assets/images/rubykit-framework-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/assets/images/rubykit-framework-logo.png
--------------------------------------------------------------------------------
/docs/guides/architecture/databases.md:
--------------------------------------------------------------------------------
1 | # Databases
2 |
3 | TODO: write about:
4 | - Our assumptions: CQRS / Ecto
5 | - Kit default database setup (read / write / ops)
6 | - Kit read VS write models
7 | - Kit model attributes setup
8 | - How to use tasks with this setup'
9 |
--------------------------------------------------------------------------------
/docs/guides/architecture/directory_structure.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/guides/architecture/directory_structure.md
--------------------------------------------------------------------------------
/docs/guides/braindumps/kit_auth.md:
--------------------------------------------------------------------------------
1 |
2 | Missing table:
3 |
4 | ```
5 | create_table :authentications do |t|
6 | t.timestamps
7 | t.integer :user_id
8 | t.string :provider
9 | t.string :uid
10 | t.string :token
11 | t.text :extra
12 | end
13 |
14 | add_index :authentications, [:user_id, :provider]
15 | add_index :authentications, [:uid, :provider]
16 | add_index :authentications, :provider
17 | ```
18 |
19 |
--------------------------------------------------------------------------------
/docs/guides/introduction/installation.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/guides/introduction/installation.md
--------------------------------------------------------------------------------
/docs/guides/introduction/overview.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/guides/introduction/overview.md
--------------------------------------------------------------------------------
/docs/guides/various/api.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/guides/various/api.md
--------------------------------------------------------------------------------
/docs/guides/various/profiling.md:
--------------------------------------------------------------------------------
1 | # List of tools
2 |
3 | - https://github.com/schneems/derailed_benchmarks
4 | - https://ruby-prof.github.io/
5 | - https://github.com/test-prof/test-prof
6 |
7 | ## In specs
8 |
9 | `TEST_RUBY_PROF=1 bundle exec rspec`
--------------------------------------------------------------------------------
/docs/guides/various/ui.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/docs/guides/various/ui.md
--------------------------------------------------------------------------------
/domains/kit-auth/.env.template:
--------------------------------------------------------------------------------
1 | PORT=
2 |
3 | DEVISE_SECRET_KEY=
4 |
5 | DATABASE_URL=
--------------------------------------------------------------------------------
/domains/kit-auth/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
3 | # Project specific setup.
4 |
5 | AllCops:
6 |
7 | Exclude:
8 | - 'spec/dummy/**/*'
9 |
10 | # Note: needed because running rubocop in the top level dir VS projects subdirectories has slightly different behaviours due to setup
11 | Lint/RedundantCopDisableDirective:
12 | Enabled: false
13 |
14 | Style/Documentation:
15 | Enabled: false
16 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/actions/kit/auth/actions/applications/load_api.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::Actions::Applications::LoadApi
2 |
3 | def self.call
4 | uid = 'api'
5 | application = Kit::Auth::Models::Read::Application.find_by(uid: uid)
6 |
7 | if application
8 | [:ok, application: application]
9 | else
10 | [:error, detail: "Could not find `#{ uid }` application"]
11 | end
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/actions/kit/auth/actions/applications/load_web.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::Actions::Applications::LoadWeb
2 |
3 | def self.call
4 | uid = 'webapp'
5 | application = Kit::Auth::Models::Read::Application.find_by(uid: uid)
6 |
7 | if application
8 | [:ok, application: application]
9 | else
10 | [:error, detail: "Could not find `#{ uid }` application"]
11 | end
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/admin/kit/auth/admin/attributes/application.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Admin::Attributes::Application < Kit::Admin::Attributes
2 |
3 | def self.all
4 | base_attributes.merge(
5 | name: :code,
6 | created_at: nil,
7 | updated_at: nil,
8 | uid: :code,
9 | scopes: :code,
10 | confidential: nil,
11 | )
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/admin/kit/auth/admin/attributes/request_metadata.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Admin::Attributes::RequestMetadata < Kit::Domain::Admin::Attributes::RequestMetadata
2 |
3 | def self.all
4 | super.merge(
5 | user: :model_verbose,
6 | )
7 | end
8 |
9 | def self.index
10 | super.merge(
11 | user: :model_verbose,
12 | )
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/admin/kit/auth/admin/attributes/user.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Admin::Attributes::User < Kit::Admin::Attributes
2 |
3 | def self.all
4 | base_attributes.merge(
5 | email: :code,
6 | created_at: nil,
7 | updated_at: nil,
8 | confirmed_at: nil,
9 | )
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/admin/kit/auth/admin/attributes/user_oauth_identity.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Admin::Attributes::UserOauthIdentity < Kit::Admin::Attributes
2 |
3 | def self.all
4 | base_attributes.merge(
5 | user: :model_verbose,
6 |
7 | provider: :color,
8 | provider_uid: :code,
9 |
10 | data: :pre_yaml,
11 | )
12 | end
13 |
14 | def self.index
15 | all.except(:data)
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/admin/kit/auth/admin/attributes/user_oauth_secret.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Admin::Attributes::UserOauthSecret < Kit::Admin::Attributes
2 |
3 | def self.all
4 | base_attributes.merge(
5 | user_oauth_identity: :model_verbose,
6 |
7 | provider_app_id: :code,
8 |
9 | secret_token: :boolean,
10 | secret_refresh_token: :boolean,
11 |
12 | expires_at: nil,
13 | )
14 | end
15 |
16 | end
17 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/assets/config/kit_auth_manifest.js:
--------------------------------------------------------------------------------
1 | //= link_directory ../javascripts/kit/auth .js
2 | //= link_directory ../stylesheets/kit/auth .css
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/assets/images/kit/auth/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-auth/app/assets/images/kit/auth/.keep
--------------------------------------------------------------------------------
/domains/kit-auth/app/assets/javascripts/kit/auth/application.js:
--------------------------------------------------------------------------------
1 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
2 | // about supported directives.
3 |
4 | //= require "./components"
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/assets/javascripts/kit/auth/components.js:
--------------------------------------------------------------------------------
1 | // require kit/auth/components/forms/signin_form_component
2 | // require kit/auth/components/forms/signup_form_component
3 |
4 | //= require kit/auth/components/inputs/input_component
5 | //= require kit/auth/components/inputs/password_component
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Component < Kit::ViewComponents::Components::BaseComponent
2 |
3 | attr_reader :errors_list
4 |
5 | def initialize(errors_list: [], **)
6 | super
7 | @errors_list = errors_list
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/emails/users/sign_up_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Emails::Users::SignUpComponent < Kit::Auth::Components::Emails::EmailComponent
2 |
3 | attr_reader :user_email
4 |
5 | def initialize(user_email:, **)
6 | super
7 |
8 | @user_email = user_email.attributes.to_h
9 | end
10 |
11 | def liquid_assigns_list
12 | super + [:user_email]
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/forms/password_reset_component.scss:
--------------------------------------------------------------------------------
1 | .component_forms_reset-password-request {
2 | width: 100%;
3 | max-width: 420px;
4 | padding: 15px;
5 | margin: auto;
6 | }
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/forms/password_reset_request_component.scss:
--------------------------------------------------------------------------------
1 | .component_forms_reset-password-request {
2 | width: 100%;
3 | max-width: 420px;
4 | padding: 15px;
5 | margin: auto;
6 | }
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/forms/signin_form_component.scss:
--------------------------------------------------------------------------------
1 | .component_forms_signin-form {
2 | /*
3 | width: 100%;
4 | max-width: 420px;
5 | padding: 15px;
6 | margin: auto;
7 | */
8 | }
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/forms/signup_form_component.scss:
--------------------------------------------------------------------------------
1 | .component_forms_signup-form {
2 | //width: 100%;
3 | }
4 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/inputs/email_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Inputs::EmailComponent < Kit::Auth::Components::Inputs::InputComponent
2 |
3 | def initialize(*, **)
4 | super
5 | @input_type = 'email'
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/inputs/input_component.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 |
3 | const $input_components = $('[class*="component_inputs_"]');
4 |
5 | $input_components.each(function() {
6 | setupComponent($(this));
7 | });
8 |
9 | function setupComponent($component) {
10 | const $input = $component.find('input');
11 |
12 | $input.keydown(function() {
13 | $input.removeClass('is-invalid');
14 | });
15 | }
16 |
17 | });
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/inputs/input_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Inputs::InputComponent < Kit::ViewComponents::Components::Form::InputComponent
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/inputs/password_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Inputs::PasswordComponent < Kit::Auth::Components::Inputs::InputComponent
2 |
3 | attr_reader :visible
4 |
5 | def initialize(**)
6 | super
7 |
8 | @input_type = 'password'
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/inputs/password_component.scss:
--------------------------------------------------------------------------------
1 | .component_inputs_password {
2 |
3 | i.password_visibility {
4 | display: none;
5 |
6 | position: absolute;
7 | right: 14px;
8 | top: 21px;
9 |
10 | cursor: pointer;
11 | }
12 |
13 | input.is-invalid ~ i.password_visibility {
14 | right: 35px;
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/page_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::PageComponent < Kit::Auth::Components::Component
2 |
3 | attr_reader :csrf_token
4 |
5 | def initialize(csrf_token: nil, **)
6 | super
7 | @csrf_token = csrf_token
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/password_reset/edit_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::PasswordReset::EditComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :model, :access_tokens
4 |
5 | def initialize(model:, access_token:, **)
6 | super
7 |
8 | @model = model
9 | @access_token = access_token
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/password_reset_request/new_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::PasswordResetRequest::NewComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :model
4 |
5 | def initialize(model:, **)
6 | super
7 |
8 | @model = model
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/settings/oauth/index_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::Settings::Oauth::IndexComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :list
4 |
5 | def initialize(list:, **)
6 | super
7 | @list = list
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/settings/sessions/index_component.html.slim:
--------------------------------------------------------------------------------
1 | = render Kit::Auth::Components::Shared::Settings::WrapperComponent.new do
2 |
3 | h2.h3 Security & Login
4 |
5 | hr
6 |
7 | h3.h4.pt-2.mb-4
8 | | Where you're logged in
9 |
10 | - list.each do |el|
11 | = render Kit::Auth::Components::Users::DeviceComponent.new(model: el)
12 |
13 | hr
14 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/settings/sessions/index_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::Settings::Sessions::IndexComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :list
4 |
5 | def initialize(list:, **)
6 | super
7 | @list = list
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/sign_in/with_magic_link/after_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::SignIn::WithMagicLink::AfterComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :email
4 |
5 | def initialize(email:, **)
6 | super
7 |
8 | @email = email
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/sign_in/with_magic_link/new_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::SignIn::WithMagicLink::NewComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :model
4 |
5 | def initialize(model:, **)
6 | super
7 |
8 | @model = model
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/sign_in/with_oauth/new_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::SignIn::WithOauth::NewComponent < Kit::Auth::Components::Pages::PageComponent
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/sign_in/with_password/new_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::SignIn::WithPassword::NewComponent < Kit::Auth::Components::Pages::PageComponent
2 |
3 | attr_reader :model
4 |
5 | def initialize(model:, **)
6 | super
7 |
8 | @model = model
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/pages/users/sign_up/with_oauth/new_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Pages::Users::SignUp::WithOauth::NewComponent < Kit::Auth::Components::Pages::PageComponent
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/shared/email_services_component.html.slim:
--------------------------------------------------------------------------------
1 | - services.each_as_kwargs do |name:, icon:, link:|
2 | a.btn.btn-outline-secondary.text-center.mx-3.d-inline-flex.align-items-center href=link target="_blank" rel="noopener noreferrer"
3 | i.fab-extra.me-2 class=icon
4 | span.fw-bold
5 | | Open #{ name }
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/shared/social_buttons_component.html.slim:
--------------------------------------------------------------------------------
1 | .row.g-1.d-flex.justify-content-center
2 | - providers.each_as_kwargs do |name:, icon:, url:|
3 | .col-3.text-center
4 | a.btn.btn-ghost-soft-secondary.text-center.col-12 href=url
5 | .h3.mb-0
6 | i.fab class=icon
7 | .small
8 | = name
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/shared/social_buttons_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Shared::SocialButtonsComponent < Kit::Auth::Components::Component
2 |
3 | def providers
4 | raise 'Implement me!'
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/stylesheet.scss:
--------------------------------------------------------------------------------
1 | @import "kit/auth/components/forms/signin_form_component";
2 | @import "kit/auth/components/forms/signup_form_component";
3 | @import "kit/auth/components/forms/password_reset_request_component";
4 |
5 | @import "kit/auth/components/inputs/password_component";
6 |
7 | @import "kit/auth/components/various/alert_component";
8 |
9 |
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/users/oauth_identity_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Components::Users::OauthIdentityComponent < Kit::Auth::Components::Component
2 |
3 | attr_reader :model
4 |
5 | def initialize(model:)
6 | super
7 | @model = model
8 | end
9 |
10 | def provider
11 | model.provider
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/various/alert_component.html.slim:
--------------------------------------------------------------------------------
1 | .alert role="alert" class="#{classes_str} #{alert_type_class}"
2 | = content
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/various/alert_component.scss:
--------------------------------------------------------------------------------
1 | .component_various_alert {
2 |
3 | p {
4 | margin-bottom: 2px;
5 | }
6 |
7 | }
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/various/errors_alert_component.html.slim:
--------------------------------------------------------------------------------
1 | - if errors.size > 0
2 | = render Kit::Auth::Components::Various::AlertComponent.new(\
3 | type: 'danger',
4 | classes: [component_class_name],
5 | ) do
6 | - errors.each do |error|
7 | p.m-0 = error[:detail]
--------------------------------------------------------------------------------
/domains/kit-auth/app/components/kit/auth/components/various/errors_alert_component.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::Components::Various
2 | class ErrorsAlertComponent < Kit::Auth::Components::Component
3 |
4 | attr_reader :errors
5 |
6 | def initialize(errors: [], **)
7 | super
8 | @errors = errors
9 | end
10 |
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints.rb:
--------------------------------------------------------------------------------
1 | # All Kit::Auth endpoints
2 | module Kit::Auth::Endpoints
3 |
4 | def self.register_endpoints
5 | Kit::Auth::Endpoints::Api.register_endpoints
6 | Kit::Auth::Endpoints::Events.register_endpoints
7 | Kit::Auth::Endpoints::Mailers.register_endpoints
8 | Kit::Auth::Endpoints::Web.register_endpoints
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints/api.rb:
--------------------------------------------------------------------------------
1 | # All Api endpoints.
2 | module Kit::Auth::Endpoints::Api
3 |
4 | def self.register_endpoints
5 | Kit::Auth::Endpoints::Api::Aliases.register_aliases
6 | Kit::Auth::Endpoints::Api::Index.register_endpoints
7 | Kit::Auth::Endpoints::Api::Show.register_endpoints
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints/api/aliases.rb:
--------------------------------------------------------------------------------
1 | # All Api endpoints aliases declarations.
2 | module Kit::Auth::Endpoints::Api::Aliases
3 |
4 | def self.register_aliases
5 | Kit::Auth::Endpoints::Api::Aliases::RequestUser.register_aliases
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints/events.rb:
--------------------------------------------------------------------------------
1 | # All Events endpoints.
2 | module Kit::Auth::Endpoints::Events
3 |
4 | def self.register_endpoints
5 | Kit::Auth::Endpoints::Events::Users.register_endpoints
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints/mailers.rb:
--------------------------------------------------------------------------------
1 | # All Mailers endpoints.
2 | module Kit::Auth::Endpoints::Mailers
3 |
4 | def self.register_endpoints
5 | Kit::Auth::Endpoints::Mailers::Users.register_endpoints
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/endpoints/kit/auth/endpoints/web.rb:
--------------------------------------------------------------------------------
1 | # All Web endpoints.
2 | module Kit::Auth::Endpoints::Web
3 |
4 | def self.register_endpoints
5 | Kit::Auth::Endpoints::Web::Aliases.register_aliases
6 | Kit::Auth::Endpoints::Web::Users.register_endpoints
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::ApplicationRecord < ActiveRecord::Base
2 |
3 | self.abstract_class = true
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/engine_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::EngineRecord < Kit::Auth::Models::ApplicationRecord
2 |
3 | include Kit::Domain::Models::Concerns::EngineRecord
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read/application.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Read::Application < Kit::Auth::Models::ReadRecord
2 |
3 | include Kit::Auth::Models::Base::Application
4 |
5 | has_many :user_access_tokens,
6 | class_name: 'Kit::Auth::Models::Read::UserSecret',
7 | foreign_key: 'application_id'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read/ip_geolocation.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::Models::Read
2 | class IpGeolocation < Kit::Auth::Models::ReadRecord
3 |
4 | self.table_name = 'ip_geolocation'
5 |
6 | self.allowed_columns = [
7 | :id,
8 | :ip_start,
9 | :ip_end,
10 | :country_id,
11 | ]
12 |
13 | belongs_to :country,
14 | class_name: 'Kit::Auth::Models::Read::Country'
15 |
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read/request_metadata.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Read::RequestMetadata < Kit::Auth::Models::ReadRecord
2 |
3 | include Kit::Auth::Models::Base::RequestMetadata
4 |
5 | belongs_to :user,
6 | class_name: 'Kit::Auth::Models::Read::User'
7 |
8 | has_many :request_metadata_links,
9 | class_name: 'Kit::Domain::Models::Read::RequestMetadataLink'
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read/user_email.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Read::UserEmail < Kit::Auth::Models::ReadRecord
2 |
3 | include Kit::Auth::Models::Base::UserEmail
4 |
5 | def user
6 | @user ||= Kit::Auth::Models::Read::User.find(self.id)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read/user_oauth_secret.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Read::UserOauthSecret < Kit::Auth::Models::ReadRecord
2 |
3 | include Kit::Auth::Models::Base::UserOauthSecret
4 |
5 | belongs_to :user_oauth_identity,
6 | class_name: 'Kit::Auth::Models::Read::UserOauthIdentity',
7 | foreign_key: :user_oauth_identity_id
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/read_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::ReadRecord < Kit::Auth::Models::EngineRecord
2 |
3 | include Kit::Domain::Models::Concerns::ReadRecord
4 |
5 | establish_connection :primary_readonly
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/write/application.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Write::Application < Kit::Auth::Models::WriteRecord
2 |
3 | include Kit::Auth::Models::Base::Application
4 |
5 | has_many :user_access_tokens,
6 | class_name: 'Kit::Auth::Models::Write::UserSecret',
7 | foreign_key: 'application_id'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/write/request_metadata.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Write::RequestMetadata < Kit::Auth::Models::WriteRecord
2 |
3 | include Kit::Auth::Models::Base::RequestMetadata
4 |
5 | belongs_to :user,
6 | class_name: 'Kit::Auth::Models::Write::User',
7 | optional: true
8 |
9 | has_many :request_metadata_links,
10 | class_name: 'Kit::Domain::Models::Write::RequestMetadataLink'
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/write/user_email.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Write::UserEmail < Kit::Auth::Models::WriteRecord
2 |
3 | include Kit::Auth::Models::Base::UserEmail
4 |
5 | def user
6 | @user ||= Kit::Auth::Models::Write::User.find(self.id)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/write/user_oauth_secret.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::Write::UserOauthSecret < Kit::Auth::Models::WriteRecord
2 |
3 | include Kit::Auth::Models::Base::UserOauthSecret
4 |
5 | belongs_to :user_oauth_identity,
6 | class_name: 'Kit::Auth::Models::Write::UserOauthIdentity',
7 | foreign_key: :user_oauth_identity_id
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/models/kit/auth/models/write_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Models::WriteRecord < Kit::Auth::Models::EngineRecord
2 |
3 | include Kit::Domain::Models::Concerns::WriteRecord
4 |
5 | establish_connection :primary_write
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/resources/kit/auth/resources/api/resource.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::Resources::Api::Resource < Kit::Api::Resources::ActiveRecordResource # rubocop:disable Style/Documentation
2 |
3 | def self.linker
4 | Kit::Auth::Services::Api::Linker.to_h
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/app/services/kit/auth/log.rb:
--------------------------------------------------------------------------------
1 | # Library specific wrapper for Kit::Auth.
2 | module Kit::Auth::Log
3 |
4 | def self.log(msg:, flags: [])
5 | flags.unshift([:gem, :kit_auth])
6 | Kit::Log.log(msg: msg, flags: flags)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require_relative '../config/kit_runtime_config'
4 |
5 | # Set up gems listed in the Gemfile.
6 | ENV['BUNDLE_GEMFILE'] ||= KIT_APP_PATHS['GEMFILE']
7 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
8 |
9 | require 'kit/dummy_app_container/rails_binary'
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/initializers/eager_load_endpoints.rb:
--------------------------------------------------------------------------------
1 | Rails.application.config.to_prepare do
2 | Kit::Auth::Endpoints.register_endpoints
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/initializers/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.reloader.to_prepare do
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/initializers/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.reloader.to_prepare do
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/initializers/locales.rb:
--------------------------------------------------------------------------------
1 | path = File.expand_path('../locales', __dir__)
2 |
3 | Rails.application.config.i18n.load_path += Dir["#{ path }/**/*.{rb,yml}"]
4 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/emails.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 |
5 | emails:
6 |
7 | from: 'no-reply@rubykit.org'
8 |
9 | brand:
10 | logo_url: "${kit.auth.logo_url}"
11 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/emails/email_confirmation.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 |
5 | emails:
6 |
7 | email_confirmation_link:
8 |
9 | subject: "Please confirm your email."
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/emails/password_reset_link.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 |
5 | emails:
6 |
7 | password_reset_link:
8 |
9 | subject: "Reset password instructions"
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/emails/sign_in_link.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 |
5 | emails:
6 |
7 | sign_in_link:
8 |
9 | subject: "Your sign in magic-link"
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/kit_auth.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 |
5 | logo_url: 'https://raw.githubusercontent.com/rubykit/kit/main/domains/kit-auth/docs/assets/images/kit-auth.logo.svg'
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/locales/pages/header.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | kit:
3 | auth:
4 | pages:
5 | header:
6 |
7 | sign_up:
8 | action: 'Sign up'
9 |
10 | sign_in:
11 | action: 'Sign in'
12 |
13 | sign_out:
14 | action: 'Sign out'
15 |
--------------------------------------------------------------------------------
/domains/kit-auth/config/routes.rb:
--------------------------------------------------------------------------------
1 | # Engine routes: empty!
2 | # The responsability to mount domain routes belongs to the application container.
3 | Kit::Auth::Engine.routes.draw do
4 | end
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/db/migrate/20210916066033_add_user_to_request_metadata.rb:
--------------------------------------------------------------------------------
1 | class AddUserToRequestMetadata < ActiveRecord::Migration[6.1] # rubocop:disable Style/Documentation
2 |
3 | def change
4 | add_reference :request_metadata, :user, index: true, foreign_key: true
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/domains/kit-auth/docs/guides/braindumps/multi_emails.md:
--------------------------------------------------------------------------------
1 | # Multi emails
2 |
3 | Should we add default support for multi emails?
4 | This would require decoupling the underlying table from the `[:email, :confirmed_at]` tupple.
5 |
6 | ### References
7 | - https://github.com/allenwq/devise-multi_email
--------------------------------------------------------------------------------
/domains/kit-auth/lib/kit-auth.rb:
--------------------------------------------------------------------------------
1 | require_relative './kit/auth' # rubocop:disable Naming/FileName
2 |
--------------------------------------------------------------------------------
/domains/kit-auth/lib/kit/auth.rb:
--------------------------------------------------------------------------------
1 | require 'doorkeeper'
2 |
3 | module Kit # rubocop:disable Style/Documentation
4 | end
5 |
6 | module Kit::Auth # rubocop:disable Style/Documentation
7 | Doorkeeper = ::Doorkeeper
8 | end
9 |
10 | require 'kit/auth/engine'
11 | require 'kit/auth/routes'
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/lib/kit/auth/routes.rb:
--------------------------------------------------------------------------------
1 | # Routes helper for `Kit::Auth`
2 | module Kit::Auth::Routes
3 |
4 | # NOTE: The indirection is needed somehow for a thread safety thing.
5 | # Otherwise we get a `url_options` issue.
6 | module UrlHelpers
7 | include Kit::Auth::Engine.routes.url_helpers
8 | end
9 |
10 | extend UrlHelpers
11 |
12 | def self.default_url_options
13 | Kit::Auth::Engine.routes.default_url_options || {}
14 | end
15 |
16 | end
17 |
--------------------------------------------------------------------------------
/domains/kit-auth/lib/kit/auth/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Auth
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-2.6.2
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/admin/kit/auth/dummy_app_container/admin.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::DummyAppContainer::Admin
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/assets/javascripts/kit_auth_dummy_vendor.js:
--------------------------------------------------------------------------------
1 | //= require kit_theme_bootstrap/vendor
2 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/assets/stylesheets/kit_auth_dummy_application.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | = require_self
4 |
5 | = require kit/auth/application
6 |
7 | */
8 |
9 | form .actions {
10 | text-align: center;
11 | }
12 |
13 | form .form-floating {
14 | margin-bottom: 20px;
15 | }
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/assets/stylesheets/kit_auth_dummy_emails.scss:
--------------------------------------------------------------------------------
1 | @import 'kit_theme_bootstrap/theme/variables/bootstrap';
2 |
3 | @import 'bootstrap-email';
4 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/components/kit/auth/dummy_app/components/navbar_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::DummyApp::Components::NavbarComponent < Kit::ViewComponents::Components::BaseComponent
2 |
3 | attr_reader :session_user
4 |
5 | def initialize(session_user:, **)
6 | super
7 |
8 | @session_user = session_user
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/components/kit/auth/dummy_app/components/pages/home_component.html.slim:
--------------------------------------------------------------------------------
1 | .mt-4.text-center
2 | h1.fw-bold Home
3 |
4 | .lead DummyApplication to test the default Kit::Auth setup.
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/components/kit/auth/dummy_app/components/pages/home_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::DummyApp::Components::Pages::HomeComponent < Kit::Auth::Components::Pages::PageComponent
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/components/kit/auth/dummy_app/components/pages/route_alias_component.html.slim:
--------------------------------------------------------------------------------
1 | .mt-4.text-center
2 | h1.fw-bold Route alias
3 |
4 | .lead
5 | | Helper to ensure route aliases are properly registered in their flow.
6 | br
7 | | Displays the route_name that was saved when mounting the route.
8 |
9 | h2.mt-5
10 | ' Route name:
11 | code#route_name
12 | = router_conn[:route_id]
13 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/components/kit/auth/dummy_app/components/pages/route_alias_component.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::DummyApp::Components::Pages::RouteAliasComponent < Kit::Auth::Components::Pages::PageComponent
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | # NOTE: AA implicit dependency (needed for `inherited-ressources` to work)
2 | # Ref: https://github.com/activeadmin/inherited_resources/issues/618
3 | class ::ApplicationController < Kit::Auth::DummyAppContainer::Controllers::WebController
4 | end
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/controllers/kit/auth/dummy_app_container/controllers/api_controller.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::DummyAppContainer::Controllers::ApiController < ::ActionController::API # :nodoc:
2 |
3 | # Adds default route wrapper.
4 | include Kit::Auth::Controllers::Api::Concerns::DefaultRoute
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/controllers/kit/auth/dummy_app_container/controllers/web_controller.rb:
--------------------------------------------------------------------------------
1 | class Kit::Auth::DummyAppContainer::Controllers::WebController < Kit::DummyAppContainer::Controllers::WebController
2 |
3 | layout 'layouts/kit_auth_dummy_application'
4 |
5 | # Adds default route wrapper.
6 | include Kit::Auth::Controllers::Web::Concerns::DefaultRoute
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/endpoints/kit/auth/dummy_app/endpoints.rb:
--------------------------------------------------------------------------------
1 | module Kit::Auth::DummyApp::Endpoints
2 |
3 | def self.register_endpoints
4 | Kit::Auth::DummyApp::Endpoints::Web::Home.register_endpoint
5 | Kit::Auth::DummyApp::Endpoints::Web::RouteAlias.register_endpoint
6 | Kit::Auth::DummyApp::Endpoints::Web::Settings.register_endpoint
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/jobs/application_job.rb:
--------------------------------------------------------------------------------
1 | class ApplicationJob < ActiveJob::Base
2 |
3 | def perform(route_id:, endpoint_uid:, params:)
4 | Kit::Router::Services::Adapters.call(
5 | route_id: route_id,
6 | adapter_name: :inline,
7 | params: params,
8 | )
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ::ApplicationMailer < ::ActionMailer::Base
2 |
3 | def default_email
4 | Kit::Router::Adapters::MailerRails.rails_default_email(context: self)
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 |
3 | self.abstract_class = true
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/app/views/kit/auth/dummy_app_container/controllers/web/example/example_rails_endpoint.html.slim:
--------------------------------------------------------------------------------
1 | .mt-4.text-center
2 | h1.fw-bold Example of a classic Rails controller.
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 |
3 | config.active_job.queue_adapter = :sidekiq
4 |
5 | end
6 |
7 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/config/initializers/eager_load_controllers.rb:
--------------------------------------------------------------------------------
1 | autoloader = Rails.autoloaders.main
2 |
3 | autoloader.on_setup { Kit::Auth::DummyAppContainer::Controllers::WebController }
4 | autoloader.on_setup { Kit::Auth::DummyAppContainer::Controllers::Web::ExampleController }
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/config/initializers/eager_load_endpoints.rb:
--------------------------------------------------------------------------------
1 | Rails.application.config.to_prepare do
2 | Kit::Auth::DummyApp::Endpoints.register_endpoints
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/config/initializers/letter_opener.rb:
--------------------------------------------------------------------------------
1 | if Rails.env.development?
2 | Rails.application.config.action_mailer.delivery_method = :letter_opener
3 | Rails.application.config.action_mailer.perform_deliveries = true
4 | end
5 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/db/migrate/20210910140620_create_events.kit_domain.rb:
--------------------------------------------------------------------------------
1 | gem_dir = Gem::Specification.find_by_name('kit-domain').gem_dir
2 | require "#{ gem_dir }/db/migrate/20210910140620_create_events.rb"
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/db/migrate/20210916066020_create_request_metadata.kit_domain.rb:
--------------------------------------------------------------------------------
1 | gem_dir = Gem::Specification.find_by_name('kit-domain').gem_dir
2 | require "#{ gem_dir }/db/migrate/20210916066020_create_request_metadata.rb"
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/dummy/db/migrate/20211115170903_create_request_metadata_links.kit_domain.rb:
--------------------------------------------------------------------------------
1 | gem_dir = Gem::Specification.find_by_name('kit-domain').gem_dir
2 | require "#{ gem_dir }/db/migrate/20211115170903_create_request_metadata_links.rb"
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/factories/user.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :user, class: 'Kit::Auth::Models::Write::User' do
4 | email { Faker::Internet.email }
5 |
6 | transient do
7 | password { 'xxxxxx' }
8 | end
9 |
10 | hashed_secret { Kit::Auth::Services::Password.generate_hashed_secret(password: password)[1][:hashed_secret] }
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/factories/user_oauth_identity.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :user_oauth_identity, class: 'Kit::Auth::Models::Write::UserOauthIdentity' do
4 |
5 | user
6 |
7 | provider_uid { Faker::Alphanumeric.alphanumeric(number: 10) }
8 |
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/factories/user_oauth_secret.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :user_oauth_secret, class: 'Kit::Auth::Models::Write::UserOauthSecret' do
4 | end
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/factories/user_secret.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :user_secret, class: 'Kit::Auth::Models::Write::UserSecret' do
4 | end
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/support/factory_bot_rails.rb:
--------------------------------------------------------------------------------
1 | require 'factory_bot_rails'
2 |
3 | RSpec.configure do |config|
4 |
5 | config.include FactoryBot::Syntax::Methods
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/support/helpers.rb:
--------------------------------------------------------------------------------
1 | module Helpers
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-auth/spec/support/helpers/applications.rb:
--------------------------------------------------------------------------------
1 | module Helpers::Applications
2 |
3 | def app_web
4 | Kit::Auth::Actions::Applications::LoadWeb.call[1][:application]
5 | end
6 |
7 | def app_api
8 | Kit::Auth::Actions::Applications::LoadApi.call[1][:application]
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-auth/tasks/router.rake:
--------------------------------------------------------------------------------
1 | require 'kit/router/tasks'
2 |
3 | Kit::Router::Tasks.create_rake_task_router_generate_graph!(
4 | output_dir: File.expand_path('../docs/dist/router', __dir__),
5 | #clean_output_dir: true,
6 | )
7 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | spec/dummy/db/*.sqlite3
5 | spec/dummy/db/*.sqlite3-journal
6 | spec/dummy/log/*.log
7 | spec/dummy/node_modules/
8 | spec/dummy/yarn-error.log
9 | spec/dummy/storage/
10 | spec/dummy/tmp/
11 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/README.md:
--------------------------------------------------------------------------------
1 | # Kit::Geolocation
2 | Geolocation code should live here.
3 |
4 | ## IpGeolocations Seed
5 | https://db-ip.com/db/download/ip-to-country-lite
6 |
7 | ## Countries Seed
8 | https://datahub.io/core/country-list
9 |
10 | ## Icons sets
11 | - https://icons8.com/icon/pack/flags/color
12 | - https://www.whoishostingthis.com/resources/flag-icons/
13 | - http://www.famfamfam.com/lab/icons/flags/
--------------------------------------------------------------------------------
/domains/kit-geolocation/app/assets/config/kit_payment_manifest.js:
--------------------------------------------------------------------------------
1 | //= link_directory ../javascripts/kit/geolocation .js
2 | //= link_directory ../stylesheets/kit/geolocation .css
--------------------------------------------------------------------------------
/domains/kit-geolocation/app/models/kit/geolocation/models/application_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Geolocation::Models
2 | class ApplicationRecord < ActiveRecord::Base
3 | self.abstract_class = true
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/app/models/kit/geolocation/models/engine_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Geolocation::Models
2 | class EngineRecord < ApplicationRecord
3 | include Kit::Domain::Models::Concerns::EngineRecord
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/app/models/kit/geolocation/models/read_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Geolocation::Models
2 | class ReadRecord < EngineRecord
3 | include Kit::Domain::Models::Concerns::ReadRecord
4 |
5 | establish_connection :"#{Rails.env}_readonly"
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/app/models/kit/geolocation/models/write_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Geolocation::Models
2 | class WriteRecord < EngineRecord
3 | include Kit::Domain::Models::Concerns::WriteRecord
4 |
5 | establish_connection :"#{Rails.env}_write"
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/config/routes.rb:
--------------------------------------------------------------------------------
1 | Kit::Geolocation::Engine.routes.draw do
2 | ActiveAdmin.routes(self)
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/db/migrate/20190805114041_create_ip_geolocations.rb:
--------------------------------------------------------------------------------
1 | class CreateIpGeolocations < ActiveRecord::Migration[5.2]
2 | def change
3 | create_table :ip_geolocations do |t|
4 | t.inet :ip_start, index: true
5 | t.inet :ip_end, index: true
6 | t.references :country, index: true, foreign_key: true
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/lib/kit/geolocation.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Geolocation
3 | end
4 | end
5 |
6 | require "kit/geolocation/engine"
7 | require "kit/geolocation/routes"
8 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/lib/kit/geolocation/engine.rb:
--------------------------------------------------------------------------------
1 | require 'kit/domain'
2 |
3 | module Kit
4 | module Geolocation
5 | class Engine < ::Rails::Engine
6 |
7 | Kit::Domain.config_engine(
8 | context: self,
9 | namespace: Kit::Geolocation,
10 | file: __FILE__,
11 | )
12 |
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/lib/kit/geolocation/version.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Geolocation
3 | VERSION = '0.1.0'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/.env.development:
--------------------------------------------------------------------------------
1 |
2 |
3 | DEVISE_SECRET_KEY='b412856eac2707837964d8d7ae9e7af80d11c30a9674fe911c48b665c09505a02546f249e57cabaee7536a30884ba3521c4b1b628cede740f64af3af0129ac99'
4 |
5 | DATABASE_URL='postgres://root:@127.0.0.1/elearning_development'
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-2.6.2
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 | //= link kit_geolocation_manifest.js
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/components/components/navbar.rb:
--------------------------------------------------------------------------------
1 | class Components::Navbar < Kit::ViewComponents::Components::BaseComponent
2 |
3 | def initialize(*args)
4 | super
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/controllers/api_controller.rb:
--------------------------------------------------------------------------------
1 | class ApiController < ActionController::API # :nodoc:
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | # NOTE: needed for `inherited-ressources` to work
2 | class ApplicationController < WebController
3 | end
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/controllers/home_controller.rb:
--------------------------------------------------------------------------------
1 | class HomeController < WebController
2 |
3 | def index
4 | render
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/controllers/web_controller.rb:
--------------------------------------------------------------------------------
1 | class WebController < ActionController::Base
2 | layout 'application'
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/app/views/home/index.html.slim:
--------------------------------------------------------------------------------
1 | h1 Home
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | begin
5 | exec "yarnpkg", *ARGV
6 | rescue Errno::ENOENT
7 | $stderr.puts "Yarn executable was not detected in the system."
8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 | exit 1
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | Bundler.require(*Rails.groups)
6 | require "kit/geolocation"
7 |
8 | module Dummy
9 | class Application < Rails::Application
10 | Kit::AppContainer.config_application(context: self)
11 | end
12 | end
13 |
14 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3 |
4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5 | $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | mount Kit::Geolocation::Engine => "/kit-geolocation", as: 'kit_geolocation'
3 |
4 | root to: "home#index"
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w[
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ].each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dummy",
3 | "private": true,
4 | "dependencies": {}
5 | }
6 |
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-geolocation/spec/dummy/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-geolocation/spec/dummy/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/dummy/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-geolocation/spec/dummy/public/favicon.ico
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/factories/kit/geolocation/models/country.rb:
--------------------------------------------------------------------------------
1 | module Kit::Geolocation::Models
2 | FactoryBot.define do
3 | factory :country, class: Models::Write::Country do
4 |
5 | end
6 | end
7 | end
--------------------------------------------------------------------------------
/domains/kit-geolocation/spec/support/database_cleaner.rb:
--------------------------------------------------------------------------------
1 | require 'database_cleaner'
2 |
3 | RSpec.configure do |config|
4 |
5 | config.before(:suite) do
6 | [Kit::Geolocation::Models::WriteRecord].each do |model|
7 | cleaner = DatabaseCleaner[:active_record, { model: model }]
8 | cleaner.clean_with(:truncation)
9 | cleaner.strategy = :truncation
10 | end
11 | end
12 |
13 | end
--------------------------------------------------------------------------------
/domains/kit-payment/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | spec/dummy/db/*.sqlite3
5 | spec/dummy/db/*.sqlite3-journal
6 | spec/dummy/log/*.log
7 | spec/dummy/node_modules/
8 | spec/dummy/yarn-error.log
9 | spec/dummy/storage/
10 | spec/dummy/tmp/
11 |
--------------------------------------------------------------------------------
/domains/kit-payment/README.md:
--------------------------------------------------------------------------------
1 | # Kit::Payment
2 | Payment related code should live here.
3 |
4 | ## Currencies Seed
5 | https://datahub.io/core/country-codes
6 |
7 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/admin/kit/payment/admin/tables/base_table.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Admin::Tables
2 | class BaseTable < Kit::ActiveAdmin::Table
3 | include Kit::Payment::Routes
4 |
5 | end
6 | end
--------------------------------------------------------------------------------
/domains/kit-payment/app/assets/config/kit_payment_manifest.js:
--------------------------------------------------------------------------------
1 | //= link_directory ../javascripts/kit/payment .js
2 | //= link_directory ../stylesheets/kit/payment .css
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/application_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models
2 | class ApplicationRecord < ActiveRecord::Base
3 | self.abstract_class = true
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/engine_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models
2 | class EngineRecord < ApplicationRecord
3 | include Kit::Domain::Models::Concerns::EngineRecord
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/read/currency.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models::Read
2 | class Currency < Kit::Payment::Models::ReadRecord
3 | self.table_name = 'currencies'
4 |
5 |
6 |
7 | self.allowed_columns = [
8 | :id,
9 | :iso4217_alpha,
10 | :name,
11 | :minor_unit,
12 | ]
13 |
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/read_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models
2 | class ReadRecord < EngineRecord
3 | include Kit::Domain::Models::Concerns::ReadRecord
4 |
5 | establish_connection :"#{Rails.env}_readonly"
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/write/currency.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models::Write
2 | class Currency < Kit::Payment::Models::WriteRecord
3 | self.table_name = 'currencies'
4 |
5 |
6 |
7 | self.allowed_columns = [
8 | :id,
9 | :iso4217_alpha,
10 | :name,
11 | :minor_unit,
12 | ]
13 |
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-payment/app/models/kit/payment/models/write_record.rb:
--------------------------------------------------------------------------------
1 | module Kit::Payment::Models
2 | class WriteRecord < EngineRecord
3 | include Kit::Domain::Models::Concerns::WriteRecord
4 |
5 | establish_connection :"#{Rails.env}_write"
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/domains/kit-payment/config/routes.rb:
--------------------------------------------------------------------------------
1 | Kit::Payment::Engine.routes.draw do
2 | ActiveAdmin.routes(self)
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-payment/db/migrate/20190805114002_create_currencies.rb:
--------------------------------------------------------------------------------
1 | class CreateCurrencies < ActiveRecord::Migration[5.2]
2 | def change
3 |
4 | create_table :currencies do |t|
5 | t.string :iso4217_alpha, limit: 3, index: true, unique: true
6 | t.string :name, index: true
7 | t.string :minor_unit, limit: 3
8 | end
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-payment/lib/kit/payment.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Payment
3 | end
4 | end
5 |
6 | require "kit/payment/engine"
7 | require "kit/payment/routes"
8 |
--------------------------------------------------------------------------------
/domains/kit-payment/lib/kit/payment/engine.rb:
--------------------------------------------------------------------------------
1 | require 'kit/domain'
2 |
3 | module Kit
4 | module Payment
5 | class Engine < ::Rails::Engine
6 |
7 | Kit::Domain.config_engine(
8 | context: self,
9 | namespace: Kit::Payment,
10 | file: __FILE__,
11 | )
12 |
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/domains/kit-payment/lib/kit/payment/version.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Payment
3 | VERSION = '0.1.0'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/.env.development:
--------------------------------------------------------------------------------
1 |
2 |
3 | DEVISE_SECRET_KEY='b412856eac2707837964d8d7ae9e7af80d11c30a9674fe911c48b665c09505a02546f249e57cabaee7536a30884ba3521c4b1b628cede740f64af3af0129ac99'
4 |
5 | DATABASE_URL='postgres://root:@127.0.0.1/elearning_development'
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/.ruby-version:
--------------------------------------------------------------------------------
1 | ruby-2.6.2
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | //= link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 | //= link kit_payment_manifest.js
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/components/components/navbar.rb:
--------------------------------------------------------------------------------
1 | class Components::Navbar < Kit::ViewComponents::Components::BaseComponent
2 |
3 | def initialize(*args)
4 | super
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/controllers/api_controller.rb:
--------------------------------------------------------------------------------
1 | class ApiController < ActionController::API # :nodoc:
2 | end
3 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | # NOTE: needed for `inherited-ressources` to work
2 | class ApplicationController < WebController
3 | end
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/controllers/home_controller.rb:
--------------------------------------------------------------------------------
1 | class HomeController < WebController
2 |
3 | def index
4 | render
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/controllers/web_controller.rb:
--------------------------------------------------------------------------------
1 | class WebController < ActionController::Base
2 | layout 'application'
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | end
4 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/app/views/home/index.html.slim:
--------------------------------------------------------------------------------
1 | h1 Home
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | begin
5 | exec "yarnpkg", *ARGV
6 | rescue Errno::ENOENT
7 | $stderr.puts "Yarn executable was not detected in the system."
8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 | exit 1
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | Bundler.require(*Rails.groups)
6 | require "kit/payment"
7 |
8 | module Dummy
9 | class Application < Rails::Application
10 | Kit::AppContainer.config_application(context: self)
11 | end
12 | end
13 |
14 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3 |
4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5 | $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | mount Kit::Payment::Engine => "/kit-payment", as: 'kit_payment'
3 |
4 | root to: "home#index"
5 | end
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w[
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ].each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dummy",
3 | "private": true,
4 | "dependencies": {}
5 | }
6 |
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-payment/spec/dummy/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-payment/spec/dummy/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/domains/kit-payment/spec/dummy/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/domains/kit-payment/spec/dummy/public/favicon.ico
--------------------------------------------------------------------------------
/domains/kit-payment/spec/support/database_cleaner.rb:
--------------------------------------------------------------------------------
1 | require 'database_cleaner'
2 |
3 | RSpec.configure do |config|
4 |
5 | config.before(:suite) do
6 | [Kit::Payment::Models::WriteRecord].each do |model|
7 | cleaner = DatabaseCleaner[:active_record, { model: model }]
8 | cleaner.clean_with(:truncation)
9 | cleaner.strategy = :truncation
10 | end
11 | end
12 |
13 | end
--------------------------------------------------------------------------------
/libraries/kit-active_admin/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/amount.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Amount
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.amount_tag value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/boolean.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Boolean
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.color_tag(!!value)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/code.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Code
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.code value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/code_link_to.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::CodeLinkTo
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el: el, routes: Rails.application.routes.url_helpers)
5 |
6 | ctx.code ctx.send(:link_to, *value)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/code_with_color.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::CodeWithColor
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | color_tag, code = functor.call(el)
5 |
6 | ctx.span do
7 | ctx.color_tag color_tag
8 | ctx.code code, style: 'margin-left: 5px;'
9 | end
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/color.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Color
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | if value.is_a?(Array)
7 | value.each do |v|
8 | ctx.color_tag v
9 | end
10 | else
11 | ctx.color_tag value
12 | end
13 | end
14 |
15 | end
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/date.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Date
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.date_tag value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/img.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Img
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.img value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/img_link_to.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::ImgLinkTo
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | if value[1] && value[2]
7 | ctx.link_to(ctx.image_tag(value[1], value[3]), value[2])
8 | else
9 | ctx.code 'MISSING IMAGE'
10 | end
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/json_readonly.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::JsonReadonly
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.div class: 'container_json_editor_readonly' do
7 | ctx.textarea JSON.pretty_generate(value), class: 'json_editor_readonly', style: 'display: none;'
8 | end
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/link_to.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::LinkTo
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.send :link_to, *value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/model.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Model
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | el = functor.call(el)
5 | text = el.try(:model_log_name)
6 |
7 | ctx.code(ctx.auto_link(el, text))
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/model_id.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::ModelId
2 |
3 | def self.call(el:, ctx:, functor:, name:, **)
4 | if name == :id
5 | ctx.code(ctx.auto_link el, "##{el.id}")
6 | else
7 | el = functor.call(el)
8 | text = "##{ el.try(:id).try(:to_s) }"
9 |
10 | ctx.code(ctx.auto_link(el, text))
11 | end
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/model_verbose.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::ModelVerbose
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | el = functor.call(el)
5 | text = el.try(:model_verbose_name)
6 |
7 | ctx.code(ctx.auto_link(el, text))
8 | end
9 |
10 | end
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/pre.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Pre
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.pre value
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/pre_yaml.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::PreYaml
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | value = value
7 | .to_yaml
8 | .gsub("---\n", '')
9 | .gsub("--- ", '')
10 |
11 | ctx.pre value
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/attributes/status.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Attributes::Status
2 |
3 | def self.call(el:, ctx:, functor:, **)
4 | value = functor.call(el)
5 |
6 | ctx.status_tag(value[0], value[1])
7 | end
8 |
9 | end
--------------------------------------------------------------------------------
/libraries/kit-active_admin/app/services/kit/admin/services/renderers/index.rb:
--------------------------------------------------------------------------------
1 | module Kit::Admin::Services::Renderers::Index
2 |
3 | def self.render(ctx:, attrs:)
4 | Kit::Admin::Services::Renderers.build_for_html_display(ctx: ctx, type: :column, attrs: attrs)
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/bin/test:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | $: << File.expand_path("../test", __dir__)
3 |
4 | require "bundler/setup"
5 | require "rails/plugin/test"
6 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/config/initializers/arbre/amount_tag.rb:
--------------------------------------------------------------------------------
1 | module ArbreCustomComponents
2 | class AmountTag < ActiveAdmin::Component
3 |
4 | builder_method :amount_tag
5 |
6 | def tag_name
7 | 'span'
8 | end
9 |
10 | def build(*args)
11 | if args[0]
12 | code number_to_currency(args[0], precision: 2)
13 | end
14 | end
15 |
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/config/initializers/arbre/pct_tag.rb:
--------------------------------------------------------------------------------
1 | module ArbreCustomComponents
2 | class PctTag < ActiveAdmin::Component
3 |
4 | builder_method :pct_tag
5 |
6 | def tag_name
7 | 'span'
8 | end
9 |
10 | def build(*args)
11 | if args[0]
12 | code number_to_percentage(args[0] * 100, precision: 2)
13 | end
14 | end
15 |
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/config/initializers/locales.rb:
--------------------------------------------------------------------------------
1 | path = File.expand_path('../locales', __dir__)
2 |
3 | Rails.application.config.i18n.load_path += Dir["#{ path }/**/*.{rb,yml}"]
4 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/lib/kit/active_admin.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module ActiveAdmin
3 | end
4 | end
5 |
6 | require_relative 'active_admin/engine'
7 | require_relative 'active_admin/overrides'
8 |
9 | # NOTE: to be able to load the assets
10 | require 'activeadmin_addons'
11 | require 'bootstrap'
12 | require 'popper_js'
13 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/lib/kit/active_admin/engine.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module ActiveAdmin
3 | class Engine < ::Rails::Engine
4 | isolate_namespace Kit::ActiveAdmin
5 |
6 | end
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/lib/kit/active_admin/version.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module ActiveAdmin
3 | VERSION = '0.1.0'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/config/kit-active_admin.js:
--------------------------------------------------------------------------------
1 |
2 | //= link_tree ../images
3 |
4 | //= link_directory ../javascripts/kit-active_admin .js
5 | //= link_directory ../stylesheets/kit-active_admin .css
6 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/images/kit-active_admin/famfamfam-flags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-active_admin/vendor/assets/images/kit-active_admin/famfamfam-flags.png
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/components.scss:
--------------------------------------------------------------------------------
1 | @import 'components/_json.scss';
2 | @import 'components/_tabs.scss';
3 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/components/_json.scss:
--------------------------------------------------------------------------------
1 | .attributes_table .jsoneditor table th, .attributes_table .jsoneditor table td {
2 | padding: 0px;
3 | }
4 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/mixins.scss:
--------------------------------------------------------------------------------
1 | @import 'mixins/_rounded.scss';
2 | @import 'mixins/_shadows.scss';
3 | @import 'mixins/_buttons.scss';
4 | @import 'mixins/_sections.scss';
5 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/structure.scss:
--------------------------------------------------------------------------------
1 | @import 'structure/_title_bar.scss';
2 | @import 'structure/_footer.scss';
3 | @import 'structure/_main_structure.scss';
4 | @import 'structure/_header.scss';
5 |
6 | @import 'structure/_various.scss';
7 |
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/structure/_footer.scss:
--------------------------------------------------------------------------------
1 | #footer {
2 | display: none;
3 | }
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/structure/_header.scss:
--------------------------------------------------------------------------------
1 | #header {
2 | h1 {
3 | padding: 3px 10px 0 30px;
4 |
5 | img {
6 | top: 0px;
7 | width: 22px;
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/libraries/kit-active_admin/vendor/assets/stylesheets/kit-active_admin/active_admin_overides/structure/_main_structure.scss:
--------------------------------------------------------------------------------
1 | #active_admin_content {
2 | padding: 20px 30px;
3 |
4 | #main_content_wrapper #main_content {
5 | padding-bottom: 20px;
6 | }
7 | }
--------------------------------------------------------------------------------
/libraries/kit-api/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
3 | # Note: needed because somehow running rubocop in the top level dir VS projects subdirectories has slightly different behaviours.
4 | Lint/RedundantCopDisableDirective:
5 | Enabled: false
6 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/contracts/kit/api/json_api/contracts.rb:
--------------------------------------------------------------------------------
1 | # Contracts for the project
2 | module Kit::Api::JsonApi::Contracts
3 |
4 | include Kit::Api::Contracts
5 |
6 | Document = Hash[
7 | cache: Hash.named('Document[:cache]'),
8 | included: Hash.named('Document[:included]'),
9 | response: Hash[
10 | data: Or[Array, Hash],
11 | included: Array,
12 | ].named('Document[:response]'),
13 | ].named('Document')
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/resources/kit/api/resources.rb:
--------------------------------------------------------------------------------
1 | # Resources templates.
2 | module Kit::Api::Resources
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services.rb:
--------------------------------------------------------------------------------
1 | # `Kit::Api::JsonApi` various `Services`
2 | module Kit::Api::JsonApi::Services
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services/endpoints.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Endpoints related logic.
2 | module Kit::Api::JsonApi::Services::Endpoints
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services/linkers.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Linkers strategies.
2 | module Kit::Api::JsonApi::Services::Linkers
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services/paginators.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Paginators strategies.
2 | module Kit::Api::JsonApi::Services::Paginators
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services/serialization.rb:
--------------------------------------------------------------------------------
1 | # Namespace for internal Serialization related logic.
2 | module Kit::Api::JsonApi::Services::Serialization
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/json_api/services/serializers.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Serializers strategies
2 | module Kit::Api::JsonApi::Services::Serializers
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/log.rb:
--------------------------------------------------------------------------------
1 | # Library specific wrapper for Kit::Api.
2 | module Kit::Api::Log
3 |
4 | def self.log(msg:, flags: [])
5 | flags.unshift([:gem, :kit_api])
6 | Kit::Log.log(msg: msg, flags: flags)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/services.rb:
--------------------------------------------------------------------------------
1 | # `Kit::Api` various `Services`
2 | module Kit::Api::Services
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/services/resolvers.rb:
--------------------------------------------------------------------------------
1 | # Namespace for data Resolvers strategies.
2 | module Kit::Api::Services::Resolvers
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/api/services/resolvers/sql/limit.rb:
--------------------------------------------------------------------------------
1 | # Generate LIMIT sql string statement.
2 | module Kit::Api::Services::Resolvers::Sql::Limit
3 |
4 | include Kit::Contract::Mixin
5 | # @doc false
6 | Ct = Kit::Api::Contracts
7 |
8 | before Ct::Hash[limit: Ct::Optional[Ct::Integer]]
9 | after Ct::Hash[sanitized_limit_sql: Ct::String]
10 | def self.limit_to_sql_str(sorting:)
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/libraries/kit-api/app/services/kit/config.rb:
--------------------------------------------------------------------------------
1 | module Kit::Config # rubocop:disable Style/Documentation
2 |
3 | def self.[](key)
4 | if key == :ENV_TYPE
5 | [ENV['ENV'], ENV['RAILS_ENV']].compact.uniq.map(&:to_sym)
6 | else
7 | ENV[key.to_s]
8 | end
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/libraries/kit-api/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require_relative '../config/kit_runtime_config'
4 |
5 | # Set up gems listed in the Gemfile.
6 | ENV['BUNDLE_GEMFILE'] ||= KIT_APP_PATHS['GEMFILE']
7 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
8 |
9 | require 'kit/dummy_app_container/rails_binary'
10 |
--------------------------------------------------------------------------------
/libraries/kit-api/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/libraries/kit-api/docs/guides/assets/images/api_gateway.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-api/docs/guides/assets/images/api_gateway.png
--------------------------------------------------------------------------------
/libraries/kit-api/docs/guides/graphql_support.md:
--------------------------------------------------------------------------------
1 | # GraphQL support
2 |
3 | TODO: start implementation 😊.
--------------------------------------------------------------------------------
/libraries/kit-api/docs/guides/testing.md:
--------------------------------------------------------------------------------
1 | # Testing
2 |
3 | ## Setting up the database
4 |
5 | ```
6 | RAILS_ENV=test bundle exec rails db:create:primary_ops
7 | RAILS_ENV=test bundle exec rails db:migrate:primary_ops
8 | RAILS_ENV=test bundle exec rake db:seed:fantasy_data
9 | ```
10 |
11 | ## Running the tests
12 |
13 | ```
14 | ENV=test bundle exec rspec
15 | ```
--------------------------------------------------------------------------------
/libraries/kit-api/lib/kit-api.rb:
--------------------------------------------------------------------------------
1 | require_relative './kit/api' # rubocop:disable Naming/FileName
2 |
--------------------------------------------------------------------------------
/libraries/kit-api/lib/kit/api.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Api # rubocop:disable Style/Documentation
5 | end
6 |
7 | #if Rails.env.in?(%w[development test])
8 | require_relative 'api/engine'
9 | #else
10 | # require_relative 'api/railtie'
11 | #end
12 |
--------------------------------------------------------------------------------
/libraries/kit-api/lib/kit/api/railtie.rb:
--------------------------------------------------------------------------------
1 | # Handles file loading && initializers.
2 | class Kit::Api::Railtie < ::Rails::Railtie
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/libraries/kit-api/lib/kit/api/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Api
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/.env.development:
--------------------------------------------------------------------------------
1 | PORT=3000
2 | HOST='localhost'
3 | URL="http://${HOST}:${PORT}"
4 | RAILS_FORCE_SSL=false
5 |
6 |
7 | DATABASE_URL='postgres://root:@127.0.0.1/kit_api__DEV'
8 | DATABASE_URL_READONLY="${DATABASE_URL}"
9 | DATABASE_URL_WRITE="${DATABASE_URL}"
10 | DATABASE_URL_OPS="${DATABASE_URL}"
11 |
12 | KIT_ROUTER_ALLOW_ROUTE_RELOADING=true
13 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/.env.test:
--------------------------------------------------------------------------------
1 | PORT=3000
2 | HOST='localhost'
3 | URL="http://${HOST}:${PORT}"
4 | RAILS_FORCE_SSL=false
5 |
6 |
7 | DATABASE_URL='postgres://root:@127.0.0.1/kit_api__TEST'
8 | DATABASE_URL_READONLY="${DATABASE_URL}"
9 | DATABASE_URL_WRITE="${DATABASE_URL}"
10 | DATABASE_URL_OPS="${DATABASE_URL}"
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/Rakefile:
--------------------------------------------------------------------------------
1 | # NOTE: this is loaded by the top level Rakefile.
2 |
3 | Rails.application.load_tasks
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/controllers/api_controller.rb:
--------------------------------------------------------------------------------
1 | class ::ApiController < ::ActionController::API # rubocop:disable Style/Documentation
2 |
3 | # Adds default route wrapper.
4 | include Kit::Api::JsonApi::Controllers::Concerns::DefaultRoute
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/models/kit/json_api_spec/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::JsonApiSpec::Models::ApplicationRecord < ActiveRecord::Base # rubocop:disable Style/Documentation
2 |
3 | self.abstract_class = true
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/models/kit/json_api_spec/models/engine_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::JsonApiSpec::Models::EngineRecord < Kit::JsonApiSpec::Models::ApplicationRecord # rubocop:disable Style/Documentation
2 |
3 | include Kit::Domain::Models::Concerns::EngineRecord
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/models/kit/json_api_spec/models/read_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::JsonApiSpec::Models::ReadRecord < Kit::JsonApiSpec::Models::EngineRecord # rubocop:disable Style/Documentation
2 |
3 | include Kit::Domain::Models::Concerns::ReadRecord
4 |
5 | establish_connection :primary_readonly
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/models/kit/json_api_spec/models/write_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::JsonApiSpec::Models::WriteRecord < Kit::JsonApiSpec::Models::EngineRecord # rubocop:disable Style/Documentation
2 |
3 | include Kit::Domain::Models::Concerns::WriteRecord
4 |
5 | establish_connection :primary_write
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/app/resources/kit/json_api_spec/resources/resource.rb:
--------------------------------------------------------------------------------
1 | class Kit::JsonApiSpec::Resources::Resource < Kit::Api::Resources::ActiveRecordResource # rubocop:disable Style/Documentation
2 |
3 | def self.linker
4 | Kit::JsonApiSpec::Services::Linker.to_h
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/config/initializers/eager_load_endpoints.rb:
--------------------------------------------------------------------------------
1 | Rails.application.config.to_prepare do
2 | Kit::JsonApiSpec::Endpoints.register_endpoints
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/dummy/db/seeds/fantasy_data/empty.seeds.rb:
--------------------------------------------------------------------------------
1 | # NOTE: without an `after` a file might be interpreted several times.
2 | # By adding this empty top-level seed task we can make sure this does not happen to real top-level tasks.
3 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_author.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :author, class: 'Kit::JsonApiSpec::Models::Write::Author' do
4 |
5 | name { Faker::Book.author }
6 | date_of_birth { Faker::Date.birthday(min_age: 18, max_age: 65) }
7 | date_of_death { (rand(1..10) == 5) ? Faker::Date.backward(days: rand(100..1000)) : nil }
8 |
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_book.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :book, class: 'Kit::JsonApiSpec::Models::Write::Book' do
4 |
5 | association :author
6 | association :serie
7 |
8 | title { Faker::Book.title }
9 | date_published { Faker::Date.backward(days: rand(100..600)) }
10 |
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_book_store.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :book_store, class: 'Kit::JsonApiSpec::Models::Write::BookStore' do
4 |
5 | association :book
6 | association :store
7 |
8 | in_stock { true }
9 |
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_chapter.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :chapter, class: 'Kit::JsonApiSpec::Models::Write::Chapter' do
4 |
5 | association :book
6 |
7 | title { Faker::Book.title }
8 |
9 | sequence :index
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_serie.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :serie, class: 'Kit::JsonApiSpec::Models::Write::Serie' do
4 |
5 | title { Faker::Book.title }
6 |
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/factories/factory_store.rb:
--------------------------------------------------------------------------------
1 | FactoryBot.define do
2 |
3 | factory :store, class: 'Kit::JsonApiSpec::Models::Write::Store' do
4 |
5 | name { Faker::Company.name }
6 |
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-api/spec/support/factory_bot.rb:
--------------------------------------------------------------------------------
1 | require 'factory_bot_rails'
2 |
3 | RSpec.configure do |config|
4 |
5 | config.include FactoryBot::Syntax::Methods
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-api/tasks/router.rake:
--------------------------------------------------------------------------------
1 | require 'kit/router/tasks'
2 |
3 | Kit::Router::Tasks.create_rake_task_router_generate_graph!(
4 | output_dir: File.expand_path('../docs/dist/router', __dir__),
5 | #clean_output_dir: true,
6 | )
7 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | test/dummy/db/*.sqlite3
5 | test/dummy/db/*.sqlite3-journal
6 | test/dummy/log/*.log
7 | test/dummy/node_modules/
8 | test/dummy/yarn-error.log
9 | test/dummy/storage/
10 | test/dummy/tmp/
11 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
8 | load 'rails/tasks/engine.rake'
9 | load 'rails/tasks/statistics.rake'
10 |
11 | require 'bundler/gem_tasks'
12 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/app/assets/javascripts/active_admin.js:
--------------------------------------------------------------------------------
1 | //= require kit-active_admin/kit-active_admin
2 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/app/assets/stylesheets/active_admin.css:
--------------------------------------------------------------------------------
1 | /*
2 | *= require kit-active_admin/kit-active_admin
3 | */
--------------------------------------------------------------------------------
/libraries/kit-app_container/config/initializers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-app_container/config/initializers/.keep
--------------------------------------------------------------------------------
/libraries/kit-app_container/config/initializers/inflectors.rb:
--------------------------------------------------------------------------------
1 | ActiveSupport::Inflector.inflections(:en) do |inflect|
2 | inflect.irregular 'data', 'data'
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/config/routes.rb:
--------------------------------------------------------------------------------
1 | Kit::AppContainer::Engine.routes.draw do # rubocop:disable Lint/EmptyBlock
2 | end
3 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/lib/kit/app_container/engine.rb:
--------------------------------------------------------------------------------
1 | # The Engine is mainly used to handle all autoloading.
2 | class Kit::AppContainer::Engine < ::Rails::Engine
3 |
4 | #isolate_namespace Kit::AppContainer
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/lib/kit/app_container/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::AppContainer
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-app_container/lib/tasks/kit/app/container_tasks.rake:
--------------------------------------------------------------------------------
1 | # desc "Explaining what the task does"
2 | # task :kit_app_container do
3 | # # Task goes here
4 | # end
5 |
--------------------------------------------------------------------------------
/libraries/kit-contract/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-contract/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | import 'tasks/documentation.rake'
10 |
11 | begin
12 | require 'rspec/core/rake_task'
13 |
14 | RSpec::Core::RakeTask.new(:spec)
15 |
16 | #task :default => :spec
17 | rescue LoadError
18 | # no rspec available
19 | end
20 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/any.rb:
--------------------------------------------------------------------------------
1 | # Always succeeds.
2 | class Kit::Contract::BuiltInContracts::Any
3 |
4 | def self.call(value = nil)
5 | [:ok]
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/args.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Allows to treat callable arguments as an array
4 | class Args < Kit::Contract::BuiltInContracts::Array
5 |
6 | # Receives the list of arguments as an array, and forwards it the first argument.
7 | def call(*args)
8 | super(args)
9 | end
10 |
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/big_decimal.rb:
--------------------------------------------------------------------------------
1 | require 'bigdecimal'
2 |
3 | module Kit::Contract::BuiltInContracts
4 |
5 | # Ensure that the argument is a `::BigDecimal`.
6 | BigDecimal = IsA[::BigDecimal]
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/boolean.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is `true` or `false`.
4 | Boolean = Or[IsA[::TrueClass], IsA[::FalseClass]]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/callable.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure the argument respond_to(:call)
4 | Callable = RespondTo[:call]
5 |
6 | # Ensure the argument is an Array of Callable
7 | Callables = Array.of(Callable)
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/complex.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::Complex`.
4 | Complex = IsA[::Complex]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/false_class.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::FalseClass`.
4 | FalseClass = IsA[::FalseClass]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/float.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::Float`.
4 | Float = IsA[::Float]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/nil.rb:
--------------------------------------------------------------------------------
1 | # Ensure that the argument equals the saved Contract value
2 |
3 | module Kit::Contract::BuiltInContracts
4 |
5 | Nil = Eq[nil].named('Nil')
6 | NonNil = NotEq[nil].named('NonNil')
7 | NotNil = NotEq[nil].named('NotNil')
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/not.rb:
--------------------------------------------------------------------------------
1 | # Proxy the contract and negate it ?
2 | class Kit::Contract::BuiltInContracts::Not < Kit::Contract::BuiltInContracts::InstantiableContract
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/numeric.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::Numeric`.
4 | Numeric = IsA[::Numeric]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/rational.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::Rational`.
4 | Rational = IsA[::Rational]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/string.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::String`.
4 | String = IsA[::String]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/symbol.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::Symbol`.
4 | Symbol = IsA[::Symbol]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/true_class.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::BuiltInContracts
2 |
3 | # Ensure that the argument is a `::TrueClass`.
4 | TrueClass = IsA[::TrueClass]
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/built_in_contracts/tupple.rb:
--------------------------------------------------------------------------------
1 | # Less permissive version of Array. On a Tupple the size is implicit.
2 | class Kit::Contract::BuiltInContracts::Tupple < Kit::Contract::BuiltInContracts::Array
3 |
4 | def setup(*index_contracts)
5 | super
6 | size(index_contracts.size)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/changeset/validations/cast_to_boolean.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::Changeset::Validations::CastToBoolean
2 |
3 | def self.call(value:, **)
4 | [:ok, value: (value == 'true')]
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/changeset/validations/date_in_past.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::Changeset::Validations::DateInPast
2 |
3 | def self.default_error
4 | 'This date should be in the past.'
5 | end
6 |
7 | def self.call(value:, error: nil, **)
8 | error ||= default_error
9 |
10 | if value < DateTime.now
11 | [:ok]
12 | else
13 | [:error, detail: error]
14 | end
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/changeset/validations/is_array.rb:
--------------------------------------------------------------------------------
1 | class Kit::Contract::Changeset::Validations::IsArray < Kit::Contract::Changeset::Validations::WithError
2 |
3 | def self.default_error
4 | 'Invalid date.'
5 | end
6 |
7 | def self.call(value:, error: nil, **)
8 | error ||= default_error
9 |
10 | if value.is_a?(::Array)
11 | [:ok]
12 | else
13 | [:error, detail: error]
14 | end
15 | end
16 |
17 | end
18 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/changeset/validations/success.rb:
--------------------------------------------------------------------------------
1 | module Kit::Contract::Changeset::Validations::Success
2 |
3 | def self.call(value:, **)
4 | [:ok]
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/contracts/kit/contract/changeset/validations/with_error.rb:
--------------------------------------------------------------------------------
1 | # Allow to save a custom error for the validation.
2 | class Kit::Contract::Changeset::Validations::WithError
3 |
4 | attr_reader :error
5 |
6 | def initialize(error:)
7 | @error = error
8 | end
9 |
10 | def call(value:, **)
11 | self.class.call(value: value, error: error)
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/libraries/kit-contract/app/services/kit/contract/services.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Kit::Contract Services.
2 | module Kit::Contract::Services
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-contract/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/libraries/kit-contract/docs/guides/usage.md:
--------------------------------------------------------------------------------
1 | # Usage
2 |
3 | TODO: add usage.
4 |
5 | ## Deactivating contracts
6 |
7 | To deactivate contracts you can set `KIT_CONTRACTS=false` in your environment.
8 |
--------------------------------------------------------------------------------
/libraries/kit-contract/docs/guides/why_contracts.md:
--------------------------------------------------------------------------------
1 | # Why Contracts?
2 |
3 | Code contracts allow you make some assertions about your code, and then checks them to make sure they hold.
4 |
5 | TODO: explain the need for one validation primitive
6 | TODO: explain static typing, pattern matching, dependent types, etc.
7 |
--------------------------------------------------------------------------------
/libraries/kit-contract/lib/kit/contract.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Contract # rubocop:disable Style/Documentation
5 | end
6 |
7 | require 'kit/contract/engine'
8 |
--------------------------------------------------------------------------------
/libraries/kit-contract/lib/kit/contract/engine.rb:
--------------------------------------------------------------------------------
1 | # The Engine is mainly used to handle all autoloading.
2 | class Kit::Contract::Engine < ::Rails::Engine
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-contract/lib/kit/contract/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Contract
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-doc/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-doc/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
6 | gem 'kit-support', path: '../../libraries/kit-support'
7 |
8 | group :development do
9 | gem 'pry'
10 | end
11 |
--------------------------------------------------------------------------------
/libraries/kit-doc/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | require 'pry'
10 |
11 | import 'tasks/documentation.rake'
12 | import 'specs/dummy/tasks/documentation.rake'
13 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/dist/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/dist/fonts/icomoon.eot
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/dist/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/dist/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/dist/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/dist/fonts/icomoon.woff
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/redirect.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | $title
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/.eslintignore:
--------------------------------------------------------------------------------
1 | # Ignore build artifacts
2 | formatters/*
3 | doc/*
4 | test/*
5 |
6 | # Ignore JavaScript files in dependencies
7 | deps/*
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "standard",
3 | "parser": "babel-eslint",
4 | "parserOptions": {
5 | "sourceType": "module",
6 | "allowImportExportEverywhere": false
7 | },
8 | "env": {
9 | "browser": true
10 | },
11 | "rules": {
12 | "no-path-concat": 0,
13 | "no-throw-literal": 0,
14 | "no-useless-escape": 0,
15 | "object-curly-spacing": 0
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/babel.config.js:
--------------------------------------------------------------------------------
1 | const presets = [
2 | ['@babel/env', {
3 | useBuiltIns: 'usage'
4 | }]
5 | ]
6 |
7 | module.exports = { presets }
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/src/fonts/icomoon.eot
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/src/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-doc/assets/src/fonts/icomoon.woff
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/highlight.js/languages/bash.js:
--------------------------------------------------------------------------------
1 | import bash from 'highlight.js/lib/languages/bash'
2 |
3 | export default function(hljs) {
4 | var defaults = bash(hljs);
5 |
6 | var SHELL_PROMPT = [
7 | {
8 | className: 'prompt',
9 | begin: /^\$ /,
10 | }
11 | ];
12 |
13 | defaults.contains = defaults.contains.concat(SHELL_PROMPT);
14 |
15 | return defaults;
16 | }
17 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/template-helpers/groupChanged.js:
--------------------------------------------------------------------------------
1 | export default function (context, nodeGroup, options) {
2 | var group = nodeGroup || ''
3 | if (context.group !== group) {
4 | // reset the nesting context for the #nestingChanged block helper
5 | delete context.nestedContext
6 | context.group = group
7 | return options.fn(this)
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/template-helpers/isArray.js:
--------------------------------------------------------------------------------
1 | export default function (entry, options) {
2 | if (Array.isArray(entry)) {
3 | return options.fn(this)
4 | } else {
5 | return options.inverse(this)
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/template-helpers/isLocal.js:
--------------------------------------------------------------------------------
1 | export default function (nodeUrl, options) {
2 | var currentPath = window.location.pathname.split('#')[0]
3 | nodeUrl = nodeUrl.split('#')[0]
4 |
5 | if (currentPath.endsWith(nodeUrl)) {
6 | return options.fn(this)
7 | } else {
8 | return options.inverse(this)
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/template-helpers/isNonEmptyArray.js:
--------------------------------------------------------------------------------
1 | export default function (entry, options) {
2 | if (Array.isArray(entry) && entry.length > 0) {
3 | return options.fn(this)
4 | } else {
5 | return options.inverse(this)
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/template-helpers/showSummary.js:
--------------------------------------------------------------------------------
1 | export default function (node, options) {
2 | if (node.nodeGroups) {
3 | return options.fn(this)
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/templates/tooltip-layout.handlebars:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/js/templates/versions-dropdown.handlebars:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/code.less:
--------------------------------------------------------------------------------
1 | /* Highlight.js light theme */
2 | @import (less) '~highlight.js/styles/solarized-light.css';
3 |
4 | .content-inner pre code.hljs {
5 | padding: 1em;
6 | }
7 |
8 | code {
9 | .unselectable {
10 | -webkit-touch-callout: none;
11 | -webkit-user-select: none;
12 | -khtml-user-select: none;
13 | -moz-user-select: none;
14 | -ms-user-select: none;
15 | user-select: none;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/content.less:
--------------------------------------------------------------------------------
1 | // Content Styles
2 |
3 | .content-inner {
4 | font-family: @serifFontFamily;
5 | font-size: 1em;
6 | line-height: 1.6875em;
7 | position: relative;
8 | letter-spacing: 0.2px;
9 |
10 | @import './content/general';
11 | @import './content/summary';
12 | @import './content/functions';
13 | @import './content/code';
14 | @import './content/footer';
15 | }
16 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/entry/html-ruby.less:
--------------------------------------------------------------------------------
1 | @import '../variables/ruby';
2 | @import '../html';
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/fonts.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css?family=Lato:300,400,700|Inconsolata:200,300,400,500,600,700');
2 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/kit/hr.less:
--------------------------------------------------------------------------------
1 | hr {
2 | border-color: @groupGray;
3 | margin-top: 3em;
4 | border-width: 1px;
5 | border-top: none;
6 | }
7 |
8 | body.night-mode {
9 | hr {
10 | border-color: @darkGray;
11 | }
12 | }
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/mixins.less:
--------------------------------------------------------------------------------
1 | .linkUnderlines(@color) {
2 | color: @color;
3 | text-decoration: underline;
4 | text-decoration-skip-ink: auto;
5 |
6 | &:visited {
7 | color: @color;
8 | }
9 | }
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/night/content.less:
--------------------------------------------------------------------------------
1 | body.night-mode .content-inner {
2 | color: @nightTextBody;
3 | @import './content/general';
4 | @import './content/functions';
5 | @import './content/code';
6 | @import './content/footer';
7 | }
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/night/content/footer.less:
--------------------------------------------------------------------------------
1 | .footer {
2 | color: @mediumGray;
3 |
4 | .line {
5 | display: inline-block;
6 | }
7 |
8 | a {
9 | color: @mediumGray;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/night/sidebar.less:
--------------------------------------------------------------------------------
1 | body.night-mode {
2 | .sidebar-closed .sidebar-button, .sidebar-button {
3 | color: @lightestGray;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/night/tooltips.less:
--------------------------------------------------------------------------------
1 | body.night-mode {
2 | #tooltip {
3 | box-shadow: 0 0 10px fade(@black, 50%);
4 | .tooltip-body {
5 | border: 1px solid @nightHeader;
6 | .docstring {
7 | background: @nightBackground;
8 | }
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/print.less:
--------------------------------------------------------------------------------
1 | // Print styles
2 |
3 | @media print {
4 | .main {
5 | display: block;
6 | }
7 |
8 | .sidebar, .sidebar-button {
9 | display: none;
10 | }
11 |
12 | .content {
13 | padding-left: 0;
14 | overflow: visible;
15 | }
16 |
17 | .summary-row {
18 | page-break-inside: avoid;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/less/screen-reader.less:
--------------------------------------------------------------------------------
1 | // See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
2 |
3 | .sr-only {
4 | position: absolute;
5 | width: 1px;
6 | height: 1px;
7 | padding: 0;
8 | margin: -1px;
9 | overflow: hidden;
10 | clip: rect(0, 0, 0, 0);
11 | border: 0;
12 | }
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('autoprefixer')
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/libraries/kit-doc/assets/src/test/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "mocha": true
4 | },
5 |
6 | "globals": {
7 | "expect": true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit-doc.rb:
--------------------------------------------------------------------------------
1 | # rubocop:disable Naming/FileName
2 | # rubocop:enable Naming/FileName
3 |
4 | require_relative 'kit/doc'
5 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/railtie.rb:
--------------------------------------------------------------------------------
1 | require 'rails'
2 |
3 | # Handles file loading && initializers.
4 | class Kit::Doc::Railtie < ::Rails::Railtie
5 |
6 | =begin
7 | rake_tasks do
8 | load File.expand_path('../../../tasks/documentation.rake', __dir__)
9 | end
10 | =end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/redcarpet.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Redcarpet logic.
2 | module Kit::Doc::Redcarpet
3 | end
4 |
5 | require_relative 'redcarpet/redcarpet_render_custom'
6 | require_relative 'redcarpet/overrides/redcarpet_compat'
7 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/services/extras.rb:
--------------------------------------------------------------------------------
1 | require 'redcarpet'
2 | require 'nokogiri'
3 |
4 | # Namsepace for Extras related operations.
5 | module Kit::Doc::Services::Extras
6 |
7 | # Get `extras` list.
8 | def self.get_extras_list(options:)
9 | options.files || []
10 |
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Doc
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/yard/custom_tags.rb:
--------------------------------------------------------------------------------
1 | ::YARD::Tags::Library.define_tag('Enable or disable documentation for a given docstring', :doc)
2 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/yard/overrides/logging.rb:
--------------------------------------------------------------------------------
1 | class ::YARD::Logger # rubocop:disable Style/Documentation
2 |
3 | # `YARD::CLI::Yardoc.run` sets this to true with no way to disable it on that path.
4 | # Disabled globally instead.
5 | def show_progress
6 | false
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/yard/overrides/yardoc.rb:
--------------------------------------------------------------------------------
1 | class YARD::CLI::YardocOptions # rubocop:disable Style/Documentation
2 |
3 | # Add Kit version of the FileSerializer.
4 | default_attr :serializer, -> { Kit::Doc::Yard::FileSerializer.new }
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-doc/lib/kit/doc/yard/templates/template_plugin_helper.rb:
--------------------------------------------------------------------------------
1 | # Kit Helper for Templates.
2 | module Kit::Doc::Yard::TemplatePluginHelper
3 |
4 | # Allow access to Kit plugin config from Templates.
5 | def config
6 | ::Kit::Doc::Services::Config.config
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
2 | dev:main
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/kat.rb:
--------------------------------------------------------------------------------
1 | # Our top level namespace
2 | module Kat
3 |
4 | # Kat current version
5 | VERSION = '1.3.2'
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/kat/hidden_module.rb:
--------------------------------------------------------------------------------
1 | # @doc false
2 | module Kat::HiddenModule
3 |
4 | # Pellentesque convallis consequat fermentum.
5 | # Aliquam luctus viverra erat. Duis ac placerat nibh. Phasellus id viverra neque. Nulla facilisi.
6 | def self.m1(str:)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/mixins/class_extend1.rb:
--------------------------------------------------------------------------------
1 | module ClassExtend1 # :nodoc
2 |
3 | # Maecenas a imperdiet mauris.
4 | # Etiam luctus est tellus, nec aliquam mi maximus in.
5 | # Sed fermentum imperdiet turpis sit amet dapibus.
6 | def extended_c1(a, b:)
7 | end
8 |
9 | end
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/mixins/class_extend2.rb:
--------------------------------------------------------------------------------
1 | module ClassExtend2 # :nodoc
2 |
3 | # Maecenas a imperdiet mauris.
4 | # Etiam luctus est tellus, nec aliquam mi maximus in.
5 | # Sed fermentum imperdiet turpis sit amet dapibus.
6 | def extended_c2(a, b:)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/mixins/class_include1.rb:
--------------------------------------------------------------------------------
1 | module ClassInclude1 # :nodoc
2 |
3 | # Ut laoreet erat vel libero efficitur, non aliquam ex rhoncus.
4 | # Aenean ornare vitae quam vulputate feugiat.
5 | def included_c1(a, b:)
6 | end
7 |
8 | end
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/mixins/class_include2.rb:
--------------------------------------------------------------------------------
1 | module ClassInclude2 # :nodoc
2 |
3 | # Ut laoreet erat vel libero efficitur, non aliquam ex rhoncus.
4 | # Aenean ornare vitae quam vulputate feugiat.
5 | def included_c2(a, b:)
6 | end
7 |
8 | end
--------------------------------------------------------------------------------
/libraries/kit-doc/specs/dummy/mixins/module_extend.rb:
--------------------------------------------------------------------------------
1 | module ModuleExtend # :nodoc
2 |
3 | # Maecenas a imperdiet mauris.
4 | # Etiam luctus est tellus, nec aliquam mi maximus in.
5 | # Sed fermentum imperdiet turpis sit amet dapibus.
6 | def extended_mx(a, b:)
7 | end
8 |
9 | end
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/deprecated.erb:
--------------------------------------------------------------------------------
1 |
2 | ⚠️ Deprecated.
3 | Please do not use this <%= object.type %> anymore.
4 |
5 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/docstring.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yieldall %>
3 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/docstring_tags.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yieldall %>
3 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/index.erb:
--------------------------------------------------------------------------------
1 | <%= yieldall %>
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/note.erb:
--------------------------------------------------------------------------------
1 |
2 | 🗒 Notes:
3 |
4 |
5 | <% object.tags(:note).each do |tag| %>
6 | <%= tag.text %>
7 | <% end %>
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/private.erb:
--------------------------------------------------------------------------------
1 |
2 | ⚠️ This <%= object.type %> is part of a private API.
3 | You should avoid using it as it may be removed or be changed in the future.
4 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/text.erb:
--------------------------------------------------------------------------------
1 | <%= object.docstring_rendered %>
2 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/html/todo.erb:
--------------------------------------------------------------------------------
1 |
2 | 📋 Todos:
3 |
4 |
5 | <% object.tags(:todo).each do |tag| %>
6 | <%= tag.text %>
7 | <% end %>
8 |
9 |
10 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/docstring/setup.rb:
--------------------------------------------------------------------------------
1 | include ::Kit::Doc::Yard::TemplatePluginHelper # rubocop:disable Style/MixinUsage
2 |
3 | def init
4 | return if object.docstring.blank? && !object.has_tag?(:api)
5 |
6 | sections :index, [:docstring_tags, [:private, :deprecated, :todo, :note], :docstring, [:text]], T('tags')
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/fulldoc/html/docs_config.js.erb:
--------------------------------------------------------------------------------
1 | <%
2 | version = config[:current_version_display]
3 | url = config[:documentation_url].call(version: version)
4 | %>
5 | // Generated by Yard. This is meant to be overwritten in production.
6 | var versionNodes = [
7 | {
8 | "version": "<%= version %>",
9 | "url": "<%= url %>"
10 | }
11 | ];
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/layout/html/extra.erb:
--------------------------------------------------------------------------------
1 | <%= config[:project] %> <%= config[:current_version_display] %>
2 |
3 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/layout/html/files.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/layout/html/index.erb:
--------------------------------------------------------------------------------
1 | <%= yieldall %>
2 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/method/setup.rb:
--------------------------------------------------------------------------------
1 | include ::Kit::Doc::Yard::TemplatePluginHelper # rubocop:disable Style/MixinUsage
2 |
3 | def init
4 | sections(:header, [
5 | T('method_details'),
6 | ],)
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/method_details/html/docstring_wrapper.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/method_details/html/header.erb:
--------------------------------------------------------------------------------
1 |
4 |
5 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/method_details/setup.rb:
--------------------------------------------------------------------------------
1 | include ::Kit::Doc::Yard::TemplatePluginHelper # rubocop:disable Style/MixinUsage
2 |
3 | def init
4 | sections :header, [
5 | :method_signature,
6 | :docstring_wrapper, [
7 | T('docstring'),
8 | ],
9 | #:source,
10 | ]
11 | end
12 |
--------------------------------------------------------------------------------
/libraries/kit-doc/templates/default/module/html/section_moduledoc.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/libraries/kit-domain/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-domain/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gemspec
4 |
5 | gem 'kit-active_admin', path: '../../libraries/kit-active_admin'
6 | gem 'kit-contract', path: '../../libraries/kit-contract'
7 | gem 'kit-organizer', path: '../../libraries/kit-organizer'
8 |
--------------------------------------------------------------------------------
/libraries/kit-domain/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/admin/kit/domain/admin/attributes/event.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Admin::Attributes::Event < Kit::Admin::Attributes
2 |
3 | def self.all
4 | {
5 | id: nil,
6 | created_at: nil,
7 | emitted_at: nil,
8 |
9 | name: :code,
10 | data: :pre_yaml,
11 | metadata: :pre_yaml,
12 | }
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/components/kit/domain/components/specs/link_to_component.html.slim:
--------------------------------------------------------------------------------
1 | h3
2 | | Url:
3 | code = url
4 |
5 | h3
6 | | Verb:
7 | code = method
8 |
9 | form action=url method='POST'
10 |
11 | input name='_method' value=method type='hidden'
12 | input name=csrf_param value=csrf_token type='hidden'
13 |
14 | input type='submit' value='Redirect'
15 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/endpoints/kit/domain/endpoints/specs.rb:
--------------------------------------------------------------------------------
1 | module Kit::Domain::Endpoints::Specs
2 |
3 | def self.register_endpoints
4 | Kit::Domain::Endpoints::Specs::Cookies.register_endpoints
5 | Kit::Domain::Endpoints::Specs::LinkTo.register_endpoint
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::ApplicationRecord < ActiveRecord::Base
2 |
3 | self.abstract_class = true
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/engine_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::EngineRecord < Kit::Domain::Models::ApplicationRecord
2 |
3 | include Kit::Domain::Models::Concerns::EngineRecord
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/read/event.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Read::Event < Kit::Domain::Models::ReadRecord
2 |
3 | include Kit::Domain::Models::Base::Event
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/read/request_metadata.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Read::RequestMetadata < Kit::Domain::Models::ReadRecord
2 |
3 | include Kit::Domain::Models::Base::RequestMetadata
4 |
5 | has_many :request_metadata_links,
6 | class_name: 'Kit::Domain::Models::Read::RequestMetadataLink'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/read/request_metadata_link.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Read::RequestMetadataLink < Kit::Domain::Models::ReadRecord
2 |
3 | include Kit::Domain::Models::Base::RequestMetadataLink
4 |
5 | belongs_to :request_metadata,
6 | class_name: 'Kit::Domain::Models::Read::RequestMetadata'
7 |
8 | belongs_to :target_object, polymorphic: true
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/read_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models:: ReadRecord < Kit::Domain::Models::EngineRecord
2 |
3 | include Kit::Domain::Models::Concerns::ReadRecord
4 |
5 | establish_connection :primary_readonly
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/write/event.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Write::Event < Kit::Domain::Models::WriteRecord
2 |
3 | include Kit::Domain::Models::Base::Event
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/write/request_metadata.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Write::RequestMetadata < Kit::Domain::Models::WriteRecord
2 |
3 | include Kit::Domain::Models::Base::RequestMetadata
4 |
5 | has_many :request_metadata_links,
6 | class_name: 'Kit::Domain::Models::Write::RequestMetadataLink'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/write/request_metadata_link.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::Write::RequestMetadataLink < Kit::Domain::Models::WriteRecord
2 |
3 | include Kit::Domain::Models::Base::RequestMetadataLink
4 |
5 | belongs_to :request_metadata,
6 | class_name: 'Kit::Domain::Models::Write::RequestMetadata'
7 |
8 | belongs_to :target_object, polymorphic: true
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/libraries/kit-domain/app/models/kit/domain/models/write_record.rb:
--------------------------------------------------------------------------------
1 | class Kit::Domain::Models::WriteRecord < Kit::Domain::Models::EngineRecord
2 |
3 | include Kit::Domain::Models::Concerns::WriteRecord
4 |
5 | establish_connection :primary_write
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/libraries/kit-domain/config/initializers/eager_load_endpoints.rb:
--------------------------------------------------------------------------------
1 | Rails.application.config.to_prepare do
2 | Kit::Domain::Endpoints::Specs.register_endpoints
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-domain/lib/kit/domain/engine.rb:
--------------------------------------------------------------------------------
1 | # Engine.
2 | class Kit::Domain::Engine < ::Rails::Engine
3 |
4 | isolate_namespace Kit::Domain
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/libraries/kit-domain/lib/kit/domain/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Domain
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-dotenv/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec name: 'kit-dotenv'
5 | gemspec name: 'kit-dotenv-rails'
6 |
7 | group :test, :development do
8 | gem 'pry'
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-dotenv/README.md:
--------------------------------------------------------------------------------
1 | # Kit::Dotenv
2 |
3 | `Kit::Dotenv` provides some overloads to `Dotenv` to account for engines & dummy apps (multiple root directories).
4 |
5 | ## TODOS
6 |
7 | Implement `Kit::Config`, where this simply becomes a `VaultStrategy`.
8 |
--------------------------------------------------------------------------------
/libraries/kit-dotenv/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | begin
10 | require 'rspec/core/rake_task'
11 |
12 | RSpec::Core::RakeTask.new(:spec)
13 |
14 | #task :default => :spec
15 | rescue LoadError
16 | # no rspec available
17 | end
--------------------------------------------------------------------------------
/libraries/kit-dotenv/lib/kit-dotenv-rails.rb:
--------------------------------------------------------------------------------
1 | require 'kit/dotenv'
2 | require_relative './kit/dotenv/railtie'
3 |
--------------------------------------------------------------------------------
/libraries/kit-dotenv/lib/kit-dotenv.rb:
--------------------------------------------------------------------------------
1 | require_relative './kit/dotenv'
--------------------------------------------------------------------------------
/libraries/kit-dotenv/lib/kit/dotenv.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Dotenv
3 | end
4 | end
5 |
6 | #require "kit/dotenv/rails"
7 |
--------------------------------------------------------------------------------
/libraries/kit-dotenv/lib/kit/dotenv/rails-now.rb:
--------------------------------------------------------------------------------
1 | # If you use gems that require environment variables to be set before they are
2 | # loaded, then list `dotenv-rails` in the `Gemfile` before those other gems and
3 | # require `dotenv/rails-now`.
4 | #
5 | # gem "dotenv-rails", require: "dotenv/rails-now"
6 | # gem "gem-that-requires-env-variables"
7 | #
8 |
9 | require "kit/dotenv/railtie"
10 | ::Dotenv::Railtie.load
--------------------------------------------------------------------------------
/libraries/kit-dotenv/lib/kit/dotenv/version.rb:
--------------------------------------------------------------------------------
1 | module Kit
2 | module Dotenv
3 | VERSION = '0.1.0'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/.env.development:
--------------------------------------------------------------------------------
1 |
2 |
3 | DEVISE_SECRET_KEY='b412856eac2707837964d8d7ae9e7af80d11c30a9674fe911c48b665c09505a02546f249e57cabaee7536a30884ba3521c4b1b628cede740f64af3af0129ac99'
4 |
5 | DATABASE_URL='postgres://root:@127.0.0.1/elearning_development'
6 |
7 | REDIS_SIDEKIQ_URL='redis://127.0.0.1:6379/9'
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/.env.template:
--------------------------------------------------------------------------------
1 | PORT=
2 |
3 | DEVISE_SECRET_KEY=
4 |
5 | DATABASE_URL=
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/.env.test:
--------------------------------------------------------------------------------
1 |
2 |
3 | DEVISE_SECRET_KEY='b412856eac2707837964d8d7ae9e7af80d11c30a9674fe911c48b665c09505a02546f249e57cabaee7536a30884ba3521c4b1b628cede740f64af3af0129ac99'
4 |
5 | DATABASE_URL='postgres://root:@127.0.0.1/elearning_test'
6 |
7 | REDIS_SIDEKIQ_URL='redis://127.0.0.1:6379/8'
8 |
9 | AUTH_PEPPER='pepper'
10 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require_relative 'config/application'
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/app/assets/config/manifest.js:
--------------------------------------------------------------------------------
1 | // link_tree ../images
2 | //= link_directory ../javascripts .js
3 | //= link_directory ../stylesheets .css
4 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/app/components/kit/dummy_app_container/components/navbar.rb:
--------------------------------------------------------------------------------
1 | # Default Navbar.
2 | class Kit::DummyAppContainer::Components::Navbar < ::ViewComponent::Base
3 |
4 | attr_reader :args
5 |
6 | def initialize(**args) # rubocop:disable Lint/UselessMethodDefinition
7 | super
8 |
9 | @args = args
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | # NOTE: AA implicit dependency (needed for `inherited-ressources` to work)
2 | class ::ApplicationController < Kit::DummyAppContainer::Controllers::WebController
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | if defined?(ActiveRecord::Railtie)
2 |
3 | class ApplicationRecord < ActiveRecord::Base # rubocop:disable Style/Documentation
4 |
5 | self.abstract_class = true
6 |
7 | end
8 |
9 | else
10 |
11 | class ApplicationRecord
12 | end
13 |
14 | end
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/app/views/web/home/index.html.slim:
--------------------------------------------------------------------------------
1 | h1 Home
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/initializers/eager_load_controllers.rb:
--------------------------------------------------------------------------------
1 | autoloader = Rails.autoloaders.main
2 |
3 | autoloader.on_setup { Kit::DummyAppContainer::Controllers::Web::HomeController }
4 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/initializers/inflectors.rb:
--------------------------------------------------------------------------------
1 | ActiveSupport::Inflector.inflections(:en) do |inflect|
2 | inflect.irregular 'data', 'data'
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/initializers/slim.rb:
--------------------------------------------------------------------------------
1 | if defined?(Slim) && [true, 'true'].include?(ENV['SLIM_PRETTY'])
2 | Slim::Engine.set_options pretty: true, sort_attrs: false
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/routes.rb:
--------------------------------------------------------------------------------
1 | # NOTE: this needs to be a `load` for routes auto-reload to work.
2 | if KIT_APP_PATHS['GEM_SPEC_ROUTES']
3 | load KIT_APP_PATHS['GEM_SPEC_ROUTES']
4 | end
5 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w[
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ].each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/lib/kit/dummy_app_container.rb:
--------------------------------------------------------------------------------
1 | # rubocop:disable Naming/FileName
2 | # rubocop:enable Naming/FileName
3 |
4 | module Kit # rubocop:disable Style/Documentation
5 | end
6 |
7 | # DummyAppContainer provides a simplified way to add a dummy spec app to Rails project.
8 | module Kit::DummyAppContainer
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/lib/kit/dummy_app_container/rails_application.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | if KIT_APP_PATHS[:ENGINE_ROOT]
3 | ENGINE_ROOT = KIT_APP_PATHS[:ENGINE_ROOT]
4 | end
5 |
6 | if KIT_APP_PATHS[:ENGINE_PATH]
7 | ENGINE_ROOT = KIT_APP_PATHS[:ENGINE_PATH]
8 | end
9 | =end
10 |
11 | require_relative '../../../config/application'
12 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/lib/kit/dummy_app_container/rails_rspec.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 |
3 | require File.expand_path('../../../config/environment', __dir__)
4 |
5 | # Prevent database truncation if the environment is production
6 | abort('The Rails environment is running in production mode!') if Rails.env.production?
7 |
8 | require 'rspec/rails'
9 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/lib/kit/dummy_app_container/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::DummyAppContainer
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-dummy_app_container/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-dummy_app_container/public/favicon.ico
--------------------------------------------------------------------------------
/libraries/kit-engine/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-engine/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
--------------------------------------------------------------------------------
/libraries/kit-engine/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
--------------------------------------------------------------------------------
/libraries/kit-engine/lib/kit/engine/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Engine
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-error/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | log/*.log
3 | pkg/
4 | test/dummy/db/*.sqlite3
5 | test/dummy/db/*.sqlite3-journal
6 | test/dummy/log/*.log
7 | test/dummy/node_modules/
8 | test/dummy/yarn-error.log
9 | test/dummy/storage/
10 | test/dummy/tmp/
11 |
--------------------------------------------------------------------------------
/libraries/kit-error/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-error/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
--------------------------------------------------------------------------------
/libraries/kit-error/lib/kit/error/format.rb:
--------------------------------------------------------------------------------
1 | # Namespace for various libraries error format.
2 | module Kit::Error::Format
3 | end
4 |
5 | require_relative 'format/active_model'
6 | require_relative 'format/dry_validation'
7 | require_relative 'format/json_api'
8 |
--------------------------------------------------------------------------------
/libraries/kit-error/lib/kit/error/log.rb:
--------------------------------------------------------------------------------
1 | # Log wrapper for `Kit::Error`.
2 | module Kit::Error::Log
3 |
4 | def self.log(msg:, flags: [])
5 | flags.unshift([:gem, :kit_error])
6 | Kit::Log.log(msg: msg, flags: flags)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-error/lib/kit/error/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Error
5 |
6 | # `Kit::Error` current version.lib/kit/error/version.rb
7 | VERSION = '0.1.0'
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-log/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-log/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
--------------------------------------------------------------------------------
/libraries/kit-log/lib/kit/log/backends.rb:
--------------------------------------------------------------------------------
1 | # Namespace for all output backends
2 | module Kit::Log::Backends
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/libraries/kit-log/lib/kit/log/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Log
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | import 'tasks/documentation.rake'
10 |
11 | begin
12 | require 'rspec/core/rake_task'
13 |
14 | RSpec::Core::RakeTask.new(:spec)
15 |
16 | #task :default => :spec
17 | rescue LoadError
18 | # no rspec available
19 | end
20 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/app/errors/kit/organizer/error.rb:
--------------------------------------------------------------------------------
1 | # When using contracts on method signatures (through `before`, `after`, `contract`),
2 | # a `Kit::Contract::Error` exception is raised when a contract failure happens.
3 | class Kit::Organizer::Error < ::StandardError
4 |
5 | def initialize(msg) # rubocop:disable Lint/UselessMethodDefinition
6 | super
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/app/services/kit/organizer/log.rb:
--------------------------------------------------------------------------------
1 | # Log wrapper for Kit::Organizer.
2 | module Kit::Organizer::Log
3 |
4 | def self.log(msg:, flags: [])
5 | flags.unshift([:gem, :kit_organizer])
6 | Kit::Log.log(msg: msg, flags: flags)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/app/services/kit/organizer/services.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Kit::Organizer Services.
2 | module Kit::Organizer::Services
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/config/initializers/array_override.rb:
--------------------------------------------------------------------------------
1 | class Array # rubocop:disable Style/Documentation
2 |
3 | # Helper method to be able to call organize directly on an Array.
4 | def organize(ctx: {}, **rest)
5 | args = { list: self }
6 | .merge({ ctx: ctx })
7 | .merge(rest)
8 |
9 | Kit::Organizer.call(args)
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/libraries/kit-organizer/docs/guides/organizers.md:
--------------------------------------------------------------------------------
1 | # About Organizers
2 |
3 | TODO: explain the need for one validation primitive
4 | TODO: explain static typing, pattern matching, dependent types, etc.
5 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/docs/guides/usage.md:
--------------------------------------------------------------------------------
1 | # Usage
2 |
3 | ## Gem installation
4 |
5 | Add this line to your application's Gemfile:
6 |
7 | ```ruby
8 | gem 'kit-organizer'
9 | ```
10 |
11 | And run:
12 | ```sh
13 | $ bundle install
14 | ```
15 |
16 | ## Tasks
17 |
18 | ### Documentation
19 |
20 | Run:
21 | ```sh
22 | $ bundle exec rake documentation:generate
23 | ```
24 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/lib/kit/organizer/engine.rb:
--------------------------------------------------------------------------------
1 | # The Engine is mainly used to handle all autoloading.
2 | class Kit::Organizer::Engine < ::Rails::Engine
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-organizer/lib/kit/organizer/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | module Kit::Organizer
5 |
6 | VERSION = '0.1.0'
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | git_source(:github) { |repo| "https://github.com/#{ repo }.git" }
3 |
4 | gemspec
5 |
6 | group :development do
7 | gem 'kit-doc', path: '../../libraries/kit-doc'
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | require 'rspec/core/rake_task'
10 | import 'tasks/documentation.rake'
11 |
12 | RSpec::Core::RakeTask.new(:spec)
13 |
14 | task default: :spec
15 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/docs/VERSIONS:
--------------------------------------------------------------------------------
1 | edge:main
--------------------------------------------------------------------------------
/libraries/kit-pagination/docs/guides/relative_pagination.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rubykit/kit/cc44ec730f7b9ab67c66e69b58b5be2e87ee59a1/libraries/kit-pagination/docs/guides/relative_pagination.md
--------------------------------------------------------------------------------
/libraries/kit-pagination/docs/guides/usage.md:
--------------------------------------------------------------------------------
1 | # Usage
2 |
3 | ## Installation
4 | Add this line to your application's `Gemfile`:
5 |
6 | ```ruby
7 | gem 'kit-pagination'
8 | ```
9 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/lib/kit/pagination.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/Documentation
2 | end
3 |
4 | # Pagination logic for sets.
5 | module Kit::Pagination
6 | end
7 |
8 | require 'kit/pagination/condition'
9 | require 'kit/pagination/cursor'
10 | require 'kit/pagination/active_record'
11 |
--------------------------------------------------------------------------------
/libraries/kit-pagination/lib/kit/pagination/version.rb:
--------------------------------------------------------------------------------
1 | module Kit # rubocop:disable Style/ClassAndModuleChildren
2 | module Pagination
3 | VERSION = '0.1.0'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-router/.rubocop.yml:
--------------------------------------------------------------------------------
1 | inherit_from: ../../.rubocop_shared.yml
2 |
3 | # Note: needed because somehow running rubocop in the top level dir VS projects subdirectories has slightly different behaviours.
4 | Lint/RedundantCopDisableDirective:
5 | Enabled: false
6 |
--------------------------------------------------------------------------------
/libraries/kit-router/Rakefile:
--------------------------------------------------------------------------------
1 | begin
2 | require 'bundler/setup'
3 | rescue LoadError
4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5 | end
6 |
7 | require 'bundler/gem_tasks'
8 |
9 | import 'tasks/documentation.rake'
10 |
11 | begin
12 | require 'rspec/core/rake_task'
13 |
14 | RSpec::Core::RakeTask.new(:spec)
15 |
16 | #task :default => :spec
17 | rescue LoadError
18 | # no rspec available
19 | end
20 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/adapters/kit/router/adapters/http/intent/store.rb:
--------------------------------------------------------------------------------
1 | module Kit::Router::Adapters::Http::Intent::Store
2 |
3 | def self.create_intent_store
4 | {}
5 | end
6 |
7 | def self.default_intent_store
8 | @default_intent_store ||= create_intent_store
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/adapters/kit/router/adapters/http_rails.rb:
--------------------------------------------------------------------------------
1 | # Adapter to handle Http calls.
2 | #
3 | module Kit::Router::Adapters::HttpRails
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/adapters/kit/router/adapters/http_rails/conn.rb:
--------------------------------------------------------------------------------
1 | # Conn helpers.
2 | module Kit::Router::Adapters::HttpRails::Conn
3 |
4 | def self.cookies_encrypted_prefix
5 | '__enc_'
6 | end
7 |
8 | def self.cookies_signed_prefix
9 | '__sig_'
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/contracts/kit/router/contracts/router_conn.rb:
--------------------------------------------------------------------------------
1 | class Kit::Router::Contracts::RouterConn < Kit::Contract::BuiltInContracts::Hash
2 |
3 | Ct = Kit::Router::Contracts
4 |
5 | def setup(keyword_args_contracts = nil)
6 | @state[:contracts_list] = []
7 |
8 | instance(Ct::IsA[::Kit::Router::Models::Conn], safe: true)
9 | with(keyword_args_contracts || [])
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/services/kit/router/log.rb:
--------------------------------------------------------------------------------
1 | # Library specific wrapper for Kit::Router.
2 | module Kit::Router::Log
3 |
4 | def self.log(msg:, flags: [])
5 | flags.unshift([:gem, :kit_router])
6 | Kit::Log.log(msg: msg, flags: flags)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/services/kit/router/services.rb:
--------------------------------------------------------------------------------
1 | # Namespace for Kit::Router Services.
2 | module Kit::Router::Services
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/view_helpers/kit/router/view_helpers.rb:
--------------------------------------------------------------------------------
1 | # Namespace for various ViewHelpers.
2 | module Kit::Router::ViewHelpers
3 | end
4 |
--------------------------------------------------------------------------------
/libraries/kit-router/app/view_helpers/kit/router/view_helpers/router_conn.rb:
--------------------------------------------------------------------------------
1 | # View helper to make kit router_conn available in views (including layouts)
2 | module Kit::Router::ViewHelpers::RouterConn
3 |
4 | def router_conn
5 | request.instance_variable_get(:@kit_router_conn)
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/libraries/kit-router/assets/src/aliases.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |