Call require pretending your are at another directory
Require module from string
Resolve npm package details, like name and base path, given an absolute path to a file inside a package
Extract the non-magic parent path from a glob string.
Runtime for Regenerator-compiled generator and async functions.
Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.
Import a module like with `require()` but from a given path
Determine an app's root path from anywhere inside the app
Get the package name from a folder path
Resolve the path of a module like `require.resolve()` but from a given path
Browser-friendly inheritance fully compatible with standard node.js inherits()
Polyfill for Node.js module.createRequire (<= v12.2.0)
Keep require and import consistent after bundling or transpiling
Node.js Buffer API, for the browser
Help command for node, partner of minimist and commist
Find the module object for something that was require()d
This is lightweight memory stream module for node.js.
Require constants across node and the browser
Module to hook into the Node.js require function
Convert encodings, uses iconv-lite
The closest you can get to require something with bypassing the require cache
Minimal module to check if a file is executable.
Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (node.js/javascript util)
Universal filesystem path utils
reverse-require allows one to require files that ends with a specified path from other RubyGems. For instance, if one wanted to require the file 'mylibrary/extensions.rb' from all RubyGems: require 'reverse_require' require_all 'mylibrary/extensions' # => true One can also require 'mylibrary/extensions.rb' only from RubyGems that depend on the currently loaded version of the mylibrary Gem: require_for 'mylibrary', 'mylibrary/extensions' # => true
Easy way to require multiple files from a relative path
reverse_require requires specific files from the gems which depend on a certain RubyGem and contain the specified path. Using reverse_require one can allow others to easily extend the functionality of a RubyGem. Simply add reverse_require into the code of your RubyGem: reverse_require 'my_gem', 'some/path' Then other gems which depend upon +my_gem+ merely have to provide <tt>some/path</tt> within their <tt>lib/</tt> directory, and reverse_require will load them all at run-time. This ability makes designing plug-in systems for a RubyGem trivial.
Use ruby-which for those times when you don't know which version of a library you're require-ing, or from what path on your system it's coming from.
Use ruby-which for those times when you don't know which version of a library you're require-ing, or from what path on your system it's coming from.
You've got a script. It's got some settings. Some settings are for this module, some are for that module. Most of them don't change. Except on your laptop, where the paths are different. Or when you're in production mode. Or when you're testing from the command line. "" So, Consigliere of mine, I think you should tell your Don what everyone knows. "" -- Don Corleone Configliere manage settings from many sources: static constants, simple config files, environment variables, commandline options, straight ruby. You don't have to predefine anything, but you can ask configliere to type-convert, require, document or password-obscure any of its fields. Modules can define config settings independently of each other and the main program.
== A soundcloud player written in Ruby with Ncurses for user interface and mpg123 for playback. Requires the mpg123 executable to be present in the PATH. == Usage * lists recently uploaded tracks from soundcloud cloudruby * lists all tracks that matches the keyword (here 'wearecastor') cloudruby wearecastor * also works with the direct soundcloud URL cloudruby http://soundcloud.com/crassmix/feint-clockwork-hearts-crass
magicprotorb lets you `require "magicprotorb/foo/bar_pb"` and have foo/bar.proto compiled to descriptors and registered at require time. The dotted require path mirrors the canonical proto path 1:1, so the require name, the file location, and the descriptor name can never drift apart. A small Rust extension (built on the pure-Rust protox compiler) turns .proto text into a FileDescriptorSet, which is then registered through the stock protobuf DescriptorPool — making the resulting message classes indistinguishable from generated ones.
Used by tribunals_frontend and tribunals_api to share configuration. To use: 1) add "gem 'moj_tribunals_config'" to your Gemfile 2) in an initializer, add the following code: require 'moj_tribunals_config' my_config = Moj::Tribunals::ConfigLoader.new.load This will load the default config files from the gem. To load different files, you can provide an alternative path to the ConfigLoader.new method, e.g. my_config = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load To just load config for a specific tribunal, you can do: config_loader = Moj::Tribunals::ConfigLoader.new config_file = config_loader.config_file_for('utiac') config_loader.load_file( config_file ) RailsConfig integration ======================= If you're using the RailsConfig gem, your intializer can just do something like: files = Moj::Tribunals::ConfigLoader.new.config_files files.each{ |f| Settings.add_source!( f ) } Settings.reload!
Chef-Berksfile-Env ================== A Chef plugin which allows you to lock down your Chef Environment's cookbook versions with a Berksfile. This is effectively the same as doing `berks apply ...` but via `knife environment from file ...`. View the [Change Log](https://github.com/bbaugher/chef-berksfile-env/blob/master/CHANGELOG.md) to see what has changed. Installation ------------ /opt/chef/embedded/bin/gem install chef-berksfile-env Usage ----- In your chef repo create a Berksfile next to your Chef environment file like this, chef-repo/environments/[ENV_NAME]/Berksfile This is the default location that will used by the plugin. We have to put the Berksfile in its own directory since [multiple Berksfiles can't exist in the same directory](https://github.com/berkshelf/berkshelf/issues/1247). The berksfile should include any cookbooks that your nodes or roles explicitly mention for that environment, source "https://supermarket.getchef.com" cookbook "java" cookbook "yum", "~> 2.0" ... Next we need to generate our Berksfile's lock file, berks install Your environment file must by in `.rb` format and look like this, require 'chef-berksfile-env' # The name must be defined first so we can use it to find the Berksfile name "my_env" # Load Berksfile locked dependencies as my environment's cookbook version contraints load_berksfile ... Now our environment will use the locked versions of the cookbooks and transitive dependencies generated by our Berksfile. Upgrading to the latest dependecies is now as simple as, berks install Our Berksfile also provides an easy way to ensure all the cookbooks and their versions that our environment requires are uploaded to our chef-server, berks upload How the Plugin Finds the Berksfile ---------------------------------- If you are curious how the plugin knows to find the Berksfile in `chef-repo/environments/[ENV]/Berksfile`, you want to put your Berksfile somewhere else or you have run into this error `Expected Berksfile at [/path/../Berksfile] but does not exist`, this section will explain how this works and ways to tweak the path or fix your error. `load_berksfile` has an optional argument which represents the path to your Berksfile. This path can be pseduo relative (explained in a moment) or absolute. By default the value is `environments/[ENV_NAME]/Berksfile`. By pseduo relative I mean that its a relative path but the plugin will check to see if the directory we are executing from partially matches our relative path. So if we are running knife from `/home/chef-repo/environments` and our relative path is `chef-repo/environments/dev/Berksfile` the plugin will see that the relative path is partially included in our execution directory and will attempt to merge the two to come up with `/home/chef-repo/environments/dev/Berksfile`. If we can't make any match at all we attempt to guess the path by just joining the relative path with our execution directory. So why do we do this? Well the only way to use this plugin is if your environment is in Ruby format. Chef's `knife from file ...` uses Ruby's `instance_eval` in order to do this. This means the code on Chef's end effectively looks like this, env.instance_eval(IO.read(env_ruby_file)) which means that any context about the location of the environment file is lost. So we have no great way to discern the location of our environment Ruby file, so instead we guess.
== DESCRIPTION: Provides a script and library to parse stories saved in the RSpec plain text story format and creates a PDF file with printable 3"x5" index cards suitable for using in Agile planning and prioritization. == FEATURES/PROBLEMS: * Create a PDF with each page as a 3x5 sheet, or as 4 cards per 8.5 x 11 sheet * Included script reads stories from STDIN and writes PDF to STDOUT * TODO: Improve test coverage * TODO: Improve documentation == SYNOPSIS: From the command line with stories2cards < /path/to/stories.txt Or via Ruby story_text = File.read('my_story') pdf_content = PDF::Storycards::Writer.make_pdf(story_text, :style => :card_1up) == REQUIREMENTS:
A Rack middleware to make URLs in one-page webapps easier. In a couple of recent projects, I've needed to avoid full page refreshes as much as possible. In the first, I wanted to keep an embedded music player active while the user was browsing. In the second, I just wanted fancier transitions between pages. It's possible to do this in an ad-hoc way, but I very quickly got tired of hacking things together. Enter Onesie. Onesie congealed from these requirements: * I want a one-page web app, * But I want the back button to work, * And I want search engines to still index some stuff, * And I (mostly) don't want to change the way I write a Rails/Sinatra app. If someone visits <tt>http://example.org/meta/contact</tt>, I want them to be redirected to <tt>http://example.org/blah/#/meta/contact</tt>, but after the redirection I still want the original route to be rendered for search engine indexing, etc. When Onesie gets a request, it looks to see if under your preferred one-page app path ("blah" in the example above). If it's not, Onesie sets the current request's path in the session and redirects to your app path. If a request is under the one-page app path, the "real" request's path is retrieved from the session and used for subsequent routing and rendering. This means that, as above, a request for http://example.org/meta/contact Will be redirected to http://example.org/blah/#/meta/contact But still render the correct action in the wrapped app, even though URL fragments aren't passed to the server. This is a terrible explanation. I'll write a sample app or something soon.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.