Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
DataPaths is a library to manage the paths of directories containing static-content across multiple libraries.
For example, DataPaths can manage the data/
directories of
multiple RubyGems, in much the same way RubyGems manages the paths of
lib/
directories using $LOAD_PATH
.
register_data_path
class or instance method.unregister_data_path
or all paths registered by that library with
unregister_data_paths
.Register a directory containing static-content:
require 'data_paths'
module MyLibrary
include DataPaths
# define the data dir(s)
register_data_path File.join(File.dirname(__FILE__),'..','..','data')
end
List previously registered static-content directories:
# all data directories
DataPaths.paths
# => [...]
# the data directories registeed in MyLibrary
MyLibrary.data_paths
# => [...]
# list data directories registered in an object
lib = MyLibrary.new
lib.register_data_path File.join('path','to','data')
lib.data_paths
# => [...]
Using {DataPaths::Finders} to access content from within the static-content directories:
module MyLibrary
class UsesContent
include DataPaths::Finders
def index
find_data_file('index.html')
end
def file_dirs
all_data_dirs('extra')
end
end
end
$ gem install data_paths
Copyright (c) 2011-2012 Hal Brodigan
See {file:LICENSE.txt} for license information.
FAQs
Unknown package
We found that data_paths demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.