highb / pathspec-ruby Goto Github PK
View Code? Open in Web Editor NEWMatch Path Specifications, such as .gitignore, in Ruby!
License: Apache License 2.0
Match Path Specifications, such as .gitignore, in Ruby!
License: Apache License 2.0
I have a test on my pipeline for the gitignore file using the pathspec-ruby. Worked well with 0.2.1 but crashed with 1.0.0.
The error is this:
$ bundle exec rake syntax
rake aborted!
SyntaxError: /usr/local/bundle/gems/pathspec-1.0.0/lib/pathspec/gitignorespec.rb:45: syntax error, unexpected ']'
... pattern = pattern[1..]
... ^
/usr/local/bundle/gems/pathspec-1.0.0/lib/pathspec/gitignorespec.rb:52: syntax error, unexpected ']'
pattern = pattern[1..] if pattern.start_with?('\\')
^
/usr/local/bundle/gems/pathspec-1.0.0/lib/pathspec.rb:1:in `require'
/usr/local/bundle/gems/pathspec-1.0.0/lib/pathspec.rb:1:in `<top (required)>'
/usr/local/bundle/gems/puppetlabs_spec_helper-2.16.0/lib/puppetlabs_spec_helper/tasks/check_symlinks.rb:3:in `require'
/usr/local/bundle/gems/puppetlabs_spec_helper-2.16.0/lib/puppetlabs_spec_helper/tasks/check_symlinks.rb:3:in `<top (required)>'
/usr/local/bundle/gems/puppetlabs_spec_helper-2.16.0/lib/puppetlabs_spec_helper/rake_tasks.rb:11:in `require'
/usr/local/bundle/gems/puppetlabs_spec_helper-2.16.0/lib/puppetlabs_spec_helper/rake_tasks.rb:11:in `<top (required)>'
/builds/equinix-mse/control-repo/Rakefile:1:in `require'
/builds/equinix-mse/control-repo/Rakefile:1:in `<top (required)>'
/usr/local/bundle/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
The only line with brackets on the gitignore is .*.sw[op]
The specs fail with this error:
3) PathSpec#match_tree unix
Failure/Error:
Find.find(root) do |path|
relpath = Pathname.new(path).relative_path_from(rootpath).to_s
relpath += '/' if File.directory? path
if match(relpath)
matching << path
end
NoMethodError:
undefined method `children' for FakeFS::Dir:Class
# ./lib/pathspec.rb:41:in `match_tree'
# ./spec/unit/pathspec_spec.rb:191:in `block (4 levels) in <top (required)>'
# ./spec/unit/pathspec_spec.rb:196:in `block (4 levels) in <top (required)>'
Commit 5b5a0f6 disabled Ruby 2.5.0 testing in Travis. Blocking on enabling it until travis-ci/travis-ci#8969 is resolved.
Hello,
While inspecting the codebase for preparing a debian package with it, I saw that there were some details that were missing according to the license that you've chosen for the codebase:
To find out more details about the two points, you can check out the following URL: https://infra.apache.org/apply-license.html
[x] Update changelog
[x] Ruby versions supported changed, updated minimum ruby version
[x] Some linting changes that should not effect anything
[x] tag
[x] tag again after forgetting about the allowed gem host update I did
[x] push to rubygems
[x] going to need to figure out how the new MFA based push works
[x] setup push to GH packages, as well? just going to push to rubygems at this time
Some folks might not want the full .gitignore functionality or regex, so a simple shell globbing utility might suit them better.
Can you add a example of gemspec where some can define spec.files =
without using git ls-files
but still taking gitignore
into consideration.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.tool-versions
ruby 3.3.0
Gemfile
.github/workflows/gem-push.yml
actions/checkout v4
ruby/setup-ruby v1
.github/workflows/ruby.yml
actions/checkout v4
ruby/setup-ruby v1
actions/checkout v4
ruby/setup-ruby v1
SVN, HG, and other source control ignore files might be desired in some use cases.
CHANGELOG
Close file handle when reading from filename #13
Hi there!
I'm currently working on packaging your gem for debian, and I was warned by the debian linting utility, lintian, that there is no man page for the binary pathspec-rb
.
It's always nice to have a documentation page that one can find with man $binary
to get at least a tiny bit more verbose information than the usage text.
I can try and come up with something soonish, however I'm still not yet very well acquainted with this library and its accompanying binary, so I would fear describing inaccurate information. I also don't know what formatting would be most desirable to you for the contents of the man page.
from what I can see so far, the pathspec-rb
binary is a helper tool for testing matches of some values of pathspecs on a specified path. also there doesn't seem to be any configuration file involved. so the man page would probably be very simple.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.