Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices" rel="nofollow noreferrer">Gem Packaging: Best Practices</a> gives a lot of advice, some of which include</p> <ul> <li><p>Don't pollute the global load path. Ideally, only have <code>foo.rb</code> in your <code>lib</code> directory, and put all your other files in <code>lib/foo</code>.</p></li> <li><p>Don't <code>require</code> files using <code>__FILE__</code>.</p></li> <li><p>Don't rely on anything outside the load path. Folders may not have the same structure as in your original version. For example, don't use something like </p> <p>VERSION = ::File.read(::File.join(::File.dirname(<strong>FILE</strong>), "..", "..", "VERSION")).strip</p></li> <li><p>Don't manage <code>$LOAD_PATH</code> within <code>lib</code>.</p></li> <li><p>Provide a <code>VERSION</code> constant.</p></li> <li><p>Don't depend on rubygems. The person using your code may not be using rubygems, but some other packaging system (or no packaging system). Similarly, don't mention version dependencies in the code itself, or <code>rescue Gem::LoadError</code>.</p></li> </ul> <p><a href="https://oree.ch/2009/06/06/rubygems-dependencies.html" rel="nofollow noreferrer">Rubygems dependencies. Please...</a> argues that you shouldn't list optional runtime dependencies, and should separate developer from runtime dependencies.</p> <p><a href="http://github.com/agrimm/zombie-chaser/commit/0a888b2ea33481e078ab7640c9fd38dc6a23710f" rel="nofollow noreferrer">From my own experience</a>: if nothing else, try building and installing your gem locally before releasing it into the wild. It avoids brown paper bag releases.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload