dallal 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +33 -0
- data/app/assets/javascripts/dallal/application.js +13 -0
- data/app/assets/stylesheets/dallal/application.css +15 -0
- data/app/controllers/dallal/application_controller.rb +5 -0
- data/app/helpers/dallal/application_helper.rb +4 -0
- data/app/jobs/dallal/dallal_job.rb +13 -0
- data/app/mailers/dallal/mailer.rb +36 -0
- data/app/views/layouts/dallal/application.html.erb +14 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/routes.rb +2 -0
- data/lib/dallal/abstract_interface.rb +30 -0
- data/lib/dallal/configuration.rb +54 -0
- data/lib/dallal/engine.rb +22 -0
- data/lib/dallal/events/event_publisher.rb +8 -0
- data/lib/dallal/events/event_subscriber.rb +33 -0
- data/lib/dallal/events/events.rb +5 -0
- data/lib/dallal/events/observer.rb +57 -0
- data/lib/dallal/events/publisher.rb +44 -0
- data/lib/dallal/events/subscriber.rb +16 -0
- data/lib/dallal/file_loader.rb +15 -0
- data/lib/dallal/notification.rb +79 -0
- data/lib/dallal/notifiers/email_notifier.rb +28 -0
- data/lib/dallal/notifiers/notifier.rb +33 -0
- data/lib/dallal/notifiers/sms_notifier.rb +15 -0
- data/lib/dallal/result.rb +21 -0
- data/lib/dallal/version.rb +3 -0
- data/lib/dallal.rb +41 -0
- data/lib/generators/dallal/install/USAGE +2 -0
- data/lib/generators/dallal/install/install_generator.rb +11 -0
- data/lib/generators/dallal/install/templates/dallal.rb +16 -0
- data/lib/generators/dallal/notification/USAGE +2 -0
- data/lib/generators/dallal/notification/notification_generator.rb +44 -0
- data/lib/generators/dallal/notification/templates/migration.rb +10 -0
- data/lib/generators/dallal/notification/templates/model.rb +2 -0
- data/lib/generators/dallal/notifiers/USAGE +2 -0
- data/lib/generators/dallal/notifiers/notifiers_generator.rb +56 -0
- data/lib/generators/dallal/notifiers/templates/email_notifier.rb +2 -0
- data/lib/generators/dallal/notifiers/templates/email_notifier_migration.rb +7 -0
- data/lib/generators/dallal/notifiers/templates/sms_notifier.rb +2 -0
- data/lib/generators/dallal/notifiers/templates/sms_notifier_migration.rb +7 -0
- data/lib/tasks/user_notification_tasks.rake +4 -0
- data/spec/dallal/configuration_spec.rb +56 -0
- data/spec/dallal/dallal_spec.rb +23 -0
- data/spec/dallal/events/event_publisher_spec.rb +7 -0
- data/spec/dallal/events/event_subscriber_spec.rb +92 -0
- data/spec/dallal/events/observer_spec.rb +117 -0
- data/spec/dallal/events/publisher_spec.rb +14 -0
- data/spec/dallal/events/subscriber_spec.rb +4 -0
- data/spec/dallal/notification_spec.rb +152 -0
- data/spec/dallal/notifiers/notifier_spec.rb +27 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/post.rb +4 -0
- data/spec/dummy/app/models/user.rb +4 -0
- data/spec/dummy/app/notifiers/comment_notifier.rb +0 -0
- data/spec/dummy/app/notifiers/post_notifier.rb +9 -0
- data/spec/dummy/app/notifiers/user_notifier.rb +2 -0
- data/spec/dummy/app/views/dallal/mailer/posts/register.html.erb +5 -0
- data/spec/dummy/app/views/dallal/mailer/posts/register_subject.html.erb +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +32 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20160801191053_create_users.rb +10 -0
- data/spec/dummy/db/migrate/20160803174036_create_posts.rb +11 -0
- data/spec/dummy/db/schema.rb +38 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +2057 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/factories/posts.rb +7 -0
- data/spec/dummy/spec/factories/users.rb +6 -0
- data/spec/dummy/spec/models/post_spec.rb +5 -0
- data/spec/dummy/spec/models/user_spec.rb +5 -0
- data/spec/factories/posts.rb +7 -0
- data/spec/factories/users.rb +6 -0
- data/spec/jobs/dallal/dallal_job_spec.rb +14 -0
- data/spec/mailers/dallal/mailer_spec.rb +7 -0
- data/spec/mailers/previews/dallal/mailer_preview.rb +6 -0
- data/spec/rails_helper.rb +26 -0
- data/spec/spec_helper.rb +92 -0
- metadata +295 -0
@@ -0,0 +1,14 @@
|
|
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] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 58c998cca82d49fe2d4a3b0f36cd7a87d2f88581461130947e44a67677b49587fd5534efe002c303254e120e9ded7adbf806fa02471c669ec7c3d18992ab501b
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 458260f5cf1fb5e4c78352fa45b2f22e9d9fd9d7a38cddc263f789d38bb006165687cedbb81b26cbe986f48fee69dce8c52d7ea30799eb1f5994c650f05884a2
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20160803174036) do
|
15
|
+
|
16
|
+
create_table "posts", force: :cascade do |t|
|
17
|
+
t.integer "user_id"
|
18
|
+
t.string "title"
|
19
|
+
t.string "body"
|
20
|
+
t.datetime "created_at", null: false
|
21
|
+
t.datetime "updated_at", null: false
|
22
|
+
end
|
23
|
+
|
24
|
+
add_index "posts", ["user_id"], name: "index_posts_on_user_id"
|
25
|
+
|
26
|
+
create_table "dallal_products", force: :cascade do |t|
|
27
|
+
t.datetime "created_at", null: false
|
28
|
+
t.datetime "updated_at", null: false
|
29
|
+
end
|
30
|
+
|
31
|
+
create_table "users", force: :cascade do |t|
|
32
|
+
t.string "email"
|
33
|
+
t.string "username"
|
34
|
+
t.datetime "created_at", null: false
|
35
|
+
t.datetime "updated_at", null: false
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
Binary file
|