symbolink 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ # Symbolink changelog
2
+
3
+ ## v0.0.2
4
+ - New default symbolink refresh: ⟲
@@ -0,0 +1,42 @@
1
+ # Symbolink
2
+
3
+ Simple way to use Unicode symbols as icons in Rails application.
4
+
5
+ ## Installation
6
+
7
+ Gemfile:
8
+
9
+ gem 'symbolink'
10
+
11
+ ## Usage
12
+
13
+ Instead of
14
+
15
+ <%= link_to '&times;'.html_safe, model, :confirm => 'Sure?', :method => :delete %>
16
+
17
+ just use
18
+
19
+ <%= symbolink_to :delete, model, :confirm => 'Sure?', :method => :delete %>
20
+
21
+ or ever
22
+
23
+ <%= symbolink_destroy model, :confirm => 'Sure?' %>
24
+
25
+ ## Predefined symbols
26
+
27
+ Symbolink maps ruby symbols to fragmetns of HTML code. The following symbols are 'out of the box':
28
+ - :add ( &#x271A; )
29
+ - :delete ( &#x2716; )
30
+ - :edit ( &#x2328; )
31
+ - :print ( &#x2338; )
32
+ - :refresh ( &#x27F2; )
33
+
34
+ ## Custom symbols
35
+
36
+ Add initializer to define custom symbols or override existing:
37
+
38
+ Symbolink.add_symbols leader: '&#x265B;',
39
+ employee: '&#x2659;'
40
+
41
+
42
+
data/Rakefile CHANGED
@@ -1,38 +1,9 @@
1
1
  #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
- begin
8
- require 'rdoc/task'
9
- rescue LoadError
10
- require 'rdoc/rdoc'
11
- require 'rake/rdoctask'
12
- RDoc::Task = Rake::RDocTask
13
- end
14
-
15
- RDoc::Task.new(:rdoc) do |rdoc|
16
- rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'Symbolink'
18
- rdoc.options << '--line-numbers'
19
- rdoc.rdoc_files.include('README.rdoc')
20
- rdoc.rdoc_files.include('lib/**/*.rb')
21
- end
22
-
23
-
24
-
25
-
2
+ require 'bundler'
26
3
  Bundler::GemHelper.install_tasks
27
4
 
28
- require 'rake/testtask'
29
-
30
- Rake::TestTask.new(:test) do |t|
31
- t.libs << 'lib'
32
- t.libs << 'test'
33
- t.pattern = 'test/**/*_test.rb'
34
- t.verbose = false
35
- end
36
-
5
+ require 'rspec/core'
6
+ require 'rspec/core/rake_task'
7
+ RSpec::Core::RakeTask.new(:spec)
37
8
 
38
- task :default => :test
9
+ task :default => :spec
@@ -1,23 +1,28 @@
1
1
  module Symbolink
2
- SYMBOLS = {
2
+ SYMBOLS = {}
3
+
4
+ def self.add_symbols(map = {})
5
+ map.each { |symbol, icon| SYMBOLS[symbol] = icon.html_safe }
6
+ end
7
+
8
+ add_symbols(
3
9
  delete: '&#x2716;',
4
10
  add: '&#x271A;',
5
11
  print: '&#x2338;',
6
12
  half: '&#xBD;',
7
- left_arrow: '&#x226A;', # '&#x21D0;',
8
- double_left_arrow: '&#x22D8;', # '&#x21DA;',
9
- right_arrow: '&#x226B;', # '&#x21D2;',
10
- double_right_arrow: '&#x22D9;', # '&#x21DB;',
13
+ left_arrow: '&#x226A;',
14
+ double_left_arrow: '&#x22D8;',
15
+ right_arrow: '&#x226B;',
16
+ double_right_arrow: '&#x22D9;',
11
17
  edit: '&#x2328;',
12
- }
18
+ refresh: '&#x27F2;',
19
+ )
13
20
 
14
- def self.add_symbols(map = {})
15
- SYMBOLS.merge!(map)
16
- end
21
+ SYMBOLS.default_proc = ->(hash, key) { raise ArgumentError, "Unregistered symbolink #{key}" }
17
22
 
18
23
  module SymbolinkHelpers
19
24
  def symbol(sym)
20
- (Symbolink::SYMBOLS[sym] || '').html_safe
25
+ SYMBOLS[sym]
21
26
  end
22
27
 
23
28
  def symbolink_to(sym, options = {}, html_options = {})
@@ -1,3 +1,3 @@
1
1
  module Symbolink
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  <%= render 'form' %>
4
4
 
5
- <%= link_to 'Show', @user %> |
6
- <%= link_to 'Back', users_path %>
5
+ <%= symbolink_to :show, @user, title: 'Show' %> |
6
+ <%= symbolink_to :back, users_path, title: 'Back' %>
@@ -11,7 +11,7 @@
11
11
  <% @users.each do |user| %>
12
12
  <tr>
13
13
  <td><%= user.name %></td>
14
- <td><%= link_to 'Show', user %></td>
14
+ <td><%= symbolink_to :show, user %></td>
15
15
  <td><%= symbolink_to :edit, edit_user_path(user), title: 'Edit' %></td>
16
16
  <td><%= symbolink_destroy user, data: { confirm: 'Are you sure?' }, title: 'Destroy' %></td>
17
17
  </tr>
@@ -2,4 +2,4 @@
2
2
 
3
3
  <%= render 'form' %>
4
4
 
5
- <%= link_to 'Back', users_path %>
5
+ <%= symbolink_to :back, users_path, title: 'Back' %>
@@ -6,5 +6,5 @@
6
6
  </p>
7
7
 
8
8
 
9
- <%= link_to 'Edit', edit_user_path(@user) %> |
10
- <%= link_to 'Back', users_path %>
9
+ <%= symbolink_to :edit, edit_user_path(@user), title: 'Edit' %> |
10
+ <%= symbolink_to :back, users_path, title: 'Back' %>
@@ -0,0 +1,2 @@
1
+ Symbolink.add_symbols show: '&#x2317;',
2
+ back: '&#x23CF;'
@@ -317,3 +317,191 @@ Served asset /jquery.js - 304 Not Modified (0ms)
317
317
 
318
318
  Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-01-24 16:44:45 +0400
319
319
  Served asset /application.js - 304 Not Modified (1ms)
320
+
321
+
322
+ Started GET "/" for 127.0.0.1 at 2013-01-25 00:34:57 +0400
323
+ Connecting to database specified by database.yml
324
+ Processing by UsersController#index as HTML
325
+ User Load (0.0ms) SELECT "users".* FROM "users" 
326
+ Rendered users/index.html.erb within layouts/application (23.0ms)
327
+ Completed 200 OK in 266ms (Views: 141.0ms | ActiveRecord: 14.0ms)
328
+
329
+
330
+ Started GET "/" for 127.0.0.1 at 2013-01-25 00:38:52 +0400
331
+ Connecting to database specified by database.yml
332
+ Processing by UsersController#index as HTML
333
+ User Load (0.0ms) SELECT "users".* FROM "users" 
334
+ Rendered users/index.html.erb within layouts/application (24.0ms)
335
+ Completed 200 OK in 268ms (Views: 141.0ms | ActiveRecord: 15.0ms)
336
+
337
+
338
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
339
+ Served asset /scaffold.css - 304 Not Modified (3ms)
340
+
341
+
342
+ Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
343
+ Served asset /jquery_ujs.js - 200 OK (3ms)
344
+
345
+
346
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
347
+ Served asset /jquery.js - 200 OK (5ms)
348
+
349
+
350
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
351
+ Served asset /users.js - 304 Not Modified (1ms)
352
+
353
+
354
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
355
+ Served asset /application.css - 200 OK (4ms)
356
+
357
+
358
+ Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
359
+ Served asset /users.css - 200 OK (3ms)
360
+
361
+
362
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-01-25 00:38:53 +0400
363
+ Served asset /application.js - 200 OK (8ms)
364
+
365
+
366
+ Started GET "/users/new" for 127.0.0.1 at 2013-01-25 00:39:00 +0400
367
+ Processing by UsersController#new as HTML
368
+ Rendered users/_form.html.erb (8.0ms)
369
+ Rendered users/new.html.erb within layouts/application (29.0ms)
370
+ Completed 200 OK in 43ms (Views: 38.0ms | ActiveRecord: 0.0ms)
371
+
372
+
373
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:00 +0400
374
+ Served asset /scaffold.css - 304 Not Modified (0ms)
375
+
376
+
377
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:00 +0400
378
+ Served asset /users.js - 304 Not Modified (0ms)
379
+
380
+
381
+ Started GET "/users" for 127.0.0.1 at 2013-01-25 00:39:11 +0400
382
+ Processing by UsersController#index as HTML
383
+ User Load (0.0ms) SELECT "users".* FROM "users"
384
+ Rendered users/index.html.erb within layouts/application (1.0ms)
385
+ Completed 200 OK in 16ms (Views: 14.0ms | ActiveRecord: 0.0ms)
386
+
387
+
388
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:11 +0400
389
+ Served asset /users.js - 304 Not Modified (1ms)
390
+
391
+
392
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:11 +0400
393
+ Served asset /scaffold.css - 304 Not Modified (0ms)
394
+
395
+
396
+ Started GET "/users/new" for 127.0.0.1 at 2013-01-25 00:39:12 +0400
397
+ Processing by UsersController#new as HTML
398
+ Rendered users/_form.html.erb (2.0ms)
399
+ Rendered users/new.html.erb within layouts/application (6.0ms)
400
+ Completed 200 OK in 20ms (Views: 19.0ms | ActiveRecord: 0.0ms)
401
+
402
+
403
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:13 +0400
404
+ Served asset /scaffold.css - 304 Not Modified (1ms)
405
+
406
+
407
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:13 +0400
408
+ Served asset /users.js - 304 Not Modified (1ms)
409
+
410
+
411
+ Started POST "/users" for 127.0.0.1 at 2013-01-25 00:39:17 +0400
412
+ Processing by UsersController#create as HTML
413
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"nAuP2WDLKzzaimg3up2PGukiFMftCcYQ7pCcjIkNe5I=", "user"=>{"name"=>"New user"}, "commit"=>"Create User"}
414
+  (0.0ms) begin transaction
415
+ SQL (50.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 24 Jan 2013 20:39:17 UTC +00:00], ["name", "New user"], ["updated_at", Thu, 24 Jan 2013 20:39:17 UTC +00:00]]
416
+  (7.0ms) commit transaction
417
+ Redirected to http://localhost:3000/users/2
418
+ Completed 302 Found in 66ms (ActiveRecord: 57.0ms)
419
+
420
+
421
+ Started GET "/users/2" for 127.0.0.1 at 2013-01-25 00:39:17 +0400
422
+ Processing by UsersController#show as HTML
423
+ Parameters: {"id"=>"2"}
424
+ User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
425
+ Rendered users/show.html.erb within layouts/application (2.0ms)
426
+ Completed 200 OK in 19ms (Views: 15.0ms | ActiveRecord: 1.0ms)
427
+
428
+
429
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:17 +0400
430
+ Served asset /scaffold.css - 304 Not Modified (1ms)
431
+
432
+
433
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:18 +0400
434
+ Served asset /users.js - 304 Not Modified (0ms)
435
+
436
+
437
+ Started GET "/users/2/edit" for 127.0.0.1 at 2013-01-25 00:39:24 +0400
438
+ Processing by UsersController#edit as HTML
439
+ Parameters: {"id"=>"2"}
440
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
441
+ Rendered users/_form.html.erb (3.0ms)
442
+ Rendered users/edit.html.erb within layouts/application (9.0ms)
443
+ Completed 200 OK in 26ms (Views: 24.0ms | ActiveRecord: 0.0ms)
444
+
445
+
446
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:24 +0400
447
+ Served asset /scaffold.css - 304 Not Modified (0ms)
448
+
449
+
450
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:25 +0400
451
+ Served asset /users.js - 304 Not Modified (0ms)
452
+
453
+
454
+ Started GET "/users/2" for 127.0.0.1 at 2013-01-25 00:39:26 +0400
455
+ Processing by UsersController#show as HTML
456
+ Parameters: {"id"=>"2"}
457
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "2"]]
458
+ Rendered users/show.html.erb within layouts/application (1.0ms)
459
+ Completed 200 OK in 17ms (Views: 15.0ms | ActiveRecord: 0.0ms)
460
+
461
+
462
+ Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-01-25 00:39:26 +0400
463
+ Served asset /scaffold.css - 304 Not Modified (0ms)
464
+
465
+
466
+ Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-01-25 00:39:26 +0400
467
+ Served asset /users.js - 304 Not Modified (0ms)
468
+ Connecting to database specified by database.yml
469
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
470
+  (0.0ms) select sqlite_version(*)
471
+  (10.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
472
+  (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
473
+  (5.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
474
+  (0.0ms) SELECT version FROM "schema_migrations"
475
+  (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124123012')
476
+ Connecting to database specified by database.yml
477
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
478
+  (0.0ms) select sqlite_version(*)
479
+  (6.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
480
+  (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
481
+  (6.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
482
+  (0.0ms) SELECT version FROM "schema_migrations"
483
+  (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124123012')
484
+ Connecting to database specified by database.yml
485
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
486
+  (1.0ms) select sqlite_version(*)
487
+  (10.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
488
+  (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
489
+  (30.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
490
+  (1.0ms) SELECT version FROM "schema_migrations"
491
+  (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124123012')
492
+ Connecting to database specified by database.yml
493
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
494
+  (1.0ms) select sqlite_version(*)
495
+  (6.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
496
+  (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
497
+  (5.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
498
+  (0.0ms) SELECT version FROM "schema_migrations"
499
+  (7.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124123012')
500
+ Connecting to database specified by database.yml
501
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
502
+  (0.0ms) select sqlite_version(*)
503
+  (6.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
504
+  (9.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
505
+  (6.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
506
+  (0.0ms) SELECT version FROM "schema_migrations"
507
+  (7.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20130124123012')
@@ -0,0 +1,200 @@
1
+ Connecting to database specified by database.yml
2
+  (2.0ms) begin transaction
3
+  (0.0ms) rollback transaction
4
+  (0.0ms) begin transaction
5
+  (0.0ms) rollback transaction
6
+  (0.0ms) begin transaction
7
+  (0.0ms) rollback transaction
8
+  (0.0ms) begin transaction
9
+  (0.0ms) rollback transaction
10
+  (0.0ms) begin transaction
11
+  (0.0ms) rollback transaction
12
+  (0.0ms) begin transaction
13
+  (0.0ms) rollback transaction
14
+  (0.0ms) begin transaction
15
+  (0.0ms) rollback transaction
16
+  (1.0ms) begin transaction
17
+  (1.0ms) rollback transaction
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+  (0.0ms) begin transaction
21
+  (0.0ms) rollback transaction
22
+  (0.0ms) begin transaction
23
+  (0.0ms) rollback transaction
24
+  (0.0ms) begin transaction
25
+  (0.0ms) rollback transaction
26
+  (0.0ms) begin transaction
27
+  (0.0ms) rollback transaction
28
+  (0.0ms) begin transaction
29
+  (0.0ms) rollback transaction
30
+  (0.0ms) begin transaction
31
+  (0.0ms) rollback transaction
32
+  (0.0ms) begin transaction
33
+  (0.0ms) rollback transaction
34
+ Connecting to database specified by database.yml
35
+ Connecting to database specified by database.yml
36
+  (1.0ms) begin transaction
37
+ Fixture Delete (1.0ms) DELETE FROM "users"
38
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 10:28:27', '2013-01-25 10:28:27', 980190962)
39
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 10:28:27', '2013-01-25 10:28:27', 298486374)
40
+  (6.0ms) commit transaction
41
+  (0.0ms) begin transaction
42
+ User Load (2.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
43
+  (0.0ms) SELECT COUNT(*) FROM "users"
44
+ Processing by UsersController#create as HTML
45
+ Parameters: {"user"=>{"name"=>"MyString"}}
46
+  (0.0ms) SAVEPOINT active_record_1
47
+ SQL (52.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 25 Jan 2013 10:28:27 UTC +00:00], ["name", "MyString"], ["updated_at", Fri, 25 Jan 2013 10:28:27 UTC +00:00]]
48
+  (0.0ms) RELEASE SAVEPOINT active_record_1
49
+ Redirected to http://test.host/users/980190963
50
+ Completed 302 Found in 59ms (ActiveRecord: 52.0ms)
51
+  (1.0ms) SELECT COUNT(*) FROM "users"
52
+  (4.0ms) rollback transaction
53
+  (0.0ms) begin transaction
54
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
55
+  (0.0ms) SELECT COUNT(*) FROM "users"
56
+ Processing by UsersController#destroy as HTML
57
+ Parameters: {"id"=>"980190962"}
58
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
59
+  (0.0ms) SAVEPOINT active_record_1
60
+ SQL (2.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 980190962]]
61
+  (0.0ms) RELEASE SAVEPOINT active_record_1
62
+ Redirected to http://test.host/users
63
+ Completed 302 Found in 4ms (ActiveRecord: 2.0ms)
64
+  (0.0ms) SELECT COUNT(*) FROM "users" 
65
+  (2.0ms) rollback transaction
66
+  (0.0ms) begin transaction
67
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
68
+ Processing by UsersController#edit as HTML
69
+ Parameters: {"id"=>"980190962"}
70
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
71
+ Rendered users/_form.html.erb (21.0ms)
72
+ Completed 200 OK in 224ms (Views: 221.0ms | ActiveRecord: 0.0ms)
73
+  (0.0ms) rollback transaction
74
+  (1.0ms) begin transaction
75
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
76
+ Processing by UsersController#index as HTML
77
+ User Load (0.0ms) SELECT "users".* FROM "users" 
78
+ Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.0ms)
79
+  (0.0ms) rollback transaction
80
+  (0.0ms) begin transaction
81
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
82
+ Processing by UsersController#new as HTML
83
+ Rendered users/_form.html.erb (1.0ms)
84
+ Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
85
+  (0.0ms) rollback transaction
86
+  (0.0ms) begin transaction
87
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
88
+ Processing by UsersController#show as HTML
89
+ Parameters: {"id"=>"980190962"}
90
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
91
+ Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)
92
+  (0.0ms) rollback transaction
93
+  (0.0ms) begin transaction
94
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
95
+ Processing by UsersController#update as HTML
96
+ Parameters: {"user"=>{"name"=>"MyString"}, "id"=>"980190962"}
97
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
98
+  (0.0ms) SAVEPOINT active_record_1
99
+  (0.0ms) RELEASE SAVEPOINT active_record_1
100
+ Redirected to http://test.host/users/980190962
101
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
102
+  (0.0ms) rollback transaction
103
+ Connecting to database specified by database.yml
104
+  (1.0ms) begin transaction
105
+ Fixture Delete (1.0ms) DELETE FROM "users"
106
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 11:33:19', '2013-01-25 11:33:19', 980190962)
107
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 11:33:19', '2013-01-25 11:33:19', 298486374)
108
+  (5.0ms) commit transaction
109
+  (0.0ms) begin transaction
110
+  (0.0ms) rollback transaction
111
+ Connecting to database specified by database.yml
112
+  (1.0ms) begin transaction
113
+ Fixture Delete (1.0ms) DELETE FROM "users"
114
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 11:33:30', '2013-01-25 11:33:30', 980190962)
115
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "created_at", "updated_at", "id") VALUES ('MyString', '2013-01-25 11:33:30', '2013-01-25 11:33:30', 298486374)
116
+  (4.0ms) commit transaction
117
+  (0.0ms) begin transaction
118
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
119
+  (0.0ms) SELECT COUNT(*) FROM "users"
120
+ Processing by UsersController#create as HTML
121
+ Parameters: {"user"=>{"name"=>"MyString"}}
122
+  (0.0ms) SAVEPOINT active_record_1
123
+ SQL (6.0ms) INSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 25 Jan 2013 11:33:30 UTC +00:00], ["name", "MyString"], ["updated_at", Fri, 25 Jan 2013 11:33:30 UTC +00:00]]
124
+  (0.0ms) RELEASE SAVEPOINT active_record_1
125
+ Redirected to http://test.host/users/980190963
126
+ Completed 302 Found in 10ms (ActiveRecord: 6.0ms)
127
+  (0.0ms) SELECT COUNT(*) FROM "users"
128
+  (2.0ms) rollback transaction
129
+  (0.0ms) begin transaction
130
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
131
+  (0.0ms) SELECT COUNT(*) FROM "users"
132
+ Processing by UsersController#destroy as HTML
133
+ Parameters: {"id"=>"980190962"}
134
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
135
+  (0.0ms) SAVEPOINT active_record_1
136
+ SQL (1.0ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 980190962]]
137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
138
+ Redirected to http://test.host/users
139
+ Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
140
+  (0.0ms) SELECT COUNT(*) FROM "users" 
141
+  (1.0ms) rollback transaction
142
+  (0.0ms) begin transaction
143
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
144
+ Processing by UsersController#edit as HTML
145
+ Parameters: {"id"=>"980190962"}
146
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
147
+ Rendered users/_form.html.erb (7.0ms)
148
+ Completed 200 OK in 140ms (Views: 139.0ms | ActiveRecord: 0.0ms)
149
+  (1.0ms) rollback transaction
150
+  (0.0ms) begin transaction
151
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
152
+ Processing by UsersController#index as HTML
153
+ User Load (0.0ms) SELECT "users".* FROM "users" 
154
+ Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms)
155
+  (0.0ms) rollback transaction
156
+  (0.0ms) begin transaction
157
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
158
+ Processing by UsersController#new as HTML
159
+ Rendered users/_form.html.erb (1.0ms)
160
+ Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
161
+  (0.0ms) rollback transaction
162
+  (0.0ms) begin transaction
163
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
164
+ Processing by UsersController#show as HTML
165
+ Parameters: {"id"=>"980190962"}
166
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
167
+ Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.0ms)
168
+  (0.0ms) rollback transaction
169
+  (0.0ms) begin transaction
170
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
171
+ Processing by UsersController#update as HTML
172
+ Parameters: {"user"=>{"name"=>"MyString"}, "id"=>"980190962"}
173
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "980190962"]]
174
+  (0.0ms) SAVEPOINT active_record_1
175
+  (0.0ms) RELEASE SAVEPOINT active_record_1
176
+ Redirected to http://test.host/users/980190962
177
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
178
+  (0.0ms) rollback transaction
179
+ Connecting to database specified by database.yml
180
+ Connecting to database specified by database.yml
181
+ Connecting to database specified by database.yml
182
+ Connecting to database specified by database.yml
183
+ Connecting to database specified by database.yml
184
+ Connecting to database specified by database.yml
185
+ Connecting to database specified by database.yml
186
+ Connecting to database specified by database.yml
187
+ Connecting to database specified by database.yml
188
+ Connecting to database specified by database.yml
189
+ Connecting to database specified by database.yml
190
+ Connecting to database specified by database.yml
191
+ Connecting to database specified by database.yml
192
+ Connecting to database specified by database.yml
193
+ Connecting to database specified by database.yml
194
+ Connecting to database specified by database.yml
195
+ Connecting to database specified by database.yml
196
+ Connecting to database specified by database.yml
197
+ Connecting to database specified by database.yml
198
+ Connecting to database specified by database.yml
199
+ Connecting to database specified by database.yml
200
+ Connecting to database specified by database.yml
@@ -0,0 +1,20 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../../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
+ class ActiveSupport::TestCase
13
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
14
+ #
15
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
16
+ # -- they do not yet inherit this setting
17
+ fixtures :all
18
+
19
+ # Add more helper methods to be used by all tests here...
20
+ end
@@ -1 +1 @@
1
- 17524
1
+ 13996
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symbolink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &26090328 !ruby/object:Gem::Requirement
16
+ requirement: &21507228 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.11
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *26090328
24
+ version_requirements: *21507228
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &26089620 !ruby/object:Gem::Requirement
27
+ requirement: &21506844 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,18 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *26089620
35
+ version_requirements: *21506844
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec-rails
38
+ requirement: &21506424 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 2.12.0
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *21506424
36
47
  description: Allow to register unicode symbols and displays them as symbolic icons
37
48
  in rails application. Provides some helpers to generate the links by symbols.
38
49
  email:
@@ -48,7 +59,8 @@ files:
48
59
  - lib/tasks/symbolink_tasks.rake
49
60
  - MIT-LICENSE
50
61
  - Rakefile
51
- - README.rdoc
62
+ - README.md
63
+ - CHANGELOG.md
52
64
  - test/dummy/app/assets/javascripts/application.js
53
65
  - test/dummy/app/assets/javascripts/users.js
54
66
  - test/dummy/app/assets/stylesheets/application.css
@@ -77,6 +89,7 @@ files:
77
89
  - test/dummy/config/initializers/mime_types.rb
78
90
  - test/dummy/config/initializers/secret_token.rb
79
91
  - test/dummy/config/initializers/session_store.rb
92
+ - test/dummy/config/initializers/symbolink.rb
80
93
  - test/dummy/config/initializers/wrap_parameters.rb
81
94
  - test/dummy/config/locales/en.yml
82
95
  - test/dummy/config/routes.rb
@@ -84,7 +97,9 @@ files:
84
97
  - test/dummy/db/development.sqlite3
85
98
  - test/dummy/db/migrate/20130124123012_create_users.rb
86
99
  - test/dummy/db/schema.rb
100
+ - test/dummy/db/test.sqlite3
87
101
  - test/dummy/log/development.log
102
+ - test/dummy/log/test.log
88
103
  - test/dummy/public/404.html
89
104
  - test/dummy/public/422.html
90
105
  - test/dummy/public/500.html
@@ -94,7 +109,9 @@ files:
94
109
  - test/dummy/script/rails
95
110
  - test/dummy/test/fixtures/users.yml
96
111
  - test/dummy/test/functional/users_controller_test.rb
112
+ - test/dummy/test/test_helper.rb
97
113
  - test/dummy/test/unit/helpers/users_helper_test.rb
114
+ - test/dummy/test/unit/symbolink_test.rb
98
115
  - test/dummy/test/unit/user_test.rb
99
116
  - test/dummy/tmp/cache/assets/C25/8D0/sprockets%2F211d039621a004a79758499eb80936d7
100
117
  - test/dummy/tmp/cache/assets/C5E/120/sprockets%2F57d21998d90d028f5229ef45530c4762
@@ -113,8 +130,6 @@ files:
113
130
  - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
114
131
  - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
115
132
  - test/dummy/tmp/pids/server.pid
116
- - test/symbolink_test.rb
117
- - test/test_helper.rb
118
133
  homepage: https://github.com/avolochnev/symbolink
119
134
  licenses: []
120
135
  post_install_message:
@@ -168,6 +183,7 @@ test_files:
168
183
  - test/dummy/config/initializers/mime_types.rb
169
184
  - test/dummy/config/initializers/secret_token.rb
170
185
  - test/dummy/config/initializers/session_store.rb
186
+ - test/dummy/config/initializers/symbolink.rb
171
187
  - test/dummy/config/initializers/wrap_parameters.rb
172
188
  - test/dummy/config/locales/en.yml
173
189
  - test/dummy/config/routes.rb
@@ -175,7 +191,9 @@ test_files:
175
191
  - test/dummy/db/development.sqlite3
176
192
  - test/dummy/db/migrate/20130124123012_create_users.rb
177
193
  - test/dummy/db/schema.rb
194
+ - test/dummy/db/test.sqlite3
178
195
  - test/dummy/log/development.log
196
+ - test/dummy/log/test.log
179
197
  - test/dummy/public/404.html
180
198
  - test/dummy/public/422.html
181
199
  - test/dummy/public/500.html
@@ -185,7 +203,9 @@ test_files:
185
203
  - test/dummy/script/rails
186
204
  - test/dummy/test/fixtures/users.yml
187
205
  - test/dummy/test/functional/users_controller_test.rb
206
+ - test/dummy/test/test_helper.rb
188
207
  - test/dummy/test/unit/helpers/users_helper_test.rb
208
+ - test/dummy/test/unit/symbolink_test.rb
189
209
  - test/dummy/test/unit/user_test.rb
190
210
  - test/dummy/tmp/cache/assets/C25/8D0/sprockets%2F211d039621a004a79758499eb80936d7
191
211
  - test/dummy/tmp/cache/assets/C5E/120/sprockets%2F57d21998d90d028f5229ef45530c4762
@@ -204,5 +224,3 @@ test_files:
204
224
  - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
205
225
  - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
206
226
  - test/dummy/tmp/pids/server.pid
207
- - test/symbolink_test.rb
208
- - test/test_helper.rb
@@ -1,3 +0,0 @@
1
- = Symbolink
2
-
3
- This project rocks and uses MIT-LICENSE.
@@ -1,15 +0,0 @@
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