sketchily 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/README.md +4 -0
  2. data/Rakefile +5 -4
  3. data/app/assets/javascripts/sketchily_embed.js +1 -1
  4. data/app/assets/javascripts/sketchily_embed.js~ +0 -3
  5. data/app/views/sketchily/_embed.html.erb +27 -4
  6. data/app/views/sketchily/_embed.html.erb~ +27 -5
  7. data/app/views/sketchily/_embed.js.erb +6 -3
  8. data/app/views/sketchily/_embed.js.erb~ +4 -4
  9. data/lib/sketchily.rb +1 -10
  10. data/lib/sketchily.rb~ +2 -11
  11. data/lib/sketchily/sketchily.rb +18 -6
  12. data/lib/sketchily/sketchily.rb~ +19 -6
  13. data/lib/sketchily/sketchily_tag.rb +9 -3
  14. data/lib/sketchily/sketchily_tag.rb~ +10 -3
  15. data/lib/sketchily/version.rb +1 -1
  16. data/lib/sketchily/version.rb~ +1 -1
  17. data/spec/dummy/app/controllers/sketchily_controller.rb +9 -0
  18. data/spec/dummy/app/models/drawing.rb +2 -0
  19. data/spec/dummy/app/models/drawing.rb~ +3 -0
  20. data/spec/dummy/app/views/sketchily/sketchily.html.erb +3 -0
  21. data/spec/dummy/app/views/sketchily/sketchily_tag.html.erb +3 -0
  22. data/spec/dummy/config/routes.rb +3 -56
  23. data/spec/dummy/config/routes.rb~ +5 -0
  24. data/spec/dummy/db/development.sqlite3 +0 -0
  25. data/spec/dummy/db/migrate/20130211122120_create_drawings.rb +7 -0
  26. data/spec/dummy/db/schema.rb +20 -0
  27. data/spec/dummy/db/test.sqlite3 +0 -0
  28. data/spec/dummy/log/development.log +192 -0
  29. data/spec/dummy/log/test.log +75 -0
  30. data/spec/features/sketchily.rb~ +9 -0
  31. data/spec/features/sketchily_spec.rb +10 -0
  32. data/spec/features/sketchily_spec.rb~ +9 -0
  33. data/spec/features/sketchily_tag.rb~ +9 -0
  34. data/spec/features/sketchily_tag_spec.rb +10 -0
  35. data/spec/features/sketchily_tag_spec.rb~ +9 -0
  36. data/spec/features/user_views_sketchily_spec.rb~ +15 -0
  37. data/spec/{spec_helper.rb → minitest_helper.rb} +2 -1
  38. data/spec/spec_helper.rb~ +19 -0
  39. data/vendor/assets/javascripts/base64.js +95 -0
  40. data/vendor/assets/javascripts/base64.js~ +95 -0
  41. metadata +76 -4
@@ -0,0 +1,5 @@
1
+ Dummy::Application.routes.draw do
2
+ resource :drawing
3
+ get 'sketchily', :to => 'sketchily#sketchily'
4
+ get 'sketchily_tag', :to => 'sketchily#sketchily_tag'
5
+ end
Binary file
@@ -0,0 +1,7 @@
1
+ class CreateDrawings < ActiveRecord::Migration
2
+ def change
3
+ create_table :drawings do |t|
4
+ t.text :svg
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,20 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20130211122120) do
15
+
16
+ create_table "drawings", :force => true do |t|
17
+ t.text "svg"
18
+ end
19
+
20
+ end
Binary file
@@ -7,3 +7,195 @@ Connecting to database specified by database.yml
7
7
  Connecting to database specified by database.yml
8
8
  Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily.html.erb (17.6ms)
9
9
  Connecting to database specified by database.yml
10
+ Connecting to database specified by database.yml
11
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
12
+  (0.1ms) select sqlite_version(*)
13
+  (13.6ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text) 
14
+  (6.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
15
+  (5.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
16
+  (0.1ms) SELECT version FROM "schema_migrations"
17
+  (5.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20130211122120')
18
+ Connecting to database specified by database.yml
19
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
20
+  (0.1ms) select sqlite_version(*)
21
+  (13.8ms) DROP TABLE "drawings"
22
+  (4.4ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
23
+  (0.1ms) SELECT version FROM "schema_migrations"
24
+ Connecting to database specified by database.yml
25
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
26
+  (0.1ms) select sqlite_version(*)
27
+  (13.3ms) DROP TABLE "drawings"
28
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
29
+  (0.0ms) SELECT version FROM "schema_migrations"
30
+ Connecting to database specified by database.yml
31
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
32
+  (0.2ms) select sqlite_version(*)
33
+  (20.4ms) DROP TABLE "drawings"
34
+  (4.3ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
35
+  (0.0ms) SELECT version FROM "schema_migrations"
36
+ Connecting to database specified by database.yml
37
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
38
+  (0.2ms) select sqlite_version(*)
39
+  (14.4ms) DROP TABLE "drawings"
40
+  (5.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
41
+  (0.1ms) SELECT version FROM "schema_migrations"
42
+ Connecting to database specified by database.yml
43
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
44
+  (0.2ms) select sqlite_version(*)
45
+  (27.8ms) DROP TABLE "drawings"
46
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
47
+  (0.1ms) SELECT version FROM "schema_migrations"
48
+ Connecting to database specified by database.yml
49
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
50
+  (0.1ms) select sqlite_version(*)
51
+  (14.2ms) DROP TABLE "drawings"
52
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
53
+  (0.1ms) SELECT version FROM "schema_migrations"
54
+ Connecting to database specified by database.yml
55
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
56
+  (0.1ms) select sqlite_version(*)
57
+  (8.1ms) DROP TABLE "drawings"
58
+  (5.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
59
+  (0.1ms) SELECT version FROM "schema_migrations"
60
+ Connecting to database specified by database.yml
61
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
62
+  (0.1ms) select sqlite_version(*)
63
+  (14.0ms) DROP TABLE "drawings"
64
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
65
+  (0.1ms) SELECT version FROM "schema_migrations"
66
+ Connecting to database specified by database.yml
67
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
68
+  (0.2ms) select sqlite_version(*)
69
+  (14.1ms) DROP TABLE "drawings"
70
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
71
+  (0.0ms) SELECT version FROM "schema_migrations"
72
+ Connecting to database specified by database.yml
73
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
74
+  (0.2ms) select sqlite_version(*)
75
+  (16.4ms) DROP TABLE "drawings"
76
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
77
+  (0.1ms) SELECT version FROM "schema_migrations"
78
+ Connecting to database specified by database.yml
79
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
80
+  (0.2ms) select sqlite_version(*)
81
+  (48.9ms) DROP TABLE "drawings"
82
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
83
+  (0.1ms) SELECT version FROM "schema_migrations"
84
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
85
+ Migrating to CreateDrawings (20130211122120)
86
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
87
+ Connecting to database specified by database.yml
88
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
89
+  (0.2ms) select sqlite_version(*)
90
+  (12.5ms) DROP TABLE "drawings"
91
+  (4.5ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
92
+  (0.1ms) SELECT version FROM "schema_migrations"
93
+ Connecting to database specified by database.yml
94
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
95
+  (0.2ms) select sqlite_version(*)
96
+  (12.0ms) DROP TABLE "drawings"
97
+  (3.9ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
98
+  (0.1ms) SELECT version FROM "schema_migrations"
99
+ Connecting to database specified by database.yml
100
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
101
+ Migrating to CreateDrawings (20130211122120)
102
+  (0.0ms) select sqlite_version(*)
103
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
104
+ Connecting to database specified by database.yml
105
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
106
+  (0.1ms) select sqlite_version(*)
107
+  (12.9ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text) 
108
+  (5.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
109
+  (5.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
110
+  (0.1ms) SELECT version FROM "schema_migrations"
111
+  (4.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20130211122120')
112
+ Connecting to database specified by database.yml
113
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
114
+  (0.2ms) select sqlite_version(*)
115
+  (11.5ms) DROP TABLE "drawings"
116
+  (4.3ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
117
+  (0.0ms) SELECT version FROM "schema_migrations"
118
+ Connecting to database specified by database.yml
119
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
120
+  (0.2ms) select sqlite_version(*)
121
+  (14.0ms) DROP TABLE "drawings"
122
+  (4.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
123
+  (0.1ms) SELECT version FROM "schema_migrations"
124
+ Connecting to database specified by database.yml
125
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
126
+  (0.2ms) select sqlite_version(*)
127
+  (50.7ms) DROP TABLE "drawings"
128
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
129
+  (0.1ms) SELECT version FROM "schema_migrations"
130
+ Connecting to database specified by database.yml
131
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
132
+  (0.2ms) select sqlite_version(*)
133
+  (13.5ms) DROP TABLE "drawings"
134
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
135
+  (0.1ms) SELECT version FROM "schema_migrations"
136
+ Connecting to database specified by database.yml
137
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
138
+  (0.2ms) select sqlite_version(*)
139
+  (13.5ms) DROP TABLE "drawings"
140
+  (5.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
141
+  (0.1ms) SELECT version FROM "schema_migrations"
142
+ Connecting to database specified by database.yml
143
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
144
+  (0.2ms) select sqlite_version(*)
145
+  (8.6ms) DROP TABLE "drawings"
146
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
147
+  (0.1ms) SELECT version FROM "schema_migrations"
148
+ Connecting to database specified by database.yml
149
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
150
+  (0.2ms) select sqlite_version(*)
151
+  (13.8ms) DROP TABLE "drawings"
152
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
153
+  (0.1ms) SELECT version FROM "schema_migrations"
154
+ Connecting to database specified by database.yml
155
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
156
+  (0.1ms) select sqlite_version(*)
157
+  (34.6ms) DROP TABLE "drawings"
158
+  (4.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
159
+  (0.1ms) SELECT version FROM "schema_migrations"
160
+ Connecting to database specified by database.yml
161
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
162
+  (0.1ms) select sqlite_version(*)
163
+  (13.2ms) DROP TABLE "drawings"
164
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
165
+  (0.0ms) SELECT version FROM "schema_migrations"
166
+ Connecting to database specified by database.yml
167
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
168
+  (0.1ms) select sqlite_version(*)
169
+  (13.1ms) DROP TABLE "drawings"
170
+  (4.1ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
171
+  (0.1ms) SELECT version FROM "schema_migrations"
172
+ Connecting to database specified by database.yml
173
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
174
+  (0.1ms) select sqlite_version(*)
175
+  (11.9ms) DROP TABLE "drawings"
176
+  (4.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
177
+  (0.1ms) SELECT version FROM "schema_migrations"
178
+ Connecting to database specified by database.yml
179
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
180
+  (0.1ms) select sqlite_version(*)
181
+  (30.3ms) DROP TABLE "drawings"
182
+  (4.2ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
183
+  (0.1ms) SELECT version FROM "schema_migrations"
184
+ Connecting to database specified by database.yml
185
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
186
+  (0.1ms) select sqlite_version(*)
187
+  (15.9ms) DROP TABLE "drawings"
188
+  (4.0ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
189
+  (0.0ms) SELECT version FROM "schema_migrations"
190
+ Connecting to database specified by database.yml
191
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
192
+  (0.1ms) select sqlite_version(*)
193
+  (14.6ms) DROP TABLE "drawings"
194
+  (4.4ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
195
+  (0.1ms) SELECT version FROM "schema_migrations"
196
+ Connecting to database specified by database.yml
197
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
198
+  (0.1ms) select sqlite_version(*)
199
+  (13.6ms) DROP TABLE "drawings"
200
+  (4.4ms) CREATE TABLE "drawings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "svg" text)
201
+  (0.1ms) SELECT version FROM "schema_migrations"
@@ -0,0 +1,75 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+ Connecting to database specified by database.yml
4
+ Connecting to database specified by database.yml
5
+ Connecting to database specified by database.yml
6
+ Connecting to database specified by database.yml
7
+ Connecting to database specified by database.yml
8
+ Connecting to database specified by database.yml
9
+ Connecting to database specified by database.yml
10
+ Connecting to database specified by database.yml
11
+ Connecting to database specified by database.yml
12
+ Connecting to database specified by database.yml
13
+ Connecting to database specified by database.yml
14
+  (0.2ms) begin transaction
15
+  (0.0ms) rollback transaction
16
+  (0.0ms) begin transaction
17
+  (0.0ms) rollback transaction
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+  (0.2ms) begin transaction
21
+ Started GET "/sketchily" for 127.0.0.1 at 2013-03-04 18:41:30 -0600
22
+ Processing by SketchilyController#sketchily as HTML
23
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (1.0ms)
24
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (3.4ms)
25
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily.html.erb (4.4ms)
26
+ Rendered sketchily/sketchily.html.erb within layouts/application (9.6ms)
27
+ Completed 200 OK in 65ms (Views: 33.0ms | ActiveRecord: 1.0ms)
28
+  (0.1ms) rollback transaction
29
+  (0.0ms) begin transaction
30
+ Started GET "/sketchily_tag" for 127.0.0.1 at 2013-03-04 18:41:30 -0600
31
+ Processing by SketchilyController#sketchily_tag as HTML
32
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (0.1ms)
33
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (1.4ms)
34
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily_tag.html.erb (2.0ms)
35
+ Rendered sketchily/sketchily_tag.html.erb within layouts/application (3.2ms)
36
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
37
+  (0.0ms) rollback transaction
38
+ Connecting to database specified by database.yml
39
+  (0.2ms) begin transaction
40
+ Started GET "/sketchily" for 127.0.0.1 at 2013-03-04 18:42:40 -0600
41
+ Processing by SketchilyController#sketchily as HTML
42
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (1.0ms)
43
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (3.2ms)
44
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily.html.erb (4.3ms)
45
+ Rendered sketchily/sketchily.html.erb within layouts/application (9.4ms)
46
+ Completed 200 OK in 65ms (Views: 32.7ms | ActiveRecord: 1.0ms)
47
+  (0.1ms) rollback transaction
48
+  (0.0ms) begin transaction
49
+ Started GET "/sketchily_tag" for 127.0.0.1 at 2013-03-04 18:42:40 -0600
50
+ Processing by SketchilyController#sketchily_tag as HTML
51
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (0.1ms)
52
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (1.4ms)
53
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily_tag.html.erb (2.0ms)
54
+ Rendered sketchily/sketchily_tag.html.erb within layouts/application (3.3ms)
55
+ Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms)
56
+  (0.1ms) rollback transaction
57
+ Connecting to database specified by database.yml
58
+  (0.2ms) begin transaction
59
+ Started GET "/sketchily" for 127.0.0.1 at 2013-03-04 18:43:02 -0600
60
+ Processing by SketchilyController#sketchily as HTML
61
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (1.0ms)
62
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (3.2ms)
63
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily.html.erb (4.3ms)
64
+ Rendered sketchily/sketchily.html.erb within layouts/application (9.3ms)
65
+ Completed 200 OK in 64ms (Views: 32.1ms | ActiveRecord: 1.0ms)
66
+  (0.1ms) rollback transaction
67
+  (0.0ms) begin transaction
68
+ Started GET "/sketchily_tag" for 127.0.0.1 at 2013-03-04 18:43:02 -0600
69
+ Processing by SketchilyController#sketchily_tag as HTML
70
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.js.erb (0.1ms)
71
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_embed.html.erb (1.4ms)
72
+ Rendered /home/dantemss/Desktop/sketchily/app/views/sketchily/_sketchily_tag.html.erb (2.0ms)
73
+ Rendered sketchily/sketchily_tag.html.erb within layouts/application (3.2ms)
74
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
75
+  (0.0ms) rollback transaction
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Sketchily integration" do
4
+ it "should render the sketchily html" do
5
+ visit sketchily_path
6
+ page.must_have_selector('#svgedit_drawing_svg')
7
+ end
8
+ end
9
+
@@ -0,0 +1,10 @@
1
+ require "minitest_helper"
2
+
3
+ # To be handled correctly by Capybara this spec must end with "Feature Test"
4
+ feature "Sketchily Feature Test" do
5
+ scenario "should render the sketchily html" do
6
+ visit sketchily_path
7
+ page.must_have_selector("#svgedit_drawing_svg")
8
+ end
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ require "minitest_helper"
2
+
3
+ feature "Sketchily Feature Test" do
4
+ scenario "should render the sketchily html" do
5
+ visit sketchily_path
6
+ page.must_have_selector("#svgedit_drawing_svg")
7
+ end
8
+ end
9
+
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Sketchily tag integration" do
4
+ it "should render the sketchily_tag html" do
5
+ visit sketchily_tag_path
6
+ page.must_have_selector('#svgedit_drawing')
7
+ end
8
+ end
9
+
@@ -0,0 +1,10 @@
1
+ require "minitest_helper"
2
+
3
+ # To be handled correctly by Capybara this spec must end with "Feature Test"
4
+ feature "Sketchily Tag Feature Test" do
5
+ scenario "should render the sketchily_tag html" do
6
+ visit sketchily_tag_path
7
+ page.must_have_selector("#svgedit_drawing")
8
+ end
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ require "minitest_helper"
2
+
3
+ feature "Sketchily Tag Feature Test" do
4
+ scenario "should render the sketchily_tag html" do
5
+ visit sketchily_tag_path
6
+ page.must_have_selector("#svgedit_drawing")
7
+ end
8
+ end
9
+
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Viewing sketchily' do
4
+
5
+ it 'should render the sketchily html through the form sketchily helper' do
6
+ visit sketchily_path
7
+ page.must_have_selector('#svgedit_drawing_svg')
8
+ end
9
+
10
+ it 'should render the sketchily html through the sketchily_tag helper' do
11
+ visit sketchily_tag_path
12
+ page.should have_selector('#svgedit_drawing')
13
+ end
14
+
15
+ end
@@ -2,10 +2,11 @@
2
2
  ENV["RAILS_ENV"] = "test"
3
3
 
4
4
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
- require "rails/test_help"
6
5
 
7
6
  require "minitest/autorun"
8
7
  require "minitest/rails"
9
8
 
9
+ require "minitest/rails/capybara"
10
+
10
11
  Rails.backtrace_cleaner.remove_silencers!
11
12
 
@@ -0,0 +1,19 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+
6
+ require "minitest/autorun"
7
+ require "minitest/rails"
8
+
9
+ require "minitest/rails/capybara"
10
+
11
+ Rails.backtrace_cleaner.remove_silencers!
12
+
13
+ class ActiveSupport::TestCase
14
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
15
+ fixtures :all
16
+
17
+ # Add more helper methods to be used by all tests here...
18
+ end
19
+
@@ -0,0 +1,95 @@
1
+ // This code was written by Tyler Akins and has been placed in the
2
+ // public domain. It would be nice if you left this header intact.
3
+ // Base64 code from Tyler Akins -- http://rumkin.com
4
+
5
+ // schiller: Removed string concatenation in favour of Array.join() optimization,
6
+ // also precalculate the size of the array needed.
7
+
8
+ // Function: sketchily_encode64
9
+ // Converts a string to base64
10
+ var sketchily_encode64 = function(input) {
11
+ // base64 strings are 4/3 larger than the original string
12
+ input = sketchily_convertToXMLReferences(input);
13
+ if(window.btoa) return window.btoa(input); // Use native if available
14
+ var output = new Array( Math.floor( (input.length + 2) / 3 ) * 4 );
15
+ var chr1, chr2, chr3;
16
+ var enc1, enc2, enc3, enc4;
17
+ var i = 0, p = 0;
18
+
19
+ do {
20
+ chr1 = input.charCodeAt(i++);
21
+ chr2 = input.charCodeAt(i++);
22
+ chr3 = input.charCodeAt(i++);
23
+
24
+ enc1 = chr1 >> 2;
25
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
26
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
27
+ enc4 = chr3 & 63;
28
+
29
+ if (isNaN(chr2)) {
30
+ enc3 = enc4 = 64;
31
+ } else if (isNaN(chr3)) {
32
+ enc4 = 64;
33
+ }
34
+
35
+ output[p++] = KEYSTR.charAt(enc1);
36
+ output[p++] = KEYSTR.charAt(enc2);
37
+ output[p++] = KEYSTR.charAt(enc3);
38
+ output[p++] = KEYSTR.charAt(enc4);
39
+ } while (i < input.length);
40
+
41
+ return output.join('');
42
+ };
43
+
44
+ // Function: sketchily_decode64
45
+ // Converts a string from base64
46
+ var sketchily_decode64 = function(input) {
47
+ if(window.atob) return window.atob(input);
48
+ var output = "";
49
+ var chr1, chr2, chr3 = "";
50
+ var enc1, enc2, enc3, enc4 = "";
51
+ var i = 0;
52
+
53
+ // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
54
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
55
+
56
+ do {
57
+ enc1 = KEYSTR.indexOf(input.charAt(i++));
58
+ enc2 = KEYSTR.indexOf(input.charAt(i++));
59
+ enc3 = KEYSTR.indexOf(input.charAt(i++));
60
+ enc4 = KEYSTR.indexOf(input.charAt(i++));
61
+
62
+ chr1 = (enc1 << 2) | (enc2 >> 4);
63
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
64
+ chr3 = ((enc3 & 3) << 6) | enc4;
65
+
66
+ output = output + String.fromCharCode(chr1);
67
+
68
+ if (enc3 != 64) {
69
+ output = output + String.fromCharCode(chr2);
70
+ }
71
+ if (enc4 != 64) {
72
+ output = output + String.fromCharCode(chr3);
73
+ }
74
+
75
+ chr1 = chr2 = chr3 = "";
76
+ enc1 = enc2 = enc3 = enc4 = "";
77
+
78
+ } while (i < input.length);
79
+ return unescape(output);
80
+ };
81
+
82
+ // Function: sketchily_convertToXMLReferences
83
+ // Converts a string to use XML references
84
+ var sketchily_convertToXMLReferences = function(input) {
85
+ var output = '';
86
+ for (var n = 0; n < input.length; n++){
87
+ var c = input.charCodeAt(n);
88
+ if (c < 128) {
89
+ output += input[n];
90
+ } else if(c > 127) {
91
+ output += ("&#" + c + ";");
92
+ }
93
+ }
94
+ return output;
95
+ };