txtblx 0.0.2 → 0.0.3

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: 664e6521e2b4b82dffadfcaff363f8b37fc0e857
4
- data.tar.gz: cd91629c4b1a4731ba055c4363bc1124b7fecefd
3
+ metadata.gz: bf78830b02ee2da1279afd7d714030b952d80672
4
+ data.tar.gz: c2855853900673c0279d1345fd2393ad6bb63679
5
5
  SHA512:
6
- metadata.gz: 96807fff6a9eea234586f6647a764f4f3a5a74aae0ad95442e3b96fd7c5c519c5b8169cedf40a78d391c3fecd36e9b3bad1c60795fa88813d147e2c946169d3d
7
- data.tar.gz: 782d695e11ce867657f81c017b6e2f8231f15c2e85ccddb9513a21f1076ce502a8ff52af3923e547d05f5ab0342d168f0b11e511544aeb7cfa9d465aeccc129f
6
+ metadata.gz: d7034f641f68213955a01538f5342a7ed8601bbc8c828b594be3ba6c3d247c4fcbd66e38f0e2869389450af7669cf78fe32e2a301ba679639fd7cebe9a1cf970
7
+ data.tar.gz: c961bea1de2dc7e3536af77a2eea0c2b518ea9c2a11f2da470e8811effb9d25a3da33f061afc41a9516cc1c15979ace157c8be401a01bc7a645809c71f86c8a6
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Textblocks
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/txtblx.svg)](http://badge.fury.io/rb/txtblx)
4
+ [![Build Status](https://travis-ci.org/codevise/txtblx.svg?branch=master)](https://travis-ci.org/codevise/txtblx)
5
+ [![Code Climate](https://codeclimate.com/github/codevise/txtblx/badges/gpa.svg)](https://codeclimate.com/github/codevise/txtblx)
6
+ [![Test Coverage](https://codeclimate.com/github/codevise/txtblx/badges/coverage.svg)](https://codeclimate.com/github/codevise/txtblx)
7
+
8
+
3
9
  ## Editable, revisioned front-end texts for rails apps.
4
10
 
5
11
  Txtblx provides a simple way to allow Active Admin users to edit interface copy.
@@ -1,4 +1,35 @@
1
- # desc "Explaining what the task does"
2
- # task :txtblx do
3
- # # Task goes here
4
- # end
1
+
2
+ namespace :txtblx do
3
+ desc "Import Textblocks from files"
4
+
5
+ task import: :environment do
6
+
7
+ txtdir = Rails.root.join('textblocks')
8
+ puts "Looking for markdown files in #{txtdir}"
9
+ Dir.glob(File.join(txtdir, "*.md")) do |mdfile|
10
+ key = File.basename(mdfile, '.md')
11
+ puts "Processing key '#{key}'"
12
+
13
+ Txtblx::Textblock.find_or_create_by(key: key) do |txtb|
14
+ description_indicator = '->'
15
+
16
+ lines = File.readlines(mdfile)
17
+
18
+ first_line = lines.first.strip
19
+ if first_line.start_with?(description_indicator)
20
+ description = first_line[description_indicator.length, first_line.length]
21
+ content = lines[1, lines.length].join("\n")
22
+ else
23
+ description = key
24
+ content = lines.join("\n")
25
+ end
26
+
27
+ puts " -- Created Textblock (#{description})"
28
+ txtb.text = content
29
+ txtb.description = description
30
+ txtb.save
31
+ txtb.publish
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module Txtblx
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -2725,3 +2725,323 @@ Completed 200 OK in 14ms (Views: 13.3ms | ActiveRecord: 0.1ms)
2725
2725
  SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 14:19:19.977601"], ["updated_at", "2015-04-09 14:19:19.977601"]]
2726
2726
   (0.1ms) RELEASE SAVEPOINT active_record_1
2727
2727
   (0.1ms) rollback transaction
2728
+  (0.1ms) begin transaction
2729
+  (0.1ms) SAVEPOINT active_record_1
2730
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2731
+ SQL (0.4ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text"], ["text_html", "<p>some text</p>"], ["perma_id", 1], ["created_at", "2015-04-09 15:07:35.628075"], ["updated_at", "2015-04-09 15:07:35.628075"]]
2732
+ SQL (0.3ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.664845' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2733
+ ON txtblx_textblocks.id = snaps_tags.record_id
2734
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2735
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2736
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:07:35.671162"], ["updated_at", "2015-04-09 15:07:35.671162"]]
2737
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2738
+  (0.1ms) rollback transaction
2739
+  (0.1ms) begin transaction
2740
+  (0.1ms) SAVEPOINT active_record_1
2741
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2742
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text inlcuding http://example.com"], ["text_html", "<p>some text inlcuding <a href=\"http://example.com\" target=\"_blank\" rel=\"nofollow\">http://example.com</a></p>"], ["perma_id", 1], ["created_at", "2015-04-09 15:07:35.676439"], ["updated_at", "2015-04-09 15:07:35.676439"]]
2743
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.678490' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2744
+ ON txtblx_textblocks.id = snaps_tags.record_id
2745
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2746
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2747
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:07:35.679240"], ["updated_at", "2015-04-09 15:07:35.679240"]]
2748
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2749
+  (0.2ms) rollback transaction
2750
+  (0.1ms) begin transaction
2751
+  (0.1ms) SAVEPOINT active_record_1
2752
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:07:35.690099"], ["updated_at", "2015-04-09 15:07:35.690099"]]
2753
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.692615' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2754
+ ON txtblx_textblocks.id = snaps_tags.record_id
2755
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2756
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2757
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:07:35.693538"], ["updated_at", "2015-04-09 15:07:35.693538"]]
2758
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2759
+  (0.0ms) SAVEPOINT active_record_1
2760
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:07:35.695740"], ["updated_at", "2015-04-09 15:07:35.695740"]]
2761
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2762
+  (0.0ms) SAVEPOINT active_record_1
2763
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.698207' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2764
+ ON txtblx_textblocks.id = snaps_tags.record_id
2765
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2766
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2767
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-09 15:07:35.698910"], ["updated_at", "2015-04-09 15:07:35.698910"]]
2768
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2769
+ Started GET "/" for 127.0.0.1 at 2015-04-09 17:07:35 +0200
2770
+ Processing by DummiesController#index as HTML
2771
+ Txtblx::Textblock Load (0.2ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2772
+ ON txtblx_textblocks.id = snaps_tags.record_id
2773
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2774
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2775
+ Rendered dummies/index.html.erb within layouts/application (7.8ms)
2776
+ Completed 200 OK in 30ms (Views: 29.8ms | ActiveRecord: 0.2ms)
2777
+  (0.2ms) rollback transaction
2778
+  (0.1ms) begin transaction
2779
+  (0.1ms) SAVEPOINT active_record_1
2780
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:07:35.764400"], ["updated_at", "2015-04-09 15:07:35.764400"]]
2781
+ SQL (1.9ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.766927' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2782
+ ON txtblx_textblocks.id = snaps_tags.record_id
2783
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2784
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2785
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:07:35.769601"], ["updated_at", "2015-04-09 15:07:35.769601"]]
2786
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2787
+  (0.9ms) SAVEPOINT active_record_1
2788
+ SQL (0.4ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:07:35.829267"], ["updated_at", "2015-04-09 15:07:35.829267"]]
2789
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2790
+  (0.0ms) SAVEPOINT active_record_1
2791
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:07:35.833298' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2792
+ ON txtblx_textblocks.id = snaps_tags.record_id
2793
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2794
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2795
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-09 15:07:35.834269"], ["updated_at", "2015-04-09 15:07:35.834269"]]
2796
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2797
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2798
+ ON txtblx_textblocks.id = snaps_tags.record_id
2799
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2800
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2801
+  (0.2ms) rollback transaction
2802
+  (0.1ms) begin transaction
2803
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2804
+ ON txtblx_textblocks.id = snaps_tags.record_id
2805
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2806
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2807
+  (0.2ms) rollback transaction
2808
+  (0.1ms) begin transaction
2809
+ Txtblx::Textblock Load (0.3ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2810
+ ON txtblx_textblocks.id = snaps_tags.record_id
2811
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2812
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2813
+  (0.1ms) rollback transaction
2814
+  (0.0ms) begin transaction
2815
+  (0.1ms) SAVEPOINT active_record_1
2816
+ SQL (0.3ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:08:09.099166"], ["updated_at", "2015-04-09 15:08:09.099166"]]
2817
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.113909' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2818
+ ON txtblx_textblocks.id = snaps_tags.record_id
2819
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2820
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2821
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:08:09.115032"], ["updated_at", "2015-04-09 15:08:09.115032"]]
2822
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2823
+  (0.0ms) SAVEPOINT active_record_1
2824
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:08:09.117639"], ["updated_at", "2015-04-09 15:08:09.117639"]]
2825
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2826
+  (0.0ms) SAVEPOINT active_record_1
2827
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.119956' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2828
+ ON txtblx_textblocks.id = snaps_tags.record_id
2829
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2830
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2831
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-09 15:08:09.120590"], ["updated_at", "2015-04-09 15:08:09.120590"]]
2832
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2833
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2834
+ ON txtblx_textblocks.id = snaps_tags.record_id
2835
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2836
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2837
+  (0.2ms) rollback transaction
2838
+  (0.1ms) begin transaction
2839
+  (0.1ms) SAVEPOINT active_record_1
2840
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:08:09.127465"], ["updated_at", "2015-04-09 15:08:09.127465"]]
2841
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.129521' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2842
+ ON txtblx_textblocks.id = snaps_tags.record_id
2843
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2844
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2845
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:08:09.130359"], ["updated_at", "2015-04-09 15:08:09.130359"]]
2846
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2847
+  (0.0ms) SAVEPOINT active_record_1
2848
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-09 15:08:09.132289"], ["updated_at", "2015-04-09 15:08:09.132289"]]
2849
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2850
+  (0.0ms) SAVEPOINT active_record_1
2851
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.134279' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2852
+ ON txtblx_textblocks.id = snaps_tags.record_id
2853
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2854
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2855
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-09 15:08:09.134848"], ["updated_at", "2015-04-09 15:08:09.134848"]]
2856
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2857
+ Started GET "/" for 127.0.0.1 at 2015-04-09 17:08:09 +0200
2858
+ Processing by DummiesController#index as HTML
2859
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags
2860
+ ON txtblx_textblocks.id = snaps_tags.record_id
2861
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2862
+ AND snaps_tags.tag = 'published' WHERE (snaps_tags.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2863
+ Rendered dummies/index.html.erb within layouts/application (2.4ms)
2864
+ Completed 200 OK in 11ms (Views: 10.7ms | ActiveRecord: 0.1ms)
2865
+  (0.2ms) rollback transaction
2866
+  (0.1ms) begin transaction
2867
+  (0.1ms) SAVEPOINT active_record_1
2868
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2869
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text inlcuding http://example.com"], ["text_html", "<p>some text inlcuding <a href=\"http://example.com\" target=\"_blank\" rel=\"nofollow\">http://example.com</a></p>"], ["perma_id", 1], ["created_at", "2015-04-09 15:08:09.250952"], ["updated_at", "2015-04-09 15:08:09.250952"]]
2870
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.252850' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2871
+ ON txtblx_textblocks.id = snaps_tags.record_id
2872
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2873
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2874
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:08:09.253726"], ["updated_at", "2015-04-09 15:08:09.253726"]]
2875
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2876
+  (0.1ms) rollback transaction
2877
+  (0.0ms) begin transaction
2878
+  (0.0ms) SAVEPOINT active_record_1
2879
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2880
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text"], ["text_html", "<p>some text</p>"], ["perma_id", 1], ["created_at", "2015-04-09 15:08:09.257641"], ["updated_at", "2015-04-09 15:08:09.257641"]]
2881
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-09 15:08:09.259196' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2882
+ ON txtblx_textblocks.id = snaps_tags.record_id
2883
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2884
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2885
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-09 15:08:09.259787"], ["updated_at", "2015-04-09 15:08:09.259787"]]
2886
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2887
+  (0.1ms) rollback transaction
2888
+  (0.1ms) begin transaction
2889
+  (0.1ms) SAVEPOINT active_record_1
2890
+  (0.2ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2891
+ SQL (0.4ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text"], ["text_html", "<p>some text</p>"], ["perma_id", 1], ["created_at", "2015-04-10 20:17:22.499850"], ["updated_at", "2015-04-10 20:17:22.499850"]]
2892
+ SQL (0.3ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.528588' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2893
+ ON txtblx_textblocks.id = snaps_tags.record_id
2894
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2895
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2896
+ SQL (0.2ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:17:22.531462"], ["updated_at", "2015-04-10 20:17:22.531462"]]
2897
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2898
+  (0.1ms) rollback transaction
2899
+  (0.1ms) begin transaction
2900
+  (0.1ms) SAVEPOINT active_record_1
2901
+  (0.2ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
2902
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text inlcuding http://example.com"], ["text_html", "<p>some text inlcuding <a href=\"http://example.com\" target=\"_blank\" rel=\"nofollow\">http://example.com</a></p>"], ["perma_id", 1], ["created_at", "2015-04-10 20:17:22.538061"], ["updated_at", "2015-04-10 20:17:22.538061"]]
2903
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.540520' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2904
+ ON txtblx_textblocks.id = snaps_tags.record_id
2905
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2906
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2907
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:17:22.541334"], ["updated_at", "2015-04-10 20:17:22.541334"]]
2908
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2909
+  (0.1ms) rollback transaction
2910
+  (0.1ms) begin transaction
2911
+  (0.1ms) SAVEPOINT active_record_1
2912
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:17:22.546693"], ["updated_at", "2015-04-10 20:17:22.546693"]]
2913
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.548826' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2914
+ ON txtblx_textblocks.id = snaps_tags.record_id
2915
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2916
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2917
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:17:22.549592"], ["updated_at", "2015-04-10 20:17:22.549592"]]
2918
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2919
+  (0.0ms) SAVEPOINT active_record_1
2920
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:17:22.546693"], ["updated_at", "2015-04-10 20:17:22.551393"]]
2921
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2922
+  (0.0ms) SAVEPOINT active_record_1
2923
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.553325' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2924
+ ON txtblx_textblocks.id = snaps_tags.record_id
2925
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2926
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2927
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-10 20:17:22.553924"], ["updated_at", "2015-04-10 20:17:22.553924"]]
2928
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2929
+ Started GET "/" for 127.0.0.1 at 2015-04-10 22:17:22 +0200
2930
+ Processing by DummiesController#index as HTML
2931
+ Txtblx::Textblock Load (0.2ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
2932
+ ON txtblx_textblocks.id = t_published.record_id
2933
+ AND t_published.record_type = 'Txtblx::Textblock'
2934
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2935
+ Rendered dummies/index.html.erb within layouts/application (46.2ms)
2936
+ Completed 200 OK in 56ms (Views: 55.7ms | ActiveRecord: 0.2ms)
2937
+  (0.2ms) rollback transaction
2938
+  (0.1ms) begin transaction
2939
+  (0.1ms) SAVEPOINT active_record_1
2940
+ SQL (0.3ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:17:22.630741"], ["updated_at", "2015-04-10 20:17:22.630741"]]
2941
+ SQL (0.3ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.634823' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2942
+ ON txtblx_textblocks.id = snaps_tags.record_id
2943
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2944
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2945
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:17:22.636520"], ["updated_at", "2015-04-10 20:17:22.636520"]]
2946
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2947
+  (0.0ms) SAVEPOINT active_record_1
2948
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:17:22.630741"], ["updated_at", "2015-04-10 20:17:22.638784"]]
2949
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2950
+  (0.0ms) SAVEPOINT active_record_1
2951
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:17:22.640724' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2952
+ ON txtblx_textblocks.id = snaps_tags.record_id
2953
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2954
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2955
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-10 20:17:22.641347"], ["updated_at", "2015-04-10 20:17:22.641347"]]
2956
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2957
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
2958
+ ON txtblx_textblocks.id = t_published.record_id
2959
+ AND t_published.record_type = 'Txtblx::Textblock'
2960
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2961
+  (0.1ms) rollback transaction
2962
+  (0.0ms) begin transaction
2963
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
2964
+ ON txtblx_textblocks.id = t_published.record_id
2965
+ AND t_published.record_type = 'Txtblx::Textblock'
2966
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2967
+  (0.1ms) rollback transaction
2968
+  (0.1ms) begin transaction
2969
+  (0.1ms) SAVEPOINT active_record_1
2970
+ SQL (0.3ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:19:31.761642"], ["updated_at", "2015-04-10 20:19:31.761642"]]
2971
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:31.783040' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2972
+ ON txtblx_textblocks.id = snaps_tags.record_id
2973
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2974
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
2975
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:19:31.784985"], ["updated_at", "2015-04-10 20:19:31.784985"]]
2976
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2977
+  (0.0ms) SAVEPOINT active_record_1
2978
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:19:31.761642"], ["updated_at", "2015-04-10 20:19:31.787233"]]
2979
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2980
+  (0.1ms) SAVEPOINT active_record_1
2981
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:31.789495' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
2982
+ ON txtblx_textblocks.id = snaps_tags.record_id
2983
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
2984
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
2985
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-10 20:19:31.790092"], ["updated_at", "2015-04-10 20:19:31.790092"]]
2986
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2987
+ Started GET "/" for 127.0.0.1 at 2015-04-10 22:19:31 +0200
2988
+ Processing by DummiesController#index as HTML
2989
+ Txtblx::Textblock Load (0.2ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
2990
+ ON txtblx_textblocks.id = t_published.record_id
2991
+ AND t_published.record_type = 'Txtblx::Textblock'
2992
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
2993
+ Rendered dummies/index.html.erb within layouts/application (4.5ms)
2994
+ Completed 200 OK in 14ms (Views: 13.9ms | ActiveRecord: 0.2ms)
2995
+  (0.2ms) rollback transaction
2996
+  (0.1ms) begin transaction
2997
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
2998
+ ON txtblx_textblocks.id = t_published.record_id
2999
+ AND t_published.record_type = 'Txtblx::Textblock'
3000
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
3001
+  (0.1ms) rollback transaction
3002
+  (0.0ms) begin transaction
3003
+  (0.1ms) SAVEPOINT active_record_1
3004
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:19:31.975131"], ["updated_at", "2015-04-10 20:19:31.975131"]]
3005
+ SQL (0.2ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:31.977195' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
3006
+ ON txtblx_textblocks.id = snaps_tags.record_id
3007
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
3008
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
3009
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:19:31.977948"], ["updated_at", "2015-04-10 20:19:31.977948"]]
3010
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3011
+  (0.0ms) SAVEPOINT active_record_1
3012
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("perma_id", "key", "description", "text", "text_html", "path", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["perma_id", 1], ["key", "homepage.welcome"], ["description", ""], ["text", ""], ["text_html", "Welcome to Dummy App"], ["path", "MyString"], ["created_at", "2015-04-10 20:19:31.975131"], ["updated_at", "2015-04-10 20:19:31.979691"]]
3013
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3014
+  (0.0ms) SAVEPOINT active_record_1
3015
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:31.981619' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
3016
+ ON txtblx_textblocks.id = snaps_tags.record_id
3017
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
3018
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "published"]]
3019
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 2], ["record_type", "Txtblx::Textblock"], ["tag", "published"], ["created_at", "2015-04-10 20:19:31.982198"], ["updated_at", "2015-04-10 20:19:31.982198"]]
3020
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3021
+ Txtblx::Textblock Load (0.1ms) SELECT "txtblx_textblocks".* FROM "txtblx_textblocks" INNER JOIN snaps_tags t_published
3022
+ ON txtblx_textblocks.id = t_published.record_id
3023
+ AND t_published.record_type = 'Txtblx::Textblock'
3024
+ AND t_published.tag = 'published' WHERE (t_published.superseded_at IS NULL) AND "txtblx_textblocks"."key" = ? LIMIT 1 [["key", "homepage.welcome"]]
3025
+  (0.1ms) rollback transaction
3026
+  (0.1ms) begin transaction
3027
+  (0.1ms) SAVEPOINT active_record_1
3028
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
3029
+ SQL (0.2ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text inlcuding http://example.com"], ["text_html", "<p>some text inlcuding <a href=\"http://example.com\" target=\"_blank\" rel=\"nofollow\">http://example.com</a></p>"], ["perma_id", 1], ["created_at", "2015-04-10 20:19:32.074731"], ["updated_at", "2015-04-10 20:19:32.074731"]]
3030
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:32.076666' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
3031
+ ON txtblx_textblocks.id = snaps_tags.record_id
3032
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
3033
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
3034
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:19:32.077415"], ["updated_at", "2015-04-10 20:19:32.077415"]]
3035
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3036
+  (0.1ms) rollback transaction
3037
+  (0.0ms) begin transaction
3038
+  (0.0ms) SAVEPOINT active_record_1
3039
+  (0.1ms) SELECT MAX("txtblx_textblocks"."perma_id") FROM "txtblx_textblocks"
3040
+ SQL (0.1ms) INSERT INTO "txtblx_textblocks" ("key", "text", "text_html", "perma_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["key", "some key"], ["text", "some text"], ["text_html", "<p>some text</p>"], ["perma_id", 1], ["created_at", "2015-04-10 20:19:32.080865"], ["updated_at", "2015-04-10 20:19:32.080865"]]
3041
+ SQL (0.1ms) UPDATE "snaps_tags" SET "superseded_at" = '2015-04-10 20:19:32.082328' WHERE "snaps_tags"."id" IN (SELECT "snaps_tags"."id" FROM "snaps_tags" INNER JOIN txtblx_textblocks
3042
+ ON txtblx_textblocks.id = snaps_tags.record_id
3043
+ AND snaps_tags.record_type = 'Txtblx::Textblock'
3044
+ AND perma_id = 1 WHERE "snaps_tags"."tag" = ? AND "snaps_tags"."superseded_at" IS NULL) [["tag", "draft"]]
3045
+ SQL (0.1ms) INSERT INTO "snaps_tags" ("record_id", "record_type", "tag", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["record_id", 1], ["record_type", "Txtblx::Textblock"], ["tag", "draft"], ["created_at", "2015-04-10 20:19:32.082883"], ["updated_at", "2015-04-10 20:19:32.082883"]]
3046
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3047
+  (0.1ms) rollback transaction
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  ENV['RAILS_ENV'] ||= 'test'
2
2
 
3
+ require "codeclimate-test-reporter"
4
+ CodeClimate::TestReporter.start
5
+
3
6
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
7
  require 'rspec/rails'
5
8
  require 'rspec/autorun'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txtblx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: snaps
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
@@ -56,60 +56,74 @@ dependencies:
56
56
  name: auto_html
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 1.6.4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 1.6.4
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 1.3.10
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.3.10
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '3.2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '3.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: capybara
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 2.4.4
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 2.4.4
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: factory_girl_rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '4.5'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: '4.5'
125
+ - !ruby/object:Gem::Dependency
126
+ name: codeclimate-test-reporter
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - '>='