formie 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3a2d8174e39897137b232898c15b85b4c57ff3a
4
- data.tar.gz: 68bac9a4e35ca0f4bf7599f48fa6173bbe3363f6
3
+ metadata.gz: 474f1b2a111d1933ae5c8c35199739089a6ec3c8
4
+ data.tar.gz: 453cadb69cd50e2d1432a04207efefc5bfe227ac
5
5
  SHA512:
6
- metadata.gz: 2c08fc6dab733537406aff4303e07939762cf347a15331c994dee16c0058c7441e9fd817569a9c83d24a023d80d91de718344481323ea1007f4cd9c3add84de8
7
- data.tar.gz: 06b66fc01c0292104b44ff1e76606a3cd5fde3cdfb63b498bdc8609ed3a054b43aad13f4264b406721efe5fb4cae44dd228caefd290bd4b9264ec3b2832482c6
6
+ metadata.gz: 175bcf690ad0f4c2fcb844130838345a889a6468af55c0707bd1c60ded48e12c3ef68d08558169b241e9bdfe75bb8e57bc4537906831d3db2ee5fa67c3ba3691
7
+ data.tar.gz: d7439d5e5be5bb156ae43edcc8d04e4468cf3b9d35524adb45ed9fa2442056e7629eeb2e74db8c4a2290b08ca9672937c53864a6989cd97070c6ff931f6481fd
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Formie
2
2
  ======
3
3
 
4
- [![Gem Version](https://badge.fury.io/rb/formie.png)](http://badge.fury.io/rb/formie)
4
+ [![Gem Version](https://badge.fury.io/rb/formie.svg)](https://badge.fury.io/rb/formie)
5
5
  [![Build Status](https://travis-ci.org/matique/formie.png?branch=master)](https://travis-ci.org/matique/formie)
6
6
 
7
7
  Tired of programming each HTML tag? Are you in search of DRYness for Rails
@@ -42,13 +42,15 @@ Templates for Formie are hosted in:
42
42
  Inside a formie the following locals (as delivered by the
43
43
  controller) are available:
44
44
 
45
- - action_name
46
- - args remainings after extracting options/locals
47
- - block block passed to the formie
48
- - controller_name
49
- - form (available inside form_for (similar to fields_for))
50
- - form.object
51
- - params
45
+ |Name | Description
46
+ | --- | ---
47
+ | action_name
48
+ | args | remainings after extracting options/locals
49
+ | block | block passed to the formie
50
+ | controller_name
51
+ | form | (available inside form_for (similar to fields_for))
52
+ | form.object
53
+ | params
52
54
 
53
55
  Locals are passed in a hash.
54
56
  The controller attributes are available as usual.
@@ -1,3 +1,3 @@
1
1
  module Formie
2
- VERSION = '0.8.0'
2
+ VERSION = '0.8.2'
3
3
  end
@@ -0,0 +1,3 @@
1
+ module Formie
2
+ VERSION = '0.8.1'
3
+ end
data/lib/formie.rb.bak ADDED
@@ -0,0 +1,67 @@
1
+ require 'formie/engine.rb'
2
+
3
+ module Formie
4
+
5
+ def self.reload
6
+ now = Time.now
7
+ @last_update ||= Time.new(0)
8
+ self.load_formies(::ActionView::Helpers::FormBuilder, 'app/formies/forms')
9
+ self.load_formies(::ActionView::Helpers::TextHelper, 'app/formies/application')
10
+ self.load_formies(::ActionView::Helpers::TextHelper, 'app/formies/templates')
11
+ @last_update = now
12
+ end
13
+
14
+ def self.define_formie(where, name, path)
15
+ formiename = name
16
+
17
+ where.send(:define_method, formiename, lambda {|*args, &block|
18
+ #p "** called #{where} #{formiename}", args, block
19
+ params = args.extract_options!
20
+ options = {}
21
+ options[:file] = path
22
+ options[:locals] = {}
23
+ options[:locals].update params
24
+ options[:locals].update :formiename => formiename,
25
+ :block => block, :form => self, :args => args
26
+ p [11, options]
27
+ defined?(controller) == 'method' ?
28
+ controller.render_to_body(options) :
29
+ @template.render(options)
30
+ })
31
+ #p "** defined #{where} #{formiename}"
32
+ end
33
+
34
+
35
+ private
36
+ def self.load_formies(where, dir)
37
+ dir = "#{::Rails.root.to_s}/#{dir}"
38
+ return unless File.exists?(dir)
39
+ Dir.chdir(dir) {|current_dir|
40
+ hsh = {}
41
+ Dir.glob('**/**').sort.each { |path|
42
+ base = File.basename(path).split('.').first
43
+ hsh[base] = path unless hsh[base]
44
+ }
45
+ hsh.each { |name, path|
46
+ next if File.new(path).mtime < @last_update
47
+
48
+ x = File.expand_path(File.dirname(path))
49
+ where.define_formie name, File.join(x, name)
50
+ }
51
+ }
52
+ end
53
+
54
+ end
55
+
56
+
57
+ module ActionView::Helpers::TextHelper
58
+ def self.define_formie(name, txt)
59
+ Formie.define_formie(self, name, txt)
60
+ end
61
+ end
62
+
63
+ class ActionView::Helpers::FormBuilder
64
+ def self.define_formie(name, txt)
65
+ Formie.define_formie(self, name, txt)
66
+ end
67
+ end
Binary file
@@ -0,0 +1,310 @@
1
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
+ SQL (131.5ms) DELETE FROM "orders"
3
+  (0.1ms) begin transaction
4
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:17:15.764914"], ["updated_at", "2016-12-23 21:17:15.764914"]]
5
+  (110.8ms) commit transaction
6
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:17:15 +0100
7
+ Processing by OrdersController#new as HTML
8
+ Rendered app/formies/forms/builtins.html.erb (0.6ms)
9
+ Rendered orders/_new.html.erb (2.7ms)
10
+ Rendered orders/new.html.erb within layouts/application (6.4ms)
11
+ Completed 200 OK in 127ms (Views: 126.3ms | ActiveRecord: 0.0ms)
12
+ SQL (109.7ms) DELETE FROM "orders"
13
+  (0.1ms) begin transaction
14
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:17:16.164550"], ["updated_at", "2016-12-23 21:17:16.164550"]]
15
+  (114.8ms) commit transaction
16
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:17:16 +0100
17
+ Processing by OrdersController#index as HTML
18
+ Rendered app/formies/application/copyright.html.erb (0.7ms)
19
+ Rendered app/formies/templates/labelled.html.erb (0.3ms)
20
+ Rendered app/formies/templates/l_text_field.html.erb (3.4ms)
21
+ Rendered orders/index.html.erb within layouts/application (12.7ms)
22
+ Completed 200 OK in 15ms (Views: 14.4ms | ActiveRecord: 0.0ms)
23
+ SQL (115.6ms) DELETE FROM "orders"
24
+  (0.1ms) begin transaction
25
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:17:16.415971"], ["updated_at", "2016-12-23 21:17:16.415971"]]
26
+  (116.1ms) commit transaction
27
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
28
+ Started GET "/orders/160" for 127.0.0.1 at 2016-12-23 22:17:16 +0100
29
+ Processing by OrdersController#show as HTML
30
+ Parameters: {"id"=>"160"}
31
+  (0.1ms) begin transaction
32
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:17:16.539032"], ["updated_at", "2016-12-23 21:17:16.539032"]]
33
+  (118.7ms) commit transaction
34
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 160]]
35
+ Rendered app/formies/forms/l_text_field.html.erb (10.0ms)
36
+ Rendered app/formies/forms/l_text_field.html.erb (0.5ms)
37
+ Rendered app/formies/templates/hello.slim (11.9ms)
38
+ Rendered orders/_form.html.erb (26.3ms)
39
+ Rendered orders/show.html.erb within layouts/application (27.5ms)
40
+ Completed 200 OK in 157ms (Views: 29.0ms | ActiveRecord: 119.3ms)
41
+  (0.1ms) begin transaction
42
+ ----------------------------------------------------
43
+ OrdersControllerTest: test_checking_formie_copyright
44
+ ----------------------------------------------------
45
+ Processing by OrdersController#index as HTML
46
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
47
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
48
+ Rendered app/formies/templates/l_text_field.html.erb (0.4ms)
49
+ Rendered orders/index.html.erb within layouts/application (1.1ms)
50
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
51
+  (0.1ms) rollback transaction
52
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
53
+  (0.1ms) begin transaction
54
+ ----------------------------------------------------
55
+ OrdersControllerTest: test_checking_formie_copyright
56
+ ----------------------------------------------------
57
+ Processing by OrdersController#index as HTML
58
+ Order Load (0.2ms) SELECT "orders".* FROM "orders"
59
+ Rendered app/formies/application/copyright.html.erb (0.7ms)
60
+ Rendered app/formies/templates/labelled.html.erb (0.9ms)
61
+ Rendered app/formies/templates/l_text_field.html.erb (54.4ms)
62
+ Rendered orders/index.html.erb within layouts/application (94.5ms)
63
+ Completed 200 OK in 250ms (Views: 247.9ms | ActiveRecord: 0.4ms)
64
+  (0.1ms) rollback transaction
65
+ SQL (161.4ms) DELETE FROM "orders"
66
+  (0.1ms) begin transaction
67
+ SQL (0.4ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:20:57.232247"], ["updated_at", "2016-12-23 21:20:57.232247"]]
68
+  (118.2ms) commit transaction
69
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:20:57 +0100
70
+ Processing by OrdersController#new as HTML
71
+ Rendered app/formies/forms/builtins.html.erb (1.2ms)
72
+ Rendered orders/_new.html.erb (23.9ms)
73
+ Rendered orders/new.html.erb within layouts/application (30.1ms)
74
+ Completed 200 OK in 33ms (Views: 32.3ms | ActiveRecord: 0.0ms)
75
+ SQL (111.4ms) DELETE FROM "orders"
76
+  (0.1ms) begin transaction
77
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:20:57.515569"], ["updated_at", "2016-12-23 21:20:57.515569"]]
78
+  (106.5ms) commit transaction
79
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:20:57 +0100
80
+ Processing by OrdersController#index as HTML
81
+ Order Load (0.3ms) SELECT "orders".* FROM "orders"
82
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
83
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
84
+ Rendered app/formies/templates/l_text_field.html.erb (94.4ms)
85
+ Rendered orders/index.html.erb within layouts/application (222.9ms)
86
+ Completed 200 OK in 226ms (Views: 224.9ms | ActiveRecord: 0.3ms)
87
+ SQL (103.3ms) DELETE FROM "orders"
88
+  (0.1ms) begin transaction
89
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:20:57.958873"], ["updated_at", "2016-12-23 21:20:57.958873"]]
90
+  (114.8ms) commit transaction
91
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
92
+ Started GET "/orders/164" for 127.0.0.1 at 2016-12-23 22:20:58 +0100
93
+ Processing by OrdersController#show as HTML
94
+ Parameters: {"id"=>"164"}
95
+  (0.1ms) begin transaction
96
+ SQL (0.3ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:20:58.080779"], ["updated_at", "2016-12-23 21:20:58.080779"]]
97
+  (118.6ms) commit transaction
98
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 164]]
99
+ Rendered app/formies/forms/l_text_field.html.erb (19.3ms)
100
+ Rendered app/formies/forms/l_text_field.html.erb (1.2ms)
101
+ Rendered app/formies/templates/hello.slim (25.0ms)
102
+ Rendered orders/_form.html.erb (311.8ms)
103
+ Rendered orders/show.html.erb within layouts/application (314.0ms)
104
+ Completed 200 OK in 444ms (Views: 316.2ms | ActiveRecord: 119.3ms)
105
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
106
+ SQL (157.8ms) DELETE FROM "orders"
107
+  (0.1ms) begin transaction
108
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:16.284960"], ["updated_at", "2016-12-23 21:22:16.284960"]]
109
+  (130.5ms) commit transaction
110
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:22:16 +0100
111
+ Processing by OrdersController#new as HTML
112
+ Rendered app/formies/forms/builtins.html.erb (0.6ms)
113
+ Rendered orders/_new.html.erb (2.5ms)
114
+ Rendered orders/new.html.erb within layouts/application (6.1ms)
115
+ Completed 200 OK in 127ms (Views: 126.7ms | ActiveRecord: 0.0ms)
116
+ SQL (130.5ms) DELETE FROM "orders"
117
+  (0.1ms) begin transaction
118
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:16.719660"], ["updated_at", "2016-12-23 21:22:16.719660"]]
119
+  (114.7ms) commit transaction
120
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:22:16 +0100
121
+ Processing by OrdersController#index as HTML
122
+ Rendered app/formies/application/copyright.html.erb (0.7ms)
123
+ Rendered app/formies/templates/labelled.html.erb (0.3ms)
124
+ Rendered app/formies/templates/l_text_field.html.erb (2.2ms)
125
+ Rendered orders/index.html.erb within layouts/application (9.6ms)
126
+ Completed 200 OK in 12ms (Views: 11.3ms | ActiveRecord: 0.0ms)
127
+ SQL (110.7ms) DELETE FROM "orders"
128
+  (0.1ms) begin transaction
129
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:16.962861"], ["updated_at", "2016-12-23 21:22:16.962861"]]
130
+  (106.5ms) commit transaction
131
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
132
+ Started GET "/orders/168" for 127.0.0.1 at 2016-12-23 22:22:17 +0100
133
+ Processing by OrdersController#show as HTML
134
+ Parameters: {"id"=>"168"}
135
+  (0.1ms) begin transaction
136
+ SQL (0.3ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:22:17.076327"], ["updated_at", "2016-12-23 21:22:17.076327"]]
137
+  (111.7ms) commit transaction
138
+ Order Load (0.2ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 168]]
139
+ Rendered app/formies/forms/l_text_field.html.erb (10.0ms)
140
+ Rendered app/formies/forms/l_text_field.html.erb (0.5ms)
141
+ Rendered app/formies/templates/hello.slim (11.8ms)
142
+ Rendered orders/_form.html.erb (26.2ms)
143
+ Rendered orders/show.html.erb within layouts/application (27.3ms)
144
+ Completed 200 OK in 149ms (Views: 28.6ms | ActiveRecord: 112.3ms)
145
+  (0.1ms) begin transaction
146
+ ----------------------------------------------------
147
+ OrdersControllerTest: test_checking_formie_copyright
148
+ ----------------------------------------------------
149
+ Processing by OrdersController#index as HTML
150
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
151
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
152
+ Rendered app/formies/templates/l_text_field.html.erb (0.4ms)
153
+ Rendered orders/index.html.erb within layouts/application (1.1ms)
154
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
155
+  (0.1ms) rollback transaction
156
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
157
+ SQL (131.5ms) DELETE FROM "orders"
158
+  (0.1ms) begin transaction
159
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:37.958237"], ["updated_at", "2016-12-23 21:22:37.958237"]]
160
+  (115.1ms) commit transaction
161
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:22:38 +0100
162
+ Processing by OrdersController#new as HTML
163
+ Rendered app/formies/forms/builtins.html.erb (0.6ms)
164
+ Rendered orders/_new.html.erb (2.4ms)
165
+ Rendered orders/new.html.erb within layouts/application (6.0ms)
166
+ Completed 200 OK in 127ms (Views: 126.3ms | ActiveRecord: 0.0ms)
167
+ SQL (114.5ms) DELETE FROM "orders"
168
+  (0.1ms) begin transaction
169
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:38.360992"], ["updated_at", "2016-12-23 21:22:38.360992"]]
170
+  (114.6ms) commit transaction
171
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:22:38 +0100
172
+ Processing by OrdersController#index as HTML
173
+ Rendered app/formies/application/copyright.html.erb (0.3ms)
174
+ Rendered app/formies/templates/labelled.html.erb (0.3ms)
175
+ Rendered app/formies/templates/l_text_field.html.erb (2.2ms)
176
+ Rendered orders/index.html.erb within layouts/application (6.9ms)
177
+ Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms)
178
+ SQL (113.3ms) DELETE FROM "orders"
179
+  (0.1ms) begin transaction
180
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:22:38.604154"], ["updated_at", "2016-12-23 21:22:38.604154"]]
181
+  (123.8ms) commit transaction
182
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
183
+ Started GET "/orders/172" for 127.0.0.1 at 2016-12-23 22:22:38 +0100
184
+ Processing by OrdersController#show as HTML
185
+ Parameters: {"id"=>"172"}
186
+  (0.2ms) begin transaction
187
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:22:38.735174"], ["updated_at", "2016-12-23 21:22:38.735174"]]
188
+  (119.8ms) commit transaction
189
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 172]]
190
+ Rendered app/formies/forms/l_text_field.html.erb (9.9ms)
191
+ Rendered app/formies/forms/l_text_field.html.erb (0.5ms)
192
+ Rendered app/formies/templates/hello.slim (11.8ms)
193
+ Rendered orders/_form.html.erb (26.2ms)
194
+ Rendered orders/show.html.erb within layouts/application (28.2ms)
195
+ Completed 200 OK in 159ms (Views: 29.9ms | ActiveRecord: 120.4ms)
196
+  (0.1ms) begin transaction
197
+ ----------------------------------------------------
198
+ OrdersControllerTest: test_checking_formie_copyright
199
+ ----------------------------------------------------
200
+ Processing by OrdersController#index as HTML
201
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
202
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
203
+ Rendered app/formies/templates/l_text_field.html.erb (0.3ms)
204
+ Rendered orders/index.html.erb within layouts/application (1.0ms)
205
+ Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
206
+  (0.1ms) rollback transaction
207
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
208
+  (0.2ms) begin transaction
209
+ ----------------------------------------------------
210
+ OrdersControllerTest: test_checking_formie_copyright
211
+ ----------------------------------------------------
212
+ Processing by OrdersController#index as HTML
213
+ Order Load (0.2ms) SELECT "orders".* FROM "orders"
214
+ Rendered app/formies/application/copyright.html.erb (0.8ms)
215
+ Rendered app/formies/templates/labelled.html.erb (0.8ms)
216
+ Rendered app/formies/templates/l_text_field.html.erb (57.7ms)
217
+ Rendered orders/index.html.erb within layouts/application (100.3ms)
218
+ Completed 200 OK in 257ms (Views: 255.7ms | ActiveRecord: 0.4ms)
219
+  (0.1ms) rollback transaction
220
+ SQL (157.1ms) DELETE FROM "orders"
221
+  (0.1ms) begin transaction
222
+ SQL (0.4ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:13.621440"], ["updated_at", "2016-12-23 21:23:13.621440"]]
223
+  (133.6ms) commit transaction
224
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:23:13 +0100
225
+ Processing by OrdersController#index as HTML
226
+ Order Load (0.3ms) SELECT "orders".* FROM "orders"
227
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
228
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
229
+ Rendered app/formies/templates/l_text_field.html.erb (83.5ms)
230
+ Rendered orders/index.html.erb within layouts/application (184.9ms)
231
+ Completed 200 OK in 187ms (Views: 186.1ms | ActiveRecord: 0.3ms)
232
+ SQL (136.0ms) DELETE FROM "orders"
233
+  (0.2ms) begin transaction
234
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:14.095258"], ["updated_at", "2016-12-23 21:23:14.095258"]]
235
+  (106.4ms) commit transaction
236
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
237
+ Started GET "/orders/175" for 127.0.0.1 at 2016-12-23 22:23:14 +0100
238
+ Processing by OrdersController#show as HTML
239
+ Parameters: {"id"=>"175"}
240
+  (0.1ms) begin transaction
241
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:23:14.208880"], ["updated_at", "2016-12-23 21:23:14.208880"]]
242
+  (110.3ms) commit transaction
243
+ Order Load (0.2ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 175]]
244
+ Rendered app/formies/forms/l_text_field.html.erb (19.8ms)
245
+ Rendered app/formies/forms/l_text_field.html.erb (1.0ms)
246
+ Rendered app/formies/templates/hello.slim (29.4ms)
247
+ Rendered orders/_form.html.erb (283.4ms)
248
+ Rendered orders/show.html.erb within layouts/application (286.8ms)
249
+ Completed 200 OK in 408ms (Views: 288.4ms | ActiveRecord: 110.8ms)
250
+ SQL (110.9ms) DELETE FROM "orders"
251
+  (0.1ms) begin transaction
252
+ SQL (0.3ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:14.731025"], ["updated_at", "2016-12-23 21:23:14.731025"]]
253
+  (124.2ms) commit transaction
254
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:23:14 +0100
255
+ Processing by OrdersController#new as HTML
256
+ Rendered app/formies/forms/builtins.html.erb (1.4ms)
257
+ Rendered orders/_new.html.erb (49.9ms)
258
+ Rendered orders/new.html.erb within layouts/application (52.0ms)
259
+ Completed 200 OK in 55ms (Views: 54.6ms | ActiveRecord: 0.0ms)
260
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
261
+  (0.1ms) begin transaction
262
+ ----------------------------------------------------
263
+ OrdersControllerTest: test_checking_formie_copyright
264
+ ----------------------------------------------------
265
+ Processing by OrdersController#index as HTML
266
+ Rendered app/formies/application/copyright.html.erb (0.4ms)
267
+ Rendered app/formies/templates/labelled.html.erb (0.3ms)
268
+ Rendered app/formies/templates/l_text_field.html.erb (2.2ms)
269
+ Rendered orders/index.html.erb within layouts/application (6.8ms)
270
+ Completed 200 OK in 128ms (Views: 126.9ms | ActiveRecord: 0.0ms)
271
+  (0.1ms) rollback transaction
272
+ SQL (135.8ms) DELETE FROM "orders"
273
+  (0.1ms) begin transaction
274
+ SQL (0.4ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:34.404068"], ["updated_at", "2016-12-23 21:23:34.404068"]]
275
+  (117.5ms) commit transaction
276
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" ORDER BY "orders"."id" ASC LIMIT 1
277
+ Started GET "/orders/178" for 127.0.0.1 at 2016-12-23 22:23:34 +0100
278
+ Processing by OrdersController#show as HTML
279
+ Parameters: {"id"=>"178"}
280
+  (0.1ms) begin transaction
281
+ SQL (0.1ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "hugo"], ["created_at", "2016-12-23 21:23:34.536181"], ["updated_at", "2016-12-23 21:23:34.536181"]]
282
+  (106.8ms) commit transaction
283
+ Order Load (0.3ms) SELECT "orders".* FROM "orders" WHERE "orders"."id" = ? LIMIT 1 [["id", 178]]
284
+ Rendered app/formies/forms/l_text_field.html.erb (10.0ms)
285
+ Rendered app/formies/forms/l_text_field.html.erb (0.5ms)
286
+ Rendered app/formies/templates/hello.slim (11.8ms)
287
+ Rendered orders/_form.html.erb (26.2ms)
288
+ Rendered orders/show.html.erb within layouts/application (32.1ms)
289
+ Completed 200 OK in 146ms (Views: 33.9ms | ActiveRecord: 107.3ms)
290
+ SQL (110.1ms) DELETE FROM "orders"
291
+  (0.1ms) begin transaction
292
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:34.795618"], ["updated_at", "2016-12-23 21:23:34.795618"]]
293
+  (106.4ms) commit transaction
294
+ Started GET "/orders" for 127.0.0.1 at 2016-12-23 22:23:34 +0100
295
+ Processing by OrdersController#index as HTML
296
+ Rendered app/formies/application/copyright.html.erb (0.1ms)
297
+ Rendered app/formies/templates/labelled.html.erb (0.1ms)
298
+ Rendered app/formies/templates/l_text_field.html.erb (0.7ms)
299
+ Rendered orders/index.html.erb within layouts/application (1.8ms)
300
+ Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)
301
+ SQL (117.2ms) DELETE FROM "orders"
302
+  (0.1ms) begin transaction
303
+ SQL (0.2ms) INSERT INTO "orders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Rumpelstilzchen"], ["created_at", "2016-12-23 21:23:35.030434"], ["updated_at", "2016-12-23 21:23:35.030434"]]
304
+  (114.8ms) commit transaction
305
+ Started GET "/orders/new" for 127.0.0.1 at 2016-12-23 22:23:35 +0100
306
+ Processing by OrdersController#new as HTML
307
+ Rendered app/formies/forms/builtins.html.erb (1.2ms)
308
+ Rendered orders/_new.html.erb (4.7ms)
309
+ Rendered orders/new.html.erb within layouts/application (6.7ms)
310
+ Completed 200 OK in 9ms (Views: 8.8ms | ActiveRecord: 0.0ms)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-17 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -40,8 +40,10 @@ files:
40
40
  - Rakefile
41
41
  - config/initializers/formie.rb
42
42
  - lib/formie.rb
43
+ - lib/formie.rb.bak
43
44
  - lib/formie/engine.rb
44
45
  - lib/formie/version.rb
46
+ - lib/formie/version.rb.bak
45
47
  - test/controllers/orders_test.rb
46
48
  - test/dummy/Rakefile
47
49
  - test/dummy/app/controllers/application_controller.rb
@@ -70,9 +72,7 @@ files:
70
72
  - test/dummy/config/environment.rb
71
73
  - test/dummy/config/environments/development.rb
72
74
  - test/dummy/config/environments/production.rb
73
- - test/dummy/config/environments/production.rb.bak
74
75
  - test/dummy/config/environments/test.rb
75
- - test/dummy/config/environments/test.rb.bak
76
76
  - test/dummy/config/initializers/assets.rb
77
77
  - test/dummy/config/initializers/cookies_serializer.rb
78
78
  - test/dummy/config/initializers/filter_parameter_logging.rb
@@ -85,6 +85,7 @@ files:
85
85
  - test/dummy/db/migrate/20141016161801_create_orders.rb
86
86
  - test/dummy/db/schema.rb
87
87
  - test/dummy/db/test.sqlite3
88
+ - test/dummy/log/test.log
88
89
  - test/integration/order_test.rb
89
90
  - test/test_helper.rb
90
91
  homepage: http://matique.de
@@ -107,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  version: '0'
108
109
  requirements: []
109
110
  rubyforge_project:
110
- rubygems_version: 2.4.8
111
+ rubygems_version: 2.5.1
111
112
  signing_key:
112
113
  specification_version: 4
113
114
  summary: Formie is like a helper, but uses the notation of a partial.
@@ -115,6 +116,7 @@ test_files:
115
116
  - test/integration/order_test.rb
116
117
  - test/test_helper.rb
117
118
  - test/dummy/Rakefile
119
+ - test/dummy/log/test.log
118
120
  - test/dummy/config.ru
119
121
  - test/dummy/db/development.sqlite3
120
122
  - test/dummy/db/schema.rb
@@ -152,8 +154,7 @@ test_files:
152
154
  - test/dummy/config/boot.rb
153
155
  - test/dummy/config/environments/development.rb
154
156
  - test/dummy/config/environments/production.rb
155
- - test/dummy/config/environments/test.rb.bak
156
- - test/dummy/config/environments/production.rb.bak
157
157
  - test/dummy/config/environments/test.rb
158
158
  - test/dummy/config/database.yml
159
159
  - test/controllers/orders_test.rb
160
+ has_rdoc:
@@ -1,77 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
22
-
23
- # Disable Rails's static asset server (Apache or NGINX will already do this).
24
- config.serve_static_assets = false
25
-
26
- # Compress JavaScripts and CSS.
27
- config.assets.js_compressor = :uglifier
28
- # config.assets.css_compressor = :sass
29
-
30
- # Do not fallback to assets pipeline if a precompiled asset is missed.
31
- config.assets.compile = false
32
-
33
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
34
- # yet still be able to expire them through the digest params.
35
- config.assets.digest = true
36
-
37
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
38
-
39
- # Specifies the header that your server uses for sending files.
40
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
41
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
42
-
43
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
44
- # config.force_ssl = true
45
-
46
- # Decrease the log volume.
47
- # config.log_level = :info
48
-
49
- # Prepend all log lines with the following tags.
50
- # config.log_tags = [ :subdomain, :uuid ]
51
-
52
- # Use a different logger for distributed setups.
53
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
54
-
55
- # Use a different cache store in production.
56
- # config.cache_store = :mem_cache_store
57
-
58
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
59
- # config.action_controller.asset_host = 'http://assets.example.com'
60
-
61
- # Ignore bad email addresses and do not raise email delivery errors.
62
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
63
- # config.action_mailer.raise_delivery_errors = false
64
-
65
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
66
- # the I18n.default_locale when a translation cannot be found).
67
- config.i18n.fallbacks = true
68
-
69
- # Send deprecation notices to registered listeners.
70
- config.active_support.deprecation = :notify
71
-
72
- # Use default logging formatter so that PID and timestamp are not suppressed.
73
- config.log_formatter = ::Logger::Formatter.new
74
-
75
- # Do not dump schema after migrations.
76
- config.active_record.dump_schema_after_migration = false
77
- end
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
17
- config.static_cache_control = 'public, max-age=3600'
18
-
19
- # Show full error reports and disable caching.
20
- config.consider_all_requests_local = true
21
- config.action_controller.perform_caching = false
22
-
23
- # Raise exceptions instead of rendering exception templates.
24
- config.action_dispatch.show_exceptions = false
25
-
26
- # Disable request forgery protection in test environment.
27
- config.action_controller.allow_forgery_protection = false
28
-
29
- # Tell Action Mailer not to deliver emails to the real world.
30
- # The :test delivery method accumulates sent emails in the
31
- # ActionMailer::Base.deliveries array.
32
- config.action_mailer.delivery_method = :test
33
-
34
- # Randomize the order test cases are executed
35
- config.active_support.test_order = :random
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end