dynamic_text 0.0.7 → 0.0.8

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
  SHA256:
3
- metadata.gz: c5bf76fb6450fa76db95c4bc477593b344b3da892344b76d94390dace1dca5cf
4
- data.tar.gz: bd631cb8b05cb8b33414939be1ad8d3f5008bc007f63de0d81a66c068d33ba11
3
+ metadata.gz: 170d3043bf20729ce856f83b704685672813c178ccdd466344ba18f85c9f3ad3
4
+ data.tar.gz: 270e719155b19386ff6cb00de6e70b479b952c98fb8ebef56b3f0e0750703451
5
5
  SHA512:
6
- metadata.gz: cb6c3bcbb282ee2b2740128b8da05453ed36456c3a7818d3a5370a571c9fb741555518d2d9e6df745ef24807c1b42fa80902c332243302ab9d568f7e9a706ff3
7
- data.tar.gz: a6e60da0f931c54cf8038b8599603f4e242dc0c5e75d002b2377cffe2e114a62a302dd77170ff04590a284c3082657fd53c3599988f847aa4861df144c0c1b4c
6
+ metadata.gz: c594d92ff07e3cd1e9646429b1fc065799637f64234885e769617e898d274e323e0fe293f0b736b3f0cf39b8b6e422219fb01bd09aa659e78a9462d2710163f3
7
+ data.tar.gz: 62cec8be8065c29f84c59849886a1cd56b77bfee6bce4c5373b3498969ee0e5fb5bf28d405dc81d78d103d7bceec068321547abba12eea04ce1d6a3b35b40b02
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Welcome to Dynamic Text
2
2
  Create a more seamless integration between displaying information and editing it! With Dynamic Text, you can allow users to easily update elements of a resource in your app just by clicking on the text and changing it, no separate edit page needed!
3
3
 
4
+ ![](dynamic-text-in-action.gif)
5
+
4
6
  ## Build Status
5
7
  [![Build Status](https://travis-ci.org/JoshHadik/dynamic_text.svg?branch=master)](https://travis-ci.org/JoshHadik/dynamic_text)
6
8
 
@@ -25,32 +27,27 @@ $ gem install dynamic_text
25
27
 
26
28
  Dynamic Text allows you to do two main things:
27
29
 
28
- ### 1 - Render Editable Content Based on a Resource and Attribute
30
+ ### 1) Render editable content based on a resource and attribute
29
31
 
30
32
  With the dynamic_text gem, you can easily create a hybrid HTML element that acts as both the display text for a specific attribute of a resource, and the text box for updating that attribute.
31
33
 
32
34
  ```html
33
- <div>
34
- <%= editable_text_for(@article, :title) %>
35
- </div>
35
+ <%= editable_text_for(@article, :title) %>
36
36
  ```
37
37
 
38
- ### 2 - Render Dynamic Content that Updates In Real Time with Editable Content
38
+ ### 2) Render dynamic content that updates in real time with editable text
39
39
 
40
40
  You might not want all of the text for a specific attribute of a specific resource to be editable. For example, you might want to display the title for a blog post in both an 'h1' tag above the body of the post, as well as the navigation bar on the top of the screen.
41
41
 
42
-
43
42
  In this case, you might want the text to be editable when pressed on in the main article section of the page, but not in the header. However, you probably still want the text in the header to change in real time if a user edits the title from within the article section.
44
43
 
45
44
  You can use the following method to identify content that isn't editable but updates in real time when changes are made to the attribute of the resource somewhere else on the page.
46
45
 
47
46
  ```html
48
- <div>
49
- <%= dynamic_text_for(@article, :title) %>
50
- </div>
47
+ <%= dynamic_text_for(@article, :title) %>
51
48
  ```
52
49
 
53
- ### Why Does It Do It?
50
+ ## Why Does It Do It?
54
51
 
55
52
  Long ago, in the Wild West of software, the key ingredient for a successful app was functionality. Every idea was unique back then, and the potential of apps and websites was virtually untapped.
56
53
 
@@ -58,19 +55,7 @@ Nowadays, almost everything has been done. In order to gain an edge on competito
58
55
 
59
56
  I believe the days of pure CRUD apps in consumer facing applications are numbered, users no longer want to navigate through completely separate pages for specific actions on specific resources. Users want pages that provide information and actions for many different resources at once in an intuitive and easy-to-navigate manner (think 'dashboard' pages).
60
57
 
61
- This gem is built as a way to merge the 'edit' page and the 'show' page for a given resource, so users can update content in real time just by clicking on the text that displays that information.
62
-
63
- For example, you could use this gem to merge the display text and edit field for the title of a blog post, so the H1 tag on the show page merges with the <input type='text'> tag in the edit form, removing the necessity for a separate edit page to update that information.
64
-
65
-
66
- ### How Can You Use It?
67
-
68
- 1. Dynamic Text
69
- 2. Editable Text
70
-
71
- ### Configuration
72
-
73
- 1. AJAX
58
+ This gem is built as a way to merge the 'edit' page and the 'show' page for a given resource, so users can update content in real time just by clicking on the text that displays that information. For example, you could use this gem to merge the display text and edit field for the title of a blog post, so the H1 tag on the show page merges with the <input type='text'> tag in the edit form, removing the necessity for a separate edit page to update that information.
74
59
 
75
60
  ## License
76
61
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -3,7 +3,7 @@
3
3
  }
4
4
 
5
5
  .editable-text {
6
- cursor: url('/assets/dynamic_text/pencil.png'), pointer;
6
+ cursor: pointer;
7
7
  display: block;
8
8
  white-space: pre-line;
9
9
  position: relative;
@@ -20,3 +20,14 @@
20
20
  color: #878787;
21
21
  font-style: italic;
22
22
  }
23
+
24
+ // Default style (only works when enabled by developer)
25
+ .editable-text.dt-default-style:focus {
26
+ background-color: #f2f2f2;
27
+ border: 2px solid blue;
28
+ outline: none;
29
+ outline-width: 0;
30
+ line-height: 1.2;
31
+ // padding: 8px;
32
+ border-radius: 2px;
33
+ }
@@ -1,10 +1,12 @@
1
1
  module DynamicText
2
2
  module ViewHelper
3
+ # Render editable text view partial for attribute of resource
3
4
  def dynamic_text_for(resource, attribute, opts={})
4
5
  DynamicText::ViewRenderer.new(self)
5
6
  .render_dynamic_text_for(resource, attribute, opts)
6
7
  end
7
8
 
9
+ # Render editable text view partial for attribute of resource
8
10
  def editable_text_for(resource, attribute, opts={})
9
11
  DynamicText::ViewRenderer.new(self)
10
12
  .render_editable_text_for(resource, attribute, opts)
@@ -1,4 +1,4 @@
1
- <span class='dynamic-text'
1
+ <span class='dynamic-text <%= style_class %>'
2
2
  data-dynamic-tag='<%= dynamic_tag %>'>
3
3
  <%= value -%>
4
4
  </span>
@@ -1,6 +1,6 @@
1
1
  <span class='editable-text-container'>
2
2
  <%= content_tag(:span,
3
- class: 'editable-text',
3
+ class: "editable-text #{style_class}",
4
4
  contenteditable: true,
5
5
  placeholder: placeholder,
6
6
  data: { 'dynamic-tag': dynamic_tag }
@@ -3,9 +3,21 @@ class DynamicText::Configuration
3
3
 
4
4
  def initialize
5
5
  @resource_scope = nil
6
+ @use_default_style = false
6
7
  end
7
8
 
9
+ # Set a custom scope for the default resource path (in case your Rails app uses something other than the default path)
8
10
  def resource_scope=(resource_scope)
9
11
  @resource_scope = "/#{resource_scope}"
10
12
  end
13
+
14
+ # Use the dynamic text default style for editable text boxes
15
+ def use_default_style!
16
+ @use_default_style = true
17
+ end
18
+
19
+ # Check if using default style
20
+ def use_default_style?
21
+ return @use_default_style
22
+ end
11
23
  end
@@ -1,4 +1,5 @@
1
1
  class DynamicText::LocalsSetter
2
+ # Set all locals for dynamic text view partial based on passed in arguments
2
3
  def get_dynamic_locals(resource, attribute, opts={})
3
4
  locals.merge!(opts).tap do |locals|
4
5
  locals[:resource] = resource
@@ -10,20 +11,23 @@ class DynamicText::LocalsSetter
10
11
  locals[:resource_type] ||= default_resource_type
11
12
  locals[:resource_route] ||= default_resource_route
12
13
  locals[:dynamic_tag] ||= default_dynamic_tag
14
+ locals[:style_class] ||= default_style_class
13
15
  end
14
16
  end #PT
15
17
 
18
+ # Set all locals for editable text view partial based on passed in arguments
16
19
  def get_editable_locals(resource, attribute, opts={})
17
20
  get_dynamic_locals(resource, attribute, opts).tap do |locals|
18
21
  locals[:url] ||= default_url
19
22
  locals[:js_key] ||= default_js_key
23
+ locals[:style_class] ||= default_style_class
20
24
  end
21
25
  end #PT
22
26
 
23
27
  private
24
28
 
25
29
  # Defaults
26
-
30
+
27
31
  def default_resource_scope
28
32
  DynamicText.configuration.resource_scope
29
33
  end
@@ -52,6 +56,10 @@ class DynamicText::LocalsSetter
52
56
  get_locals(:resource_type, :attribute).join(":")
53
57
  end
54
58
 
59
+ def default_style_class
60
+ DynamicText.configuration.use_default_style? ? "dt-default-style" : ""
61
+ end
62
+
55
63
  # Helpers
56
64
 
57
65
  def locals
@@ -1,3 +1,3 @@
1
1
  module DynamicText
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -1698,3 +1698,723 @@ DynamicText::Test: test_truth
1698
1698
   (0.1ms) ROLLBACK
1699
1699
   (0.1ms) BEGIN
1700
1700
   (0.1ms) ROLLBACK
1701
+  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1702
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1703
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1704
+  (139.4ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1705
+  (377.4ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1706
+ SQL (3.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1707
+  (18.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1708
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1709
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1710
+  (3.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1711
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1712
+  (0.2ms) BEGIN
1713
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-08 22:32:21.612110"], ["updated_at", "2019-08-08 22:32:21.612110"]]
1714
+  (0.5ms) COMMIT
1715
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1716
+  (0.2ms) BEGIN
1717
+  (0.2ms) COMMIT
1718
+  (1.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1719
+  (0.2ms) BEGIN
1720
+  (0.2ms) ROLLBACK
1721
+  (0.1ms) BEGIN
1722
+  (0.2ms) ROLLBACK
1723
+  (0.1ms) BEGIN
1724
+  (0.1ms) ROLLBACK
1725
+  (0.1ms) BEGIN
1726
+  (0.1ms) ROLLBACK
1727
+  (0.1ms) BEGIN
1728
+  (0.1ms) ROLLBACK
1729
+  (0.1ms) BEGIN
1730
+  (0.1ms) ROLLBACK
1731
+  (0.1ms) BEGIN
1732
+  (0.1ms) ROLLBACK
1733
+  (0.1ms) BEGIN
1734
+  (0.1ms) ROLLBACK
1735
+  (0.1ms) BEGIN
1736
+  (0.1ms) ROLLBACK
1737
+  (0.1ms) BEGIN
1738
+  (0.1ms) ROLLBACK
1739
+  (0.1ms) BEGIN
1740
+  (0.1ms) ROLLBACK
1741
+  (0.1ms) BEGIN
1742
+  (0.1ms) ROLLBACK
1743
+  (0.1ms) BEGIN
1744
+  (0.1ms) ROLLBACK
1745
+  (0.1ms) BEGIN
1746
+  (0.1ms) ROLLBACK
1747
+  (0.1ms) BEGIN
1748
+  (0.1ms) ROLLBACK
1749
+  (0.1ms) BEGIN
1750
+  (0.1ms) ROLLBACK
1751
+  (0.1ms) BEGIN
1752
+  (0.1ms) ROLLBACK
1753
+  (0.1ms) BEGIN
1754
+  (0.1ms) ROLLBACK
1755
+  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1756
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1757
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1758
+  (133.8ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1759
+  (358.1ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1760
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1761
+  (7.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1762
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1763
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1764
+  (4.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1765
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1766
+  (0.1ms) BEGIN
1767
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:51:35.398116"], ["updated_at", "2019-08-10 21:51:35.398116"]]
1768
+  (0.4ms) COMMIT
1769
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1770
+  (0.2ms) BEGIN
1771
+  (0.1ms) COMMIT
1772
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1773
+  (0.2ms) BEGIN
1774
+  (0.2ms) ROLLBACK
1775
+  (0.1ms) BEGIN
1776
+  (0.2ms) ROLLBACK
1777
+  (0.1ms) BEGIN
1778
+  (0.1ms) ROLLBACK
1779
+  (0.1ms) BEGIN
1780
+  (0.1ms) ROLLBACK
1781
+  (0.1ms) BEGIN
1782
+  (0.1ms) ROLLBACK
1783
+  (0.1ms) BEGIN
1784
+  (0.1ms) ROLLBACK
1785
+  (0.1ms) BEGIN
1786
+  (0.1ms) ROLLBACK
1787
+  (0.1ms) BEGIN
1788
+  (0.1ms) ROLLBACK
1789
+  (0.1ms) BEGIN
1790
+  (0.1ms) ROLLBACK
1791
+  (0.1ms) BEGIN
1792
+  (0.1ms) ROLLBACK
1793
+  (0.1ms) BEGIN
1794
+  (0.1ms) ROLLBACK
1795
+  (0.1ms) BEGIN
1796
+  (0.1ms) ROLLBACK
1797
+  (0.1ms) BEGIN
1798
+  (0.1ms) ROLLBACK
1799
+  (0.1ms) BEGIN
1800
+  (0.2ms) ROLLBACK
1801
+  (0.1ms) BEGIN
1802
+  (0.1ms) ROLLBACK
1803
+  (0.1ms) BEGIN
1804
+  (0.1ms) ROLLBACK
1805
+  (0.1ms) BEGIN
1806
+  (0.1ms) ROLLBACK
1807
+  (0.1ms) BEGIN
1808
+  (0.1ms) ROLLBACK
1809
+  (0.1ms) BEGIN
1810
+  (0.1ms) ROLLBACK
1811
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1812
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1813
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1814
+  (135.1ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1815
+  (295.1ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1816
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1817
+  (6.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1818
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1819
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1820
+  (3.3ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1821
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1822
+  (0.1ms) BEGIN
1823
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:53:11.095249"], ["updated_at", "2019-08-10 21:53:11.095249"]]
1824
+  (0.4ms) COMMIT
1825
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1826
+  (0.1ms) BEGIN
1827
+  (0.1ms) COMMIT
1828
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1829
+  (0.2ms) BEGIN
1830
+  (0.1ms) ROLLBACK
1831
+  (0.1ms) BEGIN
1832
+  (0.1ms) ROLLBACK
1833
+  (0.1ms) BEGIN
1834
+  (0.1ms) ROLLBACK
1835
+  (0.1ms) BEGIN
1836
+  (0.1ms) ROLLBACK
1837
+  (0.1ms) BEGIN
1838
+  (0.1ms) ROLLBACK
1839
+  (0.1ms) BEGIN
1840
+  (0.1ms) ROLLBACK
1841
+  (0.1ms) BEGIN
1842
+  (0.1ms) ROLLBACK
1843
+  (0.1ms) BEGIN
1844
+  (0.1ms) ROLLBACK
1845
+  (0.1ms) BEGIN
1846
+  (0.1ms) ROLLBACK
1847
+  (0.1ms) BEGIN
1848
+  (0.1ms) ROLLBACK
1849
+  (0.1ms) BEGIN
1850
+  (0.1ms) ROLLBACK
1851
+  (0.1ms) BEGIN
1852
+  (0.1ms) ROLLBACK
1853
+  (0.1ms) BEGIN
1854
+  (0.1ms) ROLLBACK
1855
+  (20.0ms) BEGIN
1856
+  (0.2ms) ROLLBACK
1857
+  (0.1ms) BEGIN
1858
+  (0.1ms) ROLLBACK
1859
+  (0.1ms) BEGIN
1860
+  (0.1ms) ROLLBACK
1861
+  (0.1ms) BEGIN
1862
+  (0.1ms) ROLLBACK
1863
+  (0.1ms) BEGIN
1864
+  (0.1ms) ROLLBACK
1865
+  (0.1ms) BEGIN
1866
+  (0.1ms) ROLLBACK
1867
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1868
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1869
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1870
+  (133.9ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1871
+  (292.4ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1872
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1873
+  (7.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1874
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1875
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1876
+  (4.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1877
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1878
+  (0.1ms) BEGIN
1879
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:53:52.146820"], ["updated_at", "2019-08-10 21:53:52.146820"]]
1880
+  (0.4ms) COMMIT
1881
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1882
+  (0.3ms) BEGIN
1883
+  (0.1ms) COMMIT
1884
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1885
+  (0.2ms) BEGIN
1886
+  (0.1ms) ROLLBACK
1887
+  (0.1ms) BEGIN
1888
+  (0.1ms) ROLLBACK
1889
+  (0.1ms) BEGIN
1890
+  (0.1ms) ROLLBACK
1891
+  (0.1ms) BEGIN
1892
+  (0.1ms) ROLLBACK
1893
+  (0.1ms) BEGIN
1894
+  (0.1ms) ROLLBACK
1895
+  (0.1ms) BEGIN
1896
+  (0.1ms) ROLLBACK
1897
+  (0.1ms) BEGIN
1898
+  (0.1ms) ROLLBACK
1899
+  (0.1ms) BEGIN
1900
+  (0.1ms) ROLLBACK
1901
+  (0.1ms) BEGIN
1902
+  (0.1ms) ROLLBACK
1903
+  (0.1ms) BEGIN
1904
+  (0.1ms) ROLLBACK
1905
+  (0.1ms) BEGIN
1906
+  (0.1ms) ROLLBACK
1907
+  (0.1ms) BEGIN
1908
+  (0.1ms) ROLLBACK
1909
+  (0.1ms) BEGIN
1910
+  (0.1ms) ROLLBACK
1911
+  (0.2ms) BEGIN
1912
+  (0.1ms) ROLLBACK
1913
+  (0.1ms) BEGIN
1914
+  (0.1ms) ROLLBACK
1915
+  (0.1ms) BEGIN
1916
+  (0.1ms) ROLLBACK
1917
+  (0.1ms) BEGIN
1918
+  (0.1ms) ROLLBACK
1919
+  (0.1ms) BEGIN
1920
+  (0.1ms) ROLLBACK
1921
+  (0.1ms) BEGIN
1922
+  (0.1ms) ROLLBACK
1923
+  (0.1ms) BEGIN
1924
+  (0.2ms) ROLLBACK
1925
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1926
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1927
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1928
+  (133.8ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1929
+  (293.3ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1930
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1931
+  (8.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1932
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1933
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1934
+  (4.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1935
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1936
+  (0.1ms) BEGIN
1937
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:54:10.735037"], ["updated_at", "2019-08-10 21:54:10.735037"]]
1938
+  (0.5ms) COMMIT
1939
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1940
+  (0.1ms) BEGIN
1941
+  (0.1ms) COMMIT
1942
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1943
+  (0.2ms) BEGIN
1944
+  (0.1ms) ROLLBACK
1945
+  (0.1ms) BEGIN
1946
+  (0.1ms) ROLLBACK
1947
+  (0.1ms) BEGIN
1948
+  (0.1ms) ROLLBACK
1949
+  (0.1ms) BEGIN
1950
+  (0.1ms) ROLLBACK
1951
+  (0.1ms) BEGIN
1952
+  (0.1ms) ROLLBACK
1953
+  (0.1ms) BEGIN
1954
+  (0.1ms) ROLLBACK
1955
+  (0.1ms) BEGIN
1956
+  (0.1ms) ROLLBACK
1957
+  (0.1ms) BEGIN
1958
+  (0.1ms) ROLLBACK
1959
+  (0.1ms) BEGIN
1960
+  (0.1ms) ROLLBACK
1961
+  (0.1ms) BEGIN
1962
+  (0.1ms) ROLLBACK
1963
+  (0.1ms) BEGIN
1964
+  (0.1ms) ROLLBACK
1965
+  (0.1ms) BEGIN
1966
+  (0.1ms) ROLLBACK
1967
+  (0.1ms) BEGIN
1968
+  (0.2ms) ROLLBACK
1969
+  (0.1ms) BEGIN
1970
+  (0.1ms) ROLLBACK
1971
+  (0.1ms) BEGIN
1972
+  (0.1ms) ROLLBACK
1973
+  (0.1ms) BEGIN
1974
+  (0.1ms) ROLLBACK
1975
+  (0.1ms) BEGIN
1976
+  (0.1ms) ROLLBACK
1977
+  (0.1ms) BEGIN
1978
+  (0.1ms) ROLLBACK
1979
+  (0.1ms) BEGIN
1980
+  (0.1ms) ROLLBACK
1981
+  (0.1ms) BEGIN
1982
+  (0.1ms) ROLLBACK
1983
+  (0.1ms) BEGIN
1984
+  (0.1ms) ROLLBACK
1985
+  (0.1ms) BEGIN
1986
+  (0.1ms) ROLLBACK
1987
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1988
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1989
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1990
+  (135.5ms) DROP DATABASE IF EXISTS "dynamic_text_test"
1991
+  (291.8ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
1992
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1993
+  (7.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1994
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1995
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES (0)
1996
+  (3.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1997
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1998
+  (0.1ms) BEGIN
1999
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:54:32.322759"], ["updated_at", "2019-08-10 21:54:32.322759"]]
2000
+  (0.5ms) COMMIT
2001
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2002
+  (0.1ms) BEGIN
2003
+  (0.1ms) COMMIT
2004
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2005
+  (0.2ms) BEGIN
2006
+  (0.2ms) ROLLBACK
2007
+  (0.1ms) BEGIN
2008
+  (0.1ms) ROLLBACK
2009
+  (0.1ms) BEGIN
2010
+  (0.1ms) ROLLBACK
2011
+  (0.1ms) BEGIN
2012
+  (0.1ms) ROLLBACK
2013
+  (0.1ms) BEGIN
2014
+  (0.1ms) ROLLBACK
2015
+  (0.1ms) BEGIN
2016
+  (0.1ms) ROLLBACK
2017
+  (0.1ms) BEGIN
2018
+  (0.1ms) ROLLBACK
2019
+  (0.1ms) BEGIN
2020
+  (0.1ms) ROLLBACK
2021
+  (0.1ms) BEGIN
2022
+  (0.1ms) ROLLBACK
2023
+  (0.1ms) BEGIN
2024
+  (0.1ms) ROLLBACK
2025
+  (0.1ms) BEGIN
2026
+  (0.1ms) ROLLBACK
2027
+  (0.1ms) BEGIN
2028
+  (0.1ms) ROLLBACK
2029
+  (0.1ms) BEGIN
2030
+  (0.1ms) ROLLBACK
2031
+  (0.1ms) BEGIN
2032
+  (0.1ms) ROLLBACK
2033
+  (0.1ms) BEGIN
2034
+  (0.1ms) ROLLBACK
2035
+  (0.1ms) BEGIN
2036
+  (0.1ms) ROLLBACK
2037
+  (0.1ms) BEGIN
2038
+  (0.1ms) ROLLBACK
2039
+  (0.1ms) BEGIN
2040
+  (0.1ms) ROLLBACK
2041
+  (0.1ms) BEGIN
2042
+  (0.1ms) ROLLBACK
2043
+  (0.1ms) BEGIN
2044
+  (0.1ms) ROLLBACK
2045
+  (0.1ms) BEGIN
2046
+  (0.1ms) ROLLBACK
2047
+  (0.1ms) BEGIN
2048
+  (0.1ms) ROLLBACK
2049
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2050
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2051
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2052
+  (135.2ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2053
+  (298.4ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2054
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2055
+  (6.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2056
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2057
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2058
+  (3.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2059
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2060
+  (0.1ms) BEGIN
2061
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:55:32.494021"], ["updated_at", "2019-08-10 21:55:32.494021"]]
2062
+  (0.5ms) COMMIT
2063
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2064
+  (0.1ms) BEGIN
2065
+  (0.1ms) COMMIT
2066
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2067
+  (0.2ms) BEGIN
2068
+  (0.2ms) ROLLBACK
2069
+  (0.1ms) BEGIN
2070
+  (0.2ms) ROLLBACK
2071
+  (0.1ms) BEGIN
2072
+  (0.1ms) ROLLBACK
2073
+  (0.1ms) BEGIN
2074
+  (0.1ms) ROLLBACK
2075
+  (0.1ms) BEGIN
2076
+  (0.1ms) ROLLBACK
2077
+  (0.1ms) BEGIN
2078
+  (0.1ms) ROLLBACK
2079
+  (0.1ms) BEGIN
2080
+  (0.1ms) ROLLBACK
2081
+  (0.1ms) BEGIN
2082
+  (0.1ms) ROLLBACK
2083
+  (0.1ms) BEGIN
2084
+  (0.1ms) ROLLBACK
2085
+  (0.1ms) BEGIN
2086
+  (0.1ms) ROLLBACK
2087
+  (0.1ms) BEGIN
2088
+  (0.1ms) ROLLBACK
2089
+  (0.1ms) BEGIN
2090
+  (0.1ms) ROLLBACK
2091
+  (0.1ms) BEGIN
2092
+  (0.1ms) ROLLBACK
2093
+  (0.1ms) BEGIN
2094
+  (0.1ms) ROLLBACK
2095
+  (0.1ms) BEGIN
2096
+  (0.1ms) ROLLBACK
2097
+  (0.1ms) BEGIN
2098
+  (0.1ms) ROLLBACK
2099
+  (0.1ms) BEGIN
2100
+  (0.1ms) ROLLBACK
2101
+  (0.1ms) BEGIN
2102
+  (0.1ms) ROLLBACK
2103
+  (0.1ms) BEGIN
2104
+  (0.1ms) ROLLBACK
2105
+  (0.1ms) BEGIN
2106
+  (0.1ms) ROLLBACK
2107
+  (0.1ms) BEGIN
2108
+  (0.2ms) ROLLBACK
2109
+  (0.1ms) BEGIN
2110
+  (0.2ms) ROLLBACK
2111
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2112
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2113
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2114
+  (132.0ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2115
+  (295.6ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2116
+ SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2117
+  (8.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2118
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2119
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2120
+  (4.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2121
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2122
+  (0.1ms) BEGIN
2123
+ ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-10 21:55:44.095848"], ["updated_at", "2019-08-10 21:55:44.095848"]]
2124
+  (0.4ms) COMMIT
2125
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2126
+  (0.1ms) BEGIN
2127
+  (0.1ms) COMMIT
2128
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2129
+  (0.2ms) BEGIN
2130
+  (0.2ms) ROLLBACK
2131
+  (0.1ms) BEGIN
2132
+  (0.1ms) ROLLBACK
2133
+  (0.1ms) BEGIN
2134
+  (0.1ms) ROLLBACK
2135
+  (0.1ms) BEGIN
2136
+  (0.1ms) ROLLBACK
2137
+  (0.1ms) BEGIN
2138
+  (0.1ms) ROLLBACK
2139
+  (0.1ms) BEGIN
2140
+  (0.1ms) ROLLBACK
2141
+  (0.1ms) BEGIN
2142
+  (0.1ms) ROLLBACK
2143
+  (0.1ms) BEGIN
2144
+  (0.1ms) ROLLBACK
2145
+  (0.1ms) BEGIN
2146
+  (0.1ms) ROLLBACK
2147
+  (0.1ms) BEGIN
2148
+  (0.1ms) ROLLBACK
2149
+  (0.1ms) BEGIN
2150
+  (0.1ms) ROLLBACK
2151
+  (0.1ms) BEGIN
2152
+  (0.1ms) ROLLBACK
2153
+  (0.1ms) BEGIN
2154
+  (0.1ms) ROLLBACK
2155
+  (0.2ms) BEGIN
2156
+  (0.1ms) ROLLBACK
2157
+  (0.1ms) BEGIN
2158
+  (0.1ms) ROLLBACK
2159
+  (0.1ms) BEGIN
2160
+  (0.1ms) ROLLBACK
2161
+  (0.1ms) BEGIN
2162
+  (0.1ms) ROLLBACK
2163
+  (0.1ms) BEGIN
2164
+  (0.1ms) ROLLBACK
2165
+  (0.1ms) BEGIN
2166
+  (0.1ms) ROLLBACK
2167
+  (0.1ms) BEGIN
2168
+  (0.1ms) ROLLBACK
2169
+  (0.1ms) BEGIN
2170
+  (0.1ms) ROLLBACK
2171
+  (0.1ms) BEGIN
2172
+  (0.1ms) ROLLBACK
2173
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2174
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2175
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2176
+  (146.4ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2177
+  (362.9ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2178
+ SQL (2.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2179
+  (12.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2180
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2181
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2182
+  (3.4ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2183
+ ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2184
+  (0.2ms) BEGIN
2185
+ ActiveRecord::InternalMetadata Create (0.9ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-11 22:50:30.826941"], ["updated_at", "2019-08-11 22:50:30.826941"]]
2186
+  (0.4ms) COMMIT
2187
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2188
+  (0.1ms) BEGIN
2189
+  (0.1ms) COMMIT
2190
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2191
+  (0.2ms) BEGIN
2192
+  (0.2ms) ROLLBACK
2193
+  (0.1ms) BEGIN
2194
+  (0.2ms) ROLLBACK
2195
+  (0.1ms) BEGIN
2196
+  (0.1ms) ROLLBACK
2197
+  (0.1ms) BEGIN
2198
+  (0.1ms) ROLLBACK
2199
+  (0.1ms) BEGIN
2200
+  (0.1ms) ROLLBACK
2201
+  (0.1ms) BEGIN
2202
+  (0.1ms) ROLLBACK
2203
+  (0.1ms) BEGIN
2204
+  (0.1ms) ROLLBACK
2205
+  (0.1ms) BEGIN
2206
+  (0.1ms) ROLLBACK
2207
+  (0.1ms) BEGIN
2208
+  (0.1ms) ROLLBACK
2209
+  (0.1ms) BEGIN
2210
+  (0.1ms) ROLLBACK
2211
+  (0.1ms) BEGIN
2212
+  (0.1ms) ROLLBACK
2213
+  (0.1ms) BEGIN
2214
+  (0.1ms) ROLLBACK
2215
+  (0.1ms) BEGIN
2216
+  (0.2ms) ROLLBACK
2217
+  (0.1ms) BEGIN
2218
+  (0.1ms) ROLLBACK
2219
+  (0.1ms) BEGIN
2220
+  (0.1ms) ROLLBACK
2221
+  (0.1ms) BEGIN
2222
+  (0.1ms) ROLLBACK
2223
+  (0.1ms) BEGIN
2224
+  (0.1ms) ROLLBACK
2225
+  (0.1ms) BEGIN
2226
+  (0.1ms) ROLLBACK
2227
+  (0.2ms) BEGIN
2228
+  (0.1ms) ROLLBACK
2229
+  (0.1ms) BEGIN
2230
+  (0.1ms) ROLLBACK
2231
+  (0.1ms) BEGIN
2232
+  (0.1ms) ROLLBACK
2233
+  (0.1ms) BEGIN
2234
+  (0.1ms) ROLLBACK
2235
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2236
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2237
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2238
+  (130.5ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2239
+  (328.4ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2240
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2241
+  (7.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2242
+  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2243
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2244
+  (4.2ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2245
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2246
+  (0.1ms) BEGIN
2247
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-11 22:55:16.992817"], ["updated_at", "2019-08-11 22:55:16.992817"]]
2248
+  (0.4ms) COMMIT
2249
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2250
+  (0.1ms) BEGIN
2251
+  (0.1ms) COMMIT
2252
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2253
+  (0.2ms) BEGIN
2254
+  (0.2ms) ROLLBACK
2255
+  (0.1ms) BEGIN
2256
+  (0.1ms) ROLLBACK
2257
+  (0.1ms) BEGIN
2258
+  (0.1ms) ROLLBACK
2259
+  (0.1ms) BEGIN
2260
+  (0.1ms) ROLLBACK
2261
+  (0.1ms) BEGIN
2262
+  (0.1ms) ROLLBACK
2263
+  (0.1ms) BEGIN
2264
+  (0.1ms) ROLLBACK
2265
+  (0.1ms) BEGIN
2266
+  (0.1ms) ROLLBACK
2267
+  (0.1ms) BEGIN
2268
+  (0.1ms) ROLLBACK
2269
+  (0.1ms) BEGIN
2270
+  (0.1ms) ROLLBACK
2271
+  (0.1ms) BEGIN
2272
+  (0.1ms) ROLLBACK
2273
+  (0.1ms) BEGIN
2274
+  (0.1ms) ROLLBACK
2275
+  (0.1ms) BEGIN
2276
+  (0.1ms) ROLLBACK
2277
+  (0.1ms) BEGIN
2278
+  (0.2ms) ROLLBACK
2279
+  (0.1ms) BEGIN
2280
+  (0.1ms) ROLLBACK
2281
+  (0.1ms) BEGIN
2282
+  (0.1ms) ROLLBACK
2283
+  (0.1ms) BEGIN
2284
+  (0.1ms) ROLLBACK
2285
+  (0.1ms) BEGIN
2286
+  (0.1ms) ROLLBACK
2287
+  (0.1ms) BEGIN
2288
+  (0.1ms) ROLLBACK
2289
+  (0.1ms) BEGIN
2290
+  (0.1ms) ROLLBACK
2291
+  (0.1ms) BEGIN
2292
+  (0.1ms) ROLLBACK
2293
+  (0.1ms) BEGIN
2294
+  (0.1ms) ROLLBACK
2295
+  (0.1ms) BEGIN
2296
+  (0.1ms) ROLLBACK
2297
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2298
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2299
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2300
+  (132.3ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2301
+  (403.0ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2302
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2303
+  (9.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2304
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2305
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2306
+  (4.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2307
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2308
+  (0.2ms) BEGIN
2309
+ ActiveRecord::InternalMetadata Create (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-11 23:39:16.796749"], ["updated_at", "2019-08-11 23:39:16.796749"]]
2310
+  (0.4ms) COMMIT
2311
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2312
+  (0.2ms) BEGIN
2313
+  (0.1ms) COMMIT
2314
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2315
+  (0.3ms) BEGIN
2316
+  (0.3ms) ROLLBACK
2317
+  (0.1ms) BEGIN
2318
+  (0.2ms) ROLLBACK
2319
+  (0.1ms) BEGIN
2320
+  (0.2ms) ROLLBACK
2321
+  (0.1ms) BEGIN
2322
+  (0.1ms) ROLLBACK
2323
+  (0.1ms) BEGIN
2324
+  (0.2ms) ROLLBACK
2325
+  (0.1ms) BEGIN
2326
+  (0.1ms) ROLLBACK
2327
+  (0.1ms) BEGIN
2328
+  (0.1ms) ROLLBACK
2329
+  (0.1ms) BEGIN
2330
+  (0.1ms) ROLLBACK
2331
+  (0.1ms) BEGIN
2332
+  (0.1ms) ROLLBACK
2333
+  (0.1ms) BEGIN
2334
+  (0.1ms) ROLLBACK
2335
+  (0.1ms) BEGIN
2336
+  (0.1ms) ROLLBACK
2337
+  (0.1ms) BEGIN
2338
+  (0.2ms) ROLLBACK
2339
+  (0.1ms) BEGIN
2340
+  (0.2ms) ROLLBACK
2341
+  (0.1ms) BEGIN
2342
+  (0.1ms) ROLLBACK
2343
+  (0.1ms) BEGIN
2344
+  (0.1ms) ROLLBACK
2345
+  (0.1ms) BEGIN
2346
+  (0.1ms) ROLLBACK
2347
+  (0.1ms) BEGIN
2348
+  (0.1ms) ROLLBACK
2349
+  (0.1ms) BEGIN
2350
+  (0.1ms) ROLLBACK
2351
+  (0.1ms) BEGIN
2352
+  (0.2ms) ROLLBACK
2353
+  (0.1ms) BEGIN
2354
+  (0.1ms) ROLLBACK
2355
+  (0.1ms) BEGIN
2356
+  (0.1ms) ROLLBACK
2357
+  (0.1ms) BEGIN
2358
+  (0.1ms) ROLLBACK
2359
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2360
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2361
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2362
+  (133.3ms) DROP DATABASE IF EXISTS "dynamic_text_test"
2363
+  (275.4ms) CREATE DATABASE "dynamic_text_test" ENCODING = 'unicode'
2364
+ SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2365
+  (11.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2366
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2367
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES (0)
2368
+  (4.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2369
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2370
+  (0.2ms) BEGIN
2371
+ ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "test"], ["created_at", "2019-08-11 23:41:52.767420"], ["updated_at", "2019-08-11 23:41:52.767420"]]
2372
+  (0.4ms) COMMIT
2373
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2374
+  (0.1ms) BEGIN
2375
+  (0.1ms) COMMIT
2376
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2377
+  (0.2ms) BEGIN
2378
+  (0.2ms) ROLLBACK
2379
+  (0.1ms) BEGIN
2380
+  (0.1ms) ROLLBACK
2381
+  (0.1ms) BEGIN
2382
+  (0.1ms) ROLLBACK
2383
+  (0.1ms) BEGIN
2384
+  (0.1ms) ROLLBACK
2385
+  (0.1ms) BEGIN
2386
+  (0.1ms) ROLLBACK
2387
+  (0.1ms) BEGIN
2388
+  (0.1ms) ROLLBACK
2389
+  (0.1ms) BEGIN
2390
+  (0.1ms) ROLLBACK
2391
+  (0.1ms) BEGIN
2392
+  (0.1ms) ROLLBACK
2393
+  (0.1ms) BEGIN
2394
+  (0.1ms) ROLLBACK
2395
+  (0.1ms) BEGIN
2396
+  (0.1ms) ROLLBACK
2397
+  (0.1ms) BEGIN
2398
+  (0.2ms) ROLLBACK
2399
+  (0.1ms) BEGIN
2400
+  (0.1ms) ROLLBACK
2401
+  (0.1ms) BEGIN
2402
+  (0.1ms) ROLLBACK
2403
+  (0.2ms) BEGIN
2404
+  (0.1ms) ROLLBACK
2405
+  (0.2ms) BEGIN
2406
+  (0.2ms) ROLLBACK
2407
+  (0.1ms) BEGIN
2408
+  (0.1ms) ROLLBACK
2409
+  (0.1ms) BEGIN
2410
+  (0.1ms) ROLLBACK
2411
+  (0.1ms) BEGIN
2412
+  (0.1ms) ROLLBACK
2413
+  (0.2ms) BEGIN
2414
+  (0.2ms) ROLLBACK
2415
+  (0.1ms) BEGIN
2416
+  (0.1ms) ROLLBACK
2417
+  (0.1ms) BEGIN
2418
+  (0.1ms) ROLLBACK
2419
+  (0.1ms) BEGIN
2420
+  (0.1ms) ROLLBACK
@@ -21,6 +21,11 @@ RSpec.describe DynamicText::LocalsSetter do
21
21
  Resource.new(attribute_value)
22
22
  end
23
23
 
24
+ # Reset the configuration after each test is run
25
+ after(:each) do
26
+ DynamicText.reset!
27
+ end
28
+
24
29
  describe '#get_dynamic_locals' do
25
30
  it 'returns a hash with :resource set to the first parameter' do
26
31
  output = subject.get_dynamic_locals(resource, :attribute)
@@ -57,6 +62,17 @@ RSpec.describe DynamicText::LocalsSetter do
57
62
  output = subject.get_dynamic_locals(resource, :attribute)
58
63
  expect(output[:dynamic_tag]).to eq("resource:#{resource.id}:attribute")
59
64
  end
65
+
66
+ it 'returns a hash with :style_class defaulted to an empty string' do
67
+ output = subject.get_dynamic_locals(resource, :attribute)
68
+ expect(output[:style_class]).to eq("")
69
+ end
70
+
71
+ it 'returns a hash with :style_class defaulted to dt-default-style when configuration was set to use_default_style' do
72
+ DynamicText.configuration.use_default_style!
73
+ output = subject.get_dynamic_locals(resource, :attribute)
74
+ expect(output[:style_class]).to eq("dt-default-style")
75
+ end
60
76
  end
61
77
 
62
78
  describe '#get_editable_locals' do
@@ -110,5 +126,16 @@ RSpec.describe DynamicText::LocalsSetter do
110
126
  output = subject.get_editable_locals(resource, :attribute)
111
127
  expect(output[:js_key]).to eq("resource:attribute")
112
128
  end
129
+
130
+ it 'returns a hash with :style_class defaulted to an empty string' do
131
+ output = subject.get_editable_locals(resource, :attribute)
132
+ expect(output[:style_class]).to eq("")
133
+ end
134
+
135
+ it 'returns a hash with :style_class defaulted to dt-default-style when configuration was set to use_default_style' do
136
+ DynamicText.configuration.use_default_style!
137
+ output = subject.get_editable_locals(resource, :attribute)
138
+ expect(output[:style_class]).to eq("dt-default-style")
139
+ end
113
140
  end
114
141
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Hadik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-11 00:00:00.000000000 Z
11
+ date: 2019-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -216,68 +216,69 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  - !ruby/object:Gem::Version
217
217
  version: '0'
218
218
  requirements: []
219
- rubygems_version: 3.0.2
219
+ rubyforge_project:
220
+ rubygems_version: 2.7.7
220
221
  signing_key:
221
222
  specification_version: 4
222
223
  summary: A light-weight gem for adding content editable text to a rails project.
223
224
  test_files:
224
- - spec/dummy/config/application.rb
225
- - spec/dummy/config/environments/production.rb
226
- - spec/dummy/config/environments/development.rb
227
- - spec/dummy/config/environments/test.rb
228
- - spec/dummy/config/initializers/inflections.rb
229
- - spec/dummy/config/initializers/application_controller_renderer.rb
230
- - spec/dummy/config/initializers/wrap_parameters.rb
231
- - spec/dummy/config/initializers/cookies_serializer.rb
232
- - spec/dummy/config/initializers/assets.rb
233
- - spec/dummy/config/initializers/mime_types.rb
234
- - spec/dummy/config/initializers/filter_parameter_logging.rb
235
- - spec/dummy/config/initializers/content_security_policy.rb
236
- - spec/dummy/config/initializers/backtrace_silencers.rb
237
- - spec/dummy/config/locales/en.yml
238
- - spec/dummy/config/routes.rb
239
- - spec/dummy/config/puma.rb
240
- - spec/dummy/config/environment.rb
241
- - spec/dummy/config/boot.rb
242
- - spec/dummy/config/spring.rb
243
- - spec/dummy/config/storage.yml
244
- - spec/dummy/config/cable.yml
245
- - spec/dummy/config/database.yml
246
- - spec/dummy/Rakefile
247
- - spec/dummy/bin/bundle
248
- - spec/dummy/bin/setup
249
- - spec/dummy/bin/rails
250
- - spec/dummy/bin/update
251
- - spec/dummy/bin/rake
252
- - spec/dummy/bin/yarn
253
- - spec/dummy/db/schema.rb
254
- - spec/dummy/public/apple-touch-icon.png
255
- - spec/dummy/public/500.html
256
- - spec/dummy/public/422.html
257
- - spec/dummy/public/404.html
258
- - spec/dummy/public/apple-touch-icon-precomposed.png
259
- - spec/dummy/public/favicon.ico
260
- - spec/dummy/package.json
261
- - spec/dummy/app/jobs/application_job.rb
225
+ - spec/spec_helper.rb
262
226
  - spec/dummy/app/mailers/application_mailer.rb
263
- - spec/dummy/app/models/application_record.rb
264
- - spec/dummy/app/channels/application_cable/channel.rb
265
227
  - spec/dummy/app/channels/application_cable/connection.rb
266
- - spec/dummy/app/assets/stylesheets/application.css
267
- - spec/dummy/app/assets/config/manifest.js
268
- - spec/dummy/app/assets/javascripts/cable.js
269
- - spec/dummy/app/assets/javascripts/application.js
228
+ - spec/dummy/app/channels/application_cable/channel.rb
270
229
  - spec/dummy/app/views/layouts/application.html.erb
271
- - spec/dummy/app/views/layouts/mailer.html.erb
272
230
  - spec/dummy/app/views/layouts/mailer.text.erb
273
- - spec/dummy/app/controllers/application_controller.rb
231
+ - spec/dummy/app/views/layouts/mailer.html.erb
232
+ - spec/dummy/app/jobs/application_job.rb
233
+ - spec/dummy/app/models/application_record.rb
274
234
  - spec/dummy/app/helpers/application_helper.rb
235
+ - spec/dummy/app/assets/javascripts/application.js
236
+ - spec/dummy/app/assets/javascripts/cable.js
237
+ - spec/dummy/app/assets/stylesheets/application.css
238
+ - spec/dummy/app/assets/config/manifest.js
239
+ - spec/dummy/app/controllers/application_controller.rb
275
240
  - spec/dummy/log/test.log
276
241
  - spec/dummy/log/development.log
242
+ - spec/dummy/Rakefile
243
+ - spec/dummy/bin/yarn
244
+ - spec/dummy/bin/update
245
+ - spec/dummy/bin/rake
246
+ - spec/dummy/bin/bundle
247
+ - spec/dummy/bin/rails
248
+ - spec/dummy/bin/setup
249
+ - spec/dummy/public/404.html
250
+ - spec/dummy/public/500.html
251
+ - spec/dummy/public/apple-touch-icon-precomposed.png
252
+ - spec/dummy/public/422.html
253
+ - spec/dummy/public/apple-touch-icon.png
254
+ - spec/dummy/public/favicon.ico
277
255
  - spec/dummy/config.ru
278
- - spec/rails_helper.rb
279
- - spec/integration/navigation_test.rb
280
- - spec/spec_helper.rb
281
- - spec/helpers/view_helper_spec.rb
256
+ - spec/dummy/db/schema.rb
257
+ - spec/dummy/config/routes.rb
258
+ - spec/dummy/config/environment.rb
259
+ - spec/dummy/config/spring.rb
260
+ - spec/dummy/config/cable.yml
261
+ - spec/dummy/config/application.rb
262
+ - spec/dummy/config/boot.rb
263
+ - spec/dummy/config/environments/test.rb
264
+ - spec/dummy/config/environments/development.rb
265
+ - spec/dummy/config/environments/production.rb
266
+ - spec/dummy/config/locales/en.yml
267
+ - spec/dummy/config/storage.yml
268
+ - spec/dummy/config/puma.rb
269
+ - spec/dummy/config/initializers/wrap_parameters.rb
270
+ - spec/dummy/config/initializers/content_security_policy.rb
271
+ - spec/dummy/config/initializers/mime_types.rb
272
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
273
+ - spec/dummy/config/initializers/assets.rb
274
+ - spec/dummy/config/initializers/application_controller_renderer.rb
275
+ - spec/dummy/config/initializers/inflections.rb
276
+ - spec/dummy/config/initializers/cookies_serializer.rb
277
+ - spec/dummy/config/initializers/backtrace_silencers.rb
278
+ - spec/dummy/config/database.yml
279
+ - spec/dummy/package.json
282
280
  - spec/lib/locals_setter_spec.rb
283
281
  - spec/lib/view_renderer.rb
282
+ - spec/integration/navigation_test.rb
283
+ - spec/helpers/view_helper_spec.rb
284
+ - spec/rails_helper.rb