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,81 @@
1
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to AddShrewPageViewTable (1)
6
+  (0.1ms) begin transaction
7
+  (0.3ms) CREATE TABLE "shrew_page_views" ("user_id" integer)
8
+  (0.1ms) CREATE INDEX "index_shrew_page_views_on_user_id" ON "shrew_page_views" ("user_id")
9
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
10
+  (0.9ms) commit transaction
11
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
+  (0.1ms)  SELECT sql
13
+ FROM sqlite_master
14
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
15
+ UNION ALL
16
+ SELECT sql
17
+ FROM sqlite_temp_master
18
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
19
+ 
20
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
21
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
22
+ Migrating to AddShrewPageViewTable (1)
23
+  (0.1ms) begin transaction
24
+  (1.1ms) DROP TABLE "shrew_page_views"
25
+ SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '1'
26
+  (0.6ms) commit transaction
27
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
28
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
29
+ Migrating to AddShrewPageViewTable (1)
30
+  (0.0ms) begin transaction
31
+  (0.0ms) rollback transaction
32
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
+ Migrating to AddShrewPageViewTable (1)
34
+  (0.1ms) begin transaction
35
+  (0.3ms) CREATE TABLE "shrew_page_views" ("user_id" integer, "controller" varchar(255), "status" integer, "view_runtime" float, "db_runtime" float, "sent_time" integer, "js_return_time" integer, "js_tracking_id" blob(16)) 
36
+  (0.0ms) select sqlite_version(*)
37
+  (0.1ms) CREATE INDEX "index_shrew_page_views_on_user_id" ON "shrew_page_views" ("user_id")
38
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
39
+  (0.9ms) commit transaction
40
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
41
+  (0.1ms)  SELECT sql
42
+ FROM sqlite_master
43
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
44
+ UNION ALL
45
+ SELECT sql
46
+ FROM sqlite_temp_master
47
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
48
+ 
49
+  (1.1ms) CREATE TABLE "shrew_page_views" ("user_id" integer, "controller" varchar(255), "status" integer, "view_runtime" float, "db_runtime" float, "sent_time" integer, "js_return_time" integer, "js_tracking_id" blob(16)) 
50
+  (0.1ms) select sqlite_version(*)
51
+  (0.7ms) CREATE INDEX "index_shrew_page_views_on_user_id" ON "shrew_page_views" ("user_id")
52
+  (0.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
53
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
54
+  (0.1ms) SELECT version FROM "schema_migrations"
55
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
56
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
57
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
58
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
59
+ Migrating to AddAnalyticsPageViewTable (1)
60
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
61
+  (0.1ms) select sqlite_version(*)
62
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
63
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
64
+ Migrating to AddAnalyticsPageViewTable (1)
65
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
+ Migrating to AddShrewPageViewTable (1)
67
+  (0.1ms) begin transaction
68
+  (0.4ms) CREATE TABLE "shrew_page_views" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "controller" varchar(255), "status" integer, "view_runtime" float, "db_runtime" float, "sent_time" integer, "js_return_time" integer, "time_between_sent_and_return" integer, "js_tracking_id" blob(16)) 
69
+  (0.0ms) select sqlite_version(*)
70
+  (0.1ms) CREATE INDEX "index_shrew_page_views_on_user_id" ON "shrew_page_views" ("user_id")
71
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
72
+  (0.9ms) commit transaction
73
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
74
+  (0.1ms)  SELECT sql
75
+ FROM sqlite_master
76
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
77
+ UNION ALL
78
+ SELECT sql
79
+ FROM sqlite_temp_master
80
+ WHERE name='index_shrew_page_views_on_user_id' AND type='index'
81
+