[ANN] Mr Bones - 1.1.0

Discussion in 'Ruby' started by Tim Pease, Dec 29, 2007.

  1. Tim Pease

    Tim Pease Guest

    Bones
    by Tim Pease
    <http://codeforpeople.rubyforge.org/bones>

    == DESCRIPTION:

    Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
    The skeleton contains some starter code and a collection of rake tasks to
    ease the management and deployment of your source code. Mr Bones is not
    viral -- all the code your project needs is included in the skeleton (no
    gem dependency required).

    == FEATURES/PROBLEMS:

    Mr Bones provides the following rake tasks:

    clobber # Remove all build products
    doc # Alias to doc:rdoc
    doc:rdoc # Build the rdoc HTML Files
    doc:release # Publish RDoc to RubyForge
    doc:rerdoc # Force a rebuild of the RDOC files
    doc:ri # Generate ri locally for testing
    gem # Alias to gem:package
    gem:debug # Show information about the gem
    gem:gem # Build the gem file
    gem:install # Install the gem
    gem:package # Build all the packages
    gem:release # Package and upload to RubyForge
    gem:repackage # Force a rebuild of the package files
    gem:uninstall # Uninstall the gem
    manifest:check # Verify the manifest
    manifest:create # Create a new manifest
    notes # Enumerate all annotations
    notes:fixme # Enumerate all FIXME annotations
    notes:eek:ptimize # Enumerate all OPTIMIZE annotations
    notes:todo # Enumerate all TODO annotations
    spec:rcov # Run all specs with RCov
    spec:run # Run all specs with basic output
    spec:specdoc # Run all specs with text output
    test:rcov # Run rcov on the unit tests
    test:run # Run tests for run

    The rake tasks in the Mr Bones framework can be found in the "tasks"
    directory. Add your own tasks there when you need more functionality.

    == SYNOPSIS:

    To create a new "Get Fuzzy" project:

    bones get_fuzzy

    If a new release of Mr Bones comes out with better features the "Get Fuzzy"
    project will need to be updated:

    bones --update get_fuzzy

    And if you ever get confused about what Mr Bones can do:

    bones --help

    == REQUIREMENTS:

    Mr Bones does not have any "requirements", but if you do not have the
    following gems installed you will not get all that Mr Bones has to offer.

    * rubyforge - for easy gem publishing to rubyforge.org
    * rcov - for code coverage testing
    * rspec - if that's the way you roll

    == INSTALL:

    * sudo gem install bones


    See the Mr Bones webpage for more information and a little manual.
    <http://codeforpeople.rubyforge.org/bones>


    Blessings,
    TwP
     
    Tim Pease, Dec 29, 2007
    #1
    1. Advertising

  2. Tim Pease

    James Britt Guest

    Tim Pease wrote:

    >
    > To create a new "Get Fuzzy" project:
    >
    > bones get_fuzzy
    >



    Looks very col. However, after installing the gem, I tried it out and
    got this:


    james@james06:/tmp$ bones FOOBAR
    /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    `files_to_load': File or directory not found: manifest:create (RuntimeError)


    It does create the project directory, though.

    However, if I cd to that folder and run

    $ rake manifest:create

    I get that same error.


    In fact, this seems to happen with other rake tasks as well. For example:

    james@james06:/tmp/FOOBAR$ rake clobber
    (in /tmp/FOOBAR)
    /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    `files_to_load': File or directory not found: clobber (RuntimeError)





    --
    James Britt

    "The greatest obstacle to discovery is not ignorance, but the illusion
    of knowledge."
    - D. Boorstin
     
    James Britt, Dec 29, 2007
    #2
    1. Advertising

  3. On Sun, Dec 30, 2007, Tim Pease wrote:
    > Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
    > The skeleton contains some starter code and a collection of rake tasks to
    > ease the management and deployment of your source code. Mr Bones is not
    > viral -- all the code your project needs is included in the skeleton (no
    > gem dependency required).


    How does Mr. Bones compare with rabal?

    http://copiousfreetime.rubyforge.org/rabal/

    Ben
     
    Ben Bleything, Dec 29, 2007
    #3
  4. Tim Pease

    Tim Pease Guest

    On Dec 29, 2007 1:02 PM, Ben Bleything <> wrote:
    > On Sun, Dec 30, 2007, Tim Pease wrote:
    > > Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
    > > The skeleton contains some starter code and a collection of rake tasks to
    > > ease the management and deployment of your source code. Mr Bones is not
    > > viral -- all the code your project needs is included in the skeleton (no
    > > gem dependency required).

    >
    > How does Mr. Bones compare with rabal?
    >
    > http://copiousfreetime.rubyforge.org/rabal/
    >


    Same idea, but different implementation. Mr Bones is a bit simpler
    than Rabal. The main difference is (1) in how much of a skeleton is
    created (Mr Bones is a smaller skeleton) and (2) how the rake tasks
    are managed. Mr Bones does everything by setting project parameters in
    the top-level Rakefile. Rabal generates tasks specific to a particular
    project.

    Blessings,
    TwP
     
    Tim Pease, Dec 29, 2007
    #4
  5. Tim Pease

    Tim Pease Guest

    On Dec 29, 2007 12:46 PM, James Britt <> wrote:
    > Tim Pease wrote:
    >
    > >
    > > To create a new "Get Fuzzy" project:
    > >
    > > bones get_fuzzy
    > >

    >
    >
    > Looks very col. However, after installing the gem, I tried it out and
    > got this:
    >
    >
    > james@james06:/tmp$ bones FOOBAR
    > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    > `files_to_load': File or directory not found: manifest:create (RuntimeError)
    >
    >
    > It does create the project directory, though.
    >
    > However, if I cd to that folder and run
    >
    > $ rake manifest:create
    >
    > I get that same error.
    >
    >
    > In fact, this seems to happen with other rake tasks as well. For example:
    >
    > james@james06:/tmp/FOOBAR$ rake clobber
    > (in /tmp/FOOBAR)
    > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    > `files_to_load': File or directory not found: clobber (RuntimeError)
    >
    >



    Grrrr. Mr Bones is not playing nicely with RSpec 1.1.1 I'll look
    into it and see if I can patch things up between the two.

    TwP
     
    Tim Pease, Dec 29, 2007
    #5
  6. Tim Pease

    Tim Pease Guest

    On Dec 29, 2007 12:46 PM, James Britt <> wrote:
    >
    > Looks very col. However, after installing the gem, I tried it out and
    > got this:
    >
    >
    > james@james06:/tmp$ bones FOOBAR
    > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    > `files_to_load': File or directory not found: manifest:create (RuntimeError)
    >


    Just fixed the bug and release a 1.1.1 version.

    I was requiring the top-level RSpec file, "spec.rb", and that has an
    "at_exit" handler that tries to run the tests specified on the command
    line. This just happens to be whatever rake task you were trying to
    run, and it complains that it can't find that file.

    Fixed now.

    Blessings,
    TwP
     
    Tim Pease, Dec 29, 2007
    #6
  7. Or, for that matter, how is this different than newgem, hoe, echoe,
    and the others? Not a critical question (variety isn't bad at all),
    but I'm just wondering if there's an advantage over those libraries.

    --Jeremy

    On Dec 29, 2007 3:22 PM, Tim Pease <> wrote:
    >
    > On Dec 29, 2007 1:02 PM, Ben Bleything <> wrote:
    > > On Sun, Dec 30, 2007, Tim Pease wrote:
    > > > Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
    > > > The skeleton contains some starter code and a collection of rake tasks to
    > > > ease the management and deployment of your source code. Mr Bones is not
    > > > viral -- all the code your project needs is included in the skeleton (no
    > > > gem dependency required).

    > >
    > > How does Mr. Bones compare with rabal?
    > >
    > > http://copiousfreetime.rubyforge.org/rabal/
    > >

    >
    > Same idea, but different implementation. Mr Bones is a bit simpler
    > than Rabal. The main difference is (1) in how much of a skeleton is
    > created (Mr Bones is a smaller skeleton) and (2) how the rake tasks
    > are managed. Mr Bones does everything by setting project parameters in
    > the top-level Rakefile. Rabal generates tasks specific to a particular
    > project.
    >
    > Blessings,
    > TwP
    >
    >




    --
    http://www.jeremymcanally.com/

    My books:
    Ruby in Practice
    http://www.manning.com/mcanally/

    My free Ruby e-book
    http://www.humblelittlerubybook.com/

    My blogs:
    http://www.mrneighborly.com/
    http://www.rubyinpractice.com/
     
    Jeremy McAnally, Dec 29, 2007
    #7
  8. Tim Pease

    James Britt Guest

    Tim Pease wrote:

    > Just fixed the bug and release a 1.1.1 version.
    >
    > I was requiring the top-level RSpec file, "spec.rb", and that has an
    > "at_exit" handler that tries to run the tests specified on the command
    > line. This just happens to be whatever rake task you were trying to
    > run, and it complains that it can't find that file.
    >
    > Fixed now.
    >


    Thanks; that was fast!

    James
     
    James Britt, Dec 29, 2007
    #8
  9. Tim Pease

    Tim Pease Guest

    On Dec 29, 2007 2:09 PM, Jeremy McAnally <> wrote:
    > Or, for that matter, how is this different than newgem, hoe, echoe,
    > and the others? Not a critical question (variety isn't bad at all),
    > but I'm just wondering if there's an advantage over those libraries.
    >


    Regarding the rake tasks, Mr Bones is intended to put everything in
    the skeleton. Contrast this to hoe and echoe where you are relying on
    an external gem. With Mr Bones you can twiddle the tasks if they don't
    do what you need / like / desire. That is a little more difficult to
    do with the others.

    Mr Bones has the upgrade flag for when you want to update your tasks.
    You have to update all your projects individually. Hoe and echoe
    simplify this since they are included in all your projects -- update
    those guys and all your projects are running the latests and greatest
    (which might or might not be what you want).

    Anyway, Mr Bones is a little more work, but it provides more
    flexibility for my needs. Just thought I would share.

    And what a great name!! "Mr Bones" ;)

    Blessings,
    TwP

    Happy New Year to all.
     
    Tim Pease, Dec 30, 2007
    #9
  10. Tim Pease

    Matt Todd Guest

    Sounds like a good implementation. I'll test it later and let you know
    how I feel.

    I'm of the persuasion that likes very, very, very minimal overhead for
    something simple. Currently, my primary Gem project is Halcyon and
    with a single Rakefile I get by with packaging, locally installing,
    uninstalling, generating RDocs, etc. All that is required is my time
    to fill out the project information in the Rakefile and the directory
    structure to be sane.

    Like I said, I'll take a look at it and see if it satisfies my
    ultra-slim mentality. :)

    Matt
     
    Matt Todd, Dec 30, 2007
    #10
  11. On Sun, Dec 30, 2007 at 05:22:05AM +0900, Tim Pease wrote:
    > On Dec 29, 2007 1:02 PM, Ben Bleything <> wrote:
    > > On Sun, Dec 30, 2007, Tim Pease wrote:
    > > > Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.
    > > > The skeleton contains some starter code and a collection of rake tasks to
    > > > ease the management and deployment of your source code. Mr Bones is not
    > > > viral -- all the code your project needs is included in the skeleton (no
    > > > gem dependency required).

    > >
    > > How does Mr. Bones compare with rabal?
    > >
    > > http://copiousfreetime.rubyforge.org/rabal/
    > >

    >
    > Same idea, but different implementation. Mr Bones is a bit simpler
    > than Rabal. The main difference is (1) in how much of a skeleton is
    > created (Mr Bones is a smaller skeleton) and (2) how the rake tasks
    > are managed. Mr Bones does everything by setting project parameters in
    > the top-level Rakefile. Rabal generates tasks specific to a particular
    > project.
    >


    Tim! I see what you've been doing on your vacation. Dang you, getting
    Mr. Bones out there before I can refactor Rabal. I love the name.

    I'm sure Tim and I will have several conversations :). We do happen to
    frequent the same coffee shop on an exteremely regular basis.

    Oh, and Ben, look for a refactoring of Rabal in the coming months. I
    have a couple more ideas I need to work with.

    enjoy,

    -jeremy

    --
    ========================================================================
    Jeremy Hinegardner
     
    Jeremy Hinegardner, Dec 31, 2007
    #11
  12. Tim Pease

    nexneo Guest

    Re: Mr Bones - 1.1.0


    >
    > > Looks very col. However, after installing the gem, I tried it out and
    > > got this:

    >
    > > james@james06:/tmp$ bones FOOBAR
    > > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    > > `files_to_load': File or directory not found: manifest:create (RuntimeError)

    >
    > Just fixed the bug and release a 1.1.1 version.
    >
    > I was requiring the top-level RSpec file, "spec.rb", and that has an
    > "at_exit" handler that tries to run the tests specified on the command
    > line. This just happens to be whatever rake task you were trying to
    > run, and it complains that it can't find that file.
    >
    > Fixed now.
    >


    after running merb generator i get similar error.
    /Library/Ruby/Gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:
    216:in `files_to_load': File or directory not found: info
    (RuntimeError)

    is that related to above bug?
     
    nexneo, Jan 4, 2008
    #12
  13. Re: Mr Bones - 1.1.0

    >> james@james06:/tmp$ bones FOOBAR
    >> /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in
    >> `files_to_load': File or directory not found: manifest:create (RuntimeError)
    >>

    >
    > Just fixed the bug and release a 1.1.1 version.


    hm, seems to be still a problem, even using rspec 1.1.2:

    /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:216:in
    `files_to_load': File or directory not found: test:units (RuntimeError)
    from
    /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:210:in
    `each'


    Florian
    --
    Posted via http://www.ruby-forum.com/.
     
    Florian Ebeling, Jan 16, 2008
    #13
  14. Tim Pease

    Tim Pease Guest

    Re: Mr Bones - 1.1.0

    On Jan 16, 2008, at 3:35 AM, Florian Ebeling wrote:

    >>> james@james06:/tmp$ bones FOOBAR
    >>> /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/
    >>> options.rb:216:in
    >>> `files_to_load': File or directory not found: manifest:create
    >>> (RuntimeError)
    >>>

    >>
    >> Just fixed the bug and release a 1.1.1 version.

    >
    > hm, seems to be still a problem, even using rspec 1.1.2:
    >
    > /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/
    > options.rb:216:in
    > `files_to_load': File or directory not found: test:units
    > (RuntimeError)
    > from
    > /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/
    > options.rb:210:in
    > `each'
    >


    If you have the following line anywhere in your source code

    require 'spec'

    RSpec is going to load an at_exit handler that will try to run RSpec
    specifications. I had this require line in version 1.1.0 of Mr Bones.
    The release of Mr Bones 1.1.1 fixed that bug (Mr Bones is now up to
    1.3.0 by the way).

    Grep through you code and see if something has the line "require
    'spec'". That is where the problem is coming from.

    Blessings,
    TwP
     
    Tim Pease, Jan 16, 2008
    #14
  15. Tim Pease

    ara.t.howard Guest

    Re: Mr Bones - 1.1.0

    On Jan 16, 2008, at 10:47 AM, Tim Pease wrote:

    > If you have the following line anywhere in your source code
    >
    > require 'spec'
    >
    > RSpec is going to load an at_exit handler that will try to run
    > RSpec specifications. I had this require line in version 1.1.0 of
    > Mr Bones. The release of Mr Bones 1.1.1 fixed that bug (Mr Bones is
    > now up to 1.3.0 by the way).
    >
    > Grep through you code and see if something has the line "require
    > 'spec'". That is where the problem is coming from.


    just a quick note, if you ever load a lib with a screwy at_exit
    handler you can monkey patch it by

    require 'spec'
    at_exit{ exit! } # discard *all* pervious exit handlers

    sometimes handy - and dangerous...

    a @ http://codeforpeople.com/
    --
    share your knowledge. it's a way to achieve immortality.
    h.h. the 14th dalai lama
     
    ara.t.howard, Jan 16, 2008
    #15
  16. Re: Mr Bones - 1.1.0

    ara.t.howard wrote:
    > just a quick note, if you ever load a lib with a screwy at_exit handler
    > you can monkey patch it by
    >
    > require 'spec'
    > at_exit{ exit! } # discard *all* pervious exit handlers
    >
    > sometimes handy - and dangerous...


    Hm, what about this?

    at_exit do
    puts "foo"
    end
    at_exit do
    puts "bar"
    end
    at_exit do
    puts "baz"
    end

    # end of existing code,
    # monkey patch begins below...

    BEGIN {
    def at_exit(&block)
    if $at_exit_handlers # or make this local to BEGIN and use
    define_method
    $at_exit_handlers << block
    else
    $at_exit_handlers = [block]
    super do
    while block = $at_exit_handlers.pop
    block[$at_exit_handlers]
    end
    end
    end
    end
    }

    at_exit do |remaining|
    remaining.delete_if do |block|
    eval("__LINE__", block) == 1 # or use __FILE__
    end
    puts "deleted foo handler"
    end

    __END__

    Output:

    deleted foo handler
    baz
    bar

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Jan 16, 2008
    #16
  17. Tim Pease

    ara.t.howard Guest

    Re: Mr Bones - 1.1.0

    On Jan 16, 2008, at 3:01 PM, Joel VanderWerf wrote:

    > ara.t.howard wrote:
    >> just a quick note, if you ever load a lib with a screwy at_exit
    >> handler you can monkey patch it by
    >> require 'spec'
    >> at_exit{ exit! } # discard *all* pervious exit handlers
    >> sometimes handy - and dangerous...

    >
    > Hm, what about this?
    >
    > at_exit do
    > puts "foo"
    > end
    > at_exit do
    > puts "bar"
    > end
    > at_exit do
    > puts "baz"
    > end
    >
    > # end of existing code,
    > # monkey patch begins below...
    >
    > BEGIN {
    > def at_exit(&block)
    > if $at_exit_handlers # or make this local to BEGIN and use
    > define_method
    > $at_exit_handlers << block
    > else
    > $at_exit_handlers = [block]
    > super do
    > while block = $at_exit_handlers.pop
    > block[$at_exit_handlers]
    > end
    > end
    > end
    > end
    > }
    >
    > at_exit do |remaining|
    > remaining.delete_if do |block|
    > eval("__LINE__", block) == 1 # or use __FILE__
    > end
    > puts "deleted foo handler"
    > end
    >
    > __END__
    >
    > Output:
    >
    > deleted foo handler
    > baz
    > bar
    >
    > --
    > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
    >


    yeah - something like

    require 'at_exit_stack'

    would be a cool gem for sure!

    a @ http://codeforpeople.com/
    --
    share your knowledge. it's a way to achieve immortality.
    h.h. the 14th dalai lama
     
    ara.t.howard, Jan 16, 2008
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard

    bare bones <div> demo online

    Richard, Nov 3, 2003, in forum: HTML
    Replies:
    20
    Views:
    902
    informant
    Nov 4, 2003
  2. Tim Pease

    [ANN] Mr Bones - 1.2.0

    Tim Pease, Jan 1, 2008, in forum: Ruby
    Replies:
    0
    Views:
    132
    Tim Pease
    Jan 1, 2008
  3. Tim Pease

    [ANN] Mr Bones - 1.3.0

    Tim Pease, Jan 4, 2008, in forum: Ruby
    Replies:
    0
    Views:
    79
    Tim Pease
    Jan 4, 2008
  4. Tim Pease

    [ANN] Mr Bones 1.3.1

    Tim Pease, Feb 1, 2008, in forum: Ruby
    Replies:
    0
    Views:
    94
    Tim Pease
    Feb 1, 2008
  5. Tim Pease

    [ANN] Mr Bones 1.3.2

    Tim Pease, Feb 5, 2008, in forum: Ruby
    Replies:
    7
    Views:
    90
    Shane Vitarana
    Feb 9, 2008
Loading...

Share This Page