doodle_rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/doodle/application.js +13 -0
  6. data/app/assets/javascripts/doodle/auth.js +2 -0
  7. data/app/assets/javascripts/doodle/keywords.js +2 -0
  8. data/app/assets/javascripts/doodle/users.js +2 -0
  9. data/app/assets/stylesheets/doodle/application.css +15 -0
  10. data/app/assets/stylesheets/doodle/auth.css +4 -0
  11. data/app/assets/stylesheets/doodle/keywords.css +4 -0
  12. data/app/assets/stylesheets/doodle/users.css +4 -0
  13. data/app/controllers/doodle/application_controller.rb +15 -0
  14. data/app/controllers/doodle/auth_controller.rb +23 -0
  15. data/app/controllers/doodle/chat_controller.rb +50 -0
  16. data/app/controllers/doodle/conversations_controller.rb +30 -0
  17. data/app/controllers/doodle/keywords_controller.rb +32 -0
  18. data/app/controllers/doodle/users_controller.rb +35 -0
  19. data/app/helpers/doodle/application_helper.rb +4 -0
  20. data/app/helpers/doodle/auth_helper.rb +4 -0
  21. data/app/helpers/doodle/keywords_helper.rb +4 -0
  22. data/app/helpers/doodle/users_helper.rb +4 -0
  23. data/app/models/doodle/channel.rb +12 -0
  24. data/app/models/doodle/keyword/action.rb +4 -0
  25. data/app/models/doodle/keyword/text.rb +4 -0
  26. data/app/models/doodle/keyword.rb +4 -0
  27. data/app/models/doodle/protocol.rb +65 -0
  28. data/app/models/doodle/user/analyst.rb +18 -0
  29. data/app/models/doodle/user/customer.rb +4 -0
  30. data/app/models/doodle/user.rb +9 -0
  31. data/app/models/doodle/user_channel.rb +27 -0
  32. data/app/services/doodle/channel/finder_service.rb +15 -0
  33. data/app/services/doodle/chat/join_service.rb +23 -0
  34. data/app/services/doodle/keyword/finder_service.rb +15 -0
  35. data/app/services/doodle/protocol/creator_service.rb +16 -0
  36. data/app/services/doodle/protocol/finalizer_service.rb +11 -0
  37. data/app/services/doodle/protocol/finder_service.rb +13 -0
  38. data/app/services/layer/conversation/creator_service.rb +11 -0
  39. data/app/services/layer/token_creator_service.rb +13 -0
  40. data/app/views/layouts/doodle/application.html.erb +14 -0
  41. data/config/initializers/layer.rb +12 -0
  42. data/config/routes.rb +25 -0
  43. data/db/migrate/20160211170908_create_doodle_channels.rb +9 -0
  44. data/db/migrate/20160211202503_create_doodle_user_channels.rb +13 -0
  45. data/db/migrate/20160320142137_create_doodle_users.rb +11 -0
  46. data/db/migrate/20160320142142_create_doodle_keywords.rb +11 -0
  47. data/db/migrate/20160320175917_create_doodle_protocols.rb +16 -0
  48. data/lib/doodle/engine.rb +5 -0
  49. data/lib/doodle/version.rb +3 -0
  50. data/lib/doodle.rb +4 -0
  51. data/lib/tasks/doodle_tasks.rake +4 -0
  52. data/test/controllers/doodle/auth_controller_test.rb +13 -0
  53. data/test/controllers/doodle/keywords_controller_test.rb +13 -0
  54. data/test/controllers/doodle/users_controller_test.rb +13 -0
  55. data/test/doodle_test.rb +7 -0
  56. data/test/dummy/README.rdoc +28 -0
  57. data/test/dummy/Rakefile +6 -0
  58. data/test/dummy/app/assets/javascripts/application.js +13 -0
  59. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  60. data/test/dummy/app/controllers/application_controller.rb +5 -0
  61. data/test/dummy/app/helpers/application_helper.rb +2 -0
  62. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  63. data/test/dummy/bin/bundle +3 -0
  64. data/test/dummy/bin/rails +4 -0
  65. data/test/dummy/bin/rake +4 -0
  66. data/test/dummy/bin/setup +29 -0
  67. data/test/dummy/config/application.rb +28 -0
  68. data/test/dummy/config/boot.rb +5 -0
  69. data/test/dummy/config/database.yml +25 -0
  70. data/test/dummy/config/environment.rb +5 -0
  71. data/test/dummy/config/environments/development.rb +41 -0
  72. data/test/dummy/config/environments/production.rb +79 -0
  73. data/test/dummy/config/environments/test.rb +42 -0
  74. data/test/dummy/config/initializers/assets.rb +11 -0
  75. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  76. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  77. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/test/dummy/config/initializers/inflections.rb +16 -0
  79. data/test/dummy/config/initializers/mime_types.rb +4 -0
  80. data/test/dummy/config/initializers/session_store.rb +3 -0
  81. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  82. data/test/dummy/config/locales/en.yml +23 -0
  83. data/test/dummy/config/private_key.pem +15 -0
  84. data/test/dummy/config/routes.rb +4 -0
  85. data/test/dummy/config/secrets.yml +22 -0
  86. data/test/dummy/config.ru +4 -0
  87. data/test/dummy/db/development.sqlite3 +0 -0
  88. data/test/dummy/db/schema.rb +66 -0
  89. data/test/dummy/log/development.log +7207 -0
  90. data/test/dummy/public/404.html +67 -0
  91. data/test/dummy/public/422.html +67 -0
  92. data/test/dummy/public/500.html +66 -0
  93. data/test/dummy/public/favicon.ico +0 -0
  94. data/test/fixtures/doodle/keywords.yml +11 -0
  95. data/test/fixtures/doodle/users.yml +11 -0
  96. data/test/integration/navigation_test.rb +8 -0
  97. data/test/models/doodle/keyword_test.rb +9 -0
  98. data/test/models/doodle/user_test.rb +9 -0
  99. data/test/test_helper.rb +21 -0
  100. metadata +218 -0
@@ -0,0 +1,15 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIICXQIBAAKBgQCSD4Ga2raKX4Ao1OVDUC4vfhbe4pjFh2Y+f5xzsiJ08qZ1Pdcz
3
+ Lt42UboOaObjXRqv1KSHsukwXIVQO+HdfOILf5uq6rGVdeEQpaSMymtChP4s767U
4
+ zjBdABYWqEyKiX9zP5aMDmUToQYsW0Lxhzn6qq+bLHkr2CklloJoQkU8lQIDAQAB
5
+ AoGAZDt753bb+c1bt6mRw0XMzA6tRzsdN8CZK56LEOJXvwWdsatEeP1axNAE7EqU
6
+ 18ZWv/8fAXiHigaT/eF6OHKw88WyYUAYWS0L0PrIDT/+KQj86xZoUVGgz8nXHnaw
7
+ 2TwFx1xX4jPppAP+3DznvFnU2mnhsMLEMlMY1uLsaAuuCsECQQDBlXlOlYiFW/kf
8
+ ZtDdlaxqR4/M0a7AIl8IB75cngQ0SC8ziTXFGiYmcnDgKoy3lu4UIUCY3g7lM9YZ
9
+ AxWl8e2dAkEAwSduQ1Bau3aQuAThZAsTWTa1zG0Dqb8RUZPTIkffV5nP8t/L6R5Y
10
+ 0AXnm6HF5jpeXn+4pJX+y8FaNzP20W7VWQJAZg9gPUYpC+ZJmXyjca+Pjxjbf6is
11
+ 8S8t2xX6DupgXRARkqIsbxYyNuLvD8BfIAu6yXIelHm+cKi7n8Q4jZzXIQJBAJKs
12
+ RJitHhkYcdCrNBRqLKkkWG0BozR1OMt/u2ZeuYSl8jj2JLvDJaHhufx+ne60CBEu
13
+ X6HrnO5QxxcASL7EsRECQQC8Y06TKIZZb8sPMIDsHePrbGemgiNT8LB5o0BpXZXy
14
+ f71b9gdd6sRTK348Auje62StD1kRo/DDyqHozXko4L9B
15
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Doodle::Engine => "/doodle"
4
+ end
@@ -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: 19db146234f30d296a8e37f7dca651432be570ddf1aa26a565840fddc275840518a0acccdbaeb966ad9ca2e595263afc1ccacb6c627b73321a19d20427443240
15
+
16
+ test:
17
+ secret_key_base: 74c13f67d7f312176035a176f6ebce1fb525773aa06b46ed1c98458e9debed4bbf1d5f29e9c3c78393d666e6a4f3a29513070dd7d406a834986db9f879af4d9e
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"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
Binary file
@@ -0,0 +1,66 @@
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: 20160320175917) do
15
+
16
+ create_table "doodle_channels", force: :cascade do |t|
17
+ t.string "name"
18
+ t.datetime "created_at", null: false
19
+ t.datetime "updated_at", null: false
20
+ end
21
+
22
+ create_table "doodle_keywords", force: :cascade do |t|
23
+ t.string "name"
24
+ t.string "value"
25
+ t.string "type"
26
+ t.datetime "created_at", null: false
27
+ t.datetime "updated_at", null: false
28
+ end
29
+
30
+ create_table "doodle_protocols", force: :cascade do |t|
31
+ t.string "customer_login"
32
+ t.integer "channel_id"
33
+ t.integer "user_id"
34
+ t.string "conversation_id"
35
+ t.string "phone"
36
+ t.string "status"
37
+ t.datetime "in_progress_at"
38
+ t.datetime "finalized_at"
39
+ t.datetime "created_at", null: false
40
+ t.datetime "updated_at", null: false
41
+ end
42
+
43
+ add_index "doodle_protocols", ["channel_id"], name: "index_doodle_protocols_on_channel_id"
44
+ add_index "doodle_protocols", ["user_id"], name: "index_doodle_protocols_on_user_id"
45
+
46
+ create_table "doodle_user_channels", force: :cascade do |t|
47
+ t.integer "user_id"
48
+ t.integer "channel_id"
49
+ t.string "status"
50
+ t.integer "concurrent_protocols"
51
+ t.datetime "created_at", null: false
52
+ t.datetime "updated_at", null: false
53
+ end
54
+
55
+ add_index "doodle_user_channels", ["channel_id"], name: "index_doodle_user_channels_on_channel_id"
56
+ add_index "doodle_user_channels", ["user_id"], name: "index_doodle_user_channels_on_user_id"
57
+
58
+ create_table "doodle_users", force: :cascade do |t|
59
+ t.string "login"
60
+ t.string "pass"
61
+ t.string "type"
62
+ t.datetime "created_at", null: false
63
+ t.datetime "updated_at", null: false
64
+ end
65
+
66
+ end