hyphenify 0.0.5 → 0.0.6

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: 4210b831895f4df8c6b51ad76b45a0f118a0150e
4
- data.tar.gz: 4fb6ea45458dee04325acb74a3c3bc601109ff6a
3
+ metadata.gz: a6502040bd6c2e6f497804e4a1a88049345a4f14
4
+ data.tar.gz: 597a4fe7aa13070f34c1b36004b2e628f96400da
5
5
  SHA512:
6
- metadata.gz: 35f2a127caee3677a555f4351b0192bd1851bd94e15aa0056f6fdbe0528d2548ccca6ef4a59e1b8c6e06f348f7c6b6710e064d7654371c2e3afba230a8dcb853
7
- data.tar.gz: d76ca03701d383635b685fb40270053efdfa3493456ae7828ee33a88f6612a296556da1a6b2e7754db45dfe3188279c49149d6bdd659b35c6ccc58c181e4ab20
6
+ metadata.gz: 42f92490257ab961e30cc8e1593824637e4efdd6e17e10cf6ead10059a33944313e69b9a19b14809f27c7a676ba36478ada03ea17b8090f92f1988136b0275d3
7
+ data.tar.gz: d3b5b295d77866a1573f85d6fbd73695e60d1a82fcd8c23f6587952e7715e65de75b0858cd3f553dc411b3894150c898a7259144a91ed992111c93d1c82376eb
@@ -1,4 +1,5 @@
1
- require 'hyphenify/rails'
1
+ require 'hyphenify/action_view/base'
2
+ require 'hyphenify/railtie'
2
3
  require 'hyphenify/version'
3
4
 
4
5
  module Hyphenify
@@ -0,0 +1,20 @@
1
+ module Hyphenify
2
+ module ActionView
3
+ module Base
4
+ extend ActiveSupport::Concern
5
+
6
+ included do
7
+ alias_method_chain :tag_options, :hyphen
8
+ end
9
+
10
+ private
11
+
12
+ def tag_options_with_hyphen(options, escape = true)
13
+ options.stringify_keys!
14
+ %w[id class for].each { |key| options[key] = options[key].to_s.dasherize if options.has_key? key }
15
+ tag_options_without_hyphen options, escape
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ module Hyphenify
2
+ class Railtie < Rails::Railtie
3
+
4
+ initializer 'hyphenify' do
5
+ ::ActionView::Base.send :include, Hyphenify::ActionView::Base
6
+ if Rails::VERSION::MAJOR < 4
7
+ ::ActionView::Helpers::InstanceTag.send :include, Hyphenify::ActionView::Base
8
+ else
9
+ ::ActionView::Helpers::Tags::Base.send :include, Hyphenify::ActionView::Base
10
+ end
11
+ end
12
+
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Hyphenify
2
2
 
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
 
5
5
  end
@@ -0,0 +1,9 @@
1
+ class PagesController < ApplicationController
2
+
3
+ def index
4
+ end
5
+
6
+ def form
7
+ end
8
+
9
+ end
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
- <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
6
+ <%= javascript_include_tag 'application' %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
@@ -0,0 +1,4 @@
1
+ <%= form_for :test, url: 'http://test.com' do |f| %>
2
+ <%= f.label :id %>
3
+ <%= f.text_field :id, class: 'the_class' %>
4
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= tag :div, class: 'the_class', id: 'the_id' %>
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require 'hyphenify'
6
+ require "hyphenify"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -9,4 +9,4 @@
9
9
 
10
10
  # Make sure your secret_key_base is kept private
11
11
  # if you're sharing your code publicly.
12
- Dummy::Application.config.secret_key_base = '70419e2a1d2393b3cbd8413204f2643a4060ff79b981dee9c04060612d455bd2a622c3bec6c017338d48975d560adb81a910d3f55f6b35ba3d67b9216bdd745b'
12
+ Dummy::Application.config.secret_key_base = 'ed0eded0efc92fa96afd1113ea2b9f8dc601e53805294f14a7e4be9d84831561a88c7217883807df7cc675293285fe08de00d0379ffdd019fad4f0dbdfbd73c5'
@@ -1,4 +1,8 @@
1
1
  Dummy::Application.routes.draw do
2
+
3
+ root to: 'pages#index'
4
+ get '/form', to: 'pages#form'
5
+
2
6
  # The priority is based upon order of creation: first created -> highest priority.
3
7
  # See how all your routes lay out with "rake routes".
4
8
 
@@ -1,3 +1,8 @@
1
-  (50.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
-  (3.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1
+  (2.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (2.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
3
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
6
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
7
+  (0.0ms) SELECT version FROM "schema_migrations"
8
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
@@ -1,817 +1,39 @@
1
-  (0.3ms) begin transaction
2
- ---------------------------------------------------------
3
- HelpersTest: test_should_return_id_and_class_with_hyphens
4
- ---------------------------------------------------------
5
-  (0.2ms) rollback transaction
6
-  (0.1ms) begin transaction
7
- -------------------------
8
- HyphenifyTest: test_truth
9
- -------------------------
10
-  (0.1ms) rollback transaction
11
-  (0.2ms) begin transaction
12
- ---------------------------------------------------------
13
- HelpersTest: test_should_return_id_and_class_with_hyphens
14
- ---------------------------------------------------------
15
-  (0.2ms) rollback transaction
16
-  (0.1ms) begin transaction
17
- -------------------------
18
- HyphenifyTest: test_truth
19
- -------------------------
20
-  (0.1ms) rollback transaction
21
-  (0.2ms) begin transaction
22
- ---------------------------------------------------------
23
- HelpersTest: test_should_return_id_and_class_with_hyphens
24
- ---------------------------------------------------------
25
-  (0.2ms) rollback transaction
26
-  (0.1ms) begin transaction
27
- -------------------------
28
- HyphenifyTest: test_truth
29
- -------------------------
30
-  (0.1ms) rollback transaction
31
-  (0.2ms) begin transaction
32
- ---------------------------------------------------------
33
- HelpersTest: test_should_return_id_and_class_with_hyphens
34
- ---------------------------------------------------------
35
-  (0.2ms) rollback transaction
36
-  (0.1ms) begin transaction
37
- -------------------------
38
- HyphenifyTest: test_truth
39
- -------------------------
40
-  (0.1ms) rollback transaction
41
-  (0.2ms) begin transaction
42
- ---------------------------------------------------------
43
- HelpersTest: test_should_return_id_and_class_with_hyphens
44
- ---------------------------------------------------------
45
-  (0.2ms) rollback transaction
46
-  (0.1ms) begin transaction
47
- -------------------------
48
- HyphenifyTest: test_truth
49
- -------------------------
50
-  (0.1ms) rollback transaction
51
-  (0.2ms) begin transaction
52
- ---------------------------------------------------------
53
- HelpersTest: test_should_return_id_and_class_with_hyphens
54
- ---------------------------------------------------------
55
-  (0.2ms) rollback transaction
56
-  (0.1ms) begin transaction
57
- -------------------------
58
- HyphenifyTest: test_truth
59
- -------------------------
60
-  (0.1ms) rollback transaction
61
-  (0.2ms) begin transaction
62
- ---------------------------------------------------------
63
- HelpersTest: test_should_return_id_and_class_with_hyphens
64
- ---------------------------------------------------------
65
-  (0.2ms) rollback transaction
66
-  (0.1ms) begin transaction
67
- -------------------------
68
- HyphenifyTest: test_truth
69
- -------------------------
70
-  (0.1ms) rollback transaction
71
-  (0.3ms) begin transaction
72
- ---------------------------------------------------------
73
- HelpersTest: test_should_return_id_and_class_with_hyphens
74
- ---------------------------------------------------------
75
-  (0.2ms) rollback transaction
76
-  (0.1ms) begin transaction
77
- -------------------------
78
- HyphenifyTest: test_truth
79
- -------------------------
80
-  (0.1ms) rollback transaction
81
-  (0.2ms) begin transaction
82
- ---------------------------------------------------------
83
- HelpersTest: test_should_return_id_and_class_with_hyphens
84
- ---------------------------------------------------------
85
-  (0.2ms) rollback transaction
86
-  (0.1ms) begin transaction
87
- -------------------------
88
- HyphenifyTest: test_truth
89
- -------------------------
90
-  (0.1ms) rollback transaction
91
-  (0.2ms) begin transaction
92
- ---------------------------------------------------------
93
- HelpersTest: test_should_return_id_and_class_with_hyphens
94
- ---------------------------------------------------------
95
-  (0.2ms) rollback transaction
96
-  (0.1ms) begin transaction
97
- -------------------------
98
- HyphenifyTest: test_truth
99
- -------------------------
100
-  (0.1ms) rollback transaction
101
-  (0.2ms) begin transaction
102
- ---------------------------------------------------------
103
- HelpersTest: test_should_return_id_and_class_with_hyphens
104
- ---------------------------------------------------------
105
-  (0.2ms) rollback transaction
106
-  (0.1ms) begin transaction
107
- -------------------------
108
- HyphenifyTest: test_truth
109
- -------------------------
110
-  (0.1ms) rollback transaction
111
-  (0.2ms) begin transaction
112
- ---------------------------------------------------------
113
- HelpersTest: test_should_return_id_and_class_with_hyphens
114
- ---------------------------------------------------------
115
-  (0.2ms) rollback transaction
116
-  (0.1ms) begin transaction
117
- -------------------------
118
- HyphenifyTest: test_truth
119
- -------------------------
120
-  (0.1ms) rollback transaction
121
-  (0.2ms) begin transaction
122
- ---------------------------------------------------------
123
- HelpersTest: test_should_return_id_and_class_with_hyphens
124
- ---------------------------------------------------------
125
-  (0.2ms) rollback transaction
126
-  (0.1ms) begin transaction
127
- -------------------------
128
- HyphenifyTest: test_truth
129
- -------------------------
130
-  (0.1ms) rollback transaction
131
-  (0.2ms) begin transaction
132
- ---------------------------------------------------------
133
- HelpersTest: test_should_return_id_and_class_with_hyphens
134
- ---------------------------------------------------------
135
-  (0.2ms) rollback transaction
136
-  (0.1ms) begin transaction
137
- -------------------------
138
- HyphenifyTest: test_truth
139
- -------------------------
140
-  (0.1ms) rollback transaction
141
-  (0.2ms) begin transaction
142
- ---------------------------------------------------------
143
- HelpersTest: test_should_return_id_and_class_with_hyphens
144
- ---------------------------------------------------------
145
-  (0.2ms) rollback transaction
146
-  (0.1ms) begin transaction
147
- -------------------------
148
- HyphenifyTest: test_truth
149
- -------------------------
150
-  (0.1ms) rollback transaction
151
-  (0.2ms) begin transaction
152
- ---------------------------------------------------------
153
- HelpersTest: test_should_return_id_and_class_with_hyphens
154
- ---------------------------------------------------------
155
-  (0.2ms) rollback transaction
156
-  (0.1ms) begin transaction
157
- -------------------------
158
- HyphenifyTest: test_truth
159
- -------------------------
160
-  (0.1ms) rollback transaction
161
-  (0.2ms) begin transaction
162
- ---------------------------------------------------------
163
- HelpersTest: test_should_return_id_and_class_with_hyphens
164
- ---------------------------------------------------------
165
-  (0.2ms) rollback transaction
166
-  (0.1ms) begin transaction
167
- -------------------------
168
- HyphenifyTest: test_truth
169
- -------------------------
170
-  (0.1ms) rollback transaction
171
-  (0.2ms) begin transaction
172
- ---------------------------------------------------------
173
- HelpersTest: test_should_return_id_and_class_with_hyphens
174
- ---------------------------------------------------------
175
-  (0.3ms) rollback transaction
176
-  (0.1ms) begin transaction
177
- -------------------------
178
- HyphenifyTest: test_truth
179
- -------------------------
180
-  (0.1ms) rollback transaction
181
-
182
- ***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
183
-
184
-  (0.2ms) begin transaction
185
- ---------------------------------------------------------
186
- HelpersTest: test_should_return_id_and_class_with_hyphens
187
- ---------------------------------------------------------
188
-  (0.2ms) rollback transaction
189
-  (0.1ms) begin transaction
190
- -------------------------
191
- HyphenifyTest: test_truth
192
- -------------------------
193
-  (0.0ms) rollback transaction
194
-  (0.2ms) begin transaction
195
- ---------------------------------------------------------
196
- HelpersTest: test_should_return_id_and_class_with_hyphens
197
- ---------------------------------------------------------
198
-  (0.2ms) rollback transaction
199
-  (0.1ms) begin transaction
200
- -------------------------
201
- HyphenifyTest: test_truth
202
- -------------------------
203
-  (0.1ms) rollback transaction
204
-  (0.3ms) begin transaction
205
- ---------------------------------------------------------
206
- HelpersTest: test_should_return_id_and_class_with_hyphens
207
- ---------------------------------------------------------
208
-  (0.2ms) rollback transaction
209
-  (0.1ms) begin transaction
210
- -------------------------
211
- HyphenifyTest: test_truth
212
- -------------------------
213
-  (0.1ms) rollback transaction
214
-  (0.2ms) begin transaction
215
- ---------------------------------------------------------
216
- HelpersTest: test_should_return_id_and_class_with_hyphens
217
- ---------------------------------------------------------
218
-  (0.2ms) rollback transaction
219
-  (0.1ms) begin transaction
220
- -------------------------
221
- HyphenifyTest: test_truth
222
- -------------------------
223
-  (0.1ms) rollback transaction
224
-  (0.2ms) begin transaction
225
- ---------------------------------------------------------
226
- HelpersTest: test_should_return_id_and_class_with_hyphens
227
- ---------------------------------------------------------
228
-  (0.2ms) rollback transaction
229
-  (0.1ms) begin transaction
230
- -------------------------
231
- HyphenifyTest: test_truth
232
- -------------------------
233
-  (0.1ms) rollback transaction
234
-  (0.2ms) begin transaction
235
- ---------------------------------------------------------
236
- HelpersTest: test_should_return_id_and_class_with_hyphens
237
- ---------------------------------------------------------
238
-  (0.2ms) rollback transaction
239
-  (0.1ms) begin transaction
240
- -------------------------
241
- HyphenifyTest: test_truth
242
- -------------------------
243
-  (0.1ms) rollback transaction
244
-  (0.2ms) begin transaction
245
- ---------------------------------------------------------
246
- HelpersTest: test_should_return_id_and_class_with_hyphens
247
- ---------------------------------------------------------
248
-  (0.2ms) rollback transaction
249
-  (0.1ms) begin transaction
250
- -------------------------
251
- HyphenifyTest: test_truth
252
- -------------------------
253
-  (0.1ms) rollback transaction
254
-  (0.2ms) begin transaction
255
- ---------------------------------------------------------
256
- HelpersTest: test_should_return_id_and_class_with_hyphens
257
- ---------------------------------------------------------
258
-  (0.2ms) rollback transaction
259
-  (0.1ms) begin transaction
260
- -------------------------
261
- HyphenifyTest: test_truth
262
- -------------------------
263
-  (0.1ms) rollback transaction
264
-  (0.2ms) begin transaction
265
- ---------------------------------------------------------
266
- HelpersTest: test_should_return_id_and_class_with_hyphens
267
- ---------------------------------------------------------
268
-  (0.2ms) rollback transaction
269
-  (0.1ms) begin transaction
270
- -------------------------
271
- HyphenifyTest: test_truth
272
- -------------------------
273
-  (0.1ms) rollback transaction
274
-  (0.2ms) begin transaction
275
- ---------------------------------------------------------
276
- HelpersTest: test_should_return_id_and_class_with_hyphens
277
- ---------------------------------------------------------
278
-  (0.2ms) rollback transaction
279
-  (0.1ms) begin transaction
280
- -------------------------
281
- HyphenifyTest: test_truth
282
- -------------------------
283
-  (0.1ms) rollback transaction
284
-  (0.2ms) begin transaction
285
- ---------------------------------------------------------
286
- HelpersTest: test_should_return_id_and_class_with_hyphens
287
- ---------------------------------------------------------
288
-  (0.2ms) rollback transaction
289
-  (0.1ms) begin transaction
290
- -------------------------
291
- HyphenifyTest: test_truth
292
- -------------------------
293
-  (0.1ms) rollback transaction
294
-  (0.2ms) begin transaction
295
- ---------------------------------------------------------
296
- HelpersTest: test_should_return_id_and_class_with_hyphens
297
- ---------------------------------------------------------
298
-  (0.2ms) rollback transaction
299
-  (0.1ms) begin transaction
300
- -------------------------
301
- HyphenifyTest: test_truth
302
- -------------------------
303
-  (0.1ms) rollback transaction
304
-  (0.2ms) begin transaction
305
- ---------------------------------------------------------
306
- HelpersTest: test_should_return_id_and_class_with_hyphens
307
- ---------------------------------------------------------
308
-  (0.2ms) rollback transaction
309
-  (0.1ms) begin transaction
310
- -------------------------
311
- HyphenifyTest: test_truth
312
- -------------------------
313
-  (0.1ms) rollback transaction
314
-  (0.2ms) begin transaction
315
- ---------------------------------------------------------
316
- HelpersTest: test_should_return_id_and_class_with_hyphens
317
- ---------------------------------------------------------
318
-  (0.2ms) rollback transaction
319
-  (0.1ms) begin transaction
320
- -------------------------
321
- HyphenifyTest: test_truth
322
- -------------------------
323
-  (0.1ms) rollback transaction
324
-  (0.2ms) begin transaction
325
- ---------------------------------------------------------
326
- HelpersTest: test_should_return_id_and_class_with_hyphens
327
- ---------------------------------------------------------
328
-  (0.2ms) rollback transaction
329
-  (0.1ms) begin transaction
330
- -------------------------
331
- HyphenifyTest: test_truth
332
- -------------------------
333
-  (0.1ms) rollback transaction
334
-  (0.2ms) begin transaction
335
- ---------------------------------------------------------
336
- HelpersTest: test_should_return_id_and_class_with_hyphens
337
- ---------------------------------------------------------
338
-  (0.2ms) rollback transaction
339
-  (0.1ms) begin transaction
340
- -------------------------
341
- HyphenifyTest: test_truth
342
- -------------------------
343
-  (0.1ms) rollback transaction
344
-  (0.2ms) begin transaction
345
- ---------------------------------------------------------
346
- HelpersTest: test_should_return_id_and_class_with_hyphens
347
- ---------------------------------------------------------
348
-  (0.2ms) rollback transaction
349
-  (0.1ms) begin transaction
350
- -------------------------
351
- HyphenifyTest: test_truth
352
- -------------------------
353
-  (0.1ms) rollback transaction
354
-  (0.2ms) begin transaction
355
- ---------------------------------------------------------
356
- HelpersTest: test_should_return_id_and_class_with_hyphens
357
- ---------------------------------------------------------
358
-  (0.2ms) rollback transaction
359
-  (0.1ms) begin transaction
360
- -------------------------
361
- HyphenifyTest: test_truth
362
- -------------------------
363
-  (0.1ms) rollback transaction
364
-  (0.2ms) begin transaction
365
- ---------------------------------------------------------
366
- HelpersTest: test_should_return_id_and_class_with_hyphens
367
- ---------------------------------------------------------
368
-  (0.2ms) rollback transaction
369
-  (0.1ms) begin transaction
370
- -------------------------
371
- HyphenifyTest: test_truth
372
- -------------------------
373
-  (0.1ms) rollback transaction
374
-  (0.2ms) begin transaction
375
- ---------------------------------------------------------
376
- HelpersTest: test_should_return_id_and_class_with_hyphens
377
- ---------------------------------------------------------
378
-  (0.2ms) rollback transaction
379
-  (0.1ms) begin transaction
380
- -------------------------
381
- HyphenifyTest: test_truth
382
- -------------------------
383
-  (0.1ms) rollback transaction
384
-  (0.2ms) begin transaction
385
- ---------------------------------------------------------
386
- HelpersTest: test_should_return_id_and_class_with_hyphens
387
- ---------------------------------------------------------
388
-  (0.2ms) rollback transaction
389
-  (0.1ms) begin transaction
390
- -------------------------
391
- HyphenifyTest: test_truth
392
- -------------------------
393
-  (0.1ms) rollback transaction
394
-  (0.2ms) begin transaction
395
- ---------------------------------------------------------
396
- HelpersTest: test_should_return_id_and_class_with_hyphens
397
- ---------------------------------------------------------
398
-  (0.2ms) rollback transaction
399
-  (0.1ms) begin transaction
400
- -------------------------
401
- HyphenifyTest: test_truth
402
- -------------------------
403
-  (0.1ms) rollback transaction
404
-  (0.3ms) begin transaction
405
- ---------------------------------------------------------
406
- HelpersTest: test_should_return_id_and_class_with_hyphens
407
- ---------------------------------------------------------
408
-  (0.1ms) rollback transaction
409
-  (0.0ms) begin transaction
410
- -------------------------
411
- HyphenifyTest: test_truth
412
- -------------------------
413
-  (0.0ms) rollback transaction
414
-  (0.2ms) begin transaction
415
- ---------------------------------------------------------
416
- HelpersTest: test_should_return_id_and_class_with_hyphens
417
- ---------------------------------------------------------
418
-  (0.2ms) rollback transaction
419
-  (0.1ms) begin transaction
420
- -------------------------
421
- HyphenifyTest: test_truth
422
- -------------------------
423
-  (0.1ms) rollback transaction
424
-  (0.2ms) begin transaction
425
- ---------------------------------------------------------
426
- HelpersTest: test_should_return_id_and_class_with_hyphens
427
- ---------------------------------------------------------
428
-  (0.1ms) rollback transaction
429
-  (0.0ms) begin transaction
430
- -------------------------
431
- HyphenifyTest: test_truth
432
- -------------------------
433
-  (0.0ms) rollback transaction
434
-  (0.2ms) begin transaction
435
- ---------------------------------------------------------
436
- HelpersTest: test_should_return_id_and_class_with_hyphens
437
- ---------------------------------------------------------
438
-  (0.1ms) rollback transaction
439
-  (0.0ms) begin transaction
440
- -------------------------
441
- HyphenifyTest: test_truth
442
- -------------------------
443
-  (0.0ms) rollback transaction
444
1
   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
445
2
   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
446
-  (0.1ms) SELECT version FROM "schema_migrations"
3
+  (0.0ms) SELECT version FROM "schema_migrations"
447
4
   (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
448
5
   (0.1ms) begin transaction
449
- ---------------------------------------------------------
450
- HelpersTest: test_should_return_id_and_class_with_hyphens
451
- ---------------------------------------------------------
452
-  (0.0ms) rollback transaction
453
-  (0.0ms) begin transaction
454
- -------------------------
455
- HyphenifyTest: test_truth
456
- -------------------------
457
-  (0.0ms) rollback transaction
458
-  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
459
-  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
460
-  (0.1ms) SELECT version FROM "schema_migrations"
461
-  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
6
+ -----------------------------------------------------------------
7
+ TagsTest: test_forms_tags_should_return_id_and_class_with_hyphens
8
+ -----------------------------------------------------------------
9
+ Started GET "/form" for 127.0.0.1 at 2013-08-18 22:38:37 -0300
10
+  (0.1ms) rollback transaction
462
11
   (0.1ms) begin transaction
463
- ---------------------------------------------------------
464
- HelpersTest: test_should_return_id_and_class_with_hyphens
465
- ---------------------------------------------------------
12
+ -----------------------------------------------------------
13
+ TagsTest: test_tags_should_return_id_and_class_with_hyphens
14
+ -----------------------------------------------------------
15
+ Started GET "/" for 127.0.0.1 at 2013-08-18 22:38:37 -0300
16
+ Processing by PagesController#index as HTML
17
+ Completed 200 OK in 38ms (Views: 37.4ms | ActiveRecord: 0.0ms)
466
18
   (0.1ms) rollback transaction
467
19
   (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
468
20
   (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
469
21
   (0.0ms) SELECT version FROM "schema_migrations"
470
22
   (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
471
23
   (0.1ms) begin transaction
472
- ---------------------------------------------------------
473
- HelpersTest: test_should_return_id_and_class_with_hyphens
474
- ---------------------------------------------------------
475
-  (0.1ms) rollback transaction
476
-  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
477
-  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
478
-  (0.1ms) SELECT version FROM "schema_migrations"
479
-  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
480
-  (0.1ms) begin transaction
481
- ---------------------------------------------------------
482
- HelpersTest: test_should_return_id_and_class_with_hyphens
483
- ---------------------------------------------------------
484
-  (0.1ms) rollback transaction
485
-  (0.2ms) begin transaction
486
- ---------------------------------------------------------
487
- HelpersTest: test_should_return_id_and_class_with_hyphens
488
- ---------------------------------------------------------
489
-  (0.0ms) rollback transaction
490
-  (0.2ms) begin transaction
491
- ---------------------------------------------------------
492
- HelpersTest: test_should_return_id_and_class_with_hyphens
493
- ---------------------------------------------------------
494
-  (0.0ms) rollback transaction
495
-  (0.2ms) begin transaction
496
- -----------------------------------------------------------------------
497
- HelpersTest: test_form_elements_should_return_id_and_class_with_hyphens
498
- -----------------------------------------------------------------------
499
-  (0.2ms) rollback transaction
500
-  (0.1ms) begin transaction
501
- -------------------------------------------------------------------------
502
- HelpersTest: test_simple_elements_should_return_id_and_class_with_hyphens
503
- -------------------------------------------------------------------------
504
-  (0.1ms) rollback transaction
505
-  (0.2ms) begin transaction
506
- -----------------------------------------------------------------------
507
- HelpersTest: test_form_elements_should_return_id_and_class_with_hyphens
508
- -----------------------------------------------------------------------
509
-  (0.2ms) rollback transaction
510
-  (0.1ms) begin transaction
511
- -------------------------------------------------------------------------
512
- HelpersTest: test_simple_elements_should_return_id_and_class_with_hyphens
513
- -------------------------------------------------------------------------
514
-  (0.1ms) rollback transaction
515
-  (0.2ms) begin transaction
516
- -----------------------------------------------------------------------
517
- HelpersTest: test_form_elements_should_return_id_and_class_with_hyphens
518
- -----------------------------------------------------------------------
519
-  (0.1ms) rollback transaction
520
-  (0.0ms) begin transaction
521
- -------------------------------------------------------------------------
522
- HelpersTest: test_simple_elements_should_return_id_and_class_with_hyphens
523
- -------------------------------------------------------------------------
524
-  (0.1ms) rollback transaction
525
-  (0.2ms) begin transaction
526
- -----------------------------------------------------------------------
527
- HelpersTest: test_form_elements_should_return_id_and_class_with_hyphens
528
- -----------------------------------------------------------------------
529
-  (0.2ms) rollback transaction
530
-  (0.1ms) begin transaction
531
- -------------------------------------------------------------------------
532
- HelpersTest: test_simple_elements_should_return_id_and_class_with_hyphens
533
- -------------------------------------------------------------------------
534
-  (0.1ms) rollback transaction
535
- Connecting to database specified by database.yml
536
-  (0.1ms) begin transaction
537
-  (0.0ms) rollback transaction
538
-  (0.0ms) begin transaction
539
-  (0.0ms) rollback transaction
540
- Connecting to database specified by database.yml
541
-  (0.1ms) begin transaction
542
-  (0.0ms) rollback transaction
543
-  (0.0ms) begin transaction
544
-  (0.0ms) rollback transaction
545
- Connecting to database specified by database.yml
546
-  (0.1ms) begin transaction
547
-  (0.0ms) rollback transaction
548
-  (0.0ms) begin transaction
549
-  (0.0ms) rollback transaction
550
-  (0.0ms) begin transaction
551
-  (0.0ms) rollback transaction
552
- Connecting to database specified by database.yml
553
-  (0.1ms) begin transaction
554
-  (0.0ms) rollback transaction
555
-  (0.0ms) begin transaction
556
-  (0.0ms) rollback transaction
557
-  (0.0ms) begin transaction
558
-  (0.0ms) rollback transaction
559
- Connecting to database specified by database.yml
560
-  (0.1ms) begin transaction
561
-  (0.0ms) rollback transaction
562
-  (0.0ms) begin transaction
563
-  (0.0ms) rollback transaction
564
-  (0.0ms) begin transaction
565
-  (0.0ms) rollback transaction
566
- Connecting to database specified by database.yml
567
-  (0.1ms) begin transaction
568
-  (0.0ms) rollback transaction
569
-  (0.0ms) begin transaction
570
-  (0.0ms) rollback transaction
571
-  (0.0ms) begin transaction
572
-  (0.0ms) rollback transaction
573
- Connecting to database specified by database.yml
574
-  (0.1ms) begin transaction
575
-  (0.0ms) rollback transaction
576
-  (0.0ms) begin transaction
577
-  (0.0ms) rollback transaction
578
-  (0.0ms) begin transaction
579
-  (0.0ms) rollback transaction
580
- Connecting to database specified by database.yml
581
-  (0.1ms) begin transaction
582
-  (0.0ms) rollback transaction
583
-  (0.0ms) begin transaction
584
-  (0.0ms) rollback transaction
585
- Connecting to database specified by database.yml
586
-  (0.1ms) begin transaction
587
-  (0.0ms) rollback transaction
588
-  (0.0ms) begin transaction
589
-  (0.0ms) rollback transaction
590
-
591
- ***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****
592
-
593
- Connecting to database specified by database.yml
594
-  (0.1ms) begin transaction
595
-  (0.0ms) rollback transaction
596
-  (0.0ms) begin transaction
597
-  (0.0ms) rollback transaction
598
- Connecting to database specified by database.yml
599
-  (0.1ms) begin transaction
600
-  (0.0ms) rollback transaction
601
-  (0.0ms) begin transaction
602
-  (0.0ms) rollback transaction
603
- Connecting to database specified by database.yml
604
-  (0.1ms) begin transaction
605
-  (0.0ms) rollback transaction
606
-  (0.0ms) begin transaction
607
-  (0.0ms) rollback transaction
608
- Connecting to database specified by database.yml
609
-  (0.1ms) begin transaction
610
-  (0.0ms) rollback transaction
611
-  (0.0ms) begin transaction
612
-  (0.0ms) rollback transaction
613
- Connecting to database specified by database.yml
614
-  (0.1ms) begin transaction
615
-  (0.0ms) rollback transaction
616
-  (0.0ms) begin transaction
617
-  (0.0ms) rollback transaction
618
- Connecting to database specified by database.yml
619
-  (0.1ms) begin transaction
620
-  (0.0ms) rollback transaction
621
-  (0.0ms) begin transaction
622
-  (0.0ms) rollback transaction
623
-  (0.2ms) begin transaction
624
- -------------------------------------------------------------------
625
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
626
- -------------------------------------------------------------------
627
-  (0.1ms) rollback transaction
628
-  (0.1ms) begin transaction
629
- ---------------------------------------------------------------------
630
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
631
- ---------------------------------------------------------------------
632
-  (0.1ms) rollback transaction
633
-  (0.2ms) begin transaction
634
- -------------------------------------------------------------------
635
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
636
- -------------------------------------------------------------------
637
-  (0.1ms) rollback transaction
638
-  (0.1ms) begin transaction
639
- ---------------------------------------------------------------------
640
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
641
- ---------------------------------------------------------------------
642
-  (0.1ms) rollback transaction
643
-  (0.2ms) begin transaction
644
- -------------------------------------------------------------------
645
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
646
- -------------------------------------------------------------------
647
-  (0.1ms) rollback transaction
648
-  (0.1ms) begin transaction
649
- ---------------------------------------------------------------------
650
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
651
- ---------------------------------------------------------------------
652
-  (0.0ms) rollback transaction
653
-  (0.2ms) begin transaction
654
- -------------------------------------------------------------------
655
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
656
- -------------------------------------------------------------------
657
-  (0.1ms) rollback transaction
658
-  (0.0ms) begin transaction
659
- ---------------------------------------------------------------------
660
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
661
- ---------------------------------------------------------------------
662
-  (0.1ms) rollback transaction
663
-  (0.2ms) begin transaction
664
- -------------------------------------------------------------------
665
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
666
- -------------------------------------------------------------------
667
-  (0.1ms) rollback transaction
668
-  (0.1ms) begin transaction
669
- ---------------------------------------------------------------------
670
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
671
- ---------------------------------------------------------------------
672
-  (0.1ms) rollback transaction
673
-  (0.2ms) begin transaction
674
- -------------------------------------------------------------------
675
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
676
- -------------------------------------------------------------------
677
-  (0.1ms) rollback transaction
678
-  (0.1ms) begin transaction
679
- ---------------------------------------------------------------------
680
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
681
- ---------------------------------------------------------------------
682
-  (0.1ms) rollback transaction
683
-  (0.2ms) begin transaction
684
- -------------------------------------------------------------------
685
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
686
- -------------------------------------------------------------------
687
-  (0.1ms) rollback transaction
688
-  (0.1ms) begin transaction
689
- ---------------------------------------------------------------------
690
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
691
- ---------------------------------------------------------------------
692
-  (0.1ms) rollback transaction
693
-  (0.2ms) begin transaction
694
- -------------------------------------------------------------------
695
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
696
- -------------------------------------------------------------------
697
-  (0.1ms) rollback transaction
698
-  (0.1ms) begin transaction
699
- ---------------------------------------------------------------------
700
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
701
- ---------------------------------------------------------------------
702
-  (0.1ms) rollback transaction
703
-  (0.2ms) begin transaction
704
- -------------------------------------------------------------------
705
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
706
- -------------------------------------------------------------------
707
-  (0.1ms) rollback transaction
708
-  (0.1ms) begin transaction
709
- ---------------------------------------------------------------------
710
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
711
- ---------------------------------------------------------------------
712
-  (0.0ms) rollback transaction
713
-  (0.2ms) begin transaction
714
- -------------------------------------------------------------------
715
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
716
- -------------------------------------------------------------------
717
-  (0.1ms) rollback transaction
718
-  (0.1ms) begin transaction
719
- ---------------------------------------------------------------------
720
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
721
- ---------------------------------------------------------------------
722
-  (0.1ms) rollback transaction
723
-  (0.2ms) begin transaction
724
- -------------------------------------------------------------------
725
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
726
- -------------------------------------------------------------------
727
-  (0.1ms) rollback transaction
728
-  (0.0ms) begin transaction
729
- ---------------------------------------------------------------------
730
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
731
- ---------------------------------------------------------------------
732
-  (0.1ms) rollback transaction
733
-  (0.2ms) begin transaction
734
- -------------------------------------------------------------------
735
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
736
- -------------------------------------------------------------------
737
-  (0.1ms) rollback transaction
738
-  (0.0ms) begin transaction
739
- ---------------------------------------------------------------------
740
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
741
- ---------------------------------------------------------------------
742
-  (0.1ms) rollback transaction
743
- Connecting to database specified by database.yml
744
-  (0.1ms) begin transaction
745
-  (0.0ms) rollback transaction
746
-  (0.0ms) begin transaction
747
-  (0.0ms) rollback transaction
748
-  (0.2ms) begin transaction
749
- -------------------------------------------------------------------
750
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
751
- -------------------------------------------------------------------
752
-  (0.1ms) rollback transaction
753
-  (0.1ms) begin transaction
754
- ---------------------------------------------------------------------
755
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
756
- ---------------------------------------------------------------------
757
-  (0.1ms) rollback transaction
758
-  (0.2ms) begin transaction
759
- -------------------------------------------------------------------
760
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
761
- -------------------------------------------------------------------
762
-  (0.1ms) rollback transaction
763
-  (0.1ms) begin transaction
764
- ---------------------------------------------------------------------
765
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
766
- ---------------------------------------------------------------------
767
-  (0.1ms) rollback transaction
768
-  (0.2ms) begin transaction
769
- -------------------------------------------------------------------
770
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
771
- -------------------------------------------------------------------
772
-  (0.1ms) rollback transaction
773
-  (0.1ms) begin transaction
774
- ---------------------------------------------------------------------
775
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
776
- ---------------------------------------------------------------------
777
-  (0.1ms) rollback transaction
778
-  (0.2ms) begin transaction
779
- -------------------------------------------------------------------
780
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
781
- -------------------------------------------------------------------
782
-  (0.1ms) rollback transaction
783
-  (0.0ms) begin transaction
784
- ---------------------------------------------------------------------
785
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
786
- ---------------------------------------------------------------------
787
-  (0.0ms) rollback transaction
788
-  (0.2ms) begin transaction
789
- -------------------------------------------------------------------
790
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
791
- -------------------------------------------------------------------
792
-  (0.1ms) rollback transaction
793
-  (0.1ms) begin transaction
794
- ---------------------------------------------------------------------
795
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
796
- ---------------------------------------------------------------------
797
-  (0.1ms) rollback transaction
798
-  (0.2ms) begin transaction
799
- -------------------------------------------------------------------
800
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
801
- -------------------------------------------------------------------
802
-  (0.1ms) rollback transaction
803
-  (0.1ms) begin transaction
804
- ---------------------------------------------------------------------
805
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
806
- ---------------------------------------------------------------------
807
-  (0.1ms) rollback transaction
808
-  (0.2ms) begin transaction
809
- -------------------------------------------------------------------
810
- HelpersTest: test_form_tags_should_return_id_and_class_with_hyphens
811
- -------------------------------------------------------------------
812
-  (0.1ms) rollback transaction
813
-  (0.1ms) begin transaction
814
- ---------------------------------------------------------------------
815
- HelpersTest: test_simple_tags_should_return_id_and_class_with_hyphens
816
- ---------------------------------------------------------------------
24
+ -----------------------------------------------------------------
25
+ TagsTest: test_forms_tags_should_return_id_and_class_with_hyphens
26
+ -----------------------------------------------------------------
27
+ Started GET "/form" for 127.0.0.1 at 2013-08-18 22:39:00 -0300
28
+ Processing by PagesController#form as HTML
29
+ Rendered pages/form.html.erb within layouts/application (116.3ms)
30
+ Completed 200 OK in 128ms (Views: 127.9ms | ActiveRecord: 0.0ms)
31
+  (0.1ms) rollback transaction
32
+  (0.1ms) begin transaction
33
+ -----------------------------------------------------------
34
+ TagsTest: test_tags_should_return_id_and_class_with_hyphens
35
+ -----------------------------------------------------------
36
+ Started GET "/" for 127.0.0.1 at 2013-08-18 22:39:00 -0300
37
+ Processing by PagesController#index as HTML
38
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
817
39
   (0.1ms) rollback transaction
@@ -0,0 +1,18 @@
1
+ require 'test_helper'
2
+
3
+ class TagsTest < ActionDispatch::IntegrationTest
4
+
5
+ test "tags should return id and class with hyphens" do
6
+ get '/'
7
+ assert_response :success
8
+ assert response.body.include?('class="the-class" id="the-id"')
9
+ end
10
+
11
+ test "forms tags should return id and class with hyphens" do
12
+ get '/form'
13
+ assert_response :success
14
+ assert response.body.include?('for="test-id"')
15
+ assert response.body.include?('class="the-class" id="test-id"')
16
+ end
17
+
18
+ end
@@ -14,5 +14,8 @@ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
14
  ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
15
15
  end
16
16
 
17
- # Load helpers
18
- ActionView::TestCase.send :include, Hyphenify::Rails::ActionView::Base
17
+ # Load database
18
+ config = YAML::load(File.read(File.expand_path('../dummy/config/database.yml', __FILE__)))
19
+ config['test']['adapter'] = 'jdbcsqlite3' if RUBY_PLATFORM == 'java'
20
+ ActiveRecord::Base.establish_connection(config['test'])
21
+ load(File.expand_path('../dummy/db/schema.rb', __FILE__))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyphenify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-07 00:00:00.000000000 Z
11
+ date: 2013-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -38,16 +38,15 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Hacks rails tags helpers to always use hyphens.
41
+ description: Hacks tags helpers to always use hyphens.
42
42
  email:
43
43
  - contact@mattways.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - lib/hyphenify/rails/action_view/base.rb
49
- - lib/hyphenify/rails/railtie.rb
50
- - lib/hyphenify/rails.rb
48
+ - lib/hyphenify/action_view/base.rb
49
+ - lib/hyphenify/railtie.rb
51
50
  - lib/hyphenify/version.rb
52
51
  - lib/hyphenify.rb
53
52
  - MIT-LICENSE
@@ -56,8 +55,11 @@ files:
56
55
  - test/dummy/app/assets/javascripts/application.js
57
56
  - test/dummy/app/assets/stylesheets/application.css
58
57
  - test/dummy/app/controllers/application_controller.rb
58
+ - test/dummy/app/controllers/pages_controller.rb
59
59
  - test/dummy/app/helpers/application_helper.rb
60
60
  - test/dummy/app/views/layouts/application.html.erb
61
+ - test/dummy/app/views/pages/form.html.erb
62
+ - test/dummy/app/views/pages/index.html.erb
61
63
  - test/dummy/bin/bundle
62
64
  - test/dummy/bin/rails
63
65
  - test/dummy/bin/rake
@@ -80,7 +82,6 @@ files:
80
82
  - test/dummy/config.ru
81
83
  - test/dummy/db/development.sqlite3
82
84
  - test/dummy/db/schema.rb
83
- - test/dummy/db/test.sqlite3
84
85
  - test/dummy/log/development.log
85
86
  - test/dummy/log/test.log
86
87
  - test/dummy/public/404.html
@@ -89,10 +90,17 @@ files:
89
90
  - test/dummy/public/favicon.ico
90
91
  - test/dummy/Rakefile
91
92
  - test/dummy/README.rdoc
92
- - test/helpers_test.rb
93
+ - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
94
+ - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
95
+ - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
96
+ - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
97
+ - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
98
+ - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
99
+ - test/tags_test.rb
93
100
  - test/test_helper.rb
94
101
  homepage: https://github.com/mattways/hyphenify
95
- licenses: []
102
+ licenses:
103
+ - MIT
96
104
  metadata: {}
97
105
  post_install_message:
98
106
  rdoc_options: []
@@ -110,16 +118,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
118
  version: '0'
111
119
  requirements: []
112
120
  rubyforge_project:
113
- rubygems_version: 2.0.2
121
+ rubygems_version: 2.0.3
114
122
  signing_key:
115
123
  specification_version: 4
116
- summary: Force hyphens in rails tags helpers.
124
+ summary: Force hyphens in tags helpers.
117
125
  test_files:
118
126
  - test/dummy/app/assets/javascripts/application.js
119
127
  - test/dummy/app/assets/stylesheets/application.css
120
128
  - test/dummy/app/controllers/application_controller.rb
129
+ - test/dummy/app/controllers/pages_controller.rb
121
130
  - test/dummy/app/helpers/application_helper.rb
122
131
  - test/dummy/app/views/layouts/application.html.erb
132
+ - test/dummy/app/views/pages/form.html.erb
133
+ - test/dummy/app/views/pages/index.html.erb
123
134
  - test/dummy/bin/bundle
124
135
  - test/dummy/bin/rails
125
136
  - test/dummy/bin/rake
@@ -142,7 +153,6 @@ test_files:
142
153
  - test/dummy/config.ru
143
154
  - test/dummy/db/development.sqlite3
144
155
  - test/dummy/db/schema.rb
145
- - test/dummy/db/test.sqlite3
146
156
  - test/dummy/log/development.log
147
157
  - test/dummy/log/test.log
148
158
  - test/dummy/public/404.html
@@ -151,5 +161,11 @@ test_files:
151
161
  - test/dummy/public/favicon.ico
152
162
  - test/dummy/Rakefile
153
163
  - test/dummy/README.rdoc
154
- - test/helpers_test.rb
164
+ - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
165
+ - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
166
+ - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
167
+ - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
168
+ - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
169
+ - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
170
+ - test/tags_test.rb
155
171
  - test/test_helper.rb
@@ -1,7 +0,0 @@
1
- require 'hyphenify/rails/action_view/base'
2
- require 'hyphenify/rails/railtie'
3
-
4
- module Hyphenify
5
- module Rails
6
- end
7
- end
@@ -1,22 +0,0 @@
1
- module Hyphenify
2
- module Rails
3
- module ActionView
4
- module Base
5
- extend ActiveSupport::Concern
6
-
7
- included do
8
- alias_method_chain :tag_options, :hyphen
9
- end
10
-
11
- private
12
-
13
- def tag_options_with_hyphen(options, escape = true)
14
- options.stringify_keys!
15
- %w[id class for].each { |key| options[key] = options[key].to_s.dasherize if options.has_key? key }
16
- tag_options_without_hyphen options, escape
17
- end
18
-
19
- end
20
- end
21
- end
22
- end
@@ -1,16 +0,0 @@
1
- module Hyphenify
2
- module Rails
3
- class Railtie < ::Rails::Railtie
4
-
5
- initializer 'hyphenify' do
6
- ::ActionView::Base.send :include, Hyphenify::Rails::ActionView::Base
7
- if ::Rails::VERSION::MAJOR < 4
8
- ::ActionView::Helpers::InstanceTag.send :include, Hyphenify::Rails::ActionView::Base
9
- else
10
- ::ActionView::Helpers::Tags::Base.send :include, Hyphenify::Rails::ActionView::Base
11
- end
12
- end
13
-
14
- end
15
- end
16
- end
File without changes
@@ -1,18 +0,0 @@
1
- require 'test_helper'
2
-
3
- class HelpersTest < ActionView::TestCase
4
-
5
- test "simple tags should return id and class with hyphens" do
6
- html = tag(:div, class: 'the_class', id: 'the_id')
7
- assert html.to_s.include?('class="the-class" id="the-id"')
8
- end
9
-
10
- test "form tags should return id and class with hyphens" do
11
- html = form_for(:test, url: 'http://test.com') do |f|
12
- f.label(:id) + f.text_field(:id, class: 'the_class')
13
- end
14
- assert html.to_s.include?('for="test-id"')
15
- assert html.to_s.include?('class="the-class" id="test-id"')
16
- end
17
-
18
- end