jekyll_basename_dirname 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 4019dc240e1548eb16d1742626466a114c7ccd6f3a5c3185cf6e2543140e1ccf
4
- data.tar.gz: a480bfc77c6f2d273e8cd09946d441c75816ea9c2c8bb7aaf655288c0c0ac99c
3
+ metadata.gz: '029c8bf4dccc0a05d629d11f48c10040549dbb43abe60ea968d5ebaf3dc5411e'
4
+ data.tar.gz: 7bd1aa48e9a29514a2e6e95098699b9cf8a7ae72b4da53db2080847bf9e4855a
5
5
  SHA512:
6
- metadata.gz: 5667cca741db2db4c2fd3b7f863750307f03ea7307a05b545aa0b4384f41471385dcbcf945fe823dd807a52917577267ba0e60b47db51a47c02cb489acb6e69b
7
- data.tar.gz: 1d8bfc8966db94ae5437e26429e8f51937b67504227452885a23b1be68771e67efd39fc9c88663f35f967b520a296cd88f32102e2be696882c93494979057bd7
6
+ metadata.gz: d23bd5913c0f9d122e5b322c80eff132a3bd41d4d41b45e6e1623c4193ca47b83113627b50e507fe76087d8df114efe5cad3b16f7b18dd9246e5ff4d2bdbdc59
7
+ data.tar.gz: 945bb59763f128e67afec7b2f3b7852ae7d3fb0a9a14bb9d31c76eee3f5294a8cd821019a01cb11fb0461295fde0358dc49c8ed955c9ecc84ca4dcdbb61fc191
data/.rubocop.yml CHANGED
@@ -1,13 +1,105 @@
1
- require: rubocop-jekyll
2
- inherit_gem:
3
- rubocop-jekyll: .rubocop.yml
1
+ require:
2
+ # - rubocop-jekyll
3
+ - rubocop-md
4
+ - rubocop-performance
5
+ - rubocop-rake
6
+ - rubocop-rspec
7
+
8
+ # inherit_gem:
9
+ # rubocop-jekyll: .rubocop.yml
4
10
 
5
11
  AllCops:
6
12
  Exclude:
7
- - vendor/**/*
8
- - Gemfile*
13
+ - demo/_site/**/*
14
+ - binstub/**/*
15
+ - vendor/**/*
16
+ - Gemfile*
9
17
  NewCops: enable
10
- TargetRubyVersion: 2.6
18
+
19
+ Gemspec/DeprecatedAttributeAssignment:
20
+ Enabled: false
21
+
22
+ Gemspec/RequireMFA:
23
+ Enabled: false
24
+
25
+ Layout/InitialIndentation:
26
+ Exclude:
27
+ - README.md
28
+
29
+ Layout/MultilineMethodCallIndentation:
30
+ Enabled: false
31
+
32
+ Layout/HashAlignment:
33
+ EnforcedColonStyle: table
34
+ Exclude:
35
+ - jekyll_basename_dirname.gemspec
11
36
 
12
37
  Layout/LineLength:
13
38
  Max: 150
39
+
40
+ Metrics/AbcSize:
41
+ Max: 45
42
+
43
+ Lint/RedundantCopDisableDirective:
44
+ Exclude:
45
+ - jekyll_basename_dirname.gemspec
46
+
47
+ Metrics/BlockLength:
48
+ Exclude:
49
+ - jekyll_basename_dirname.gemspec
50
+ - spec/**/*
51
+
52
+ Metrics/ClassLength:
53
+ Exclude:
54
+ - spec/**/*
55
+ Max: 40
56
+
57
+ Metrics/CyclomaticComplexity:
58
+ Max: 20
59
+
60
+ Metrics/MethodLength:
61
+ Max: 40
62
+
63
+ Metrics/PerceivedComplexity:
64
+ Max: 15
65
+
66
+ Naming/FileName:
67
+ Exclude:
68
+ - Rakefile
69
+
70
+ RSpec/ExampleLength:
71
+ Max: 20
72
+
73
+ RSpec/MultipleExpectations:
74
+ Max: 15
75
+
76
+ Style/CommandLiteral:
77
+ Enabled: false
78
+
79
+ Style/CommentedKeyword:
80
+ Enabled: false
81
+
82
+ Style/Documentation:
83
+ Enabled: false
84
+
85
+ Style/FrozenStringLiteralComment:
86
+ Enabled: false
87
+
88
+ Style/PercentLiteralDelimiters:
89
+ Enabled: false
90
+
91
+ Style/RegexpLiteral:
92
+ Enabled: false
93
+
94
+ Style/StringConcatenation:
95
+ Exclude:
96
+ - spec/**/*
97
+
98
+ Style/StringLiterals:
99
+ Enabled: false
100
+
101
+ Style/StringLiteralsInInterpolation:
102
+ Enabled: false
103
+
104
+ Style/TrailingCommaInHashLiteral:
105
+ EnforcedStyleForMultiline: comma
data/CHANGELOG.md CHANGED
@@ -1,15 +1,35 @@
1
+ # Change Log
2
+
3
+ ## 1.0.4 / 2025-07-21
4
+
5
+ * Added demo
6
+ * Added wbr filter
7
+
8
+
9
+ ## 1.0.3 / 2022-04-06
10
+
11
+ * Brought up to current standards
12
+
13
+
1
14
  ## 1.0.2 / 2022-04-05
2
- * Updated to jekyll_plugin_logger v2.1.0
3
- * Added unit tests
15
+
16
+ * Updated to jekyll_plugin_logger v2.1.0
17
+ * Added unit tests
18
+
4
19
 
5
20
  ## 1.0.1 / 2022-03-11
6
- * Corrected dumb error
21
+
22
+ * Corrected dumb error
23
+
7
24
 
8
25
  ## 1.0.0 / 2022-03-11
9
- * Made into a Ruby gem and published on RubyGems.org as [jekyll_basename_dirname](https://rubygems.org/gems/jekyll_basename_dirname).
10
- * `bin/attach` script added for debugging
11
- * Rubocop standards added
12
- * Proper versioning and CHANGELOG.md added
26
+
27
+ * Made into a Ruby gem and published on RubyGems.org as [jekyll_basename_dirname](https://rubygems.org/gems/jekyll_basename_dirname).
28
+ * `bin/attach` script added for debugging
29
+ * Rubocop standards added
30
+ * Proper versioning and CHANGELOG.md added
31
+
13
32
 
14
33
  ## 0.1.0 / 2020-12-29
15
- * Initial version published
34
+
35
+ * Initial version published
data/README.md CHANGED
@@ -1,16 +1,19 @@
1
- Jekyll_basename_dirname
2
- [![Gem Version](https://badge.fury.io/rb/jekyll_basename_dirname.svg)](https://badge.fury.io/rb/jekyll_basename_dirname)
3
- ===========
1
+ # Jekyll_basename_dirname [![Gem Version](https://badge.fury.io/rb/jekyll_basename_dirname.svg)](https://badge.fury.io/rb/jekyll_basename_dirname)
4
2
 
5
- This is a Jekyll plugin that provides two Liquid filters: `basename` and `dirname`.
6
- They work like the similarly named bash commands.
3
+ This is a Jekyll plugin that provides the following Liquid filters:
4
+ `basename`, `basename_without_extension`, `dirname` and `wbr`.
7
5
 
8
- More information is available on my web site about [my Jekyll plugins](https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html).
6
+ `basename` and `dirname` work like the similarly named bash commands.
7
+
8
+ More information is available on Mike Slinn's web site about [my Jekyll plugins](https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html).
9
9
 
10
10
 
11
11
  ## Installation
12
12
 
13
- Add this line to your Jekyll website's `Gemfile`, within the `jekyll_plugins` group:
13
+ ### As a Jekyll Filter Plugin
14
+
15
+ If you want to use this Ruby gem in a Jekyll application,
16
+ add the following line to your application's `Gemfile`:
14
17
 
15
18
  ```ruby
16
19
  group :jekyll_plugins do
@@ -18,13 +21,41 @@ group :jekyll_plugins do
18
21
  end
19
22
  ```
20
23
 
21
- And then execute:
24
+ And then install in the usual fashion:
25
+
26
+ ```shell
27
+ $ bundle
28
+ ```
29
+
22
30
 
23
- $ bundle install
31
+ ### As a Dependency Of a Gem
24
32
 
25
- Or install it yourself as:
33
+ Add the following line to your application's `.gemspec`:
26
34
 
27
- $ gem install jekyll_basename_dirname
35
+ ```ruby
36
+ spec.add_dependency 'jekyll_basename_dirname'
37
+ ```
38
+
39
+ And then install the dependencies in the usual fashion:
40
+
41
+ ```shell
42
+ $ bundle
43
+ ```
44
+
45
+
46
+ ### As a Ruby Module In a Ruby Program
47
+
48
+ Add the following line to your application's `Gemfile`:
49
+
50
+ ```ruby
51
+ gem 'jekyll_basename_dirname'
52
+ ```
53
+
54
+ And then install the dependencies in the usual fashion:
55
+
56
+ ```shell
57
+ $ bundle
58
+ ```
28
59
 
29
60
 
30
61
  ## Usage
@@ -33,48 +64,72 @@ Or install it yourself as:
33
64
 
34
65
  Filters a string containing a path and returns the portion of th path before the filename and extension.
35
66
  Example: Extracts "blah/blah" from the path.
36
- ```
67
+
68
+ ```html
37
69
  {{ "blah/blah/filename.ext" | dirname }} => blah/blah
38
70
  ```
39
71
 
72
+
40
73
  ### Basename
74
+
41
75
  Filters a string containing a path and returns the filename extracted from the path, including the filetype.
42
76
 
43
77
  Example: Extracts "filename.ext" from the path:
44
- ```
78
+
79
+ ```html
45
80
  {{ "blah/blah/filename.ext" | basename }} => filename.ext
46
81
  ```
47
82
 
83
+
48
84
  ### Basename Without Extension
85
+
49
86
  Filters a string containing a path and returns the filename extracted from the path, including the filetype.
50
87
 
51
88
  Example: Extracts "filename.ext" from the path:
52
- ```
89
+
90
+ ```html
53
91
  {{ "blah/blah/filename.ext" | basename_without_extension }} => filename
54
92
  ```
55
93
 
56
94
 
95
+ ### wbr
96
+
97
+ Filters a string containing a path so long paths wrap in an HTML page.
98
+
99
+ Example:
100
+
101
+ ```html
102
+ {{ 'blah/blah/filename.ext' | wbr }} => blah/<wbr>/blah/<wbr>filename.ext
103
+ ```
104
+
105
+
57
106
  ## Development
58
107
 
59
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
108
+ After checking out the repo, run `bin/setup` to install dependencies.
109
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
60
110
 
61
111
  Install development dependencies like this:
62
- ```
112
+
113
+ ```shell
63
114
  $ BUNDLE_WITH="development" bundle install
64
115
  ```
65
116
 
66
117
  To install this gem onto your local machine, run:
118
+
67
119
  ```shell
68
120
  $ bundle exec rake install
69
121
  ```
70
122
 
71
123
  To release a new version,
124
+
72
125
  1. Update the version number in `version.rb`.
73
126
  2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
74
127
  3. Run the following:
128
+
75
129
  ```shell
76
130
  $ bundle exec rake release
77
131
  ```
132
+
78
133
  The above creates a git tag for the version, commits the created tag,
79
134
  and pushes the new `.gem` file to [RubyGems.org](https://rubygems.org).
80
135
 
data/Rakefile CHANGED
@@ -1,7 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
5
3
 
6
4
  RSpec::Core::RakeTask.new(:spec)
7
- task :default => :spec
5
+ task default: :spec
@@ -1,46 +1,36 @@
1
- # frozen_string_literal: true
1
+ require_relative 'lib/jekyll_basename_dirname/version'
2
2
 
3
- require_relative "lib/jekyll_basename_dirname/version"
3
+ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
4
+ github = 'https://github.com/mslinn/jekyll_basename_dirname'
4
5
 
5
- # rubocop:disable Metrics/BlockLength
6
- Gem::Specification.new do |spec|
7
- github = "https://github.com/mslinn/jekyll_basename_dirname"
8
-
9
- spec.authors = ["Mike Slinn"]
10
- spec.bindir = "exe"
6
+ spec.authors = ['Mike Slinn']
7
+ spec.bindir = 'exe'
11
8
  spec.description = <<~END_OF_DESC
12
9
  This Jekyll plugin provides 3 Liquid filters: dirname, basename and basename_without_extension.
13
10
  END_OF_DESC
14
- spec.email = ["mslinn@mslinn.com"]
15
- spec.files = Dir[".rubocop.yml", "LICENSE.*", "Rakefile", "{lib,spec}/**/*", "*.gemspec", "*.md"]
16
- spec.homepage = "https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html#basename"
17
- spec.license = "MIT"
11
+ spec.email = ['mslinn@mslinn.com']
12
+ spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
13
+ spec.homepage = 'https://www.mslinn.com/jekyll_plugins/jekyll_basename_dirname.html'
14
+ spec.license = 'MIT'
18
15
  spec.metadata = {
19
- "allowed_push_host" => "https://rubygems.org",
20
- "bug_tracker_uri" => "#{github}/issues",
21
- "changelog_uri" => "#{github}/CHANGELOG.md",
22
- "homepage_uri" => spec.homepage,
23
- "source_code_uri" => github,
16
+ 'allowed_push_host' => 'https://rubygems.org',
17
+ 'bug_tracker_uri' => "#{github}/issues",
18
+ 'changelog_uri' => "#{github}/CHANGELOG.md",
19
+ 'homepage_uri' => spec.homepage,
20
+ 'source_code_uri' => github,
24
21
  }
25
- spec.name = "jekyll_basename_dirname"
22
+ spec.name = 'jekyll_basename_dirname'
26
23
  spec.post_install_message = <<~END_MESSAGE
27
24
 
28
25
  Thanks for installing #{spec.name}!
29
26
 
30
27
  END_MESSAGE
31
- spec.require_paths = ["lib"]
32
- spec.required_ruby_version = ">= 2.6.0"
33
- spec.summary = "This Jekyll plugin provides 3 Liquid filters: dirname, basename and basename_without_extension."
28
+ spec.require_paths = ['lib']
29
+ spec.required_ruby_version = '>= 2.6.0'
30
+ spec.summary = 'This Jekyll plugin provides 3 Liquid filters: dirname, basename and basename_without_extension.'
34
31
  spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
35
32
  spec.version = JekyllBasenameDirnameVersion::VERSION
36
33
 
37
- spec.add_dependency "jekyll", ">= 3.5.0"
38
- spec.add_dependency "jekyll_plugin_logger"
39
-
40
- spec.add_development_dependency "debase"
41
- # spec.add_development_dependency "rubocop-jekyll"
42
- # spec.add_development_dependency "rubocop-rake"
43
- # spec.add_development_dependency "rubocop-rspec"
44
- spec.add_development_dependency "ruby-debug-ide"
34
+ spec.add_dependency 'jekyll', '>= 3.5.0'
35
+ spec.add_dependency 'jekyll_plugin_logger'
45
36
  end
46
- # rubocop:enable Metrics/BlockLength
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module JekyllBasenameDirnameVersion
4
- VERSION = "1.0.3"
2
+ VERSION = '1.0.4'.freeze
5
3
  end
@@ -1,40 +1,48 @@
1
- # frozen_string_literal: true
2
-
3
- require "jekyll"
4
- require "jekyll_plugin_logger"
5
- require_relative "jekyll_basename_dirname/version"
1
+ require 'jekyll'
2
+ require 'jekyll_plugin_logger'
3
+ require_relative 'jekyll_basename_dirname/version'
6
4
 
7
5
  # @author Copyright 2020 Michael Slinn
8
6
  # @license SPDX-License-Identifier: Apache-2.0
9
7
  #
10
8
  # Jekyll filters for working with paths.
11
9
  module JekyllBasenameDirnameName
12
- PLUGIN_NAME = "jekyll_basename_dirname"
10
+ PLUGIN_NAME = 'jekyll_basename_dirname'.freeze
13
11
 
14
12
  _logger = PluginMetaLogger.instance.new_logger(self, PluginMetaLogger.instance.config)
15
13
 
16
14
  # Filters a string containing a path.
17
15
  # @return [String] the filename extracted from the path, including the filetype.
18
- # @example Extracts "filename.ext" from the path
19
- # {{ "blah/blah/filename.ext" | basename }}
16
+ # @example Extracts 'filename.ext' from the path
17
+ # {{ 'blah/blah/filename.ext' | basename }}
20
18
  def basename(filepath)
21
19
  File.basename(filepath)
22
20
  end
23
21
 
24
22
  # Filters a string containing a path.
25
23
  # @return [String] the portion of th path before the filename and extension.
26
- # @example Extracts "blah/blah" from the path.
27
- # {{ "blah/blah/filename.ext" | dirname }}
24
+ # @example Extracts 'blah/blah' from the path.
25
+ # {{ 'blah/blah/filename.ext' | dirname }}
28
26
  def dirname(filepath)
29
27
  File.dirname(filepath)
30
28
  end
31
29
 
32
30
  # Filters a string containing a path.
33
31
  # @return the filename without the extension.
34
- # @example Extracts "filename" from the path.
35
- # {{ "blah/blah/filename.ext" | basename_without_extension }}
32
+ # @example Extracts 'filename' from the path.
33
+ # {{ 'blah/blah/filename.ext' | basename_without_extension }}
36
34
  def basename_without_extension(filepath)
37
- File.basename(filepath).split(".")[0...-1].join(".")
35
+ File.basename(filepath).split('.')[0...-1].join('.')
36
+ end
37
+
38
+ # Filters a string containing a path so long paths wrap in an HTML page.
39
+ # @return the path with '<wbr>' inserted after every slash.
40
+ # @example
41
+ # {{ 'blah/blah/filename.ext' | wbr }}
42
+ # Returns:
43
+ # blah/<wbr>/blah/<wbr>filename.ext
44
+ def wbr(filepath)
45
+ filepath.gsub '/', '/<wbr>'
38
46
  end
39
47
  end
40
48
 
@@ -0,0 +1,17 @@
1
+ require 'jekyll'
2
+ require 'fileutils'
3
+ require_relative '../lib/jekyll_basename_dirname'
4
+
5
+ RSpec.describe(JekyllBasenameDirnameName) do
6
+ include described_class
7
+
8
+ it 'verifies basename' do
9
+ expect(basename('a/b/c/d/e.html')).to eq('e.html')
10
+ expect(basename('blah.html')).to eq('blah.html')
11
+ end
12
+
13
+ it 'verifies dirname' do
14
+ expect(dirname('a/b/c/d/e.html')).to eq('a/b/c/d')
15
+ expect(dirname('blah.html')).to eq('.')
16
+ end
17
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,13 +1,10 @@
1
- # frozen_string_literal: true
2
-
3
1
  require "liquid"
4
2
  require "fileutils"
5
3
  require_relative "../lib/jekyll_basename_dirname"
6
4
 
7
5
  RSpec.configure do |config|
8
- config.filter_run :focus
9
- config.order = "random"
10
- config.run_all_when_everything_filtered = true
6
+ # config.order = "random"
7
+ config.filter_run_when_matching focus: true
11
8
 
12
9
  # See https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures
13
10
  config.example_status_persistence_file_path = "spec/status_persistence.txt"
@@ -0,0 +1,4 @@
1
+ example_id | status | run_time |
2
+ ------------------------------------------------ | ------ | --------------- |
3
+ ./spec/jekyll_basename_dirname_name_spec.rb[1:1] | passed | 0.00226 seconds |
4
+ ./spec/jekyll_basename_dirname_name_spec.rb[1:2] | passed | 0.00005 seconds |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_basename_dirname
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-06 00:00:00.000000000 Z
11
+ date: 2024-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -38,38 +38,10 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: debase
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: ruby-debug-ide
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
41
  description: 'This Jekyll plugin provides 3 Liquid filters: dirname, basename and
70
42
  basename_without_extension.
71
43
 
72
- '
44
+ '
73
45
  email:
74
46
  - mslinn@mslinn.com
75
47
  executables: []
@@ -84,16 +56,17 @@ files:
84
56
  - jekyll_basename_dirname.gemspec
85
57
  - lib/jekyll_basename_dirname.rb
86
58
  - lib/jekyll_basename_dirname/version.rb
87
- - spec/basename_dirname_spec.rb
59
+ - spec/jekyll_basename_dirname_name_spec.rb
88
60
  - spec/spec_helper.rb
89
- homepage: https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html#basename
61
+ - spec/status_persistence.txt
62
+ homepage: https://www.mslinn.com/jekyll_plugins/jekyll_basename_dirname.html
90
63
  licenses:
91
64
  - MIT
92
65
  metadata:
93
66
  allowed_push_host: https://rubygems.org
94
67
  bug_tracker_uri: https://github.com/mslinn/jekyll_basename_dirname/issues
95
68
  changelog_uri: https://github.com/mslinn/jekyll_basename_dirname/CHANGELOG.md
96
- homepage_uri: https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html#basename
69
+ homepage_uri: https://www.mslinn.com/jekyll_plugins/jekyll_basename_dirname.html
97
70
  source_code_uri: https://github.com/mslinn/jekyll_basename_dirname
98
71
  post_install_message: |2+
99
72
 
@@ -113,10 +86,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
86
  - !ruby/object:Gem::Version
114
87
  version: '0'
115
88
  requirements: []
116
- rubygems_version: 3.1.4
117
- signing_key:
89
+ rubygems_version: 3.5.10
90
+ signing_key:
118
91
  specification_version: 4
119
92
  summary: 'This Jekyll plugin provides 3 Liquid filters: dirname, basename and basename_without_extension.'
120
93
  test_files:
121
- - spec/basename_dirname_spec.rb
94
+ - spec/jekyll_basename_dirname_name_spec.rb
122
95
  - spec/spec_helper.rb
96
+ - spec/status_persistence.txt
97
+ ...
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "jekyll"
4
- require "fileutils"
5
- require_relative "../lib/jekyll_basename_dirname"
6
-
7
- RSpec.describe(JekyllBasenameDirnameName) do
8
- include JekyllBasenameDirnameName
9
-
10
- it "verifies basename" do
11
- expect(basename("a/b/c/d/e.html")).to eq("e.html")
12
- expect(basename("blah.html")).to eq("blah.html")
13
- end
14
-
15
- it "verifies dirname" do
16
- expect(dirname("a/b/c/d/e.html")).to eq("a/b/c/d")
17
- expect(dirname("blah.html")).to eq(".")
18
- end
19
- end