Skip to content

Instantly share code, notes, and snippets.

@anlek
Forked from leahneukirchen/RPS-SPEC
Created April 11, 2010 19:19

Revisions

  1. @leahneukirchen leahneukirchen revised this gist Apr 11, 2010. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions RPS-SPEC
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    THIS DOCUMENT MOVED TO http://chneukirchen.github.com/rps/
    AND http://github.com/chneukirchen/rps

    = Ruby Packaging Standard

    The aim of this document is two-fold. First, to specify a common
  2. @leahneukirchen leahneukirchen revised this gist Apr 10, 2010. 1 changed file with 22 additions and 7 deletions.
    29 changes: 22 additions & 7 deletions RPS-SPEC
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,13 @@
    = Ruby Packaging Standard

    The aim of this document is to specify a common structure of how a
    Ruby package distributed as source (that is, but not limited to,
    development directories, version-controlled repositories, .tar.gz,
    Gems, ...) should conform to.
    The aim of this document is two-fold. First, to specify a common
    structure of how a Ruby package distributed as source (that is, but
    not limited to, development directories, version-controlled
    repositories, .tar.gz, Gems, ...) should conform to.

    Second, to document common and proven ways to structure Ruby packages,
    and to point out certain anti-patterns that sneaked into common use.
    It is by intent not to innovate.

    (See RFC 2119 for use of MUST, SHOULD, SHALL.)

    @@ -31,11 +35,12 @@ Ruby executables SHOULD have a shebang line using env:

    Executables SHOULD NOT require code of the project that are outside of lib/.

    Executables SHOULD NOT require 'rubygems' or modify the $LOAD_PATH.
    Executables SHOULD NOT require 'rubygems' or modify the $LOAD_PATH,
    unless they are specifically made for doing that (e.g. package managers).

    Executable files SHOULD NOT end with .rb.

    Executable files SHOULD be installed with mode 0775.
    Executable files SHOULD be installed with mode 0755.

    == Extensions

    @@ -45,7 +50,15 @@ Extensions SHOULD reside in ext/.

    Extensions SHOULD be buildable with "ruby extconf.rb; make".

    XXX
    XXX How to install, how to find out what was built.

    == Data files

    Data files and resources of the project belong to data/.

    XXX Or data/<projectname>?

    XXX Where to install to, how to find out that place from the program?

    == Tests

    @@ -54,3 +67,5 @@ Tests SHOULD reside in test/ or spec/.
    == History

    09apr2010: First initial draft.
    10apr2010: Fix binary permissions.
    10apr2010: Add data files.
  3. @leahneukirchen leahneukirchen revised this gist Apr 9, 2010. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions RPS-SPEC
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@ Libraries SHOULD NOT require code of the project that are outside of lib/.

    Libraries MUST not require 'rubygems' or modify the $LOAD_PATH.

    Library files SHOULD end with .rb.
    Ruby library files MUST end with .rb.

    Library files SHOULD be installed with mode 0644.

    @@ -49,7 +49,7 @@ XXX

    == Tests

    Tests SHOULD reside in test/.
    Tests SHOULD reside in test/ or spec/.

    == History

  4. @leahneukirchen leahneukirchen created this gist Apr 9, 2010.
    56 changes: 56 additions & 0 deletions RPS-SPEC
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    = Ruby Packaging Standard

    The aim of this document is to specify a common structure of how a
    Ruby package distributed as source (that is, but not limited to,
    development directories, version-controlled repositories, .tar.gz,
    Gems, ...) should conform to.

    (See RFC 2119 for use of MUST, SHOULD, SHALL.)

    == Library files

    Library code MUST reside in lib/.

    Libraries SHOULD use a directory as namespace, e.g. lib/foo.rb and lib/foo/**.

    Libraries SHOULD NOT require code of the project that are outside of lib/.

    Libraries MUST not require 'rubygems' or modify the $LOAD_PATH.

    Library files SHOULD end with .rb.

    Library files SHOULD be installed with mode 0644.

    == Executables

    Executables MUST reside in bin/.

    Ruby executables SHOULD have a shebang line using env:

    #!/usr/bin/env ruby

    Executables SHOULD NOT require code of the project that are outside of lib/.

    Executables SHOULD NOT require 'rubygems' or modify the $LOAD_PATH.

    Executable files SHOULD NOT end with .rb.

    Executable files SHOULD be installed with mode 0775.

    == Extensions

    Extensions are directories which contain a extconf.rb.

    Extensions SHOULD reside in ext/.

    Extensions SHOULD be buildable with "ruby extconf.rb; make".

    XXX

    == Tests

    Tests SHOULD reside in test/.

    == History

    09apr2010: First initial draft.