shrew 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +67 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +114 -0
  5. data/README.md +38 -0
  6. data/Rakefile +15 -0
  7. data/app/assets/javascripts/shrew.js +69 -0
  8. data/app/controllers/shrew/application_controller.rb +4 -0
  9. data/app/controllers/shrew/page_views_controller.rb +22 -0
  10. data/app/models/shrew/page_view.rb +19 -0
  11. data/app/views/shrew/_automatically_track_page_views.html.erb +11 -0
  12. data/config/routes.rb +9 -0
  13. data/db/migrate/1_add_shrew_page_view_table.rb +17 -0
  14. data/lib/generators/shrew/install_generator.rb +31 -0
  15. data/lib/generators/templates/page_view_migration.rb +17 -0
  16. data/lib/generators/templates/shrew.rb +4 -0
  17. data/lib/shrew/engine.rb +14 -0
  18. data/lib/shrew/tracks_page_views.rb +21 -0
  19. data/lib/shrew/version.rb +3 -0
  20. data/shrew.gemspec +26 -0
  21. data/spec/controllers/page_views_controller_spec.rb +56 -0
  22. data/spec/controllers/tracks_page_views_spec.rb +34 -0
  23. data/spec/rails_helper.rb +50 -0
  24. data/spec/shrew_spec.rb +6 -0
  25. data/spec/spec_helper.rb +52 -0
  26. data/test/dummy/README.rdoc +28 -0
  27. data/test/dummy/Rakefile +6 -0
  28. data/test/dummy/app/assets/images/.keep +0 -0
  29. data/test/dummy/app/assets/javascripts/application.js +13 -0
  30. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  31. data/test/dummy/app/controllers/application_controller.rb +5 -0
  32. data/test/dummy/app/controllers/concerns/.keep +0 -0
  33. data/test/dummy/app/helpers/application_helper.rb +2 -0
  34. data/test/dummy/app/mailers/.keep +0 -0
  35. data/test/dummy/app/models/.keep +0 -0
  36. data/test/dummy/app/models/concerns/.keep +0 -0
  37. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  38. data/test/dummy/bin/bundle +3 -0
  39. data/test/dummy/bin/rails +4 -0
  40. data/test/dummy/bin/rake +4 -0
  41. data/test/dummy/config/application.rb +23 -0
  42. data/test/dummy/config/boot.rb +5 -0
  43. data/test/dummy/config/database.yml +25 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +37 -0
  46. data/test/dummy/config/environments/production.rb +82 -0
  47. data/test/dummy/config/environments/test.rb +39 -0
  48. data/test/dummy/config/initializers/assets.rb +8 -0
  49. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  50. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  51. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  52. data/test/dummy/config/initializers/inflections.rb +16 -0
  53. data/test/dummy/config/initializers/mime_types.rb +4 -0
  54. data/test/dummy/config/initializers/session_store.rb +3 -0
  55. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  56. data/test/dummy/config/locales/en.yml +23 -0
  57. data/test/dummy/config/routes.rb +4 -0
  58. data/test/dummy/config/secrets.yml +22 -0
  59. data/test/dummy/config.ru +4 -0
  60. data/test/dummy/db/development.sqlite3 +0 -0
  61. data/test/dummy/db/schema.rb +30 -0
  62. data/test/dummy/db/test.sqlite3 +0 -0
  63. data/test/dummy/lib/assets/.keep +0 -0
  64. data/test/dummy/log/.keep +0 -0
  65. data/test/dummy/log/development.log +81 -0
  66. data/test/dummy/log/test.log +1689 -0
  67. data/test/dummy/public/404.html +67 -0
  68. data/test/dummy/public/422.html +67 -0
  69. data/test/dummy/public/500.html +66 -0
  70. data/test/dummy/public/favicon.ico +0 -0
  71. data/test/test_helper.rb +15 -0
  72. metadata +77 -2
@@ -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,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Gross
@@ -100,7 +100,77 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
+ - ".gitignore"
104
+ - Gemfile
105
+ - Gemfile.lock
106
+ - README.md
107
+ - Rakefile
108
+ - app/assets/javascripts/shrew.js
109
+ - app/controllers/shrew/application_controller.rb
110
+ - app/controllers/shrew/page_views_controller.rb
111
+ - app/models/shrew/page_view.rb
112
+ - app/views/shrew/_automatically_track_page_views.html.erb
113
+ - config/routes.rb
114
+ - db/migrate/1_add_shrew_page_view_table.rb
115
+ - lib/generators/shrew/install_generator.rb
116
+ - lib/generators/templates/page_view_migration.rb
117
+ - lib/generators/templates/shrew.rb
103
118
  - lib/shrew.rb
119
+ - lib/shrew/engine.rb
120
+ - lib/shrew/tracks_page_views.rb
121
+ - lib/shrew/version.rb
122
+ - shrew.gemspec
123
+ - spec/controllers/page_views_controller_spec.rb
124
+ - spec/controllers/tracks_page_views_spec.rb
125
+ - spec/rails_helper.rb
126
+ - spec/shrew_spec.rb
127
+ - spec/spec_helper.rb
128
+ - test/dummy/README.rdoc
129
+ - test/dummy/Rakefile
130
+ - test/dummy/app/assets/images/.keep
131
+ - test/dummy/app/assets/javascripts/application.js
132
+ - test/dummy/app/assets/stylesheets/application.css
133
+ - test/dummy/app/controllers/application_controller.rb
134
+ - test/dummy/app/controllers/concerns/.keep
135
+ - test/dummy/app/helpers/application_helper.rb
136
+ - test/dummy/app/mailers/.keep
137
+ - test/dummy/app/models/.keep
138
+ - test/dummy/app/models/concerns/.keep
139
+ - test/dummy/app/views/layouts/application.html.erb
140
+ - test/dummy/bin/bundle
141
+ - test/dummy/bin/rails
142
+ - test/dummy/bin/rake
143
+ - test/dummy/config.ru
144
+ - test/dummy/config/application.rb
145
+ - test/dummy/config/boot.rb
146
+ - test/dummy/config/database.yml
147
+ - test/dummy/config/environment.rb
148
+ - test/dummy/config/environments/development.rb
149
+ - test/dummy/config/environments/production.rb
150
+ - test/dummy/config/environments/test.rb
151
+ - test/dummy/config/initializers/assets.rb
152
+ - test/dummy/config/initializers/backtrace_silencers.rb
153
+ - test/dummy/config/initializers/cookies_serializer.rb
154
+ - test/dummy/config/initializers/filter_parameter_logging.rb
155
+ - test/dummy/config/initializers/inflections.rb
156
+ - test/dummy/config/initializers/mime_types.rb
157
+ - test/dummy/config/initializers/session_store.rb
158
+ - test/dummy/config/initializers/wrap_parameters.rb
159
+ - test/dummy/config/locales/en.yml
160
+ - test/dummy/config/routes.rb
161
+ - test/dummy/config/secrets.yml
162
+ - test/dummy/db/development.sqlite3
163
+ - test/dummy/db/schema.rb
164
+ - test/dummy/db/test.sqlite3
165
+ - test/dummy/lib/assets/.keep
166
+ - test/dummy/log/.keep
167
+ - test/dummy/log/development.log
168
+ - test/dummy/log/test.log
169
+ - test/dummy/public/404.html
170
+ - test/dummy/public/422.html
171
+ - test/dummy/public/500.html
172
+ - test/dummy/public/favicon.ico
173
+ - test/test_helper.rb
104
174
  homepage:
105
175
  licenses:
106
176
  - MIT
@@ -125,4 +195,9 @@ rubygems_version: 2.2.2
125
195
  signing_key:
126
196
  specification_version: 4
127
197
  summary: Shrew
128
- test_files: []
198
+ test_files:
199
+ - spec/controllers/page_views_controller_spec.rb
200
+ - spec/controllers/tracks_page_views_spec.rb
201
+ - spec/rails_helper.rb
202
+ - spec/shrew_spec.rb
203
+ - spec/spec_helper.rb