abilities 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a781de9c091ad945a019e84adbc345021263234
4
- data.tar.gz: 3e20947d14fa8ed37170d9cf5b7127a6a1a438de
3
+ metadata.gz: fe9e553d23103cb3b405dc40ca88f59187781c11
4
+ data.tar.gz: 2d71a5d72d583a154f64b9f1fa20ac57c809ba43
5
5
  SHA512:
6
- metadata.gz: b3a07b2b1d1291274227cf3dbf683bade56f89f4d51f20390eff383bd8aa3b8c3d21053651f36eae88b6b303c983642d01b642c11ab177b5a5ac3b0ac49729ab
7
- data.tar.gz: 2920a8f82d13b3cc992f9a91b92d959324da4b25d82d7d3e15e3eb6bef5c833157ed00422c0f6bab3c7eefdb0915aa9bffb52ff9ea2d488fdb24711ed801ccd9
6
+ metadata.gz: 28e1e714c9c6aad351496c5080fea4eba6ca34e8c8e38bd337c4d2d06148fddee00d46c98361578111318b1b31be3a60055521320042d57fb508c971effddcbf
7
+ data.tar.gz: 293bdd74407f05a8ad2cbb69b72fd622d86747fa43dfd5e24ddb8b4fc0d9fae8113a25c7f1050c10ecac026a681ee78f7c01c8d1b30d00ea21f6b4895aef92d4
data/README.md CHANGED
@@ -18,7 +18,7 @@ $ bundle
18
18
 
19
19
  ## Configuration
20
20
 
21
- Generate the abilities initializer:
21
+ Generate the abilities configuration file:
22
22
  ```
23
23
  bundle exec rails g abilities:install
24
24
  ```
@@ -33,19 +33,24 @@ class ApplicationController < ActionController::Base
33
33
  end
34
34
  ```
35
35
 
36
- NOTE: The gem will look for a User model and include Abilities::Concern into it.
36
+ Add the abilities concern to the model:
37
+ ```ruby
38
+ class User < ActiveRecord::Base
39
+ include Abilities::Concern
40
+ end
41
+ ```
37
42
 
38
43
  ## Usage
39
44
 
40
45
  ### Defining
41
46
 
42
- All the abilities are defined in config/initializers/abilities.rb by can and cannot methods:
47
+ All the abilities are defined in config/abilities.rb by can and cannot methods:
43
48
  ```ruby
44
49
  Abilities.define do
45
50
  can :create, Post
46
51
  cannot :destroy, User unless admin?
47
- can :edit, Post do |post|
48
- post.user == self
52
+ can :edit, Post do |subject|
53
+ subject.user == self
49
54
  end
50
55
  can :manage, User
51
56
  can :touch, :all
@@ -15,14 +15,6 @@ module Abilities
15
15
  raise Abilities::AccessDenied unless can? action, subject
16
16
  end
17
17
 
18
- class << self
19
-
20
- def authorize_resource(*args)
21
- options = args.extract_options!
22
-
23
- end
24
-
25
- end
26
18
  end
27
19
  end
28
20
  end
@@ -2,13 +2,13 @@ module Abilities
2
2
  class Railtie < Rails::Railtie
3
3
 
4
4
  initializer 'abilites' do
5
- User rescue {}
6
- if defined? User
7
- User.send :include, Abilities::Concern
8
- end
9
5
  ::ActionView::Base.send :include, Abilities::ActionView::Base
10
6
  ::ActionController::Base.send :include, Abilities::ActionController::Base
11
7
  end
12
8
 
9
+ config.after_initialize do
10
+ load Rails.root.join('config/abilities.rb')
11
+ end
12
+
13
13
  end
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module Abilities
2
2
 
3
- VERSION = '0.0.4'
3
+ VERSION = '0.1.0'
4
4
 
5
5
  end
@@ -6,7 +6,7 @@ module Abilities
6
6
  source_root File.expand_path('../templates', __FILE__)
7
7
 
8
8
  def create_capable_concern
9
- copy_file 'abilities.rb', 'config/initializers/abilities.rb'
9
+ copy_file 'abilities.rb', 'config/abilities.rb'
10
10
  end
11
11
 
12
12
  end
@@ -1,2 +1,3 @@
1
1
  class User < ActiveRecord::Base
2
+ include Abilities::Concern
2
3
  end
@@ -2,8 +2,8 @@ Abilities.define do
2
2
  can :create, Post
3
3
  cannot :read, Post
4
4
  can 'destroy', Post.new if admin?
5
- can :edit, Post do |post|
6
- post.user == self
5
+ can :edit, Post do |subject|
6
+ subject.user == self
7
7
  end
8
8
  can :manage, User
9
9
  can :touch, :all
@@ -5410,3 +5410,903 @@ CheckingTest: test_ability_block
5410
5410
  GeneratorsTest: test_initializer_generator
5411
5411
  ------------------------------------------
5412
5412
   (0.1ms) rollback transaction
5413
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5414
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5415
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5416
+  (0.0ms) select sqlite_version(*)
5417
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5418
+  (0.0ms) SELECT version FROM "schema_migrations"
5419
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5420
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5421
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5422
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5423
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5424
+  (0.0ms) select sqlite_version(*)
5425
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5426
+  (0.0ms) SELECT version FROM "schema_migrations"
5427
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5428
+  (0.1ms) begin transaction
5429
+ --------------------------------
5430
+ ChangesTest: test_record_changes
5431
+ --------------------------------
5432
+  (0.1ms) rollback transaction
5433
+  (0.0ms) begin transaction
5434
+ ------------------------------------------
5435
+ GeneratorsTest: test_initializer_generator
5436
+ ------------------------------------------
5437
+  (0.0ms) rollback transaction
5438
+  (0.0ms) begin transaction
5439
+ -------------------------
5440
+ ViewTest: test_can_helper
5441
+ -------------------------
5442
+  (0.0ms) rollback transaction
5443
+  (0.0ms) begin transaction
5444
+ ----------------------------
5445
+ ViewTest: test_cannot_helper
5446
+ ----------------------------
5447
+  (0.0ms) rollback transaction
5448
+  (0.0ms) begin transaction
5449
+ -------------------------------------
5450
+ ControllerTest: test_authorize_helper
5451
+ -------------------------------------
5452
+  (0.0ms) rollback transaction
5453
+  (0.0ms) begin transaction
5454
+ -------------------------------
5455
+ ControllerTest: test_can_helper
5456
+ -------------------------------
5457
+  (0.0ms) rollback transaction
5458
+  (0.0ms) begin transaction
5459
+ ----------------------------------
5460
+ ControllerTest: test_cannot_helper
5461
+ ----------------------------------
5462
+  (0.0ms) rollback transaction
5463
+  (0.0ms) begin transaction
5464
+ --------------------------------------------
5465
+ CheckingTest: test_can_definition_with_model
5466
+ --------------------------------------------
5467
+  (0.0ms) rollback transaction
5468
+  (0.0ms) begin transaction
5469
+ -------------------------------------
5470
+ CheckingTest: test_ability_conditions
5471
+ -------------------------------------
5472
+  (0.1ms) rollback transaction
5473
+  (0.0ms) begin transaction
5474
+ ---------------------------------------
5475
+ CheckingTest: test_undefined_definition
5476
+ ---------------------------------------
5477
+  (0.0ms) rollback transaction
5478
+  (0.1ms) begin transaction
5479
+ --------------------------------
5480
+ CheckingTest: test_ability_block
5481
+ --------------------------------
5482
+  (0.0ms) rollback transaction
5483
+  (0.0ms) begin transaction
5484
+ ------------------------------
5485
+ CheckingTest: test_all_subject
5486
+ ------------------------------
5487
+  (0.0ms) rollback transaction
5488
+  (0.0ms) begin transaction
5489
+ -----------------------------------------------
5490
+ CheckingTest: test_can_definition_with_instance
5491
+ -----------------------------------------------
5492
+  (0.0ms) rollback transaction
5493
+  (0.0ms) begin transaction
5494
+ --------------------------------
5495
+ CheckingTest: test_manage_action
5496
+ --------------------------------
5497
+  (0.0ms) rollback transaction
5498
+  (0.0ms) begin transaction
5499
+ ------------------------------------
5500
+ CheckingTest: test_cannot_definition
5501
+ ------------------------------------
5502
+  (0.0ms) rollback transaction
5503
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5504
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5505
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5506
+  (0.0ms) select sqlite_version(*)
5507
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5508
+  (0.0ms) SELECT version FROM "schema_migrations"
5509
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5510
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5511
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5512
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5513
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5514
+  (0.0ms) select sqlite_version(*)
5515
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5516
+  (0.0ms) SELECT version FROM "schema_migrations"
5517
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5518
+  (0.1ms) begin transaction
5519
+ --------------------------------
5520
+ ChangesTest: test_record_changes
5521
+ --------------------------------
5522
+  (0.1ms) rollback transaction
5523
+  (0.0ms) begin transaction
5524
+ -------------------------
5525
+ ViewTest: test_can_helper
5526
+ -------------------------
5527
+  (0.0ms) rollback transaction
5528
+  (0.0ms) begin transaction
5529
+ ----------------------------
5530
+ ViewTest: test_cannot_helper
5531
+ ----------------------------
5532
+  (0.0ms) rollback transaction
5533
+  (0.0ms) begin transaction
5534
+ --------------------------------
5535
+ CheckingTest: test_ability_block
5536
+ --------------------------------
5537
+  (0.0ms) rollback transaction
5538
+  (0.0ms) begin transaction
5539
+ --------------------------------
5540
+ CheckingTest: test_manage_action
5541
+ --------------------------------
5542
+  (0.0ms) rollback transaction
5543
+  (0.0ms) begin transaction
5544
+ ------------------------------------
5545
+ CheckingTest: test_cannot_definition
5546
+ ------------------------------------
5547
+  (0.0ms) rollback transaction
5548
+  (0.0ms) begin transaction
5549
+ -------------------------------------
5550
+ CheckingTest: test_ability_conditions
5551
+ -------------------------------------
5552
+  (0.0ms) rollback transaction
5553
+  (0.0ms) begin transaction
5554
+ ------------------------------
5555
+ CheckingTest: test_all_subject
5556
+ ------------------------------
5557
+  (0.0ms) rollback transaction
5558
+  (0.0ms) begin transaction
5559
+ --------------------------------------------
5560
+ CheckingTest: test_can_definition_with_model
5561
+ --------------------------------------------
5562
+  (0.1ms) rollback transaction
5563
+  (0.0ms) begin transaction
5564
+ ---------------------------------------
5565
+ CheckingTest: test_undefined_definition
5566
+ ---------------------------------------
5567
+  (0.0ms) rollback transaction
5568
+  (0.0ms) begin transaction
5569
+ -----------------------------------------------
5570
+ CheckingTest: test_can_definition_with_instance
5571
+ -----------------------------------------------
5572
+  (0.0ms) rollback transaction
5573
+  (0.0ms) begin transaction
5574
+ ------------------------------------------
5575
+ GeneratorsTest: test_initializer_generator
5576
+ ------------------------------------------
5577
+  (0.0ms) rollback transaction
5578
+  (0.0ms) begin transaction
5579
+ ----------------------------------
5580
+ ControllerTest: test_cannot_helper
5581
+ ----------------------------------
5582
+  (0.0ms) rollback transaction
5583
+  (0.0ms) begin transaction
5584
+ -------------------------------
5585
+ ControllerTest: test_can_helper
5586
+ -------------------------------
5587
+  (0.0ms) rollback transaction
5588
+  (0.1ms) begin transaction
5589
+ -------------------------------------
5590
+ ControllerTest: test_authorize_helper
5591
+ -------------------------------------
5592
+  (0.0ms) rollback transaction
5593
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5594
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5595
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5596
+  (0.0ms) select sqlite_version(*)
5597
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5598
+  (0.0ms) SELECT version FROM "schema_migrations"
5599
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5600
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5601
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5602
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5603
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5604
+  (0.0ms) select sqlite_version(*)
5605
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5606
+  (0.0ms) SELECT version FROM "schema_migrations"
5607
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5608
+  (0.1ms) begin transaction
5609
+ --------------------------------
5610
+ ChangesTest: test_record_changes
5611
+ --------------------------------
5612
+  (0.1ms) rollback transaction
5613
+  (0.0ms) begin transaction
5614
+ ----------------------------
5615
+ ViewTest: test_cannot_helper
5616
+ ----------------------------
5617
+  (0.1ms) rollback transaction
5618
+  (0.0ms) begin transaction
5619
+ -------------------------
5620
+ ViewTest: test_can_helper
5621
+ -------------------------
5622
+  (0.0ms) rollback transaction
5623
+  (0.0ms) begin transaction
5624
+ ------------------------------------------
5625
+ GeneratorsTest: test_initializer_generator
5626
+ ------------------------------------------
5627
+  (0.1ms) rollback transaction
5628
+  (0.0ms) begin transaction
5629
+ ----------------------------------
5630
+ ControllerTest: test_cannot_helper
5631
+ ----------------------------------
5632
+  (0.0ms) rollback transaction
5633
+  (0.0ms) begin transaction
5634
+ -------------------------------------
5635
+ ControllerTest: test_authorize_helper
5636
+ -------------------------------------
5637
+  (0.0ms) rollback transaction
5638
+  (0.0ms) begin transaction
5639
+ -------------------------------
5640
+ ControllerTest: test_can_helper
5641
+ -------------------------------
5642
+  (0.0ms) rollback transaction
5643
+  (0.0ms) begin transaction
5644
+ --------------------------------
5645
+ CheckingTest: test_ability_block
5646
+ --------------------------------
5647
+  (0.0ms) rollback transaction
5648
+  (0.0ms) begin transaction
5649
+ ------------------------------------
5650
+ CheckingTest: test_cannot_definition
5651
+ ------------------------------------
5652
+  (0.0ms) rollback transaction
5653
+  (0.0ms) begin transaction
5654
+ --------------------------------------------
5655
+ CheckingTest: test_can_definition_with_model
5656
+ --------------------------------------------
5657
+  (0.0ms) rollback transaction
5658
+  (0.0ms) begin transaction
5659
+ ------------------------------
5660
+ CheckingTest: test_all_subject
5661
+ ------------------------------
5662
+  (0.0ms) rollback transaction
5663
+  (0.0ms) begin transaction
5664
+ ---------------------------------------
5665
+ CheckingTest: test_undefined_definition
5666
+ ---------------------------------------
5667
+  (0.0ms) rollback transaction
5668
+  (0.0ms) begin transaction
5669
+ -------------------------------------
5670
+ CheckingTest: test_ability_conditions
5671
+ -------------------------------------
5672
+  (0.0ms) rollback transaction
5673
+  (0.0ms) begin transaction
5674
+ --------------------------------
5675
+ CheckingTest: test_manage_action
5676
+ --------------------------------
5677
+  (0.0ms) rollback transaction
5678
+  (0.0ms) begin transaction
5679
+ -----------------------------------------------
5680
+ CheckingTest: test_can_definition_with_instance
5681
+ -----------------------------------------------
5682
+  (0.0ms) rollback transaction
5683
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5684
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5685
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5686
+  (0.0ms) select sqlite_version(*)
5687
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5688
+  (0.0ms) SELECT version FROM "schema_migrations"
5689
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5690
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5691
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5692
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5693
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5694
+  (0.0ms) select sqlite_version(*)
5695
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5696
+  (0.1ms) SELECT version FROM "schema_migrations"
5697
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5698
+  (0.1ms) begin transaction
5699
+ ------------------------------------------
5700
+ GeneratorsTest: test_initializer_generator
5701
+ ------------------------------------------
5702
+  (0.1ms) rollback transaction
5703
+  (0.0ms) begin transaction
5704
+ --------------------------------
5705
+ ChangesTest: test_record_changes
5706
+ --------------------------------
5707
+  (0.0ms) rollback transaction
5708
+  (0.0ms) begin transaction
5709
+ --------------------------------------------
5710
+ CheckingTest: test_can_definition_with_model
5711
+ --------------------------------------------
5712
+  (0.0ms) rollback transaction
5713
+  (0.0ms) begin transaction
5714
+ ------------------------------
5715
+ CheckingTest: test_all_subject
5716
+ ------------------------------
5717
+  (0.0ms) rollback transaction
5718
+  (0.0ms) begin transaction
5719
+ -------------------------------------
5720
+ CheckingTest: test_ability_conditions
5721
+ -------------------------------------
5722
+  (0.0ms) rollback transaction
5723
+  (0.0ms) begin transaction
5724
+ -----------------------------------------------
5725
+ CheckingTest: test_can_definition_with_instance
5726
+ -----------------------------------------------
5727
+  (0.0ms) rollback transaction
5728
+  (0.0ms) begin transaction
5729
+ ------------------------------------
5730
+ CheckingTest: test_cannot_definition
5731
+ ------------------------------------
5732
+  (0.0ms) rollback transaction
5733
+  (0.0ms) begin transaction
5734
+ --------------------------------
5735
+ CheckingTest: test_ability_block
5736
+ --------------------------------
5737
+  (0.0ms) rollback transaction
5738
+  (0.0ms) begin transaction
5739
+ --------------------------------
5740
+ CheckingTest: test_manage_action
5741
+ --------------------------------
5742
+  (0.0ms) rollback transaction
5743
+  (0.0ms) begin transaction
5744
+ ---------------------------------------
5745
+ CheckingTest: test_undefined_definition
5746
+ ---------------------------------------
5747
+  (0.0ms) rollback transaction
5748
+  (0.0ms) begin transaction
5749
+ -------------------------------------
5750
+ ControllerTest: test_authorize_helper
5751
+ -------------------------------------
5752
+  (0.0ms) rollback transaction
5753
+  (0.0ms) begin transaction
5754
+ -------------------------------
5755
+ ControllerTest: test_can_helper
5756
+ -------------------------------
5757
+  (0.0ms) rollback transaction
5758
+  (0.0ms) begin transaction
5759
+ ----------------------------------
5760
+ ControllerTest: test_cannot_helper
5761
+ ----------------------------------
5762
+  (0.0ms) rollback transaction
5763
+  (0.0ms) begin transaction
5764
+ ----------------------------
5765
+ ViewTest: test_cannot_helper
5766
+ ----------------------------
5767
+  (0.0ms) rollback transaction
5768
+  (0.0ms) begin transaction
5769
+ -------------------------
5770
+ ViewTest: test_can_helper
5771
+ -------------------------
5772
+  (0.0ms) rollback transaction
5773
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5774
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5775
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5776
+  (0.0ms) select sqlite_version(*)
5777
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5778
+  (0.0ms) SELECT version FROM "schema_migrations"
5779
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5780
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5781
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5782
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5783
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5784
+  (0.0ms) select sqlite_version(*)
5785
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5786
+  (0.0ms) SELECT version FROM "schema_migrations"
5787
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5788
+  (0.1ms) begin transaction
5789
+ ------------------------------------------
5790
+ GeneratorsTest: test_initializer_generator
5791
+ ------------------------------------------
5792
+  (0.1ms) rollback transaction
5793
+  (0.0ms) begin transaction
5794
+ -------------------------------------
5795
+ ControllerTest: test_authorize_helper
5796
+ -------------------------------------
5797
+  (0.0ms) rollback transaction
5798
+  (0.0ms) begin transaction
5799
+ -------------------------------
5800
+ ControllerTest: test_can_helper
5801
+ -------------------------------
5802
+  (0.0ms) rollback transaction
5803
+  (0.0ms) begin transaction
5804
+ ----------------------------------
5805
+ ControllerTest: test_cannot_helper
5806
+ ----------------------------------
5807
+  (0.0ms) rollback transaction
5808
+  (0.1ms) begin transaction
5809
+ ------------------------------------
5810
+ CheckingTest: test_cannot_definition
5811
+ ------------------------------------
5812
+  (0.0ms) rollback transaction
5813
+  (0.0ms) begin transaction
5814
+ --------------------------------
5815
+ CheckingTest: test_manage_action
5816
+ --------------------------------
5817
+  (0.0ms) rollback transaction
5818
+  (0.0ms) begin transaction
5819
+ ------------------------------
5820
+ CheckingTest: test_all_subject
5821
+ ------------------------------
5822
+  (0.0ms) rollback transaction
5823
+  (0.0ms) begin transaction
5824
+ -------------------------------------
5825
+ CheckingTest: test_ability_conditions
5826
+ -------------------------------------
5827
+  (0.0ms) rollback transaction
5828
+  (0.0ms) begin transaction
5829
+ --------------------------------------------
5830
+ CheckingTest: test_can_definition_with_model
5831
+ --------------------------------------------
5832
+  (0.0ms) rollback transaction
5833
+  (0.1ms) begin transaction
5834
+ -----------------------------------------------
5835
+ CheckingTest: test_can_definition_with_instance
5836
+ -----------------------------------------------
5837
+  (0.0ms) rollback transaction
5838
+  (0.0ms) begin transaction
5839
+ --------------------------------
5840
+ CheckingTest: test_ability_block
5841
+ --------------------------------
5842
+  (0.0ms) rollback transaction
5843
+  (0.0ms) begin transaction
5844
+ ---------------------------------------
5845
+ CheckingTest: test_undefined_definition
5846
+ ---------------------------------------
5847
+  (0.0ms) rollback transaction
5848
+  (0.0ms) begin transaction
5849
+ -------------------------
5850
+ ViewTest: test_can_helper
5851
+ -------------------------
5852
+  (0.0ms) rollback transaction
5853
+  (0.0ms) begin transaction
5854
+ ----------------------------
5855
+ ViewTest: test_cannot_helper
5856
+ ----------------------------
5857
+  (0.0ms) rollback transaction
5858
+  (0.0ms) begin transaction
5859
+ --------------------------------
5860
+ ChangesTest: test_record_changes
5861
+ --------------------------------
5862
+  (0.0ms) rollback transaction
5863
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5864
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5865
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5866
+  (0.0ms) select sqlite_version(*)
5867
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5868
+  (0.0ms) SELECT version FROM "schema_migrations"
5869
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5870
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5871
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5872
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5873
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5874
+  (0.0ms) select sqlite_version(*)
5875
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5876
+  (0.0ms) SELECT version FROM "schema_migrations"
5877
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5878
+  (0.1ms) begin transaction
5879
+ --------------------------------
5880
+ CheckingTest: test_ability_block
5881
+ --------------------------------
5882
+  (0.1ms) rollback transaction
5883
+  (0.0ms) begin transaction
5884
+ -------------------------------------
5885
+ CheckingTest: test_ability_conditions
5886
+ -------------------------------------
5887
+  (0.0ms) rollback transaction
5888
+  (0.0ms) begin transaction
5889
+ ------------------------------------
5890
+ CheckingTest: test_cannot_definition
5891
+ ------------------------------------
5892
+  (0.0ms) rollback transaction
5893
+  (0.0ms) begin transaction
5894
+ ------------------------------
5895
+ CheckingTest: test_all_subject
5896
+ ------------------------------
5897
+  (0.0ms) rollback transaction
5898
+  (0.0ms) begin transaction
5899
+ --------------------------------
5900
+ CheckingTest: test_manage_action
5901
+ --------------------------------
5902
+  (0.0ms) rollback transaction
5903
+  (0.0ms) begin transaction
5904
+ -----------------------------------------------
5905
+ CheckingTest: test_can_definition_with_instance
5906
+ -----------------------------------------------
5907
+  (0.0ms) rollback transaction
5908
+  (0.1ms) begin transaction
5909
+ --------------------------------------------
5910
+ CheckingTest: test_can_definition_with_model
5911
+ --------------------------------------------
5912
+  (0.0ms) rollback transaction
5913
+  (0.0ms) begin transaction
5914
+ ---------------------------------------
5915
+ CheckingTest: test_undefined_definition
5916
+ ---------------------------------------
5917
+  (0.0ms) rollback transaction
5918
+  (0.0ms) begin transaction
5919
+ ------------------------------------------
5920
+ GeneratorsTest: test_initializer_generator
5921
+ ------------------------------------------
5922
+  (0.1ms) rollback transaction
5923
+  (0.0ms) begin transaction
5924
+ -------------------------
5925
+ ViewTest: test_can_helper
5926
+ -------------------------
5927
+  (0.0ms) rollback transaction
5928
+  (0.0ms) begin transaction
5929
+ ----------------------------
5930
+ ViewTest: test_cannot_helper
5931
+ ----------------------------
5932
+  (0.0ms) rollback transaction
5933
+  (0.0ms) begin transaction
5934
+ -------------------------------------
5935
+ ControllerTest: test_authorize_helper
5936
+ -------------------------------------
5937
+  (0.0ms) rollback transaction
5938
+  (0.0ms) begin transaction
5939
+ -------------------------------
5940
+ ControllerTest: test_can_helper
5941
+ -------------------------------
5942
+  (0.0ms) rollback transaction
5943
+  (0.0ms) begin transaction
5944
+ ----------------------------------
5945
+ ControllerTest: test_cannot_helper
5946
+ ----------------------------------
5947
+  (0.0ms) rollback transaction
5948
+  (0.0ms) begin transaction
5949
+ --------------------------------
5950
+ ChangesTest: test_record_changes
5951
+ --------------------------------
5952
+  (0.0ms) rollback transaction
5953
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5954
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5955
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5956
+  (0.0ms) select sqlite_version(*)
5957
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5958
+  (0.0ms) SELECT version FROM "schema_migrations"
5959
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5960
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
5961
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
5962
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
5963
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
5964
+  (0.0ms) select sqlite_version(*)
5965
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5966
+  (0.1ms) SELECT version FROM "schema_migrations"
5967
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
5968
+  (0.1ms) begin transaction
5969
+ ------------------------------------------
5970
+ GeneratorsTest: test_initializer_generator
5971
+ ------------------------------------------
5972
+  (0.1ms) rollback transaction
5973
+  (0.1ms) begin transaction
5974
+ -------------------------
5975
+ ViewTest: test_can_helper
5976
+ -------------------------
5977
+  (0.0ms) rollback transaction
5978
+  (0.0ms) begin transaction
5979
+ ----------------------------
5980
+ ViewTest: test_cannot_helper
5981
+ ----------------------------
5982
+  (0.0ms) rollback transaction
5983
+  (0.0ms) begin transaction
5984
+ -------------------------------
5985
+ ControllerTest: test_can_helper
5986
+ -------------------------------
5987
+  (0.0ms) rollback transaction
5988
+  (0.0ms) begin transaction
5989
+ ----------------------------------
5990
+ ControllerTest: test_cannot_helper
5991
+ ----------------------------------
5992
+  (0.0ms) rollback transaction
5993
+  (0.0ms) begin transaction
5994
+ -------------------------------------
5995
+ ControllerTest: test_authorize_helper
5996
+ -------------------------------------
5997
+  (0.0ms) rollback transaction
5998
+  (0.0ms) begin transaction
5999
+ -------------------------------------
6000
+ CheckingTest: test_ability_conditions
6001
+ -------------------------------------
6002
+  (0.0ms) rollback transaction
6003
+  (0.1ms) begin transaction
6004
+ --------------------------------------------
6005
+ CheckingTest: test_can_definition_with_model
6006
+ --------------------------------------------
6007
+  (0.0ms) rollback transaction
6008
+  (0.1ms) begin transaction
6009
+ --------------------------------
6010
+ CheckingTest: test_ability_block
6011
+ --------------------------------
6012
+  (0.0ms) rollback transaction
6013
+  (0.0ms) begin transaction
6014
+ -----------------------------------------------
6015
+ CheckingTest: test_can_definition_with_instance
6016
+ -----------------------------------------------
6017
+  (0.0ms) rollback transaction
6018
+  (0.1ms) begin transaction
6019
+ ------------------------------
6020
+ CheckingTest: test_all_subject
6021
+ ------------------------------
6022
+  (0.0ms) rollback transaction
6023
+  (0.0ms) begin transaction
6024
+ --------------------------------
6025
+ CheckingTest: test_manage_action
6026
+ --------------------------------
6027
+  (0.0ms) rollback transaction
6028
+  (0.0ms) begin transaction
6029
+ ---------------------------------------
6030
+ CheckingTest: test_undefined_definition
6031
+ ---------------------------------------
6032
+  (0.0ms) rollback transaction
6033
+  (0.0ms) begin transaction
6034
+ ------------------------------------
6035
+ CheckingTest: test_cannot_definition
6036
+ ------------------------------------
6037
+  (0.0ms) rollback transaction
6038
+  (0.0ms) begin transaction
6039
+ --------------------------------
6040
+ ChangesTest: test_record_changes
6041
+ --------------------------------
6042
+  (0.0ms) rollback transaction
6043
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6044
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6045
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6046
+  (0.0ms) select sqlite_version(*)
6047
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6048
+  (0.0ms) SELECT version FROM "schema_migrations"
6049
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6050
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
6051
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6052
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6053
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6054
+  (0.0ms) select sqlite_version(*)
6055
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6056
+  (0.0ms) SELECT version FROM "schema_migrations"
6057
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6058
+  (0.1ms) begin transaction
6059
+ -------------------------------
6060
+ ControllerTest: test_can_helper
6061
+ -------------------------------
6062
+  (0.1ms) rollback transaction
6063
+  (0.0ms) begin transaction
6064
+ ----------------------------------
6065
+ ControllerTest: test_cannot_helper
6066
+ ----------------------------------
6067
+  (0.0ms) rollback transaction
6068
+  (0.0ms) begin transaction
6069
+ -------------------------------------
6070
+ ControllerTest: test_authorize_helper
6071
+ -------------------------------------
6072
+  (0.0ms) rollback transaction
6073
+  (0.0ms) begin transaction
6074
+ --------------------------------------------
6075
+ CheckingTest: test_can_definition_with_model
6076
+ --------------------------------------------
6077
+  (0.0ms) rollback transaction
6078
+  (0.0ms) begin transaction
6079
+ -------------------------------------
6080
+ CheckingTest: test_ability_conditions
6081
+ -------------------------------------
6082
+  (0.0ms) rollback transaction
6083
+  (0.0ms) begin transaction
6084
+ -----------------------------------------------
6085
+ CheckingTest: test_can_definition_with_instance
6086
+ -----------------------------------------------
6087
+  (0.0ms) rollback transaction
6088
+  (0.0ms) begin transaction
6089
+ ------------------------------------
6090
+ CheckingTest: test_cannot_definition
6091
+ ------------------------------------
6092
+  (0.0ms) rollback transaction
6093
+  (0.1ms) begin transaction
6094
+ ------------------------------
6095
+ CheckingTest: test_all_subject
6096
+ ------------------------------
6097
+  (0.0ms) rollback transaction
6098
+  (0.0ms) begin transaction
6099
+ --------------------------------
6100
+ CheckingTest: test_manage_action
6101
+ --------------------------------
6102
+  (0.0ms) rollback transaction
6103
+  (0.0ms) begin transaction
6104
+ --------------------------------
6105
+ CheckingTest: test_ability_block
6106
+ --------------------------------
6107
+  (0.0ms) rollback transaction
6108
+  (0.1ms) begin transaction
6109
+ ---------------------------------------
6110
+ CheckingTest: test_undefined_definition
6111
+ ---------------------------------------
6112
+  (0.0ms) rollback transaction
6113
+  (0.0ms) begin transaction
6114
+ --------------------------------
6115
+ ChangesTest: test_record_changes
6116
+ --------------------------------
6117
+  (0.0ms) rollback transaction
6118
+  (0.0ms) begin transaction
6119
+ -------------------------
6120
+ ViewTest: test_can_helper
6121
+ -------------------------
6122
+  (0.0ms) rollback transaction
6123
+  (0.0ms) begin transaction
6124
+ ----------------------------
6125
+ ViewTest: test_cannot_helper
6126
+ ----------------------------
6127
+  (0.0ms) rollback transaction
6128
+  (0.0ms) begin transaction
6129
+ ------------------------------------------
6130
+ GeneratorsTest: test_initializer_generator
6131
+ ------------------------------------------
6132
+  (0.0ms) rollback transaction
6133
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6134
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6135
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6136
+  (0.0ms) select sqlite_version(*)
6137
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6138
+  (0.0ms) SELECT version FROM "schema_migrations"
6139
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6140
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
6141
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6142
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6143
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6144
+  (0.0ms) select sqlite_version(*)
6145
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6146
+  (0.1ms) SELECT version FROM "schema_migrations"
6147
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6148
+  (0.1ms) begin transaction
6149
+ --------------------------------
6150
+ ChangesTest: test_record_changes
6151
+ --------------------------------
6152
+  (0.1ms) rollback transaction
6153
+  (0.0ms) begin transaction
6154
+ --------------------------------------------
6155
+ CheckingTest: test_can_definition_with_model
6156
+ --------------------------------------------
6157
+  (0.0ms) rollback transaction
6158
+  (0.0ms) begin transaction
6159
+ ------------------------------
6160
+ CheckingTest: test_all_subject
6161
+ ------------------------------
6162
+  (0.0ms) rollback transaction
6163
+  (0.1ms) begin transaction
6164
+ -------------------------------------
6165
+ CheckingTest: test_ability_conditions
6166
+ -------------------------------------
6167
+  (0.0ms) rollback transaction
6168
+  (0.0ms) begin transaction
6169
+ ------------------------------------
6170
+ CheckingTest: test_cannot_definition
6171
+ ------------------------------------
6172
+  (0.0ms) rollback transaction
6173
+  (0.0ms) begin transaction
6174
+ ---------------------------------------
6175
+ CheckingTest: test_undefined_definition
6176
+ ---------------------------------------
6177
+  (0.0ms) rollback transaction
6178
+  (0.0ms) begin transaction
6179
+ -----------------------------------------------
6180
+ CheckingTest: test_can_definition_with_instance
6181
+ -----------------------------------------------
6182
+  (0.0ms) rollback transaction
6183
+  (0.0ms) begin transaction
6184
+ --------------------------------
6185
+ CheckingTest: test_ability_block
6186
+ --------------------------------
6187
+  (0.0ms) rollback transaction
6188
+  (0.0ms) begin transaction
6189
+ --------------------------------
6190
+ CheckingTest: test_manage_action
6191
+ --------------------------------
6192
+  (0.0ms) rollback transaction
6193
+  (0.0ms) begin transaction
6194
+ -------------------------------------
6195
+ ControllerTest: test_authorize_helper
6196
+ -------------------------------------
6197
+  (0.0ms) rollback transaction
6198
+  (0.0ms) begin transaction
6199
+ ----------------------------------
6200
+ ControllerTest: test_cannot_helper
6201
+ ----------------------------------
6202
+  (0.0ms) rollback transaction
6203
+  (0.0ms) begin transaction
6204
+ -------------------------------
6205
+ ControllerTest: test_can_helper
6206
+ -------------------------------
6207
+  (0.1ms) rollback transaction
6208
+  (0.0ms) begin transaction
6209
+ -------------------------
6210
+ ViewTest: test_can_helper
6211
+ -------------------------
6212
+  (0.0ms) rollback transaction
6213
+  (0.0ms) begin transaction
6214
+ ----------------------------
6215
+ ViewTest: test_cannot_helper
6216
+ ----------------------------
6217
+  (0.0ms) rollback transaction
6218
+  (0.0ms) begin transaction
6219
+ ------------------------------------------
6220
+ GeneratorsTest: test_initializer_generator
6221
+ ------------------------------------------
6222
+  (0.0ms) rollback transaction
6223
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6224
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6225
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6226
+  (0.0ms) select sqlite_version(*)
6227
+  (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6228
+  (0.0ms) SELECT version FROM "schema_migrations"
6229
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6230
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203344')
6231
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" text, "user_id" integer, "created_at" datetime, "updated_at" datetime) 
6232
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "admin" boolean, "created_at" datetime, "updated_at" datetime)
6233
+  (0.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6234
+  (0.0ms) select sqlite_version(*)
6235
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6236
+  (0.1ms) SELECT version FROM "schema_migrations"
6237
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140629203412')
6238
+  (0.1ms) begin transaction
6239
+ ------------------------------
6240
+ CheckingTest: test_all_subject
6241
+ ------------------------------
6242
+  (0.1ms) rollback transaction
6243
+  (0.0ms) begin transaction
6244
+ --------------------------------
6245
+ CheckingTest: test_ability_block
6246
+ --------------------------------
6247
+  (0.1ms) rollback transaction
6248
+  (0.0ms) begin transaction
6249
+ -------------------------------------
6250
+ CheckingTest: test_ability_conditions
6251
+ -------------------------------------
6252
+  (0.0ms) rollback transaction
6253
+  (0.0ms) begin transaction
6254
+ -----------------------------------------------
6255
+ CheckingTest: test_can_definition_with_instance
6256
+ -----------------------------------------------
6257
+  (0.0ms) rollback transaction
6258
+  (0.0ms) begin transaction
6259
+ ---------------------------------------
6260
+ CheckingTest: test_undefined_definition
6261
+ ---------------------------------------
6262
+  (0.0ms) rollback transaction
6263
+  (0.0ms) begin transaction
6264
+ --------------------------------------------
6265
+ CheckingTest: test_can_definition_with_model
6266
+ --------------------------------------------
6267
+  (0.0ms) rollback transaction
6268
+  (0.1ms) begin transaction
6269
+ --------------------------------
6270
+ CheckingTest: test_manage_action
6271
+ --------------------------------
6272
+  (0.0ms) rollback transaction
6273
+  (0.0ms) begin transaction
6274
+ ------------------------------------
6275
+ CheckingTest: test_cannot_definition
6276
+ ------------------------------------
6277
+  (0.0ms) rollback transaction
6278
+  (0.0ms) begin transaction
6279
+ --------------------------------
6280
+ ChangesTest: test_record_changes
6281
+ --------------------------------
6282
+  (0.0ms) rollback transaction
6283
+  (0.0ms) begin transaction
6284
+ -------------------------
6285
+ ViewTest: test_can_helper
6286
+ -------------------------
6287
+  (0.0ms) rollback transaction
6288
+  (0.0ms) begin transaction
6289
+ ----------------------------
6290
+ ViewTest: test_cannot_helper
6291
+ ----------------------------
6292
+  (0.0ms) rollback transaction
6293
+  (0.0ms) begin transaction
6294
+ ------------------------------------------
6295
+ GeneratorsTest: test_initializer_generator
6296
+ ------------------------------------------
6297
+  (0.1ms) rollback transaction
6298
+  (0.0ms) begin transaction
6299
+ -------------------------------------
6300
+ ControllerTest: test_authorize_helper
6301
+ -------------------------------------
6302
+  (0.0ms) rollback transaction
6303
+  (0.0ms) begin transaction
6304
+ -------------------------------
6305
+ ControllerTest: test_can_helper
6306
+ -------------------------------
6307
+  (0.0ms) rollback transaction
6308
+  (0.0ms) begin transaction
6309
+ ----------------------------------
6310
+ ControllerTest: test_cannot_helper
6311
+ ----------------------------------
6312
+  (0.0ms) rollback transaction
@@ -4,7 +4,7 @@ require 'generators/abilities/install_generator'
4
4
 
5
5
  class GeneratorsTest < Rails::Generators::TestCase
6
6
  tests Abilities::InstallGenerator
7
- destination File.expand_path('../tmp', File.dirname(__FILE__))
7
+ destination Rails.root.join('tmp')
8
8
 
9
9
  teardown do
10
10
  FileUtils.rm_rf self.destination_root
@@ -12,7 +12,7 @@ class GeneratorsTest < Rails::Generators::TestCase
12
12
 
13
13
  test 'initializer generator' do
14
14
  run_generator
15
- assert_file 'config/initializers/abilities.rb'
15
+ assert_file 'config/abilities.rb'
16
16
  end
17
17
 
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-04 00:00:00.000000000 Z
11
+ date: 2015-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -81,6 +81,7 @@ files:
81
81
  - test/dummy/bin/rails
82
82
  - test/dummy/bin/rake
83
83
  - test/dummy/config.ru
84
+ - test/dummy/config/abilities.rb
84
85
  - test/dummy/config/application.rb
85
86
  - test/dummy/config/boot.rb
86
87
  - test/dummy/config/database.yml
@@ -88,7 +89,6 @@ files:
88
89
  - test/dummy/config/environments/development.rb
89
90
  - test/dummy/config/environments/production.rb
90
91
  - test/dummy/config/environments/test.rb
91
- - test/dummy/config/initializers/abilities.rb
92
92
  - test/dummy/config/initializers/backtrace_silencers.rb
93
93
  - test/dummy/config/initializers/cookies_serializer.rb
94
94
  - test/dummy/config/initializers/filter_parameter_logging.rb
@@ -150,6 +150,7 @@ test_files:
150
150
  - test/dummy/bin/bundle
151
151
  - test/dummy/bin/rails
152
152
  - test/dummy/bin/rake
153
+ - test/dummy/config/abilities.rb
153
154
  - test/dummy/config/application.rb
154
155
  - test/dummy/config/boot.rb
155
156
  - test/dummy/config/database.yml
@@ -157,7 +158,6 @@ test_files:
157
158
  - test/dummy/config/environments/development.rb
158
159
  - test/dummy/config/environments/production.rb
159
160
  - test/dummy/config/environments/test.rb
160
- - test/dummy/config/initializers/abilities.rb
161
161
  - test/dummy/config/initializers/backtrace_silencers.rb
162
162
  - test/dummy/config/initializers/cookies_serializer.rb
163
163
  - test/dummy/config/initializers/filter_parameter_logging.rb