buoys 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e9c604499d92dd5cc1a735a47f15c4a25d96db6486c8d2528b4df5fc372da9c
4
- data.tar.gz: 9f5920b1f5cbc085364d1c6baf23ad21f2467ec2ec3958f4a7d2f7a5b41db861
3
+ metadata.gz: 7206430f425484e8e75b8cd16a49b6a737dafdc54486dfc7d803d1cd06a05b91
4
+ data.tar.gz: 170521a71be7ff33dd3d1a29a377f3e8dc2f2993debae6273e0ef3dc01249cd4
5
5
  SHA512:
6
- metadata.gz: 4849d2279a185fc9a34c0326e21469ffad41a01195d287c2371023bdfc1a5d9c4f4a568e4ee2651d8490d445da380d48cc23fcb1153fdc828d39a09111ff8257
7
- data.tar.gz: c6871638d0efadbb643cf81bf99e61ef7860aaf400b60a3ff29360f0b533c330c8c5b213dbf897b7e8221bbfabd9f0721e6e8cc319a11541bd591614d15f5f9e
6
+ metadata.gz: 126f9ac46f9f98f28e24cdb3566c9ebc3d997c8e55f793ebc3e2545b1821e74944123748d02b6b36396b35d93f91b90bdb8afab2891f8d2502564aba60a09fbb
7
+ data.tar.gz: 153b7a25618e75baa83a554cacee3d97ef68adf320591c1bb1d20838655b0c067fb34a8a727b1def1f6b6958535d8c8e95a79046e9e7661af34755bde03276b3
data/lib/buoys/buoy.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  module Buoys
4
4
  class Buoy
5
5
  attr_reader :previous, :context
6
+
6
7
  # buoy :account do
7
8
  # link 'Account', account_path
8
9
  # end
data/lib/buoys/config.rb CHANGED
@@ -3,9 +3,7 @@
3
3
  module Buoys
4
4
  class Config
5
5
  class << self
6
- attr_accessor :current_class
7
-
8
- attr_accessor :link_current
6
+ attr_accessor :current_class, :link_current
9
7
  end
10
8
  end
11
9
  end
data/lib/buoys/loader.rb CHANGED
@@ -32,7 +32,7 @@ module Buoys
32
32
  loaded_times.clear
33
33
 
34
34
  buoy_files.each do |file|
35
- instance_eval File.open(file).read, file
35
+ instance_eval File.read(file), file
36
36
  loaded_times << File.mtime(file)
37
37
  end
38
38
  end
data/lib/buoys/railtie.rb CHANGED
@@ -4,7 +4,7 @@ module Buoys
4
4
  class Railtie < ::Rails::Railtie
5
5
  initializer 'buoys' do
6
6
  ActiveSupport.on_load(:action_view) do
7
- ActionView::Base.send :include, Buoys::Helper
7
+ ActionView::Base.include Buoys::Helper
8
8
  end
9
9
  end
10
10
  end
data/lib/buoys/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buoys
4
- VERSION = '2.0.2'.freeze
4
+ VERSION = '2.1.0'
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Style/RegexpLiteral, Metrics/LineLength
3
+ # rubocop:disable Style/RegexpLiteral, Layout/LineLength
4
4
  require 'test_helper'
5
5
  require 'generators/buoys/install_generator'
6
6
 
@@ -51,4 +51,4 @@ class BuoysGeneratorTest < Rails::Generators::TestCase
51
51
  assert_file File.expand_path('./config/locales/buoys.en.yml', dest_root)
52
52
  end
53
53
  end
54
- # rubocop:enable Style/RegexpLiteral, Metrics/LineLength
54
+ # rubocop:enable Style/RegexpLiteral, Layout/LineLength
@@ -103,3 +103,27 @@ true by adding the following to your application.rb file:
103
103
   (0.0ms) begin transaction
104
104
  ActiveRecord::InternalMetadata Update (0.1ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2021-01-16 06:49:23.451712"], ["key", "environment"]]
105
105
   (2.7ms) commit transaction
106
+ DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
107
+ `legacy_connection_handling` to `false` in your application.
108
+
109
+ The new connection handling does not support `connection_handlers`
110
+ getter and setter.
111
+
112
+ Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
113
+ (called from require at bin/rails:4)
114
+ DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
115
+ `legacy_connection_handling` to `false` in your application.
116
+
117
+ The new connection handling does not support `connection_handlers`
118
+ getter and setter.
119
+
120
+ Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
121
+ (called from require at bin/rails:4)
122
+ DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set
123
+ `legacy_connection_handling` to `false` in your application.
124
+
125
+ The new connection handling does not support `connection_handlers`
126
+ getter and setter.
127
+
128
+ Read more about how to migrate at: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
129
+ (called from require at bin/rails:4)
@@ -619,3 +619,97 @@ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
619
619
  BuoysTest: test_.buoy_file_paths
620
620
  --------------------------------
621
621
   (0.0ms) rollback transaction
622
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
623
+  (0.0ms) begin transaction
624
+ -----------------------------------------------
625
+ BuoysGeneratorTest: test_option_--template_slim
626
+ -----------------------------------------------
627
+  (0.0ms) rollback transaction
628
+  (0.0ms) begin transaction
629
+ -----------------------------------------------
630
+ BuoysGeneratorTest: test_option_--template_haml
631
+ -----------------------------------------------
632
+  (0.0ms) rollback transaction
633
+  (0.0ms) begin transaction
634
+ -------------------------------------------
635
+ BuoysGeneratorTest: test_no_template_option
636
+ -------------------------------------------
637
+  (0.0ms) rollback transaction
638
+  (0.0ms) begin transaction
639
+ ------------------------------------------
640
+ BuoysHelerTest: test_.buoys_(no_given_key)
641
+ ------------------------------------------
642
+ Rendered breadcrumbs/_buoys.erb (0.5ms)
643
+  (0.0ms) rollback transaction
644
+  (0.0ms) begin transaction
645
+ ------------------------------------------------------------
646
+ BuoysHelerTest: test_.buoy_(has_2_`link`s_in_one_buoy_block)
647
+ ------------------------------------------------------------
648
+ Rendered breadcrumbs/_buoys.erb (1.8ms)
649
+  (0.0ms) rollback transaction
650
+  (0.0ms) begin transaction
651
+ --------------------------------------------
652
+ BuoysHelerTest: test_.buoy_(not_only_active)
653
+ --------------------------------------------
654
+ Rendered breadcrumbs/_buoys.erb (0.3ms)
655
+  (0.0ms) rollback transaction
656
+  (0.0ms) begin transaction
657
+ ---------------------------------------------------
658
+ BuoysHelerTest: test_.buoy_(use_polymorphic_routes)
659
+ ---------------------------------------------------
660
+  (0.0ms) SAVEPOINT active_record_1
661
+ User Create (0.1ms) INSERT INTO "users" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test user"], ["created_at", "2022-02-15 15:38:54.845963"], ["updated_at", "2022-02-15 15:38:54.845963"]]
662
+  (0.0ms) RELEASE SAVEPOINT active_record_1
663
+  (0.0ms) SAVEPOINT active_record_1
664
+ Item Create (0.1ms) INSERT INTO "items" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test item"], ["created_at", "2022-02-15 15:38:54.848511"], ["updated_at", "2022-02-15 15:38:54.848511"]]
665
+  (0.0ms) RELEASE SAVEPOINT active_record_1
666
+ Rendered breadcrumbs/_buoys.erb (0.9ms)
667
+  (0.1ms) rollback transaction
668
+  (0.0ms) begin transaction
669
+ -----------------------------------------
670
+ BuoysHelerTest: test_.buoy_(only_current)
671
+ -----------------------------------------
672
+ Rendered breadcrumbs/_buoys.erb (0.1ms)
673
+  (0.0ms) rollback transaction
674
+  (0.0ms) begin transaction
675
+ -------------------------------------------------------
676
+ BuoysHelerTest: test_.buoy_(receive_multiple_arguments)
677
+ -------------------------------------------------------
678
+ Rendered breadcrumbs/_buoys.erb (0.2ms)
679
+  (0.0ms) rollback transaction
680
+  (0.0ms) begin transaction
681
+ --------------------------------------------------------------------------
682
+ BuoysHelerTest: test_.buoy_(has_configuration_options_in_link's_arguments)
683
+ --------------------------------------------------------------------------
684
+ Rendered breadcrumbs/_buoys.erb (0.2ms)
685
+  (0.0ms) rollback transaction
686
+  (0.0ms) begin transaction
687
+ --------------------------------
688
+ BuoysTest: test_.buoy_file_paths
689
+ --------------------------------
690
+  (0.0ms) rollback transaction
691
+  (0.0ms) begin transaction
692
+ ---------------------------------
693
+ BuoysLoaderTest: test_.buoy_files
694
+ ---------------------------------
695
+  (0.0ms) rollback transaction
696
+  (0.0ms) begin transaction
697
+ ----------------------------
698
+ BuoysLoaderTest: test_.buoys
699
+ ----------------------------
700
+  (0.0ms) rollback transaction
701
+  (0.0ms) begin transaction
702
+ ------------------------------------------------
703
+ BuoysBuoyTest: test_can_use_:symbol_as_link_name
704
+ ------------------------------------------------
705
+  (0.0ms) rollback transaction
706
+  (0.0ms) begin transaction
707
+ ----------------------------------------------------------------------------------
708
+ BuoysBuoyTest: test_can_interpret_multiple_`link`s_in_one_buoy_block_with_argument
709
+ ----------------------------------------------------------------------------------
710
+  (0.0ms) rollback transaction
711
+  (0.0ms) begin transaction
712
+ ------------------------------------------------------------
713
+ BuoysBuoyTest: test_delegate_unknown_methods_to_view_context
714
+ ------------------------------------------------------------
715
+  (0.0ms) rollback transaction
data/test/test_helper.rb CHANGED
@@ -18,6 +18,6 @@ Rails::TestUnitReporter.executable = 'bin/test'
18
18
  if ActiveSupport::TestCase.respond_to?(:fixture_path=)
19
19
  ActiveSupport::TestCase.fixture_path = File.expand_path('fixtures', __dir__)
20
20
  ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
21
- ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + '/files'
21
+ ActiveSupport::TestCase.file_fixture_path = "#{ActiveSupport::TestCase.fixture_path}/files"
22
22
  ActiveSupport::TestCase.fixtures :all
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buoys
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - muryoimpl
@@ -58,14 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.54'
61
+ version: '1.25'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.54'
68
+ version: '1.25'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.13'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.13'
69
83
  description: A Ruby on Rails breadcrumbs plugin.
70
84
  email:
71
85
  - muryoimpl@gmail.com