txtblx 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf78830b02ee2da1279afd7d714030b952d80672
4
- data.tar.gz: c2855853900673c0279d1345fd2393ad6bb63679
3
+ metadata.gz: 875453f25d4ee37a2e911b8645c2b01e4f217b6e
4
+ data.tar.gz: 8a65c28bd93a5ec1606b2cb713273ae2b7f27c34
5
5
  SHA512:
6
- metadata.gz: d7034f641f68213955a01538f5342a7ed8601bbc8c828b594be3ba6c3d247c4fcbd66e38f0e2869389450af7669cf78fe32e2a301ba679639fd7cebe9a1cf970
7
- data.tar.gz: c961bea1de2dc7e3536af77a2eea0c2b518ea9c2a11f2da470e8811effb9d25a3da33f061afc41a9516cc1c15979ace157c8be401a01bc7a645809c71f86c8a6
6
+ metadata.gz: 0541bb623490b597e5f05d3c477dc51adfa3fea55ff0cabf0e3e3c4fe239560d66f3c68dd82fac98eb96f859129f27c34a4bb2dc9bff72e083b74bcb5e0a99a6
7
+ data.tar.gz: 995403047749f836f44bd85f957ef0f1e6d5dbb4d9eb3c876d3920019b8f00a853b78551b3640a36d27e10d78294f16badffd927f2ce7fc1f5ba638089423435
data/README.md CHANGED
@@ -34,8 +34,13 @@ Txtblx provides a simple way to allow Active Admin users to edit interface copy.
34
34
 
35
35
  ## Active Admin Integration
36
36
 
37
- Txtblx comes with an ActiveAdmin page to manage Textblocks
37
+ Txtblx comes with an ActiveAdmin page to manage Textblocks.
38
+ Load it in an initializer:
38
39
 
40
+ # config/initializers/txtblx.rb
41
+ Txtblx.configure do |config|
42
+ config.load_active_admin
43
+ end
39
44
 
40
45
  ### CanCan Integration
41
46
 
@@ -9,5 +9,10 @@ module Txtblx
9
9
  simple_format
10
10
  end
11
11
  end
12
+
13
+ def load_active_admin
14
+ admin_path = File.join(Txtblx::Engine.root, 'lib', 'txtblx', 'admin')
15
+ ActiveAdmin.application.load_paths.unshift(admin_path)
16
+ end
12
17
  end
13
18
  end
data/lib/txtblx/engine.rb CHANGED
@@ -8,9 +8,5 @@ module Txtblx
8
8
  g.assets false
9
9
  g.helper false
10
10
  end
11
-
12
- initializer :txtblx_admin do
13
- ActiveAdmin.application.load_paths.unshift File.join(config.root, 'lib/txtblx/admin')
14
- end
15
11
  end
16
12
  end
@@ -1,3 +1,3 @@
1
1
  module Txtblx
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -0,0 +1,2 @@
1
+ ActiveAdmin.application.load_paths.unshift(Txtblx::Engine.root.join('lib', 'txtblx', 'admin'))
2
+
Binary file
Binary file
@@ -1,25 +1,15 @@
1
-  (25.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.2ms) select sqlite_version(*)
3
-  (32.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to CreateSnapsTags (20150321131740)
6
-  (0.1ms) begin transaction
7
-  (0.4ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
8
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150321131740"]]
9
-  (38.4ms) commit transaction
1
+  (24.5ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2
+  (25.9ms) CREATE TABLE "txtblx_textblocks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "key" varchar, "description" varchar, "text" text, "text_html" text, "path" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3
+  (36.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
4
+  (0.1ms) select sqlite_version(*)
5
+  (22.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+  (0.1ms) SELECT version FROM "schema_migrations"
7
+  (18.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150405222157')
8
+  (23.6ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
9
+  (16.9ms) CREATE TABLE "txtblx_textblocks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "key" varchar, "description" varchar, "text" text, "text_html" text, "path" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
10
+  (32.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
11
+  (0.1ms) select sqlite_version(*)
12
+  (28.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13
+  (0.1ms) SELECT version FROM "schema_migrations"
14
+  (29.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150405222157')
10
15
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
- Migrating to CreateTxtblxTextblocks (20150405222157)
13
-  (0.1ms) begin transaction
14
-  (0.3ms) CREATE TABLE "txtblx_textblocks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "perma_id" integer, "key" varchar, "description" varchar, "text" text, "text_html" text, "path" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
15
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150405222157"]]
16
-  (31.2ms) commit transaction
17
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
18
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
19
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
20
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
21
- Migrating to CreateSnapsTags (20150406173449)
22
-  (0.1ms) begin transaction
23
-  (0.1ms) CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
24
- SQLite3::SQLException: table "snaps_tags" already exists: CREATE TABLE "snaps_tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "record_id" integer, "record_type" varchar, "tag" varchar, "superseded_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
25
-  (0.0ms) rollback transaction