simple_breadcrumbs 0.0.1 → 1.0.4

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
- SHA1:
3
- metadata.gz: c657f2df38cd282d1f14ea5af190e4d63819189b
4
- data.tar.gz: 7a0892b36489537f399471243e159f72fdead9b1
2
+ SHA256:
3
+ metadata.gz: 39ec3132851596846471d1cc44855dede86ab7c7bee0157063f465589076541c
4
+ data.tar.gz: a9be4c9987cd78d74de9e993d9de08a6df9f7106c60140186b6b47710481c8b5
5
5
  SHA512:
6
- metadata.gz: ab9a308d04b6dbcf292aa4f3b84ab804330ee39d8700606098ba7730a4504767828d88982ef0cc1d7c52b621a08e27f3cf23e4a0f785efd0971151da8b790c29
7
- data.tar.gz: 49a333a5f08a37eefffc5f42f832697512afd2e7c7a31407c578cf3e26a9dd088bc4d04dc3e504ea7854f3dfbb58fb73b378d4b44da34d09996516905db3f5b8
6
+ metadata.gz: affddaf77d0a7fab2e8d9ecabde3b4bccb06059c45059f5b0ec1aee455e5258ab0ef3625c9ef23b389c48e4fa905e8ce8539fa20ec270aabac1723b53735dbe2
7
+ data.tar.gz: 2297472cb0edf500ec2c58b40f4eb5a46da5397591403e31554f93de59010dbad617cf9c46de3dd9213edbb79e609d463b5c9ca7a13b0d81e2b0456409e5ff91
data/.coveralls.yml ADDED
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+ repo_token: pbAYpoR8pkivD8TCNPMs80PqqBf7VYDtR
@@ -0,0 +1,25 @@
1
+ name: Build and Publish to RubyGems
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: '2.7'
16
+
17
+ - run: |
18
+ mkdir -p $HOME/.gem
19
+ touch $HOME/.gem/credentials
20
+ chmod 0600 $HOME/.gem/credentials
21
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
22
+ gem build *.gemspec
23
+ gem push *.gem
24
+ env:
25
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
@@ -0,0 +1,15 @@
1
+ name: Verify Gem Version Change
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ master ]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: simplybusiness/version-forget-me-not@v2
13
+ env:
14
+ ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15
+ VERSION_FILE_PATH: "lib/has_breadcrumb/version.rb"
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # SimpleBreadcrumbs
2
2
 
3
+ [![Code Climate](https://codeclimate.com/github/sqm/simple_breadcrumbs.png)](https://codeclimate.com/github/sqm/simple_breadcrumbs)
4
+ [![Build Status](https://travis-ci.org/sqm/simple_breadcrumbs.png?branch=master)](https://travis-ci.org/sqm/simple_breadcrumbs)
5
+ [![Coverage Status](https://coveralls.io/repos/sqm/simple_breadcrumbs/badge.png?branch=master)](https://coveralls.io/r/sqm/simple_breadcrumbs)
6
+
3
7
  This gem provides a simple and flexible way to create breadcrumbs with Rails active record
4
8
  models. Setting `has_breadcrumb` on a model will enable a view method,
5
9
  `breadcrumb()`, which will show the links to the page and its parents in
@@ -1,3 +1,3 @@
1
1
  module HasBreadcrumb
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -0,0 +1,4 @@
1
+ require "has_breadcrumb/version.rb"
2
+ require "has_breadcrumb/has_breadcrumb.rb"
3
+ require "has_breadcrumb/show_breadcrumb.rb"
4
+ require "has_breadcrumb/railtie.rb" if defined?(Rails)
@@ -19,9 +19,10 @@ Gem::Specification.new do |gem|
19
19
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
20
  gem.require_paths = ['lib']
21
21
 
22
- gem.add_dependency 'activerecord', ['>= 3.0', '< 5.0']
23
- gem.add_dependency 'activesupport', ['>= 3.0', '< 5.0']
22
+ gem.add_dependency 'activerecord', ['>= 3.0', '< 7']
23
+ gem.add_dependency 'activesupport', ['>= 3.0', '< 7']
24
24
 
25
- gem.add_development_dependency 'rspec-rails', '~> 2.13'
26
- gem.add_development_dependency 'sqlite3', '~> 1.3'
25
+ gem.add_development_dependency 'rspec-rails', '~> 3.8'
26
+ gem.add_development_dependency 'sqlite3', '~> 1.3.13'
27
+ gem.add_development_dependency 'coveralls', '~> 0.7.0'
27
28
  end
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
- require 'has_breadcrumb'
2
+ require 'simple_breadcrumbs'
3
3
 
4
4
  class Father
5
5
  include HasBreadcrumb
@@ -65,7 +65,7 @@ describe HasBreadcrumb do
65
65
 
66
66
  describe ".included" do
67
67
  it "should respond to has_breadcrumb" do
68
- Father.should respond_to(:has_breadcrumb)
68
+ expect(Father).to respond_to(:has_breadcrumb)
69
69
  end
70
70
  end
71
71
  end
@@ -30,7 +30,7 @@ describe ShowBreadcrumb do
30
30
  end
31
31
 
32
32
  describe "#breadcrumbs" do
33
- before { controller.stub(url_for: "fake_url") }
33
+ before { allow(controller).to receive_messages(url_for: "fake_url") }
34
34
 
35
35
  context "when :forced_parent is passed" do
36
36
  it "should link to the forced parent" do
data/spec/spec_helper.rb CHANGED
@@ -7,7 +7,10 @@
7
7
 
8
8
  require 'rails/all'
9
9
  require 'rspec/rails'
10
- require 'has_breadcrumb'
10
+ require 'simple_breadcrumbs'
11
+
12
+ require 'coveralls'
13
+ Coveralls.wear!
11
14
 
12
15
  ActiveSupport.on_load(:active_record) do
13
16
  include HasBreadcrumb
@@ -24,13 +27,7 @@ I18n.enforce_available_locales = false
24
27
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
25
28
 
26
29
  RSpec.configure do |config|
27
- config.treat_symbols_as_metadata_keys_with_true_values = true
28
30
  config.run_all_when_everything_filtered = true
29
31
  config.filter_run :focus
30
-
31
- # Run specs in random order to surface order dependencies. If you find an
32
- # order dependency and want to debug it, you can fix the order by providing
33
- # the seed, which is printed after each run.
34
- # --seed 1234
35
32
  config.order = 'random'
36
33
  end
@@ -1,3 +1,8 @@
1
+ ActiveRecord::Base.establish_connection(
2
+ :adapter => 'sqlite3',
3
+ :database => ':memory:'
4
+ )
5
+
1
6
  ActiveRecord::Schema.define do
2
7
  self.verbose = false
3
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_breadcrumbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Harvey
@@ -9,76 +9,90 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-10 00:00:00.000000000 Z
12
+ date: 2022-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
+ name: activerecord
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - '>='
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
20
  version: '3.0'
20
- - - <
21
+ - - "<"
21
22
  - !ruby/object:Gem::Version
22
- version: '5.0'
23
+ version: '7'
24
+ type: :runtime
23
25
  prerelease: false
24
- name: activerecord
25
26
  version_requirements: !ruby/object:Gem::Requirement
26
27
  requirements:
27
- - - '>='
28
+ - - ">="
28
29
  - !ruby/object:Gem::Version
29
30
  version: '3.0'
30
- - - <
31
+ - - "<"
31
32
  - !ruby/object:Gem::Version
32
- version: '5.0'
33
- type: :runtime
33
+ version: '7'
34
34
  - !ruby/object:Gem::Dependency
35
+ name: activesupport
35
36
  requirement: !ruby/object:Gem::Requirement
36
37
  requirements:
37
- - - '>='
38
+ - - ">="
38
39
  - !ruby/object:Gem::Version
39
40
  version: '3.0'
40
- - - <
41
+ - - "<"
41
42
  - !ruby/object:Gem::Version
42
- version: '5.0'
43
+ version: '7'
44
+ type: :runtime
43
45
  prerelease: false
44
- name: activesupport
45
46
  version_requirements: !ruby/object:Gem::Requirement
46
47
  requirements:
47
- - - '>='
48
+ - - ">="
48
49
  - !ruby/object:Gem::Version
49
50
  version: '3.0'
50
- - - <
51
+ - - "<"
51
52
  - !ruby/object:Gem::Version
52
- version: '5.0'
53
- type: :runtime
53
+ version: '7'
54
54
  - !ruby/object:Gem::Dependency
55
+ name: rspec-rails
55
56
  requirement: !ruby/object:Gem::Requirement
56
57
  requirements:
57
- - - ~>
58
+ - - "~>"
58
59
  - !ruby/object:Gem::Version
59
- version: '2.13'
60
+ version: '3.8'
61
+ type: :development
60
62
  prerelease: false
61
- name: rspec-rails
62
63
  version_requirements: !ruby/object:Gem::Requirement
63
64
  requirements:
64
- - - ~>
65
+ - - "~>"
65
66
  - !ruby/object:Gem::Version
66
- version: '2.13'
67
- type: :development
67
+ version: '3.8'
68
68
  - !ruby/object:Gem::Dependency
69
+ name: sqlite3
69
70
  requirement: !ruby/object:Gem::Requirement
70
71
  requirements:
71
- - - ~>
72
+ - - "~>"
72
73
  - !ruby/object:Gem::Version
73
- version: '1.3'
74
+ version: 1.3.13
75
+ type: :development
74
76
  prerelease: false
75
- name: sqlite3
76
77
  version_requirements: !ruby/object:Gem::Requirement
77
78
  requirements:
78
- - - ~>
79
+ - - "~>"
79
80
  - !ruby/object:Gem::Version
80
- version: '1.3'
81
+ version: 1.3.13
82
+ - !ruby/object:Gem::Dependency
83
+ name: coveralls
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 0.7.0
81
89
  type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: 0.7.0
82
96
  description: Provides a simple and flexible way to create breadcrumbs with Rails active
83
97
  record models.
84
98
  email:
@@ -87,26 +101,29 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
- - .gitignore
104
+ - ".coveralls.yml"
105
+ - ".github/workflows/gem-push.yml"
106
+ - ".github/workflows/gem-version-check.yml"
107
+ - ".gitignore"
108
+ - ".travis.yml"
91
109
  - Gemfile
92
110
  - LICENSE
93
111
  - README.md
94
112
  - Rakefile
95
- - lib/has_breadcrumb.rb
96
113
  - lib/has_breadcrumb/has_breadcrumb.rb
97
114
  - lib/has_breadcrumb/railtie.rb
98
115
  - lib/has_breadcrumb/show_breadcrumb.rb
99
116
  - lib/has_breadcrumb/version.rb
117
+ - lib/simple_breadcrumbs.rb
100
118
  - simple_breadcrumbs.gemspec
101
119
  - spec/has_breadcrumb/has_breadcrumb_spec.rb
102
120
  - spec/has_breadcrumb/show_breadcrumb_spec.rb
103
121
  - spec/spec_helper.rb
104
- - spec/support/adapters/active_record.rb
122
+ - spec/support/database.rb
105
123
  - spec/support/models/admin.rb
106
124
  - spec/support/models/intern.rb
107
125
  - spec/support/models/manager.rb
108
126
  - spec/support/models/user.rb
109
- - spec/support/schema.rb
110
127
  homepage: https://github.com/sqm/simple_breadcrumbs
111
128
  licenses:
112
129
  - MIT
@@ -117,17 +134,16 @@ require_paths:
117
134
  - lib
118
135
  required_ruby_version: !ruby/object:Gem::Requirement
119
136
  requirements:
120
- - - '>='
137
+ - - ">="
121
138
  - !ruby/object:Gem::Version
122
139
  version: '0'
123
140
  required_rubygems_version: !ruby/object:Gem::Requirement
124
141
  requirements:
125
- - - '>='
142
+ - - ">="
126
143
  - !ruby/object:Gem::Version
127
144
  version: '0'
128
145
  requirements: []
129
- rubyforge_project:
130
- rubygems_version: 2.2.1
146
+ rubygems_version: 3.1.6
131
147
  signing_key:
132
148
  specification_version: 4
133
149
  summary: Setting has_breadcrumb on a model will enable a view method, breadcrumb(),
@@ -136,10 +152,8 @@ test_files:
136
152
  - spec/has_breadcrumb/has_breadcrumb_spec.rb
137
153
  - spec/has_breadcrumb/show_breadcrumb_spec.rb
138
154
  - spec/spec_helper.rb
139
- - spec/support/adapters/active_record.rb
155
+ - spec/support/database.rb
140
156
  - spec/support/models/admin.rb
141
157
  - spec/support/models/intern.rb
142
158
  - spec/support/models/manager.rb
143
159
  - spec/support/models/user.rb
144
- - spec/support/schema.rb
145
- has_rdoc:
@@ -1,4 +0,0 @@
1
- require "has_breadcrumb/version"
2
- require "has_breadcrumb/has_breadcrumb.rb"
3
- require "has_breadcrumb/show_breadcrumb.rb"
4
- require "has_breadcrumb/railtie" if defined?(Rails)
@@ -1,4 +0,0 @@
1
- ActiveRecord::Base.establish_connection(
2
- :adapter => 'sqlite3',
3
- :database => ':memory:'
4
- )