mark_as_read 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +12 -0
  5. data/Gemfile +7 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +54 -0
  8. data/Rakefile +6 -0
  9. data/app/controllers/mark_as_read/mark_as_read_controller.rb +17 -0
  10. data/app/helpers/mark_as_read/mailer_helper.rb +12 -0
  11. data/config/routes.rb +3 -0
  12. data/gemfiles/Gemfile.rails-3.2.x +5 -0
  13. data/gemfiles/Gemfile.rails-4.0.x +6 -0
  14. data/gemfiles/Gemfile.rails-edge +5 -0
  15. data/lib/mark_as_read.rb +10 -0
  16. data/lib/mark_as_read/engine.rb +12 -0
  17. data/lib/mark_as_read/readable.rb +25 -0
  18. data/lib/mark_as_read/version.rb +3 -0
  19. data/mark_as_read.gemspec +25 -0
  20. data/spec/controllers/mark_as_read/mark_as_read_controller_spec.rb +55 -0
  21. data/spec/fixtures/bar_model.rb +5 -0
  22. data/spec/fixtures/foo_model.rb +6 -0
  23. data/spec/mailers/mailer_spec.rb +12 -0
  24. data/spec/models/readable_spec.rb +30 -0
  25. data/spec/rails_app/.gitignore +16 -0
  26. data/spec/rails_app/Rakefile +6 -0
  27. data/spec/rails_app/app/assets/images/.keep +0 -0
  28. data/spec/rails_app/app/assets/javascripts/application.js +16 -0
  29. data/spec/rails_app/app/assets/stylesheets/application.css +13 -0
  30. data/spec/rails_app/app/controllers/application_controller.rb +5 -0
  31. data/spec/rails_app/app/controllers/concerns/.keep +0 -0
  32. data/spec/rails_app/app/helpers/application_helper.rb +2 -0
  33. data/spec/rails_app/app/mailers/.keep +0 -0
  34. data/spec/rails_app/app/mailers/foo_mailer.rb +6 -0
  35. data/spec/rails_app/app/models/.keep +0 -0
  36. data/spec/rails_app/app/models/concerns/.keep +0 -0
  37. data/spec/rails_app/app/views/foo_mailer/foo.html.erb +2 -0
  38. data/spec/rails_app/app/views/layouts/application.html.erb +14 -0
  39. data/spec/rails_app/bin/bundle +3 -0
  40. data/spec/rails_app/bin/rails +4 -0
  41. data/spec/rails_app/bin/rake +4 -0
  42. data/spec/rails_app/config.ru +4 -0
  43. data/spec/rails_app/config/application.rb +28 -0
  44. data/spec/rails_app/config/boot.rb +4 -0
  45. data/spec/rails_app/config/environment.rb +5 -0
  46. data/spec/rails_app/config/environments/development.rb +26 -0
  47. data/spec/rails_app/config/environments/production.rb +80 -0
  48. data/spec/rails_app/config/environments/test.rb +36 -0
  49. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  50. data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  51. data/spec/rails_app/config/initializers/inflections.rb +16 -0
  52. data/spec/rails_app/config/initializers/mime_types.rb +5 -0
  53. data/spec/rails_app/config/initializers/secret_token.rb +12 -0
  54. data/spec/rails_app/config/initializers/session_store.rb +3 -0
  55. data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
  56. data/spec/rails_app/config/locales/en.yml +23 -0
  57. data/spec/rails_app/config/routes.rb +56 -0
  58. data/spec/rails_app/db/seeds.rb +7 -0
  59. data/spec/rails_app/lib/assets/.keep +0 -0
  60. data/spec/rails_app/lib/tasks/.keep +0 -0
  61. data/spec/rails_app/log/.keep +0 -0
  62. data/spec/rails_app/public/404.html +58 -0
  63. data/spec/rails_app/public/422.html +58 -0
  64. data/spec/rails_app/public/500.html +57 -0
  65. data/spec/rails_app/public/favicon.ico +0 -0
  66. data/spec/rails_app/public/robots.txt +5 -0
  67. data/spec/routing/routing_spec.rb +13 -0
  68. data/spec/spec_helper.rb +22 -0
  69. metadata +223 -0
File without changes
File without changes
File without changes
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'RoutingSpec' do
4
+
5
+ it 'should route the mark_as_read action' do
6
+ {:get => "/mark_as_read/foo/1.gif"}.should route_to(
7
+ :controller => "mark_as_read/mark_as_read",
8
+ :action => 'read',
9
+ :type => 'foo',
10
+ :id => "1"
11
+ )
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+
8
+ require 'mark_as_read'
9
+ require "rails_app/config/environment"
10
+ require 'rspec/rails'
11
+
12
+ RSpec.configure do |config|
13
+ config.treat_symbols_as_metadata_keys_with_true_values = true
14
+ config.run_all_when_everything_filtered = true
15
+ config.filter_run :focus
16
+
17
+ # Run specs in random order to surface order dependencies. If you find an
18
+ # order dependency and want to debug it, you can fix the order by providing
19
+ # the seed, which is printed after each run.
20
+ # --seed 1234
21
+ config.order = 'random'
22
+ end
metadata ADDED
@@ -0,0 +1,223 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mark_as_read
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Adrien Siami
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.6
62
+ - - <
63
+ - !ruby/object:Gem::Version
64
+ version: '5'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: 3.2.6
72
+ - - <
73
+ - !ruby/object:Gem::Version
74
+ version: '5'
75
+ description:
76
+ email:
77
+ - adrien@siami.fr
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - .gitignore
83
+ - .rspec
84
+ - .travis.yml
85
+ - Gemfile
86
+ - LICENSE.txt
87
+ - README.md
88
+ - Rakefile
89
+ - app/controllers/mark_as_read/mark_as_read_controller.rb
90
+ - app/helpers/mark_as_read/mailer_helper.rb
91
+ - config/routes.rb
92
+ - gemfiles/Gemfile.rails-3.2.x
93
+ - gemfiles/Gemfile.rails-4.0.x
94
+ - gemfiles/Gemfile.rails-edge
95
+ - lib/mark_as_read.rb
96
+ - lib/mark_as_read/engine.rb
97
+ - lib/mark_as_read/readable.rb
98
+ - lib/mark_as_read/version.rb
99
+ - mark_as_read.gemspec
100
+ - spec/controllers/mark_as_read/mark_as_read_controller_spec.rb
101
+ - spec/fixtures/bar_model.rb
102
+ - spec/fixtures/foo_model.rb
103
+ - spec/mailers/mailer_spec.rb
104
+ - spec/models/readable_spec.rb
105
+ - spec/rails_app/.gitignore
106
+ - spec/rails_app/Rakefile
107
+ - spec/rails_app/app/assets/images/.keep
108
+ - spec/rails_app/app/assets/javascripts/application.js
109
+ - spec/rails_app/app/assets/stylesheets/application.css
110
+ - spec/rails_app/app/controllers/application_controller.rb
111
+ - spec/rails_app/app/controllers/concerns/.keep
112
+ - spec/rails_app/app/helpers/application_helper.rb
113
+ - spec/rails_app/app/mailers/.keep
114
+ - spec/rails_app/app/mailers/foo_mailer.rb
115
+ - spec/rails_app/app/models/.keep
116
+ - spec/rails_app/app/models/concerns/.keep
117
+ - spec/rails_app/app/views/foo_mailer/foo.html.erb
118
+ - spec/rails_app/app/views/layouts/application.html.erb
119
+ - spec/rails_app/bin/bundle
120
+ - spec/rails_app/bin/rails
121
+ - spec/rails_app/bin/rake
122
+ - spec/rails_app/config.ru
123
+ - spec/rails_app/config/application.rb
124
+ - spec/rails_app/config/boot.rb
125
+ - spec/rails_app/config/environment.rb
126
+ - spec/rails_app/config/environments/development.rb
127
+ - spec/rails_app/config/environments/production.rb
128
+ - spec/rails_app/config/environments/test.rb
129
+ - spec/rails_app/config/initializers/backtrace_silencers.rb
130
+ - spec/rails_app/config/initializers/filter_parameter_logging.rb
131
+ - spec/rails_app/config/initializers/inflections.rb
132
+ - spec/rails_app/config/initializers/mime_types.rb
133
+ - spec/rails_app/config/initializers/secret_token.rb
134
+ - spec/rails_app/config/initializers/session_store.rb
135
+ - spec/rails_app/config/initializers/wrap_parameters.rb
136
+ - spec/rails_app/config/locales/en.yml
137
+ - spec/rails_app/config/routes.rb
138
+ - spec/rails_app/db/seeds.rb
139
+ - spec/rails_app/lib/assets/.keep
140
+ - spec/rails_app/lib/tasks/.keep
141
+ - spec/rails_app/log/.keep
142
+ - spec/rails_app/public/404.html
143
+ - spec/rails_app/public/422.html
144
+ - spec/rails_app/public/500.html
145
+ - spec/rails_app/public/favicon.ico
146
+ - spec/rails_app/public/robots.txt
147
+ - spec/routing/routing_spec.rb
148
+ - spec/spec_helper.rb
149
+ homepage: ''
150
+ licenses:
151
+ - MIT
152
+ metadata: {}
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - '>='
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 2.0.3
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: Allows to easily track when an e-mail has been opened
173
+ test_files:
174
+ - spec/controllers/mark_as_read/mark_as_read_controller_spec.rb
175
+ - spec/fixtures/bar_model.rb
176
+ - spec/fixtures/foo_model.rb
177
+ - spec/mailers/mailer_spec.rb
178
+ - spec/models/readable_spec.rb
179
+ - spec/rails_app/.gitignore
180
+ - spec/rails_app/Rakefile
181
+ - spec/rails_app/app/assets/images/.keep
182
+ - spec/rails_app/app/assets/javascripts/application.js
183
+ - spec/rails_app/app/assets/stylesheets/application.css
184
+ - spec/rails_app/app/controllers/application_controller.rb
185
+ - spec/rails_app/app/controllers/concerns/.keep
186
+ - spec/rails_app/app/helpers/application_helper.rb
187
+ - spec/rails_app/app/mailers/.keep
188
+ - spec/rails_app/app/mailers/foo_mailer.rb
189
+ - spec/rails_app/app/models/.keep
190
+ - spec/rails_app/app/models/concerns/.keep
191
+ - spec/rails_app/app/views/foo_mailer/foo.html.erb
192
+ - spec/rails_app/app/views/layouts/application.html.erb
193
+ - spec/rails_app/bin/bundle
194
+ - spec/rails_app/bin/rails
195
+ - spec/rails_app/bin/rake
196
+ - spec/rails_app/config.ru
197
+ - spec/rails_app/config/application.rb
198
+ - spec/rails_app/config/boot.rb
199
+ - spec/rails_app/config/environment.rb
200
+ - spec/rails_app/config/environments/development.rb
201
+ - spec/rails_app/config/environments/production.rb
202
+ - spec/rails_app/config/environments/test.rb
203
+ - spec/rails_app/config/initializers/backtrace_silencers.rb
204
+ - spec/rails_app/config/initializers/filter_parameter_logging.rb
205
+ - spec/rails_app/config/initializers/inflections.rb
206
+ - spec/rails_app/config/initializers/mime_types.rb
207
+ - spec/rails_app/config/initializers/secret_token.rb
208
+ - spec/rails_app/config/initializers/session_store.rb
209
+ - spec/rails_app/config/initializers/wrap_parameters.rb
210
+ - spec/rails_app/config/locales/en.yml
211
+ - spec/rails_app/config/routes.rb
212
+ - spec/rails_app/db/seeds.rb
213
+ - spec/rails_app/lib/assets/.keep
214
+ - spec/rails_app/lib/tasks/.keep
215
+ - spec/rails_app/log/.keep
216
+ - spec/rails_app/public/404.html
217
+ - spec/rails_app/public/422.html
218
+ - spec/rails_app/public/500.html
219
+ - spec/rails_app/public/favicon.ico
220
+ - spec/rails_app/public/robots.txt
221
+ - spec/routing/routing_spec.rb
222
+ - spec/spec_helper.rb
223
+ has_rdoc: