Skip to content

Commit

Permalink
(guts) Convince Bundler to always add the local lib directory to the …
Browse files Browse the repository at this point in the history
…load path

The `gemspec` directive (usually used when developing a gem) makes Bundler
always add the local `lib` directory to the load path. This is great for us,
because it lets us put general utility code in the puppet_docs and
puppet_references namespaces and easily load it from things like the Rakefile,
Jekyll plugins, etc. without having to munge the load path everywhere.

As part of convincing Bundler to do the thing, I also had to add a
puppet_docs.gemspec file. It doesn't have any other purpose, since we're not
releasing this helper code as a gem, but I made it look plausible anyway.
  • Loading branch information
nfagerlund committed Jan 25, 2016
1 parent f096def commit f89565d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
@@ -1,4 +1,5 @@
source 'https://rubygems.org/'
gemspec :name => 'puppet_docs'

gem 'versionomy'
gem 'rake'
Expand Down
19 changes: 19 additions & 0 deletions puppet_docs.gemspec
@@ -0,0 +1,19 @@
Gem::Specification.new do |s|
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.rubygems_version = '2.2.2'
s.required_ruby_version = '>= 2.0.0'

s.name = 'puppet_docs'
s.version = '0.1'
s.license = 'Apache 2.0'

s.summary = 'Internal tools used for building the docs.puppetlabs.com website.'
s.description = s.summary.dup

s.authors = ['Nick Fagerlund', 'Mike Hall', 'James Turnbull']
s.email = 'docs@puppetlabs.com'
s.homepage = 'https://github.com/puppetlabs/puppet-docs'

s.require_paths = ['lib']
end

0 comments on commit f89565d

Please sign in to comment.