feedbacks 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +45 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/javascripts/feedbacks/application.js +16 -0
  6. data/app/assets/stylesheets/feedbacks/application.css +16 -0
  7. data/app/controllers/feedbacks/application_controller.rb +5 -0
  8. data/app/controllers/feedbacks/feedback_sender_controller.rb +17 -0
  9. data/app/mailers/feedbacks/feedback_mailer.rb +12 -0
  10. data/app/models/feedbacks/feedback.rb +20 -0
  11. data/app/views/feedbacks/feedback_mailer/feedback_email.html.erb +27 -0
  12. data/app/views/feedbacks/feedback_sender/_feedback_form.html.erb +19 -0
  13. data/app/views/feedbacks/feedback_sender/create.js.erb +5 -0
  14. data/app/views/feedbacks/feedback_sender/new.js.erb +14 -0
  15. data/app/views/layouts/feedbacks/application.html.erb +14 -0
  16. data/app/views/shared/_error_messages.html.erb +9 -0
  17. data/config/locales/en.yml +12 -0
  18. data/config/routes.rb +7 -0
  19. data/db/migrate/20121108115745_create_feedbacks_feedbacks.rb +12 -0
  20. data/lib/feedbacks.rb +12 -0
  21. data/lib/feedbacks/engine.rb +8 -0
  22. data/lib/feedbacks/version.rb +3 -0
  23. data/lib/generators/feedbacks/initializer_generator.rb +14 -0
  24. data/test/dummy/Gemfile +14 -0
  25. data/test/dummy/Gemfile.lock +127 -0
  26. data/test/dummy/README.rdoc +1 -0
  27. data/test/dummy/Rakefile +7 -0
  28. data/test/dummy/app/assets/javascripts/application.js +16 -0
  29. data/test/dummy/app/assets/stylesheets/application.css +14 -0
  30. data/test/dummy/app/controllers/application_controller.rb +7 -0
  31. data/test/dummy/app/helpers/application_helper.rb +2 -0
  32. data/test/dummy/app/views/application/index.html.erb +3 -0
  33. data/test/dummy/app/views/layouts/application.html.erb +18 -0
  34. data/test/dummy/config.ru +4 -0
  35. data/test/dummy/config/application.rb +59 -0
  36. data/test/dummy/config/boot.rb +10 -0
  37. data/test/dummy/config/database.yml +7 -0
  38. data/test/dummy/config/environment.rb +5 -0
  39. data/test/dummy/config/environments/development.rb +37 -0
  40. data/test/dummy/config/environments/production.rb +67 -0
  41. data/test/dummy/config/environments/test.rb +37 -0
  42. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  43. data/test/dummy/config/initializers/feedbacks.rb +4 -0
  44. data/test/dummy/config/initializers/inflections.rb +15 -0
  45. data/test/dummy/config/initializers/mime_types.rb +5 -0
  46. data/test/dummy/config/initializers/secret_token.rb +7 -0
  47. data/test/dummy/config/initializers/session_store.rb +8 -0
  48. data/test/dummy/config/initializers/setup_mail.rb +9 -0
  49. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  50. data/test/dummy/config/locales/en.yml +5 -0
  51. data/test/dummy/config/locales/ru.yml +12 -0
  52. data/test/dummy/config/routes.rb +6 -0
  53. data/test/dummy/db/development.db +0 -0
  54. data/test/dummy/db/migrate/20140724190358_create_feedbacks_feedbacks.feedbacks.rb +13 -0
  55. data/test/dummy/db/schema.rb +25 -0
  56. data/test/dummy/db/test.db +0 -0
  57. data/test/dummy/log/development.log +5626 -0
  58. data/test/dummy/log/test.log +116 -0
  59. data/test/dummy/public/404.html +26 -0
  60. data/test/dummy/public/422.html +26 -0
  61. data/test/dummy/public/500.html +25 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/dummy/script/rails +6 -0
  64. data/test/dummy/spec/models/feedbacks/feedback_spec.rb +20 -0
  65. data/test/dummy/spec/rails_helper.rb +39 -0
  66. data/test/dummy/spec/spec_helper.rb +78 -0
  67. data/test/dummy/spec/support/factories.rb +8 -0
  68. data/test/dummy/tmp/cache/assets/C5B/270/sprockets%2F950f6c7b0d55e6d54701881553961a84 +0 -0
  69. data/test/dummy/tmp/cache/assets/C74/510/sprockets%2F8acc2baf76422417520890d418081b36 +0 -0
  70. data/test/dummy/tmp/cache/assets/C7D/550/sprockets%2Ff0d125345784030dd2723963561d9ced +0 -0
  71. data/test/dummy/tmp/cache/assets/C90/3F0/sprockets%2Fa5813adecb7637a6f843207987779224 +0 -0
  72. data/test/dummy/tmp/cache/assets/C9A/6A0/sprockets%2Fe3cba04112c13a41772566462891db4b +0 -0
  73. data/test/dummy/tmp/cache/assets/C9E/9F0/sprockets%2Fc2676e7c1304641a44a46195af1ae043 +0 -0
  74. data/test/dummy/tmp/cache/assets/CA3/610/sprockets%2F3dc616236a84970dcc5148a40d01d455 +0 -0
  75. data/test/dummy/tmp/cache/assets/CB8/F70/sprockets%2Fd04288328b6ecfb4705a47995e04b933 +0 -0
  76. data/test/dummy/tmp/cache/assets/CC0/DB0/sprockets%2Fa324c7f9c89af36907e19a95993503b0 +0 -0
  77. data/test/dummy/tmp/cache/assets/CD3/360/sprockets%2F4a6135703e15071f8ef187aa8c4b900a +0 -0
  78. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  79. data/test/dummy/tmp/cache/assets/CDA/0F0/sprockets%2F2104b964fbd412280234675bb9ce78bd +0 -0
  80. data/test/dummy/tmp/cache/assets/CDD/D70/sprockets%2Faed27105c7535267be0fb7f6327d2518 +0 -0
  81. data/test/dummy/tmp/cache/assets/CE5/DC0/sprockets%2F0a0559ec9c71e611ab5e82469ca58395 +0 -0
  82. data/test/dummy/tmp/cache/assets/CE6/3B0/sprockets%2F3942708d185a0dc1b828a573c895bbd9 +0 -0
  83. data/test/dummy/tmp/cache/assets/CEE/010/sprockets%2Fbd5411388cbf7f2079d86f32d3812c99 +0 -0
  84. data/test/dummy/tmp/cache/assets/CF2/010/sprockets%2F08124041b51a96b0a65b451feb5cda51 +0 -0
  85. data/test/dummy/tmp/cache/assets/CF3/270/sprockets%2Fa5c3f871cbeb977a8e256778206078c7 +0 -0
  86. data/test/dummy/tmp/cache/assets/D09/BC0/sprockets%2F5071923fa310681dcd59bfe1c636ef04 +0 -0
  87. data/test/dummy/tmp/cache/assets/D0C/C20/sprockets%2F084ea871a9fe801a622d6aa56e524d82 +0 -0
  88. data/test/dummy/tmp/cache/assets/D0E/080/sprockets%2F4e15101b58f5f7c8de1f2c157772d5a3 +0 -0
  89. data/test/dummy/tmp/cache/assets/D0E/410/sprockets%2F93e31c8b862ddc545eb7a6120e04856c +0 -0
  90. data/test/dummy/tmp/cache/assets/D11/BD0/sprockets%2F8d212a373571d358ee8076ce1f7dfa14 +0 -0
  91. data/test/dummy/tmp/cache/assets/D13/700/sprockets%2Fe9d0283f43f07370ac7730e767de0f1f +0 -0
  92. data/test/dummy/tmp/cache/assets/D16/9B0/sprockets%2F6a5a9878f43b1f8506ac26508efbb462 +0 -0
  93. data/test/dummy/tmp/cache/assets/D1A/4A0/sprockets%2F3f5c88687329ab7096ed3b1be33fe703 +0 -0
  94. data/test/dummy/tmp/cache/assets/D24/F30/sprockets%2F6f0338ea5a13d0b8127a12169ae6aa0d +0 -0
  95. data/test/dummy/tmp/cache/assets/D2B/290/sprockets%2F8856e4e9e49f5190c2f5b98d3b361ee6 +0 -0
  96. data/test/dummy/tmp/cache/assets/D2C/610/sprockets%2F35c17f36c20b2ace032f6e8e323a275b +0 -0
  97. data/test/dummy/tmp/cache/assets/D2E/6E0/sprockets%2F27ba090a0a80d29ff6d2f5990fa1011e +0 -0
  98. data/test/dummy/tmp/cache/assets/D2F/1F0/sprockets%2Ff8fe87c412fd60f985cd8c359b461885 +0 -0
  99. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  100. data/test/dummy/tmp/cache/assets/D39/D80/sprockets%2F1d743809d0765df235d5350fbaa51fdd +0 -0
  101. data/test/dummy/tmp/cache/assets/D39/DB0/sprockets%2F066fe3d19a94a3f691a2f24c40d63fc1 +0 -0
  102. data/test/dummy/tmp/cache/assets/D3A/F20/sprockets%2F68fdb071e5d26c08bb601fb176093a7f +0 -0
  103. data/test/dummy/tmp/cache/assets/D3C/AB0/sprockets%2Fbc3e82e31c4e209447bb731f0cb6c968 +0 -0
  104. data/test/dummy/tmp/cache/assets/D3F/0A0/sprockets%2F2476bea53b26aeef74f6372031b98be4 +0 -0
  105. data/test/dummy/tmp/cache/assets/D40/0A0/sprockets%2F47ade66ee19b934c023c92e1c9bb3329 +0 -0
  106. data/test/dummy/tmp/cache/assets/D40/710/sprockets%2F2a8caa9c60b397919124fd754bf1da74 +0 -0
  107. data/test/dummy/tmp/cache/assets/D48/DF0/sprockets%2Ff394d7dd0a927ed10dd559de12a29487 +0 -0
  108. data/test/dummy/tmp/cache/assets/D49/0D0/sprockets%2F6595720a01f047ffd8af0e599981dcac +0 -0
  109. data/test/dummy/tmp/cache/assets/D4D/0C0/sprockets%2F5f65b3ad601ab8928bd846d8986ad36c +0 -0
  110. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  111. data/test/dummy/tmp/cache/assets/D58/580/sprockets%2F8dda8d81bc94987d6273fa3d0a2798d9 +0 -0
  112. data/test/dummy/tmp/cache/assets/D5A/4A0/sprockets%2F332daad32aaac7d7915aea076c547153 +0 -0
  113. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  114. data/test/dummy/tmp/cache/assets/D5D/000/sprockets%2F2c8ed151db6f49eb0c014c7a2c7f4113 +0 -0
  115. data/test/dummy/tmp/cache/assets/D63/BF0/sprockets%2F5d9c07db11d9b2f3014c785c1ae550fc +0 -0
  116. data/test/dummy/tmp/cache/assets/D64/E70/sprockets%2Fba3f9cb7b80e5693e2abe21d274075b0 +0 -0
  117. data/test/dummy/tmp/cache/assets/D64/F80/sprockets%2Fb80a9ddb464f606b24e0ef82b6e620b1 +0 -0
  118. data/test/dummy/tmp/cache/assets/D68/5B0/sprockets%2F280b48ab2a891052f753cce1bfe771ce +0 -0
  119. data/test/dummy/tmp/cache/assets/D6D/830/sprockets%2F9ed7d74cd533e08604d355cafce2c350 +0 -0
  120. data/test/dummy/tmp/cache/assets/D6F/730/sprockets%2F72b6b16d8e3840753f1bede920f3cdb6 +0 -0
  121. data/test/dummy/tmp/cache/assets/D73/4E0/sprockets%2F817b581b44ccee3e09fa4870828f0bbf +0 -0
  122. data/test/dummy/tmp/cache/assets/D74/C70/sprockets%2F8f419eb322d9ddb4b8b93f24356f1c1f +0 -0
  123. data/test/dummy/tmp/cache/assets/D79/910/sprockets%2Fe8a935a8a09c5654af299acb4c36b66e +0 -0
  124. data/test/dummy/tmp/cache/assets/D7D/530/sprockets%2F17b08da019a6f1302cc12dbb13f8ebb1 +0 -0
  125. data/test/dummy/tmp/cache/assets/D82/AA0/sprockets%2F719d877e8dcf6c74bfcb857c344205be +0 -0
  126. data/test/dummy/tmp/cache/assets/D82/E20/sprockets%2F2cba4d7d2ef769667c27c10d78ee78f3 +0 -0
  127. data/test/dummy/tmp/cache/assets/D8A/D20/sprockets%2Fec3c9c64f5b7f9758d306f544b8ff6f1 +0 -0
  128. data/test/dummy/tmp/cache/assets/D8B/5B0/sprockets%2Fbe44597ce79b9e6f76dfd2d40747a5e5 +0 -0
  129. data/test/dummy/tmp/cache/assets/D9B/910/sprockets%2Fa7c3bca72ce605f517a62d5e1f891ae6 +0 -0
  130. data/test/dummy/tmp/cache/assets/D9C/F20/sprockets%2Fe48a1a537978aa70ffb1bdc2e5b0b794 +0 -0
  131. data/test/dummy/tmp/cache/assets/DA2/E50/sprockets%2Fbcf509306cd7d6cb2e13734f2fb99cf3 +0 -0
  132. data/test/dummy/tmp/cache/assets/DA3/690/sprockets%2F6eda83e8f2280c46b37fb063ee2a48ee +0 -0
  133. data/test/dummy/tmp/cache/assets/DB0/2E0/sprockets%2Fac76eb1bf53ab5c85f9562dd5b7f7299 +0 -0
  134. data/test/dummy/tmp/cache/assets/DBC/FB0/sprockets%2Fefd1a390c1dff024705c9b7c4acf400c +0 -0
  135. data/test/dummy/tmp/cache/assets/DD0/0D0/sprockets%2Fb96e72a1dcc836f7ba5b6d3bb56e3e80 +0 -0
  136. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  137. data/test/dummy/tmp/cache/assets/DDF/830/sprockets%2F0e16a9c63ef868f6cf1a97856bb3deae +0 -0
  138. data/test/dummy/tmp/cache/assets/DF7/0B0/sprockets%2Fca550ebb82aa49b5dc8b724680fbcee3 +0 -0
  139. data/test/dummy/tmp/cache/assets/DF7/180/sprockets%2Fa3dad96955fb1fcef24c03f1dd47ea21 +0 -0
  140. data/test/dummy/tmp/cache/assets/DF8/1C0/sprockets%2F0a8ed6be63cfc047322fcdfe27de092a +0 -0
  141. data/test/dummy/tmp/cache/assets/DFD/EB0/sprockets%2F61e6d55aee569fd4cb060d0f3a9cb6dc +0 -0
  142. data/test/dummy/tmp/cache/assets/DFF/5A0/sprockets%2F46db6dadd193e65b14604d9e6cd6feaa +0 -0
  143. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  144. data/test/dummy/tmp/cache/assets/E08/F50/sprockets%2Ffdf590370af77b8fddf45491afa3ece2 +0 -0
  145. metadata +379 -0
@@ -0,0 +1,116 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+  (0.3ms) begin transaction
4
+  (0.1ms) rollback transaction
5
+ Connecting to database specified by database.yml
6
+  (0.2ms) begin transaction
7
+  (0.0ms) rollback transaction
8
+  (0.0ms) begin transaction
9
+  (0.0ms) rollback transaction
10
+  (0.1ms) begin transaction
11
+  (0.1ms) rollback transaction
12
+ Connecting to database specified by database.yml
13
+  (0.3ms) begin transaction
14
+  (0.1ms) rollback transaction
15
+  (0.1ms) begin transaction
16
+  (0.0ms) rollback transaction
17
+  (0.1ms) begin transaction
18
+  (0.0ms) rollback transaction
19
+ Connecting to database specified by database.yml
20
+  (0.3ms) begin transaction
21
+  (0.1ms) rollback transaction
22
+  (0.1ms) begin transaction
23
+  (0.1ms) rollback transaction
24
+  (0.1ms) begin transaction
25
+  (0.0ms) rollback transaction
26
+ Connecting to database specified by database.yml
27
+  (0.2ms) begin transaction
28
+  (0.0ms) rollback transaction
29
+  (0.0ms) begin transaction
30
+  (0.1ms) rollback transaction
31
+  (0.1ms) begin transaction
32
+  (0.0ms) rollback transaction
33
+ Connecting to database specified by database.yml
34
+ Connecting to database specified by database.yml
35
+  (0.2ms) begin transaction
36
+  (0.0ms) rollback transaction
37
+  (0.1ms) begin transaction
38
+  (0.0ms) rollback transaction
39
+  (0.0ms) begin transaction
40
+  (0.0ms) rollback transaction
41
+ Connecting to database specified by database.yml
42
+  (0.2ms) begin transaction
43
+  (0.0ms) rollback transaction
44
+  (0.1ms) begin transaction
45
+  (0.0ms) rollback transaction
46
+  (0.1ms) begin transaction
47
+  (0.0ms) rollback transaction
48
+ Connecting to database specified by database.yml
49
+ Connecting to database specified by database.yml
50
+ Connecting to database specified by database.yml
51
+ Connecting to database specified by database.yml
52
+  (0.2ms) begin transaction
53
+  (0.0ms) rollback transaction
54
+  (0.0ms) begin transaction
55
+  (0.0ms) rollback transaction
56
+  (0.0ms) begin transaction
57
+  (0.0ms) rollback transaction
58
+ Connecting to database specified by database.yml
59
+  (0.2ms) begin transaction
60
+  (0.0ms) rollback transaction
61
+  (0.0ms) begin transaction
62
+  (0.0ms) rollback transaction
63
+  (0.0ms) begin transaction
64
+  (0.0ms) rollback transaction
65
+ Connecting to database specified by database.yml
66
+  (0.3ms) begin transaction
67
+  (0.0ms) SAVEPOINT active_record_1
68
+ SQL (11.4ms) INSERT INTO "feedbacks_feedbacks" ("created_at", "email", "text", "topic", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Sat, 26 Jul 2014 16:34:05 UTC +00:00], ["email", "email@email.email"], ["text", "123asdasdas"], ["topic", "Topic"], ["updated_at", Sat, 26 Jul 2014 16:34:05 UTC +00:00], ["url", "http://test.test"]]
69
+ Rendered /Users/user/Documents/city_news/feedbacks/app/views/feedbacks/feedback_mailer/feedback_email.html.erb (8.3ms)
70
+
71
+ Sent mail to sld7703@gmail.com (11.0ms)
72
+ Date: Sat, 26 Jul 2014 20:34:05 +0400
73
+ From: support@rbcitynews.ru
74
+ To: sld7703@gmail.com
75
+ Message-ID: <53d3d87d1f961_8913fdd358606e470595@BSR022.local.mail>
76
+ Subject: Topic
77
+ Mime-Version: 1.0
78
+ Content-Type: text/html;
79
+ charset=UTF-8
80
+ Content-Transfer-Encoding: base64
81
+
82
+ ICA8cD4KICAgIDxzdHJvbmc+RW1haWw8L3N0cm9uZz4KICAgIGVtYWlsQGVt
83
+ YWlsLmVtYWlsCiAgPC9wPgoKPHA+CiAgPHN0cm9uZz4g0JLRgNC10LzRjyDR
84
+ gdC+0LfQtNCw0L3QuNGPIDwvc3Ryb25nPgogIDI2IEp1bHkgMjAxNCwgU2F0
85
+ dXJkYXkgMTY6MzQKPC9wPgoKPHA+CiAgPGI+IFVybCDRgSDQutC+0YLQvtGA
86
+ 0L7QuSDQsdGL0Lsg0L7RgtC/0YDQsNCy0LvQtdC9PC9iPgogIDxhIGhyZWY9
87
+ Imh0dHA6Ly90ZXN0LnRlc3QiPmh0dHA6Ly90ZXN0LnRlc3Q8L2E+CjwvcD4K
88
+ CjxwPgogIDxiPiDQotC10LzQsDwvYj4KICBUb3BpYwo8L3A+Cgo8cD4KICA8
89
+ Yj7QotC10LrRgdGCPC9iPgogIDxiciAvPgogIDEyM2FzZGFzZGFzCjwvcD4=
90
+
91
+  (0.1ms) RELEASE SAVEPOINT active_record_1
92
+  (0.5ms) rollback transaction
93
+  (0.1ms) begin transaction
94
+  (0.1ms) rollback transaction
95
+  (0.0ms) begin transaction
96
+  (0.0ms) rollback transaction
97
+ Connecting to database specified by database.yml
98
+  (0.2ms) begin transaction
99
+  (0.1ms) SAVEPOINT active_record_1
100
+ SQL (2.5ms) INSERT INTO "feedbacks_feedbacks" ("created_at", "email", "text", "topic", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Sat, 26 Jul 2014 16:34:44 UTC +00:00], ["email", "email@email.email"], ["text", "123asdasdas"], ["topic", "Topic"], ["updated_at", Sat, 26 Jul 2014 16:34:44 UTC +00:00], ["url", "http://test.test"]]
101
+  (0.0ms) RELEASE SAVEPOINT active_record_1
102
+  (6.6ms) rollback transaction
103
+  (0.1ms) begin transaction
104
+  (0.1ms) rollback transaction
105
+  (0.0ms) begin transaction
106
+  (0.1ms) rollback transaction
107
+ Connecting to database specified by database.yml
108
+  (0.3ms) begin transaction
109
+  (0.1ms) SAVEPOINT active_record_1
110
+ SQL (2.7ms) INSERT INTO "feedbacks_feedbacks" ("created_at", "email", "text", "topic", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Sat, 26 Jul 2014 16:35:57 UTC +00:00], ["email", "email@email.email"], ["text", "123asdasdas"], ["topic", "Topic"], ["updated_at", Sat, 26 Jul 2014 16:35:57 UTC +00:00], ["url", "http://test.test"]]
111
+  (0.0ms) RELEASE SAVEPOINT active_record_1
112
+  (6.5ms) rollback transaction
113
+  (0.1ms) begin transaction
114
+  (0.1ms) rollback transaction
115
+  (0.0ms) begin transaction
116
+  (0.1ms) rollback transaction
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,20 @@
1
+ require 'rails_helper'
2
+
3
+ describe Feedbacks::Feedback do
4
+ describe '#create' do
5
+ let(:feedback){build(:feedback)}
6
+
7
+ it 'should call #send_email after create' do
8
+ expect(feedback).to receive(:send_email)
9
+ feedback.save!
10
+ end
11
+
12
+ it 'should validate #email presence' do
13
+ expect(build(:feedback, email: nil)).to_not be_valid
14
+ end
15
+
16
+ it 'should validate #text presence' do
17
+ expect(build(:feedback, text: nil)).to_not be_valid
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,39 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require 'spec_helper'
4
+ require File.expand_path("../../config/environment", __FILE__)
5
+ require 'rspec/rails'
6
+ require 'factory_girl'
7
+
8
+ # Requires supporting ruby files with custom matchers and macros, etc, in
9
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
10
+ # run as spec files by default. This means that files in spec/support that end
11
+ # in _spec.rb will both be required and run as specs, causing the specs to be
12
+ # run twice. It is recommended that you do not name files matching this glob to
13
+ # end with _spec.rb. You can configure this pattern with with the --pattern
14
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
15
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ config.include FactoryGirl::Syntax::Methods
19
+
20
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
21
+ # examples within a transaction, remove the following line or assign false
22
+ # instead of true.
23
+ config.use_transactional_fixtures = true
24
+
25
+ # RSpec Rails can automatically mix in different behaviours to your tests
26
+ # based on their file location, for example enabling you to call `get` and
27
+ # `post` in specs under `spec/controllers`.
28
+ #
29
+ # You can disable this behaviour by removing the line below, and instead
30
+ # explicitly tag your specs with their type, e.g.:
31
+ #
32
+ # RSpec.describe UsersController, :type => :controller do
33
+ # # ...
34
+ # end
35
+ #
36
+ # The different available types are documented in the features, such as in
37
+ # https://relishapp.com/rspec/rspec-rails/docs
38
+ config.infer_spec_type_from_file_location!
39
+ end
@@ -0,0 +1,78 @@
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
@@ -0,0 +1,8 @@
1
+ FactoryGirl.define do
2
+ factory :feedback, class: Feedbacks::Feedback do |f|
3
+ f.topic 'Topic'
4
+ f.email 'email@email.email'
5
+ f.text '123asdasdas'
6
+ f.url 'http://test.test'
7
+ end
8
+ end