simple-navigation 4.4.0 → 4.5.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 +4 -4
- data/.github/workflows/ci.yml +84 -0
- data/.rspec +1 -2
- data/.rubocop.yml +49 -0
- data/.rubocop_todo.yml +38 -0
- data/.ruby-version +1 -0
- data/Appraisals +55 -0
- data/CHANGELOG.md +18 -6
- data/Gemfile +21 -0
- data/Guardfile +4 -2
- data/README.md +14 -28
- data/Rakefile +2 -27
- data/bin/_guard-core +16 -0
- data/bin/appraisal +16 -0
- data/bin/guard +16 -0
- data/bin/rake +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/gemfiles/rails_6.1.gemfile +35 -0
- data/gemfiles/rails_7.0.gemfile +23 -0
- data/gemfiles/rails_7.1.gemfile +23 -0
- data/gemfiles/rails_7.2.gemfile +23 -0
- data/gemfiles/rails_8.0.gemfile +23 -0
- data/gemfiles/rails_8.1.gemfile +23 -0
- data/generators/navigation_config/navigation_config_generator.rb +2 -0
- data/generators/navigation_config/templates/config/navigation.rb +30 -26
- data/lib/generators/navigation_config/navigation_config_generator.rb +2 -0
- data/lib/simple-navigation.rb +3 -1
- data/lib/simple_navigation/adapters/base.rb +2 -0
- data/lib/simple_navigation/adapters/nanoc.rb +8 -3
- data/lib/simple_navigation/adapters/padrino.rb +3 -1
- data/lib/simple_navigation/adapters/rails.rb +12 -14
- data/lib/simple_navigation/adapters/sinatra.rb +4 -6
- data/lib/simple_navigation/config_file.rb +1 -1
- data/lib/simple_navigation/config_file_finder.rb +3 -3
- data/lib/simple_navigation/configuration.rb +5 -5
- data/lib/simple_navigation/helpers.rb +9 -11
- data/lib/simple_navigation/item.rb +26 -20
- data/lib/simple_navigation/item_adapter.rb +16 -5
- data/lib/simple_navigation/item_container.rb +13 -7
- data/lib/simple_navigation/items_provider.rb +6 -4
- data/lib/simple_navigation/railtie.rb +3 -1
- data/lib/simple_navigation/renderer/base.rb +5 -5
- data/lib/simple_navigation/renderer/breadcrumbs.rb +4 -3
- data/lib/simple_navigation/renderer/json.rb +1 -1
- data/lib/simple_navigation/renderer/links.rb +2 -0
- data/lib/simple_navigation/renderer/list.rb +5 -5
- data/lib/simple_navigation/renderer/text.rb +3 -1
- data/lib/simple_navigation/version.rb +3 -1
- data/lib/simple_navigation.rb +32 -24
- data/simple-navigation.gemspec +16 -26
- data/spec/fake_app/config/navigation.rb +4 -2
- data/spec/fake_app/rails_app.rb +5 -3
- data/spec/integration/rendering_navigation_spec.rb +7 -5
- data/spec/simple_navigation/adapters/nanoc_spec.rb +97 -0
- data/spec/simple_navigation/adapters/padrino_spec.rb +41 -22
- data/spec/simple_navigation/adapters/rails_spec.rb +199 -206
- data/spec/simple_navigation/adapters/sinatra_spec.rb +21 -5
- data/spec/simple_navigation/config_file_finder_spec.rb +32 -28
- data/spec/simple_navigation/config_file_spec.rb +14 -14
- data/spec/simple_navigation/configuration_spec.rb +128 -121
- data/spec/simple_navigation/helpers_spec.rb +282 -284
- data/spec/simple_navigation/item_adapter_spec.rb +109 -122
- data/spec/simple_navigation/item_container_spec.rb +407 -408
- data/spec/simple_navigation/item_spec.rb +333 -301
- data/spec/simple_navigation/items_provider_spec.rb +30 -27
- data/spec/simple_navigation/renderer/base_spec.rb +166 -168
- data/spec/simple_navigation/renderer/breadcrumbs_spec.rb +81 -83
- data/spec/simple_navigation/renderer/json_spec.rb +49 -56
- data/spec/simple_navigation/renderer/links_spec.rb +81 -83
- data/spec/simple_navigation/renderer/list_spec.rb +111 -91
- data/spec/simple_navigation/renderer/text_spec.rb +37 -39
- data/spec/simple_navigation_spec.rb +54 -47
- data/spec/spec_helper.rb +146 -53
- metadata +29 -156
- data/.travis.yml +0 -23
- data/gemfiles/rails-3-2-stable.gemfile +0 -11
- data/gemfiles/rails-4-1-stable.gemfile +0 -7
- data/gemfiles/rails-4-2-stable.gemfile +0 -7
- data/gemfiles/rails-5-2-stable.gemfile +0 -7
- data/gemfiles/rails-6-0-stable.gemfile +0 -9
- data/gemfiles/rails-6-1-stable.gemfile +0 -9
- data/init.rb +0 -1
- data/install.rb +0 -5
- data/lib/simple_navigation/adapters.rb +0 -10
- data/lib/simple_navigation/renderer.rb +0 -12
- data/spec/initializers/coveralls.rb +0 -3
- data/spec/initializers/have_css_matcher.rb +0 -19
- data/spec/initializers/memfs.rb +0 -7
- data/spec/initializers/rails.rb +0 -4
- data/spec/initializers/rspec.rb +0 -7
- data/uninstall.rb +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc3636a155faa195d02700ac3030aeec21bfc6b1bd1e0122ac82f5b36251f8be
|
|
4
|
+
data.tar.gz: ee8802128edaa33f0fa3f11668987b8d451d83a460a2f6b2e2378a06082f1157
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f96b4ae869acf99dc8199c3ef2637f4d14a87b4a5fc48fa6e441dd875c40a5070aed9899a6d6454dd2a879fc0c6567fb0eab0b985f84bdccd814fa53dc703e5
|
|
7
|
+
data.tar.gz: ea40ab0d7b5329bc0b736a814d48fed5df044560449aeb2a2d33bec28ce8e2368565614470eb292c4c6657dcb34f172b3e2c338255e994933debf50a44fd6f7c
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- '**'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- '**'
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: '0 4 1 * *'
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
rubocop:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v5
|
|
21
|
+
|
|
22
|
+
- name: Setup Ruby
|
|
23
|
+
uses: ruby/setup-ruby@v1
|
|
24
|
+
with:
|
|
25
|
+
ruby-version: '3.0'
|
|
26
|
+
|
|
27
|
+
- name: Bundler
|
|
28
|
+
run: bundle install
|
|
29
|
+
|
|
30
|
+
- name: Rubocop
|
|
31
|
+
run: bin/rubocop
|
|
32
|
+
|
|
33
|
+
rspec:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
|
|
36
|
+
strategy:
|
|
37
|
+
fail-fast: false
|
|
38
|
+
matrix:
|
|
39
|
+
ruby:
|
|
40
|
+
- '4.0'
|
|
41
|
+
- '3.4'
|
|
42
|
+
- '3.3'
|
|
43
|
+
- '3.2'
|
|
44
|
+
- '3.1'
|
|
45
|
+
- '3.0'
|
|
46
|
+
rails:
|
|
47
|
+
- rails_8.1
|
|
48
|
+
- rails_8.0
|
|
49
|
+
- rails_7.2
|
|
50
|
+
- rails_7.1
|
|
51
|
+
- rails_7.0
|
|
52
|
+
- rails_6.1
|
|
53
|
+
|
|
54
|
+
exclude:
|
|
55
|
+
- ruby: '3.0'
|
|
56
|
+
rails: 'rails_7.2'
|
|
57
|
+
- ruby: '3.0'
|
|
58
|
+
rails: 'rails_8.0'
|
|
59
|
+
- ruby: '3.0'
|
|
60
|
+
rails: 'rails_8.1'
|
|
61
|
+
|
|
62
|
+
- ruby: '3.1'
|
|
63
|
+
rails: 'rails_8.0'
|
|
64
|
+
- ruby: '3.1'
|
|
65
|
+
rails: 'rails_8.1'
|
|
66
|
+
|
|
67
|
+
env:
|
|
68
|
+
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
|
69
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile
|
|
70
|
+
# Check for frozen strings
|
|
71
|
+
RUBYOPT: "--enable=frozen-string-literal --debug=frozen-string-literal"
|
|
72
|
+
|
|
73
|
+
steps:
|
|
74
|
+
- name: Checkout
|
|
75
|
+
uses: actions/checkout@v5
|
|
76
|
+
|
|
77
|
+
- name: Setup Ruby
|
|
78
|
+
uses: ruby/setup-ruby@v1
|
|
79
|
+
with:
|
|
80
|
+
ruby-version: ${{ matrix.ruby }}
|
|
81
|
+
bundler-cache: true
|
|
82
|
+
|
|
83
|
+
- name: RSpec
|
|
84
|
+
run: bin/rspec
|
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
require:
|
|
3
|
+
- rubocop-capybara
|
|
4
|
+
- rubocop-performance
|
|
5
|
+
- rubocop-rake
|
|
6
|
+
- rubocop-rspec
|
|
7
|
+
|
|
8
|
+
inherit_from:
|
|
9
|
+
- .rubocop_todo.yml
|
|
10
|
+
|
|
11
|
+
AllCops:
|
|
12
|
+
NewCops: enable
|
|
13
|
+
SuggestExtensions: true
|
|
14
|
+
TargetRubyVersion: 3.0
|
|
15
|
+
Exclude:
|
|
16
|
+
- bin/*
|
|
17
|
+
- gemfiles/*
|
|
18
|
+
|
|
19
|
+
Gemspec/RequireMFA:
|
|
20
|
+
Enabled: false
|
|
21
|
+
|
|
22
|
+
Style/Documentation:
|
|
23
|
+
Enabled: false
|
|
24
|
+
|
|
25
|
+
Naming/FileName:
|
|
26
|
+
Exclude:
|
|
27
|
+
- lib/simple-navigation.rb
|
|
28
|
+
|
|
29
|
+
###########
|
|
30
|
+
# METRICS #
|
|
31
|
+
###########
|
|
32
|
+
|
|
33
|
+
Metrics/ClassLength:
|
|
34
|
+
Exclude:
|
|
35
|
+
- spec/**/*
|
|
36
|
+
|
|
37
|
+
Metrics/MethodLength:
|
|
38
|
+
Exclude:
|
|
39
|
+
- spec/**/*
|
|
40
|
+
|
|
41
|
+
#########
|
|
42
|
+
# RSPEC #
|
|
43
|
+
#########
|
|
44
|
+
|
|
45
|
+
RSpec/NestedGroups:
|
|
46
|
+
Max: 6
|
|
47
|
+
|
|
48
|
+
RSpec/MultipleMemoizedHelpers:
|
|
49
|
+
Max: 8
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100000`
|
|
3
|
+
# on 2026-06-25 14:47:51 UTC using RuboCop version 1.88.0.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 46
|
|
10
|
+
# Configuration parameters: .
|
|
11
|
+
# SupportedStyles: have_received, receive
|
|
12
|
+
RSpec/MessageSpies:
|
|
13
|
+
EnforcedStyle: receive
|
|
14
|
+
|
|
15
|
+
# Offense count: 24
|
|
16
|
+
RSpec/SubjectStub:
|
|
17
|
+
Exclude:
|
|
18
|
+
- 'spec/simple_navigation/item_container_spec.rb'
|
|
19
|
+
- 'spec/simple_navigation/renderer/base_spec.rb'
|
|
20
|
+
- 'spec/simple_navigation_spec.rb'
|
|
21
|
+
|
|
22
|
+
# Offense count: 69
|
|
23
|
+
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
24
|
+
RSpec/VerifiedDoubles:
|
|
25
|
+
Exclude:
|
|
26
|
+
- 'spec/simple_navigation/adapters/nanoc_spec.rb'
|
|
27
|
+
- 'spec/simple_navigation/adapters/padrino_spec.rb'
|
|
28
|
+
- 'spec/simple_navigation/adapters/rails_spec.rb'
|
|
29
|
+
- 'spec/simple_navigation/adapters/sinatra_spec.rb'
|
|
30
|
+
- 'spec/simple_navigation/configuration_spec.rb'
|
|
31
|
+
- 'spec/simple_navigation/helpers_spec.rb'
|
|
32
|
+
- 'spec/simple_navigation/item_adapter_spec.rb'
|
|
33
|
+
- 'spec/simple_navigation/item_container_spec.rb'
|
|
34
|
+
- 'spec/simple_navigation/item_spec.rb'
|
|
35
|
+
- 'spec/simple_navigation/items_provider_spec.rb'
|
|
36
|
+
- 'spec/simple_navigation/renderer/base_spec.rb'
|
|
37
|
+
- 'spec/simple_navigation_spec.rb'
|
|
38
|
+
- 'spec/spec_helper.rb'
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.2
|
data/Appraisals
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# To update files in gemfiles/ directory:
|
|
4
|
+
# rm gemfiles/*
|
|
5
|
+
# bin/appraisal generate
|
|
6
|
+
|
|
7
|
+
# To run tests:
|
|
8
|
+
# bin/appraisal rails_8.1 bundle install
|
|
9
|
+
# bin/appraisal rails_8.1 rake
|
|
10
|
+
# bin/appraisal rails_8.1 rspec
|
|
11
|
+
|
|
12
|
+
appraise 'rails_6.1' do
|
|
13
|
+
gem 'railties', '~> 6.1.0'
|
|
14
|
+
gem 'rspec-rails'
|
|
15
|
+
gem 'concurrent-ruby', '1.3.4'
|
|
16
|
+
|
|
17
|
+
# Fix:
|
|
18
|
+
# warning: drb was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
|
|
19
|
+
# You can add drb to your Gemfile or gemspec to silence this warning.
|
|
20
|
+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
|
|
21
|
+
gem 'base64'
|
|
22
|
+
gem 'bigdecimal'
|
|
23
|
+
gem 'drb'
|
|
24
|
+
gem 'mutex_m'
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("4.0.0") }' do
|
|
28
|
+
gem 'benchmark'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
appraise 'rails_7.0' do
|
|
33
|
+
gem 'railties', '~> 7.0.0'
|
|
34
|
+
gem 'rspec-rails'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
appraise 'rails_7.1' do
|
|
38
|
+
gem 'railties', '~> 7.1.0'
|
|
39
|
+
gem 'rspec-rails'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
appraise 'rails_7.2' do
|
|
43
|
+
gem 'railties', '~> 7.2.0'
|
|
44
|
+
gem 'rspec-rails'
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
appraise 'rails_8.0' do
|
|
48
|
+
gem 'railties', '~> 8.0.0'
|
|
49
|
+
gem 'rspec-rails'
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
appraise 'rails_8.1' do
|
|
53
|
+
gem 'railties', '~> 8.1.0'
|
|
54
|
+
gem 'rspec-rails'
|
|
55
|
+
end
|
data/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.5.0
|
|
4
|
+
|
|
5
|
+
* Add `aria-current=page` attribute to selected link. Credits to oneiros.
|
|
6
|
+
* Fix most of the rubocop todos.
|
|
7
|
+
* Increase coverage.
|
|
8
|
+
* Update some dependencies.
|
|
9
|
+
|
|
10
|
+
## 4.4.1
|
|
11
|
+
|
|
12
|
+
* Removes the link to the online demo from the README. Credits to tosbourn.
|
|
13
|
+
* Adds ostruct as explicit runtime dep to silence warnings with ruby 3.4.x. Credits to SebouChu.
|
|
14
|
+
|
|
3
15
|
## 4.4.0
|
|
4
16
|
|
|
5
|
-
*
|
|
17
|
+
* Add options rendering to json renderer. Credits to Mikhail Kytyzov.
|
|
6
18
|
|
|
7
19
|
## 4.3.0
|
|
8
20
|
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
21
|
+
* Removed warnings from rspec. Thanks mgrunberg.
|
|
22
|
+
* Add compatibility with rails 6.1. Credits to mgrunberg.
|
|
23
|
+
* Run specs against 6.1. Credits to mgrunberg.
|
|
12
24
|
|
|
13
25
|
## 4.2.0
|
|
14
26
|
|
|
15
|
-
*
|
|
16
|
-
*
|
|
27
|
+
* Improvements to generator template. Credits to mgrunberg.
|
|
28
|
+
* Be able to run 'rake spec:rails-6-0-stable'. Credits to mgrunberg.
|
|
17
29
|
|
|
18
30
|
## 4.1.0
|
|
19
31
|
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
gemspec
|
|
6
|
+
|
|
7
|
+
# Dev libs
|
|
8
|
+
gem 'appraisal', git: 'https://github.com/thoughtbot/appraisal.git'
|
|
9
|
+
gem 'capybara'
|
|
10
|
+
gem 'memfs', git: 'https://github.com/simonc/memfs.git'
|
|
11
|
+
gem 'rake'
|
|
12
|
+
gem 'rdoc'
|
|
13
|
+
gem 'rspec'
|
|
14
|
+
gem 'simplecov'
|
|
15
|
+
gem 'tzinfo'
|
|
16
|
+
gem 'warning'
|
|
17
|
+
|
|
18
|
+
# Dev tools / linter
|
|
19
|
+
gem 'guard-rspec', require: false
|
|
20
|
+
gem 'rubocop', require: false
|
|
21
|
+
gem 'rubocop-capybara', require: false
|
|
22
|
+
gem 'rubocop-performance', require: false
|
|
23
|
+
gem 'rubocop-rake', require: false
|
|
24
|
+
gem 'rubocop-rspec', require: false
|
data/Guardfile
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
guard :rspec, all_after_pass: true, failed_mode: :none do
|
|
2
4
|
watch(%r{^spec/.+_spec\.rb$})
|
|
3
|
-
watch(%r{^lib/(.+)\.rb$})
|
|
5
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
4
6
|
watch(%r{^spec/fake_app/.+\.rb$}) { 'spec/integration' }
|
|
5
7
|
|
|
6
|
-
watch('spec/spec_helper.rb')
|
|
8
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
|
7
9
|
end
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Simple Navigation
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/simple-navigation)
|
|
4
|
-
[](https://codeclimate.com/github/codeplant/simple-navigation)
|
|
4
|
+
[](https://github.com/codeplant/simple-navigation/actions/workflows/ci.yml)
|
|
6
5
|
[](https://coveralls.io/r/codeplant/simple-navigation)
|
|
7
6
|
|
|
8
7
|
Simple Navigation is a ruby library for creating navigations (with multiple levels) for your Rails, Sinatra or Padrino applications. It runs with all ruby versions (including ruby 2.x).
|
|
@@ -17,11 +16,9 @@ You can consult the project's RDoc on [RubyDoc.info](http://rubydoc.info/github/
|
|
|
17
16
|
|
|
18
17
|
If you need to generate the RDoc files locally, check out the repository and simply call the `rake rdoc` in the project's folder.
|
|
19
18
|
|
|
20
|
-
##
|
|
19
|
+
## Demo
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
The source code of this online demo is [available on Github](http://github.com/codeplant/simple-navigation-demo).
|
|
21
|
+
Demo source code is [available on Github](http://github.com/codeplant/simple-navigation-demo).
|
|
25
22
|
|
|
26
23
|
## Feedback and Questions
|
|
27
24
|
|
|
@@ -33,31 +30,20 @@ Fork, fix, then send a Pull Request.
|
|
|
33
30
|
|
|
34
31
|
To run the test suite locally against all supported frameworks:
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
```sh
|
|
34
|
+
bundle install
|
|
35
|
+
bin/appraisal bundle install
|
|
36
|
+
bin/appraisal rspec
|
|
37
|
+
bin/appraisal rspec ./spec/requests/users_spec.rb
|
|
38
|
+
```
|
|
38
39
|
|
|
39
40
|
To target the test suite against one framework:
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
% BUNDLE_GEMFILE='gemfiles/rails-4-2-stable.gemfile' bundle install -j 4
|
|
46
|
-
% BUNDLE_GEMFILE='gemfiles/rails-4-2-stable.gemfile' bundle exec rspec ./spec/requests/users_spec.rb
|
|
47
|
-
|
|
48
|
-
### Rake and Bundler
|
|
49
|
-
|
|
50
|
-
If you use a shell plugin (like oh-my-zsh:bundler) that auto-prefixes commands with `bundle exec` using the `rake` command will fail.
|
|
51
|
-
|
|
52
|
-
Get the original command with `type -a rake`:
|
|
53
|
-
|
|
54
|
-
% type -a rake
|
|
55
|
-
rake is an alias for bundled_rake
|
|
56
|
-
rake is /Users/username/.rubies/ruby-2.2.3/bin/rake
|
|
57
|
-
rake is /usr/bin/rake
|
|
58
|
-
|
|
59
|
-
In this situation `/Users/username/.rubies/ruby-2.2.3/bin/rake` is the command you should use.
|
|
42
|
+
```sh
|
|
43
|
+
bin/appraisal rails_8.1 rspec
|
|
44
|
+
bin/appraisal rails_8.1 rspec ./spec/requests/users_spec.rb
|
|
45
|
+
```
|
|
60
46
|
|
|
61
47
|
## License
|
|
62
48
|
|
|
63
|
-
Copyright (c)
|
|
49
|
+
Copyright (c) 2026 codeplant GmbH, released under the MIT license
|
data/Rakefile
CHANGED
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Bundler::GemHelper.install_tasks
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
require '
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
5
4
|
require 'rspec/core/rake_task'
|
|
6
|
-
|
|
7
5
|
require 'rdoc/task'
|
|
8
6
|
|
|
9
7
|
RSpec::Core::RakeTask.new(:spec)
|
|
10
|
-
|
|
11
8
|
task default: 'spec'
|
|
12
9
|
|
|
13
|
-
namespace :spec do
|
|
14
|
-
mappers = %w[
|
|
15
|
-
rails-3-2-stable
|
|
16
|
-
rails-4-1-stable
|
|
17
|
-
rails-4-2-stable
|
|
18
|
-
rails-5-2-stable
|
|
19
|
-
rails-6-0-stable
|
|
20
|
-
rails-6-1-stable
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
mappers.each do |gemfile|
|
|
24
|
-
desc "Run Tests against #{gemfile}"
|
|
25
|
-
task gemfile do
|
|
26
|
-
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle -j 4 --quiet"
|
|
27
|
-
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake -t spec"
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
desc 'Run Tests against all ORMs'
|
|
32
|
-
task all: mappers
|
|
33
|
-
end
|
|
34
|
-
|
|
35
10
|
RDoc::Task.new do |rdoc|
|
|
36
11
|
rdoc.rdoc_dir = 'rdoc'
|
|
37
12
|
rdoc.title = 'SimpleNavigation'
|
data/bin/_guard-core
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application '_guard-core' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("guard", "_guard-core")
|
data/bin/appraisal
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'appraisal' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("appraisal", "appraisal")
|
data/bin/guard
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'guard' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("guard", "guard")
|
data/bin/rake
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/rubocop
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
require "rubygems"
|
|
14
|
+
require "bundler/setup"
|
|
15
|
+
|
|
16
|
+
load Gem.bin_path("rubocop", "rubocop")
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
|
|
6
|
+
gem "capybara"
|
|
7
|
+
gem "memfs", git: "https://github.com/simonc/memfs.git"
|
|
8
|
+
gem "rake"
|
|
9
|
+
gem "rdoc"
|
|
10
|
+
gem "rspec"
|
|
11
|
+
gem "simplecov"
|
|
12
|
+
gem "tzinfo"
|
|
13
|
+
gem "warning"
|
|
14
|
+
gem "guard-rspec", require: false
|
|
15
|
+
gem "rubocop", require: false
|
|
16
|
+
gem "rubocop-capybara", require: false
|
|
17
|
+
gem "rubocop-performance", require: false
|
|
18
|
+
gem "rubocop-rake", require: false
|
|
19
|
+
gem "rubocop-rspec", require: false
|
|
20
|
+
gem "railties", "~> 6.1.0"
|
|
21
|
+
gem "rspec-rails"
|
|
22
|
+
gem "concurrent-ruby", "1.3.4"
|
|
23
|
+
|
|
24
|
+
install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do
|
|
25
|
+
gem "base64"
|
|
26
|
+
gem "bigdecimal"
|
|
27
|
+
gem "drb"
|
|
28
|
+
gem "mutex_m"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("4.0.0") } do
|
|
32
|
+
gem "benchmark"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
gemspec path: "../"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
|
|
6
|
+
gem "capybara"
|
|
7
|
+
gem "memfs", git: "https://github.com/simonc/memfs.git"
|
|
8
|
+
gem "rake"
|
|
9
|
+
gem "rdoc"
|
|
10
|
+
gem "rspec"
|
|
11
|
+
gem "simplecov"
|
|
12
|
+
gem "tzinfo"
|
|
13
|
+
gem "warning"
|
|
14
|
+
gem "guard-rspec", require: false
|
|
15
|
+
gem "rubocop", require: false
|
|
16
|
+
gem "rubocop-capybara", require: false
|
|
17
|
+
gem "rubocop-performance", require: false
|
|
18
|
+
gem "rubocop-rake", require: false
|
|
19
|
+
gem "rubocop-rspec", require: false
|
|
20
|
+
gem "railties", "~> 7.0.0"
|
|
21
|
+
gem "rspec-rails"
|
|
22
|
+
|
|
23
|
+
gemspec path: "../"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
|
|
6
|
+
gem "capybara"
|
|
7
|
+
gem "memfs", git: "https://github.com/simonc/memfs.git"
|
|
8
|
+
gem "rake"
|
|
9
|
+
gem "rdoc"
|
|
10
|
+
gem "rspec"
|
|
11
|
+
gem "simplecov"
|
|
12
|
+
gem "tzinfo"
|
|
13
|
+
gem "warning"
|
|
14
|
+
gem "guard-rspec", require: false
|
|
15
|
+
gem "rubocop", require: false
|
|
16
|
+
gem "rubocop-capybara", require: false
|
|
17
|
+
gem "rubocop-performance", require: false
|
|
18
|
+
gem "rubocop-rake", require: false
|
|
19
|
+
gem "rubocop-rspec", require: false
|
|
20
|
+
gem "railties", "~> 7.1.0"
|
|
21
|
+
gem "rspec-rails"
|
|
22
|
+
|
|
23
|
+
gemspec path: "../"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
|
|
6
|
+
gem "capybara"
|
|
7
|
+
gem "memfs", git: "https://github.com/simonc/memfs.git"
|
|
8
|
+
gem "rake"
|
|
9
|
+
gem "rdoc"
|
|
10
|
+
gem "rspec"
|
|
11
|
+
gem "simplecov"
|
|
12
|
+
gem "tzinfo"
|
|
13
|
+
gem "warning"
|
|
14
|
+
gem "guard-rspec", require: false
|
|
15
|
+
gem "rubocop", require: false
|
|
16
|
+
gem "rubocop-capybara", require: false
|
|
17
|
+
gem "rubocop-performance", require: false
|
|
18
|
+
gem "rubocop-rake", require: false
|
|
19
|
+
gem "rubocop-rspec", require: false
|
|
20
|
+
gem "railties", "~> 7.2.0"
|
|
21
|
+
gem "rspec-rails"
|
|
22
|
+
|
|
23
|
+
gemspec path: "../"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
|
|
6
|
+
gem "capybara"
|
|
7
|
+
gem "memfs", git: "https://github.com/simonc/memfs.git"
|
|
8
|
+
gem "rake"
|
|
9
|
+
gem "rdoc"
|
|
10
|
+
gem "rspec"
|
|
11
|
+
gem "simplecov"
|
|
12
|
+
gem "tzinfo"
|
|
13
|
+
gem "warning"
|
|
14
|
+
gem "guard-rspec", require: false
|
|
15
|
+
gem "rubocop", require: false
|
|
16
|
+
gem "rubocop-capybara", require: false
|
|
17
|
+
gem "rubocop-performance", require: false
|
|
18
|
+
gem "rubocop-rake", require: false
|
|
19
|
+
gem "rubocop-rspec", require: false
|
|
20
|
+
gem "railties", "~> 8.0.0"
|
|
21
|
+
gem "rspec-rails"
|
|
22
|
+
|
|
23
|
+
gemspec path: "../"
|