buoys 0.5.0 → 0.6.0

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: 670b1f473d174ae3df8d3282ca8a3ff93708d97d
4
- data.tar.gz: 73ddc4931941e3ad1dc0e69012d5f8417e3135e2
3
+ metadata.gz: 1fbcaecaeb46ac751aa20c43f34ed8b87e35d556
4
+ data.tar.gz: 1d71a1a3167b114a0ea0a51d84363768a9715861
5
5
  SHA512:
6
- metadata.gz: 89bbf4990d63ae7731ad8449bd4835d06013c250016b791a9d11064c6d62a8277f821ac1ba1ec53175cdec5923abc2ababa5cf0903b2ae71eec6ed3d949ed814
7
- data.tar.gz: 56b67fb8fe20754a00f8bf4ea257ba7c69bf85e33e47a7d0b665eb7b2b29aa49473881e739104e8026a6caca52019fb0f3c1aef5b9702f40948a844a6e2ba0e6
6
+ metadata.gz: c24acee65cbe92b2761d1424ad74b1ad9ce1875ed960b6435b630080226c955011166bfaa1199dd71a7ee80e76f0399f3f993836e17e134591c5dbe4c2795d26
7
+ data.tar.gz: 82e710f6eee4a69fce6df38485a40aeb054c34a24cc3de532793384efaf206e79405b1f25c5878e7d5e5b7f5a5c2898d88713cb654f7a3e944b0a0a2f21a7b06
data/lib/buoys/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Buoys
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
@@ -10,7 +10,7 @@ module Buoys
10
10
  copy_file 'buoys.en.yml', 'config/locales/buoys.en.yml'
11
11
  copy_file 'breadcrumbs.rb', 'config/buoys/breadcrumbs.rb'
12
12
 
13
- if %(haml slim).include?(template_type = options[:template])
13
+ if %w(haml slim).include?(template_type = options[:template])
14
14
  copy_file "_buoys.html.#{template_type}", "app/views/breadcrumbs/_buoys.html.#{template_type}"
15
15
  else
16
16
  copy_file '_buoys.html.erb', 'app/views/breadcrumbs/_buoys.html.erb'
@@ -1,12 +1,16 @@
1
1
  <% if buoys.any? %>
2
- <ol class="breadcrumb">
3
- <% buoys.each do |link| %>
4
- <li>
2
+ <ol itemscope itemtype='http://schema.org/BreadcrumbList' class='breadcrumb'>
3
+ <% buoys.each.with_index(1) do |link, i| %>
4
+ <li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
5
5
  <%# if `link.current?` is true, link.options includes {class: 'current'}. %>
6
6
  <% if link.current? %>
7
- <span><%= link.text %></span>
7
+ <span itemprop='name'><%= link.text %></span>
8
+ <meta itemprop='position' content='<%= i %>' />
8
9
  <% else %>
9
- <%= link_to link.text, link.url, link.options %>
10
+ <%= link_to link.text, link.url, link.options.merge(itemprop: :item) do %>
11
+ <span itemprop='name'><%= link.text %></span>
12
+ <% end %>
13
+ <meta itemprop='position' content='<%= i %>' />
10
14
  <% end %>
11
15
  </li>
12
16
  <% end %>
@@ -1,9 +1,12 @@
1
1
  - if buoys.any?
2
- %ol.breadcrumb
3
- - buoys.each do |link|
4
- %li
2
+ %ol.breadcrumb{itemscope: true, itemtype: 'http://schema.org/BreadcrumbList'}
3
+ - buoys.each.with_index(1) do |link, i|
4
+ %li{itemprop: 'itemListElement', itemscope: true, itemtype: 'http://schema.org/ListItem'}
5
5
  - # if `link.current?` is true, link.options includes {class: 'current'}.
6
6
  - if link.current?
7
- %span= link.text
7
+ %span{itemprop: 'name'}= link.text
8
+ %meta{itemprop: 'position', content: i}
8
9
  - else
9
- = link_to link.text, link.url, link.options
10
+ = link_to link.url, link.options.merge(itemprop: :item) do
11
+ %span{itemprop: 'name'}= link.text
12
+ %meta{itemprop: 'position', content: i}
@@ -1,10 +1,14 @@
1
1
  - if buoys.any?
2
- ol.breadcrumb
3
- - buoys.each do |link|
4
- li
2
+ ol.breadcrumb itemscope=true itemtype='http://schema.org/BreadcrumbList'
3
+ - buoys.each.with_index(1) do |link, i|
4
+ li itemprop='itemListElement' itemscope=true itemtype='http://schema.org/ListItem'
5
5
  - # if `link.current?` is true, link.options includes {class: 'current'}.
6
6
  - if link.current?
7
- span
7
+ span itemprop='name'
8
8
  = link.text
9
+ meta itemprop='position' content=i
9
10
  - else
10
- = link_to link.text, link.url, link.options
11
+ = link_to link.url, link.options.merge(itemprop: :item) do
12
+ span itemprop='name'
13
+ =link.text
14
+ meta itemprop='position' content=i
@@ -0,0 +1,51 @@
1
+ # rubocop:disable Style/RegexpLiteral,Style/PercentLiteralDelimiters
2
+ require 'test_helper'
3
+ require 'generators/buoys/install_generator'
4
+
5
+ class BuoysGeneratorTest < Rails::Generators::TestCase
6
+ tests ::Buoys::InstallGenerator
7
+ destination dest_root = File.expand_path('./generator_root', File.dirname(__FILE__))
8
+
9
+ Minitest.after_run do
10
+ FileUtils.rm_rf(Dir.glob("#{dest_root}/**"))
11
+ end
12
+
13
+ test 'no template option' do
14
+ run_generator
15
+
16
+ assert_file File.expand_path('./app/views/breadcrumbs/_buoys.html.erb', dest_root) do |content|
17
+ assert_match %r|itemscope itemtype='http://schema.org/BreadcrumbList'|, content
18
+ assert_match %r|<li itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>|, content
19
+ assert_match %r|<span itemprop='name'>|, content
20
+ assert_match %r|<meta itemprop='position' content='<%= i %>' />|, content
21
+ end
22
+ assert_file File.expand_path('./config/buoys/breadcrumbs.rb', dest_root)
23
+ assert_file File.expand_path('./config/locales/buoys.en.yml', dest_root)
24
+ end
25
+
26
+ test 'option --template haml' do
27
+ run_generator %w(--template haml)
28
+
29
+ assert_file File.expand_path('./app/views/breadcrumbs/_buoys.html.haml', dest_root) do |content|
30
+ assert_match %r|%ol.breadcrumb{itemscope: true, itemtype: 'http://schema.org/BreadcrumbList'}|, content
31
+ assert_match %r|%li{itemprop: 'itemListElement', itemscope: true, itemtype: 'http://schema.org/ListItem'}|, content
32
+ assert_match %r|%span{itemprop: 'name'}=|, content
33
+ assert_match %r|%meta{itemprop: 'position', content: i}|, content
34
+ end
35
+ assert_file File.expand_path('./config/buoys/breadcrumbs.rb', dest_root)
36
+ assert_file File.expand_path('./config/locales/buoys.en.yml', dest_root)
37
+ end
38
+
39
+ test 'option --template slim' do
40
+ run_generator %w(--template slim)
41
+
42
+ assert_file File.expand_path('./app/views/breadcrumbs/_buoys.html.slim', dest_root) do |content|
43
+ assert_match %r|ol.breadcrumb itemscope=true itemtype='http://schema.org/BreadcrumbList'|, content
44
+ assert_match %r|li itemprop='itemListElement' itemscope=true itemtype='http://schema.org/ListItem'|, content
45
+ assert_match %r|span itemprop='name'|, content
46
+ assert_match %r|meta itemprop='position' content=i|, content
47
+ end
48
+ assert_file File.expand_path('./config/buoys/breadcrumbs.rb', dest_root)
49
+ assert_file File.expand_path('./config/locales/buoys.en.yml', dest_root)
50
+ end
51
+ end
@@ -1,3 +1,4 @@
1
+ # rubocop:disable Metrics/ClassLength
1
2
  require 'test_helper'
2
3
 
3
4
  class BuoysHelerTest < ActionView::TestCase
@@ -1,6 +1,7 @@
1
1
  class ItemsController < ApplicationController
2
2
  def show
3
3
  end
4
+
4
5
  def edit
5
6
  end
6
7
  end
@@ -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 "buoys"
6
+ require 'buoys'
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -21,7 +21,8 @@ module Dummy
21
21
  config.i18n.default_locale = :en
22
22
 
23
23
  # Do not swallow errors in after_commit/after_rollback callbacks.
24
- if Gem::Version.new(Rails.version) >= Gem::Version.new("4.2.0") && Gem::Version.new(Rails.version) <= Gem::Version.new("5.0.0")
24
+ if Gem::Version.new(Rails.version) >= Gem::Version.new('4.2.0') &&
25
+ Gem::Version.new(Rails.version) <= Gem::Version.new('5.0.0')
25
26
  config.active_record.raise_in_transactional_callbacks = true
26
27
  end
27
28
  end
@@ -15,7 +15,7 @@ Rails.application.configure do
15
15
  # Configure static file server for tests with Cache-Control for performance.
16
16
  if Gem::Version.new(Rails.version) >= Gem::Version.new('5.0.0')
17
17
  config.public_file_server.enabled = true
18
- config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
18
+ config.public_file_server.headers = {'Cache-Control' => 'public, max-age=3600'}
19
19
  else
20
20
  config.serve_static_files = true
21
21
  config.static_cache_control = 'public, max-age=3600'
Binary file
@@ -0,0 +1,492 @@
1
+  (10.7ms) CREATE TABLE "items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2
+  (5.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3
+  (6.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
4
+  (0.2ms) SELECT version FROM "schema_migrations"
5
+  (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160602144324')
6
+  (0.1ms) select sqlite_version(*)
7
+  (5.1ms) INSERT INTO schema_migrations (version) VALUES ('20160602144150');
8
+
9
+ 
10
+  (7.4ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
11
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
12
+  (0.1ms) begin transaction
13
+ SQL (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2016-11-16 16:25:53 UTC], ["updated_at", 2016-11-16 16:25:53 UTC]]
14
+  (4.5ms) commit transaction
15
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
16
+  (0.0ms) begin transaction
17
+  (0.0ms) commit transaction
18
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
19
+  (0.1ms) begin transaction
20
+ --------------------------------------------------------------------------
21
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
22
+ --------------------------------------------------------------------------
23
+ Rendered breadcrumbs/_buoys.erb (6.0ms)
24
+  (0.1ms) rollback transaction
25
+  (0.0ms) begin transaction
26
+ ---------------------------------------------------
27
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
28
+ ---------------------------------------------------
29
+  (0.0ms) SAVEPOINT active_record_1
30
+ SQL (0.2ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-11-16 16:25:53 UTC], ["updated_at", 2016-11-16 16:25:53 UTC]]
31
+  (0.0ms) RELEASE SAVEPOINT active_record_1
32
+  (0.0ms) SAVEPOINT active_record_1
33
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-11-16 16:25:53 UTC], ["updated_at", 2016-11-16 16:25:53 UTC]]
34
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35
+ Rendered breadcrumbs/_buoys.erb (2.5ms)
36
+  (0.2ms) rollback transaction
37
+  (0.0ms) begin transaction
38
+ ------------------------------------------------------------
39
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
40
+ ------------------------------------------------------------
41
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
42
+  (0.0ms) rollback transaction
43
+  (0.1ms) begin transaction
44
+ --------------------------------------------
45
+ BuoysHelerTest: test_.buoy_(not_only_active)
46
+ --------------------------------------------
47
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
48
+  (0.0ms) rollback transaction
49
+  (0.0ms) begin transaction
50
+ -------------------------------------------------------
51
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
52
+ -------------------------------------------------------
53
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
54
+  (0.0ms) rollback transaction
55
+  (0.0ms) begin transaction
56
+ -----------------------------------------
57
+ BuoysHelerTest: test_.buoy_(only_current)
58
+ -----------------------------------------
59
+ Rendered breadcrumbs/_buoys.erb (0.2ms)
60
+  (0.0ms) rollback transaction
61
+  (0.1ms) begin transaction
62
+ ------------------------------------------
63
+ BuoysHelerTest: test_.buoys_(no_given_key)
64
+ ------------------------------------------
65
+ Rendered breadcrumbs/_buoys.erb (0.1ms)
66
+  (0.1ms) rollback transaction
67
+  (0.1ms) begin transaction
68
+ ---------------------------------
69
+ BuoysLoaderTest: test_.buoy_files
70
+ ---------------------------------
71
+  (0.1ms) rollback transaction
72
+  (0.1ms) begin transaction
73
+ ----------------------------
74
+ BuoysLoaderTest: test_.buoys
75
+ ----------------------------
76
+  (0.1ms) rollback transaction
77
+  (0.1ms) begin transaction
78
+ ----------------------------------------------------------------------------------
79
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
80
+ ----------------------------------------------------------------------------------
81
+  (0.0ms) rollback transaction
82
+  (0.1ms) begin transaction
83
+ ------------------------------------------------
84
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
85
+ ------------------------------------------------
86
+  (0.0ms) rollback transaction
87
+  (0.1ms) begin transaction
88
+ --------------------------------
89
+ BuoysTest: test_.buoy_file_paths
90
+ --------------------------------
91
+  (0.0ms) rollback transaction
92
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
93
+  (0.1ms) begin transaction
94
+ ----------------------------------------------------------------------------------
95
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
96
+ ----------------------------------------------------------------------------------
97
+  (0.1ms) rollback transaction
98
+  (0.0ms) begin transaction
99
+ ------------------------------------------------
100
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
101
+ ------------------------------------------------
102
+  (0.0ms) rollback transaction
103
+  (0.0ms) begin transaction
104
+ ---------------------------------
105
+ BuoysLoaderTest: test_.buoy_files
106
+ ---------------------------------
107
+  (0.0ms) rollback transaction
108
+  (0.0ms) begin transaction
109
+ ----------------------------
110
+ BuoysLoaderTest: test_.buoys
111
+ ----------------------------
112
+  (0.0ms) rollback transaction
113
+  (0.0ms) begin transaction
114
+ --------------------------------
115
+ BuoysTest: test_.buoy_file_paths
116
+ --------------------------------
117
+  (0.0ms) rollback transaction
118
+  (0.1ms) begin transaction
119
+ --------------------------------------------
120
+ BuoysHelerTest: test_.buoy_(not_only_active)
121
+ --------------------------------------------
122
+ Rendered breadcrumbs/_buoys.erb (3.4ms)
123
+  (0.1ms) rollback transaction
124
+  (0.0ms) begin transaction
125
+ --------------------------------------------------------------------------
126
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
127
+ --------------------------------------------------------------------------
128
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
129
+  (0.0ms) rollback transaction
130
+  (0.0ms) begin transaction
131
+ -----------------------------------------
132
+ BuoysHelerTest: test_.buoy_(only_current)
133
+ -----------------------------------------
134
+ Rendered breadcrumbs/_buoys.erb (0.2ms)
135
+  (0.0ms) rollback transaction
136
+  (0.0ms) begin transaction
137
+ ---------------------------------------------------
138
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
139
+ ---------------------------------------------------
140
+  (0.0ms) SAVEPOINT active_record_1
141
+ SQL (0.2ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-11-16 16:31:01 UTC], ["updated_at", 2016-11-16 16:31:01 UTC]]
142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
143
+  (0.1ms) SAVEPOINT active_record_1
144
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-11-16 16:31:01 UTC], ["updated_at", 2016-11-16 16:31:01 UTC]]
145
+  (0.0ms) RELEASE SAVEPOINT active_record_1
146
+ Rendered breadcrumbs/_buoys.erb (1.6ms)
147
+  (0.1ms) rollback transaction
148
+  (0.0ms) begin transaction
149
+ ------------------------------------------
150
+ BuoysHelerTest: test_.buoys_(no_given_key)
151
+ ------------------------------------------
152
+ Rendered breadcrumbs/_buoys.erb (0.0ms)
153
+  (0.0ms) rollback transaction
154
+  (0.0ms) begin transaction
155
+ ------------------------------------------------------------
156
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
157
+ ------------------------------------------------------------
158
+ Rendered breadcrumbs/_buoys.erb (0.5ms)
159
+  (0.1ms) rollback transaction
160
+  (0.1ms) begin transaction
161
+ -------------------------------------------------------
162
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
163
+ -------------------------------------------------------
164
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
165
+  (0.1ms) rollback transaction
166
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
167
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
168
+  (0.1ms) begin transaction
169
+ ----------------------------
170
+ BuoysLoaderTest: test_.buoys
171
+ ----------------------------
172
+  (0.1ms) rollback transaction
173
+  (0.0ms) begin transaction
174
+ ---------------------------------
175
+ BuoysLoaderTest: test_.buoy_files
176
+ ---------------------------------
177
+  (0.0ms) rollback transaction
178
+  (0.0ms) begin transaction
179
+ ----------------------------------------------------------------------------------
180
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
181
+ ----------------------------------------------------------------------------------
182
+  (0.0ms) rollback transaction
183
+  (0.0ms) begin transaction
184
+ ------------------------------------------------
185
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
186
+ ------------------------------------------------
187
+  (0.0ms) rollback transaction
188
+  (0.0ms) begin transaction
189
+ --------------------------------
190
+ BuoysTest: test_.buoy_file_paths
191
+ --------------------------------
192
+  (0.0ms) rollback transaction
193
+  (0.0ms) begin transaction
194
+ -----------------------------------------
195
+ BuoysHelerTest: test_.buoy_(only_current)
196
+ -----------------------------------------
197
+ Rendered breadcrumbs/_buoys.erb (3.1ms)
198
+  (0.1ms) rollback transaction
199
+  (0.0ms) begin transaction
200
+ ------------------------------------------------------------
201
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
202
+ ------------------------------------------------------------
203
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
204
+  (0.0ms) rollback transaction
205
+  (0.0ms) begin transaction
206
+ -------------------------------------------------------
207
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
208
+ -------------------------------------------------------
209
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
210
+  (0.0ms) rollback transaction
211
+  (0.0ms) begin transaction
212
+ ---------------------------------------------------
213
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
214
+ ---------------------------------------------------
215
+  (0.0ms) SAVEPOINT active_record_1
216
+ SQL (0.2ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-11-16 16:42:10 UTC], ["updated_at", 2016-11-16 16:42:10 UTC]]
217
+  (0.0ms) RELEASE SAVEPOINT active_record_1
218
+  (0.0ms) SAVEPOINT active_record_1
219
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-11-16 16:42:10 UTC], ["updated_at", 2016-11-16 16:42:10 UTC]]
220
+  (0.0ms) RELEASE SAVEPOINT active_record_1
221
+ Rendered breadcrumbs/_buoys.erb (1.6ms)
222
+  (0.1ms) rollback transaction
223
+  (0.0ms) begin transaction
224
+ ------------------------------------------
225
+ BuoysHelerTest: test_.buoys_(no_given_key)
226
+ ------------------------------------------
227
+ Rendered breadcrumbs/_buoys.erb (0.0ms)
228
+  (0.0ms) rollback transaction
229
+  (0.0ms) begin transaction
230
+ --------------------------------------------------------------------------
231
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
232
+ --------------------------------------------------------------------------
233
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
234
+  (0.1ms) rollback transaction
235
+  (0.1ms) begin transaction
236
+ --------------------------------------------
237
+ BuoysHelerTest: test_.buoy_(not_only_active)
238
+ --------------------------------------------
239
+ Rendered breadcrumbs/_buoys.erb (0.8ms)
240
+  (0.1ms) rollback transaction
241
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
242
+  (0.1ms) begin transaction
243
+ -----------------------------------------
244
+ BuoysHelerTest: test_.buoy_(only_current)
245
+ -----------------------------------------
246
+ Rendered breadcrumbs/_buoys.erb (5.6ms)
247
+  (0.1ms) rollback transaction
248
+  (0.0ms) begin transaction
249
+ -------------------------------------------------------
250
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
251
+ -------------------------------------------------------
252
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
253
+  (0.0ms) rollback transaction
254
+  (0.0ms) begin transaction
255
+ ---------------------------------------------------
256
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
257
+ ---------------------------------------------------
258
+  (0.1ms) SAVEPOINT active_record_1
259
+ SQL (0.3ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-11-16 16:42:46 UTC], ["updated_at", 2016-11-16 16:42:46 UTC]]
260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
261
+  (0.0ms) SAVEPOINT active_record_1
262
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-11-16 16:42:46 UTC], ["updated_at", 2016-11-16 16:42:46 UTC]]
263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
264
+ Rendered breadcrumbs/_buoys.erb (2.1ms)
265
+  (0.1ms) rollback transaction
266
+  (0.0ms) begin transaction
267
+ ------------------------------------------------------------
268
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
269
+ ------------------------------------------------------------
270
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
271
+  (0.0ms) rollback transaction
272
+  (0.0ms) begin transaction
273
+ --------------------------------------------
274
+ BuoysHelerTest: test_.buoy_(not_only_active)
275
+ --------------------------------------------
276
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
277
+  (0.0ms) rollback transaction
278
+  (0.0ms) begin transaction
279
+ --------------------------------------------------------------------------
280
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
281
+ --------------------------------------------------------------------------
282
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
283
+  (0.0ms) rollback transaction
284
+  (0.0ms) begin transaction
285
+ ------------------------------------------
286
+ BuoysHelerTest: test_.buoys_(no_given_key)
287
+ ------------------------------------------
288
+ Rendered breadcrumbs/_buoys.erb (0.0ms)
289
+  (0.0ms) rollback transaction
290
+  (0.0ms) begin transaction
291
+ --------------------------------
292
+ BuoysTest: test_.buoy_file_paths
293
+ --------------------------------
294
+  (0.0ms) rollback transaction
295
+  (0.0ms) begin transaction
296
+ ----------------------------------------------------------------------------------
297
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
298
+ ----------------------------------------------------------------------------------
299
+  (0.0ms) rollback transaction
300
+  (0.0ms) begin transaction
301
+ ------------------------------------------------
302
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
303
+ ------------------------------------------------
304
+  (0.0ms) rollback transaction
305
+  (0.0ms) begin transaction
306
+ ---------------------------------
307
+ BuoysLoaderTest: test_.buoy_files
308
+ ---------------------------------
309
+  (0.0ms) rollback transaction
310
+  (0.0ms) begin transaction
311
+ ----------------------------
312
+ BuoysLoaderTest: test_.buoys
313
+ ----------------------------
314
+  (0.0ms) rollback transaction
315
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
316
+  (0.1ms) begin transaction
317
+ ----------------------------------------------------------------------------------
318
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
319
+ ----------------------------------------------------------------------------------
320
+  (0.2ms) rollback transaction
321
+  (0.1ms) begin transaction
322
+ ------------------------------------------------
323
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
324
+ ------------------------------------------------
325
+  (0.1ms) rollback transaction
326
+  (0.0ms) begin transaction
327
+ ---------------------------------
328
+ BuoysLoaderTest: test_.buoy_files
329
+ ---------------------------------
330
+  (0.0ms) rollback transaction
331
+  (0.0ms) begin transaction
332
+ ----------------------------
333
+ BuoysLoaderTest: test_.buoys
334
+ ----------------------------
335
+  (0.0ms) rollback transaction
336
+  (0.0ms) begin transaction
337
+ -------------------------------------------
338
+ BuoysGeneratorTest: test_no_template_option
339
+ -------------------------------------------
340
+  (0.1ms) rollback transaction
341
+  (0.1ms) begin transaction
342
+ -----------------------------------------------
343
+ BuoysGeneratorTest: test_option_--template_slim
344
+ -----------------------------------------------
345
+  (0.0ms) rollback transaction
346
+  (0.0ms) begin transaction
347
+ -----------------------------------------------
348
+ BuoysGeneratorTest: test_option_--template_haml
349
+ -----------------------------------------------
350
+  (0.0ms) rollback transaction
351
+  (0.0ms) begin transaction
352
+ ------------------------------------------
353
+ BuoysHelerTest: test_.buoys_(no_given_key)
354
+ ------------------------------------------
355
+ Rendered breadcrumbs/_buoys.erb (1.1ms)
356
+  (0.1ms) rollback transaction
357
+  (0.0ms) begin transaction
358
+ ------------------------------------------------------------
359
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
360
+ ------------------------------------------------------------
361
+ Rendered breadcrumbs/_buoys.erb (2.2ms)
362
+  (0.1ms) rollback transaction
363
+  (0.1ms) begin transaction
364
+ --------------------------------------------
365
+ BuoysHelerTest: test_.buoy_(not_only_active)
366
+ --------------------------------------------
367
+ Rendered breadcrumbs/_buoys.erb (0.5ms)
368
+  (0.1ms) rollback transaction
369
+  (0.0ms) begin transaction
370
+ ---------------------------------------------------
371
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
372
+ ---------------------------------------------------
373
+  (0.1ms) SAVEPOINT active_record_1
374
+ SQL (0.4ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-12-31 16:10:52 UTC], ["updated_at", 2016-12-31 16:10:52 UTC]]
375
+  (0.1ms) RELEASE SAVEPOINT active_record_1
376
+  (0.1ms) SAVEPOINT active_record_1
377
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-12-31 16:10:52 UTC], ["updated_at", 2016-12-31 16:10:52 UTC]]
378
+  (0.1ms) RELEASE SAVEPOINT active_record_1
379
+ Rendered breadcrumbs/_buoys.erb (1.6ms)
380
+  (0.1ms) rollback transaction
381
+  (0.1ms) begin transaction
382
+ -------------------------------------------------------
383
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
384
+ -------------------------------------------------------
385
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
386
+  (0.0ms) rollback transaction
387
+  (0.0ms) begin transaction
388
+ -----------------------------------------
389
+ BuoysHelerTest: test_.buoy_(only_current)
390
+ -----------------------------------------
391
+ Rendered breadcrumbs/_buoys.erb (0.2ms)
392
+  (0.1ms) rollback transaction
393
+  (0.0ms) begin transaction
394
+ --------------------------------------------------------------------------
395
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
396
+ --------------------------------------------------------------------------
397
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
398
+  (0.1ms) rollback transaction
399
+  (0.1ms) begin transaction
400
+ --------------------------------
401
+ BuoysTest: test_.buoy_file_paths
402
+ --------------------------------
403
+  (0.0ms) rollback transaction
404
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
405
+  (0.1ms) begin transaction
406
+ ---------------------------------
407
+ BuoysLoaderTest: test_.buoy_files
408
+ ---------------------------------
409
+  (0.0ms) rollback transaction
410
+  (0.0ms) begin transaction
411
+ ----------------------------
412
+ BuoysLoaderTest: test_.buoys
413
+ ----------------------------
414
+  (0.0ms) rollback transaction
415
+  (0.0ms) begin transaction
416
+ -----------------------------------------------
417
+ BuoysGeneratorTest: test_option_--template_slim
418
+ -----------------------------------------------
419
+  (0.0ms) rollback transaction
420
+  (0.0ms) begin transaction
421
+ -------------------------------------------
422
+ BuoysGeneratorTest: test_no_template_option
423
+ -------------------------------------------
424
+  (0.0ms) rollback transaction
425
+  (0.0ms) begin transaction
426
+ -----------------------------------------------
427
+ BuoysGeneratorTest: test_option_--template_haml
428
+ -----------------------------------------------
429
+  (0.0ms) rollback transaction
430
+  (0.0ms) begin transaction
431
+ ----------------------------------------------------------------------------------
432
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
433
+ ----------------------------------------------------------------------------------
434
+  (0.1ms) rollback transaction
435
+  (0.0ms) begin transaction
436
+ ------------------------------------------------
437
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
438
+ ------------------------------------------------
439
+  (0.1ms) rollback transaction
440
+  (0.0ms) begin transaction
441
+ --------------------------------
442
+ BuoysTest: test_.buoy_file_paths
443
+ --------------------------------
444
+  (0.0ms) rollback transaction
445
+  (0.0ms) begin transaction
446
+ ------------------------------------------
447
+ BuoysHelerTest: test_.buoys_(no_given_key)
448
+ ------------------------------------------
449
+ Rendered breadcrumbs/_buoys.erb (0.9ms)
450
+  (0.0ms) rollback transaction
451
+  (0.0ms) begin transaction
452
+ --------------------------------------------------------------------------
453
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
454
+ --------------------------------------------------------------------------
455
+ Rendered breadcrumbs/_buoys.erb (2.1ms)
456
+  (0.1ms) rollback transaction
457
+  (0.0ms) begin transaction
458
+ ---------------------------------------------------
459
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
460
+ ---------------------------------------------------
461
+  (0.1ms) SAVEPOINT active_record_1
462
+ SQL (0.3ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", 2016-12-31 16:13:25 UTC], ["updated_at", 2016-12-31 16:13:25 UTC]]
463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
464
+  (0.0ms) SAVEPOINT active_record_1
465
+ SQL (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", 2016-12-31 16:13:25 UTC], ["updated_at", 2016-12-31 16:13:25 UTC]]
466
+  (0.1ms) RELEASE SAVEPOINT active_record_1
467
+ Rendered breadcrumbs/_buoys.erb (2.6ms)
468
+  (0.3ms) rollback transaction
469
+  (0.1ms) begin transaction
470
+ -----------------------------------------
471
+ BuoysHelerTest: test_.buoy_(only_current)
472
+ -----------------------------------------
473
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
474
+  (0.0ms) rollback transaction
475
+  (0.0ms) begin transaction
476
+ -------------------------------------------------------
477
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
478
+ -------------------------------------------------------
479
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
480
+  (0.0ms) rollback transaction
481
+  (0.0ms) begin transaction
482
+ --------------------------------------------
483
+ BuoysHelerTest: test_.buoy_(not_only_active)
484
+ --------------------------------------------
485
+ Rendered breadcrumbs/_buoys.erb (0.4ms)
486
+  (0.0ms) rollback transaction
487
+  (0.0ms) begin transaction
488
+ ------------------------------------------------------------
489
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
490
+ ------------------------------------------------------------
491
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
492
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buoys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - muryoimpl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2016-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -92,6 +92,7 @@ files:
92
92
  - lib/generators/buoys/templates/breadcrumbs.rb
93
93
  - lib/generators/buoys/templates/buoys.en.yml
94
94
  - test/buoys_buoy_test.rb
95
+ - test/buoys_generator_test.rb
95
96
  - test/buoys_helper_test.rb
96
97
  - test/buoys_loader_test.rb
97
98
  - test/buoys_test.rb
@@ -134,6 +135,8 @@ files:
134
135
  - test/dummy/db/migrate/20160602144150_create_items.rb
135
136
  - test/dummy/db/migrate/20160602144324_create_users.rb
136
137
  - test/dummy/db/schema.rb
138
+ - test/dummy/db/test.sqlite3
139
+ - test/dummy/log/test.log
137
140
  - test/dummy/public/404.html
138
141
  - test/dummy/public/422.html
139
142
  - test/dummy/public/500.html
@@ -159,11 +162,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
162
  version: '0'
160
163
  requirements: []
161
164
  rubyforge_project:
162
- rubygems_version: 2.5.1
165
+ rubygems_version: 2.6.8
163
166
  signing_key:
164
167
  specification_version: 4
165
168
  summary: A Ruby on Rails breadcrumbs plugin.
166
169
  test_files:
170
+ - test/buoys_generator_test.rb
167
171
  - test/buoys_buoy_test.rb
168
172
  - test/buoys_test.rb
169
173
  - test/buoys_loader_test.rb
@@ -184,12 +188,14 @@ test_files:
184
188
  - test/dummy/bin/bundle
185
189
  - test/dummy/db/migrate/20160602144324_create_users.rb
186
190
  - test/dummy/db/migrate/20160602144150_create_items.rb
191
+ - test/dummy/db/test.sqlite3
187
192
  - test/dummy/db/schema.rb
188
193
  - test/dummy/public/422.html
189
194
  - test/dummy/public/404.html
190
195
  - test/dummy/public/500.html
191
196
  - test/dummy/public/favicon.ico
192
197
  - test/dummy/Rakefile
198
+ - test/dummy/log/test.log
193
199
  - test/dummy/config/database.yml
194
200
  - test/dummy/config/initializers/assets.rb
195
201
  - test/dummy/config/initializers/cookies_serializer.rb