├── .gitignore ├── .rubocop.yml ├── CONTRIBUTING.md ├── Gemfile ├── Gemfile.lock ├── MIT-LICENSE ├── README.md ├── Rakefile ├── app ├── controllers │ └── correspondent │ │ ├── application_controller.rb │ │ └── notifications_controller.rb ├── jobs │ └── correspondent │ │ └── application_job.rb └── models │ └── correspondent │ ├── application_record.rb │ └── notification.rb ├── bin └── rails ├── config └── routes.rb ├── correspondent.gemspec ├── lib ├── correspondent.rb ├── correspondent │ ├── engine.rb │ └── version.rb ├── generators │ └── correspondent │ │ └── install │ │ ├── install_generator.rb │ │ └── templates │ │ └── create_correspondent_notifications.rb └── tasks │ └── correspondent_tasks.rake └── test ├── benchmarks └── notifies_penalty_test.rb ├── controllers └── notifications_controller_test.rb ├── correspondent_test.rb ├── dummy ├── Rakefile ├── app │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ ├── javascripts │ │ │ └── application.js │ │ └── stylesheets │ │ │ └── application.css │ ├── controllers │ │ ├── application_controller.rb │ │ └── concerns │ │ │ └── .keep │ ├── jobs │ │ └── application_job.rb │ ├── mailers │ │ └── application_mailer.rb │ ├── models │ │ ├── application_record.rb │ │ ├── concerns │ │ │ └── .keep │ │ ├── promotion.rb │ │ ├── purchase.rb │ │ ├── store.rb │ │ └── user.rb │ └── views │ │ ├── application_mailer │ │ ├── purchase_email.html.erb │ │ └── refund_email.html.erb │ │ └── layouts │ │ ├── mailer.html.erb │ │ └── mailer.text.erb ├── bin │ ├── bundle │ ├── rails │ ├── rake │ ├── setup │ └── update ├── config.ru ├── config │ ├── application.rb │ ├── boot.rb │ ├── database.yml │ ├── environment.rb │ ├── environments │ │ ├── development.rb │ │ ├── production.rb │ │ └── test.rb │ ├── initializers │ │ ├── application_controller_renderer.rb │ │ ├── backtrace_silencers.rb │ │ ├── cors.rb │ │ ├── filter_parameter_logging.rb │ │ ├── inflections.rb │ │ ├── mime_types.rb │ │ └── wrap_parameters.rb │ ├── locales │ │ └── en.yml │ ├── puma.rb │ ├── routes.rb │ └── spring.rb ├── db │ ├── migrate │ │ ├── 20190226001839_create_users.rb │ │ ├── 20190226002057_create_purchases.rb │ │ ├── 20190226182148_create_correspondent_notifications.rb │ │ ├── 20190226212733_create_promotions.rb │ │ ├── 20190228192922_add_link_url_to_notifications.rb │ │ ├── 20190307223149_create_stores.rb │ │ └── 20190307224854_add_referrer_url_to_notifications.rb │ └── schema.rb └── log │ └── .keep ├── models └── notification_test.rb └── test_helper.rb /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/.gitignore -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/.rubocop.yml -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/Gemfile -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/Gemfile.lock -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/MIT-LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/Rakefile -------------------------------------------------------------------------------- /app/controllers/correspondent/application_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/app/controllers/correspondent/application_controller.rb -------------------------------------------------------------------------------- /app/controllers/correspondent/notifications_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/app/controllers/correspondent/notifications_controller.rb -------------------------------------------------------------------------------- /app/jobs/correspondent/application_job.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/app/jobs/correspondent/application_job.rb -------------------------------------------------------------------------------- /app/models/correspondent/application_record.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/app/models/correspondent/application_record.rb -------------------------------------------------------------------------------- /app/models/correspondent/notification.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/app/models/correspondent/notification.rb -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/bin/rails -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/config/routes.rb -------------------------------------------------------------------------------- /correspondent.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/correspondent.gemspec -------------------------------------------------------------------------------- /lib/correspondent.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/lib/correspondent.rb -------------------------------------------------------------------------------- /lib/correspondent/engine.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/lib/correspondent/engine.rb -------------------------------------------------------------------------------- /lib/correspondent/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Correspondent 4 | VERSION = "1.0.1" 5 | end 6 | -------------------------------------------------------------------------------- /lib/generators/correspondent/install/install_generator.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/lib/generators/correspondent/install/install_generator.rb -------------------------------------------------------------------------------- /lib/generators/correspondent/install/templates/create_correspondent_notifications.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/lib/generators/correspondent/install/templates/create_correspondent_notifications.rb -------------------------------------------------------------------------------- /lib/tasks/correspondent_tasks.rake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/lib/tasks/correspondent_tasks.rake -------------------------------------------------------------------------------- /test/benchmarks/notifies_penalty_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/benchmarks/notifies_penalty_test.rb -------------------------------------------------------------------------------- /test/controllers/notifications_controller_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/controllers/notifications_controller_test.rb -------------------------------------------------------------------------------- /test/correspondent_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/correspondent_test.rb -------------------------------------------------------------------------------- /test/dummy/Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/Rakefile -------------------------------------------------------------------------------- /test/dummy/app/assets/config/manifest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/assets/config/manifest.js -------------------------------------------------------------------------------- /test/dummy/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/assets/javascripts/application.js -------------------------------------------------------------------------------- /test/dummy/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/assets/stylesheets/application.css -------------------------------------------------------------------------------- /test/dummy/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/controllers/application_controller.rb -------------------------------------------------------------------------------- /test/dummy/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/dummy/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /test/dummy/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/mailers/application_mailer.rb -------------------------------------------------------------------------------- /test/dummy/app/models/application_record.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/models/application_record.rb -------------------------------------------------------------------------------- /test/dummy/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/dummy/app/models/promotion.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/models/promotion.rb -------------------------------------------------------------------------------- /test/dummy/app/models/purchase.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/models/purchase.rb -------------------------------------------------------------------------------- /test/dummy/app/models/store.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/models/store.rb -------------------------------------------------------------------------------- /test/dummy/app/models/user.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/models/user.rb -------------------------------------------------------------------------------- /test/dummy/app/views/application_mailer/purchase_email.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/views/application_mailer/purchase_email.html.erb -------------------------------------------------------------------------------- /test/dummy/app/views/application_mailer/refund_email.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/views/application_mailer/refund_email.html.erb -------------------------------------------------------------------------------- /test/dummy/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/app/views/layouts/mailer.html.erb -------------------------------------------------------------------------------- /test/dummy/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /test/dummy/bin/bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/bin/bundle -------------------------------------------------------------------------------- /test/dummy/bin/rails: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/bin/rails -------------------------------------------------------------------------------- /test/dummy/bin/rake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/bin/rake -------------------------------------------------------------------------------- /test/dummy/bin/setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/bin/setup -------------------------------------------------------------------------------- /test/dummy/bin/update: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/bin/update -------------------------------------------------------------------------------- /test/dummy/config.ru: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config.ru -------------------------------------------------------------------------------- /test/dummy/config/application.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/application.rb -------------------------------------------------------------------------------- /test/dummy/config/boot.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/boot.rb -------------------------------------------------------------------------------- /test/dummy/config/database.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/database.yml -------------------------------------------------------------------------------- /test/dummy/config/environment.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/environment.rb -------------------------------------------------------------------------------- /test/dummy/config/environments/development.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/environments/development.rb -------------------------------------------------------------------------------- /test/dummy/config/environments/production.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/environments/production.rb -------------------------------------------------------------------------------- /test/dummy/config/environments/test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/environments/test.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/application_controller_renderer.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/backtrace_silencers.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/cors.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/cors.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/filter_parameter_logging.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/inflections.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/inflections.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/mime_types.rb -------------------------------------------------------------------------------- /test/dummy/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/initializers/wrap_parameters.rb -------------------------------------------------------------------------------- /test/dummy/config/locales/en.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/locales/en.yml -------------------------------------------------------------------------------- /test/dummy/config/puma.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/puma.rb -------------------------------------------------------------------------------- /test/dummy/config/routes.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/routes.rb -------------------------------------------------------------------------------- /test/dummy/config/spring.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/config/spring.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190226001839_create_users.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190226001839_create_users.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190226002057_create_purchases.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190226002057_create_purchases.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190226182148_create_correspondent_notifications.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190226182148_create_correspondent_notifications.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190226212733_create_promotions.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190226212733_create_promotions.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190228192922_add_link_url_to_notifications.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190228192922_add_link_url_to_notifications.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190307223149_create_stores.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190307223149_create_stores.rb -------------------------------------------------------------------------------- /test/dummy/db/migrate/20190307224854_add_referrer_url_to_notifications.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/migrate/20190307224854_add_referrer_url_to_notifications.rb -------------------------------------------------------------------------------- /test/dummy/db/schema.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/dummy/db/schema.rb -------------------------------------------------------------------------------- /test/dummy/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/notification_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/models/notification_test.rb -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinistock/correspondent/HEAD/test/test_helper.rb --------------------------------------------------------------------------------