event_capture 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +104 -0
  4. data/Rakefile +31 -0
  5. data/app/assets/javascripts/event_capture/client.js +23 -0
  6. data/app/assets/javascripts/event_capture.js +1 -0
  7. data/app/controllers/event_capture/application_controller.rb +4 -0
  8. data/app/controllers/event_capture/events_controller.rb +37 -0
  9. data/app/models/event_capture/event.rb +14 -0
  10. data/config/routes.rb +4 -0
  11. data/db/migrate/20140829235335_create_event_capture_events.rb +13 -0
  12. data/db/migrate/20150727145934_change_events_recorded_at_to_null.rb +5 -0
  13. data/db/migrate/20150727151245_change_events_emitted_at_to_null.rb +5 -0
  14. data/lib/event_capture/engine.rb +12 -0
  15. data/lib/event_capture/version.rb +4 -0
  16. data/lib/event_capture.rb +5 -0
  17. data/lib/tasks/event_capture_tasks.rake +4 -0
  18. data/spec/controllers/event_capture/events_controller_spec.rb +60 -0
  19. data/spec/dummy/README.rdoc +28 -0
  20. data/spec/dummy/Rakefile +6 -0
  21. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  23. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  24. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  25. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/spec/dummy/bin/bundle +3 -0
  27. data/spec/dummy/bin/rails +4 -0
  28. data/spec/dummy/bin/rake +4 -0
  29. data/spec/dummy/config/application.rb +29 -0
  30. data/spec/dummy/config/boot.rb +5 -0
  31. data/spec/dummy/config/database.yml +85 -0
  32. data/spec/dummy/config/environment.rb +5 -0
  33. data/spec/dummy/config/environments/development.rb +37 -0
  34. data/spec/dummy/config/environments/production.rb +82 -0
  35. data/spec/dummy/config/environments/test.rb +39 -0
  36. data/spec/dummy/config/initializers/assets.rb +8 -0
  37. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  39. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/spec/dummy/config/initializers/inflections.rb +16 -0
  41. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  42. data/spec/dummy/config/initializers/session_store.rb +3 -0
  43. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/spec/dummy/config/locales/en.yml +23 -0
  45. data/spec/dummy/config/routes.rb +4 -0
  46. data/spec/dummy/config/secrets.yml +22 -0
  47. data/spec/dummy/config.ru +4 -0
  48. data/spec/dummy/db/schema.rb +29 -0
  49. data/spec/dummy/log/development.log +265 -0
  50. data/spec/dummy/log/test.log +48 -0
  51. data/spec/dummy/public/404.html +67 -0
  52. data/spec/dummy/public/422.html +67 -0
  53. data/spec/dummy/public/500.html +66 -0
  54. data/spec/dummy/public/favicon.ico +0 -0
  55. data/spec/dummy/spec/javascripts/support/jasmine.yml +50 -0
  56. data/spec/spec_helper.rb +22 -0
  57. data/spec/support/controller_helpers.rb +7 -0
  58. metadata +224 -0
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,50 @@
1
+ # path to parent directory of src_files
2
+ # relative path from Rails.root
3
+ # defaults to app/assets/javascripts
4
+ src_dir: "app/assets/javascripts"
5
+
6
+ # path to additional directory of source file that are not part of assets pipeline and need to be included
7
+ # relative path from Rails.root
8
+ # defaults to []
9
+ # include_dir:
10
+ # - ../mobile_app/public/js
11
+
12
+ # path to parent directory of css_files
13
+ # relative path from Rails.root
14
+ # defaults to app/assets/stylesheets
15
+ css_dir: "app/assets/stylesheets"
16
+
17
+ # list of file expressions to include as source files
18
+ # relative path from src_dir
19
+ src_files:
20
+ - "application.{js.coffee,js,coffee}"
21
+
22
+ # list of file expressions to include as css files
23
+ # relative path from css_dir
24
+ css_files:
25
+
26
+ # path to parent directory of spec_files
27
+ # relative path from Rails.root
28
+ #
29
+ # Alternatively accept an array of directory to include external spec files
30
+ # spec_dir:
31
+ # - spec/javascripts
32
+ # - ../engine/spec/javascripts
33
+ #
34
+ # defaults to spec/javascripts
35
+ spec_dir: spec/javascripts
36
+
37
+ # list of file expressions to include as helpers into spec runner
38
+ # relative path from spec_dir
39
+ helpers:
40
+ - "helpers/**/*.{js.coffee,js,coffee}"
41
+
42
+ # list of file expressions to include as specs into spec runner
43
+ # relative path from spec_dir
44
+ spec_files:
45
+ - "**/*[Ss]pec.{js.coffee,js,coffee}"
46
+
47
+ # path to directory of temporary files
48
+ # (spec runner and asset cache)
49
+ # defaults to tmp/jasmine
50
+ tmp_dir: "tmp/jasmine"
@@ -0,0 +1,22 @@
1
+ ENV["RAILS_ENV"] ||= "test"
2
+
3
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ require "rspec/rails"
5
+
6
+ Rails.backtrace_cleaner.remove_silencers!
7
+
8
+ # Load support files
9
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
10
+
11
+ RSpec.configure do |config|
12
+ config.mock_with :rspec
13
+ config.fixture_path = "#{File.dirname(__FILE__)}/fixtures"
14
+ config.use_transactional_fixtures = true
15
+ config.infer_base_class_for_anonymous_controllers = false
16
+ config.order = "random"
17
+ # without this, jbuilder templates fail
18
+ config.render_views = true
19
+
20
+ # Include our own helpers
21
+ config.include Controllers::JsonHelpers, type: :controller
22
+ end
@@ -0,0 +1,7 @@
1
+ module Controllers
2
+ module JsonHelpers
3
+ def json
4
+ @json ||= JSON.parse(response.body)
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,224 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: event_capture
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Eric Carty-Fickes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pg
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: '3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jasmine-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.10'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.10'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jshintrb
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.25'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.25'
97
+ description: A Rails engine for capturing events.
98
+ email:
99
+ - ericcf@northwestern.edu
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - MIT-LICENSE
105
+ - README.md
106
+ - Rakefile
107
+ - app/assets/javascripts/event_capture.js
108
+ - app/assets/javascripts/event_capture/client.js
109
+ - app/controllers/event_capture/application_controller.rb
110
+ - app/controllers/event_capture/events_controller.rb
111
+ - app/models/event_capture/event.rb
112
+ - config/routes.rb
113
+ - db/migrate/20140829235335_create_event_capture_events.rb
114
+ - db/migrate/20150727145934_change_events_recorded_at_to_null.rb
115
+ - db/migrate/20150727151245_change_events_emitted_at_to_null.rb
116
+ - lib/event_capture.rb
117
+ - lib/event_capture/engine.rb
118
+ - lib/event_capture/version.rb
119
+ - lib/tasks/event_capture_tasks.rake
120
+ - spec/controllers/event_capture/events_controller_spec.rb
121
+ - spec/dummy/README.rdoc
122
+ - spec/dummy/Rakefile
123
+ - spec/dummy/app/assets/javascripts/application.js
124
+ - spec/dummy/app/assets/stylesheets/application.css
125
+ - spec/dummy/app/controllers/application_controller.rb
126
+ - spec/dummy/app/helpers/application_helper.rb
127
+ - spec/dummy/app/views/layouts/application.html.erb
128
+ - spec/dummy/bin/bundle
129
+ - spec/dummy/bin/rails
130
+ - spec/dummy/bin/rake
131
+ - spec/dummy/config.ru
132
+ - spec/dummy/config/application.rb
133
+ - spec/dummy/config/boot.rb
134
+ - spec/dummy/config/database.yml
135
+ - spec/dummy/config/environment.rb
136
+ - spec/dummy/config/environments/development.rb
137
+ - spec/dummy/config/environments/production.rb
138
+ - spec/dummy/config/environments/test.rb
139
+ - spec/dummy/config/initializers/assets.rb
140
+ - spec/dummy/config/initializers/backtrace_silencers.rb
141
+ - spec/dummy/config/initializers/cookies_serializer.rb
142
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
143
+ - spec/dummy/config/initializers/inflections.rb
144
+ - spec/dummy/config/initializers/mime_types.rb
145
+ - spec/dummy/config/initializers/session_store.rb
146
+ - spec/dummy/config/initializers/wrap_parameters.rb
147
+ - spec/dummy/config/locales/en.yml
148
+ - spec/dummy/config/routes.rb
149
+ - spec/dummy/config/secrets.yml
150
+ - spec/dummy/db/schema.rb
151
+ - spec/dummy/log/development.log
152
+ - spec/dummy/log/test.log
153
+ - spec/dummy/public/404.html
154
+ - spec/dummy/public/422.html
155
+ - spec/dummy/public/500.html
156
+ - spec/dummy/public/favicon.ico
157
+ - spec/dummy/spec/javascripts/support/jasmine.yml
158
+ - spec/spec_helper.rb
159
+ - spec/support/controller_helpers.rb
160
+ homepage: https://github.com/cbitstech/event_capture
161
+ licenses:
162
+ - MIT
163
+ metadata: {}
164
+ post_install_message:
165
+ rdoc_options: []
166
+ require_paths:
167
+ - lib
168
+ required_ruby_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ requirements: []
179
+ rubyforge_project:
180
+ rubygems_version: 2.5.1
181
+ signing_key:
182
+ specification_version: 4
183
+ summary: A Rails engine for capturing events.
184
+ test_files:
185
+ - spec/controllers/event_capture/events_controller_spec.rb
186
+ - spec/dummy/app/assets/javascripts/application.js
187
+ - spec/dummy/app/assets/stylesheets/application.css
188
+ - spec/dummy/app/controllers/application_controller.rb
189
+ - spec/dummy/app/helpers/application_helper.rb
190
+ - spec/dummy/app/views/layouts/application.html.erb
191
+ - spec/dummy/bin/bundle
192
+ - spec/dummy/bin/rails
193
+ - spec/dummy/bin/rake
194
+ - spec/dummy/config/application.rb
195
+ - spec/dummy/config/boot.rb
196
+ - spec/dummy/config/database.yml
197
+ - spec/dummy/config/environment.rb
198
+ - spec/dummy/config/environments/development.rb
199
+ - spec/dummy/config/environments/production.rb
200
+ - spec/dummy/config/environments/test.rb
201
+ - spec/dummy/config/initializers/assets.rb
202
+ - spec/dummy/config/initializers/backtrace_silencers.rb
203
+ - spec/dummy/config/initializers/cookies_serializer.rb
204
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
205
+ - spec/dummy/config/initializers/inflections.rb
206
+ - spec/dummy/config/initializers/mime_types.rb
207
+ - spec/dummy/config/initializers/session_store.rb
208
+ - spec/dummy/config/initializers/wrap_parameters.rb
209
+ - spec/dummy/config/locales/en.yml
210
+ - spec/dummy/config/routes.rb
211
+ - spec/dummy/config/secrets.yml
212
+ - spec/dummy/config.ru
213
+ - spec/dummy/db/schema.rb
214
+ - spec/dummy/log/development.log
215
+ - spec/dummy/log/test.log
216
+ - spec/dummy/public/404.html
217
+ - spec/dummy/public/422.html
218
+ - spec/dummy/public/500.html
219
+ - spec/dummy/public/favicon.ico
220
+ - spec/dummy/Rakefile
221
+ - spec/dummy/README.rdoc
222
+ - spec/dummy/spec/javascripts/support/jasmine.yml
223
+ - spec/spec_helper.rb
224
+ - spec/support/controller_helpers.rb