Skip to content
This repository

New Gem Generator for RubyGems

Merge pull request #18 from avh4/patch-2

Update matchers.rb template for rspec 2
latest commit 9ad4ca905d
Dr Nic Williams authored June 19, 2012
Octocat-spinner-32 app_generators Fixed "newgem --help" to not show backtrace summary July 01, 2009
Octocat-spinner-32 bin all require 'rubygems' are conditional unless ENV['NO_RUBYGEMS']; rsp… March 18, 2009
Octocat-spinner-32 config merged hoe.rb back into Rakefile (only 29 lines now) October 21, 2008
Octocat-spinner-32 cucumber_generators feature generator cleans up ModelName into model_name for file paths October 17, 2008
Octocat-spinner-32 features Only test for "Error" not "error" in rake task output to determine su… November 03, 2009
Octocat-spinner-32 lib bump to 1.5.3 to release activesupport fix March 04, 2010
Octocat-spinner-32 newgem_generators refactor lots of tasks into hoe plugins newgem and website June 15, 2009
Octocat-spinner-32 newgem_theme_generators module_name supports hyphens throughout all generators (they are trea… May 01, 2009
Octocat-spinner-32 rubygems_generators Update matchers.rb template for rspec 2 June 16, 2012
Octocat-spinner-32 script all require 'rubygems' are conditional unless ENV['NO_RUBYGEMS']; rsp… March 18, 2009
Octocat-spinner-32 test Um, need to try rubygems if cannot load rubigen without it. November 03, 2009
Octocat-spinner-32 website @ c5be6b2 update website June 24, 2010
Octocat-spinner-32 .gitignore * In generated projects: August 30, 2009
Octocat-spinner-32 .gitmodules migrated website -> gh-pages branch, and replaced with submodule link December 29, 2008
Octocat-spinner-32 History.txt bump to 1.5.3 to release activesupport fix March 04, 2010
Octocat-spinner-32 Manifest.txt Only load newgem.rb once June 29, 2009
Octocat-spinner-32 PostInstall.txt update postinstall and readme notices [thx Tomasz Muras] October 28, 2008
Octocat-spinner-32 README.rdoc added runcoderun link to readme October 31, 2008
Octocat-spinner-32 Rakefile do not load activesupport 3 March 04, 2010
Octocat-spinner-32 TODO.markdown some TODO thoughts on a 'rake post_rubyflow' task March 17, 2009
README.rdoc

New Gem Generator

DESCRIPTION:

Quickly bundle any Ruby libraries into a RubyGem and share it with the world, your colleagues, or perhaps just with yourself amongst your projects.

RubyGems are centrally stored, versioned, and support dependencies between other gems, so they are the ultimate way to bundle libraries, executables, associated tests, examples, and more.

Within this gem, you get one thing - newgem - an executable to create your own gems. Your new gems will include designated folders for Ruby code, test files, executables, and even a default website page for you to explain your project, and which instantly uploads to RubyForge website (which looks just like this one by default)

BASIC USAGE:

Go to the folder where you want to create your new gem folder structure, and run the newgem command to generate your gem scaffolding.

cd ~/ruby_projects
$ newgem wizzo
        create  
        create  doc
        create  lib
        create  script
        create  tasks
        create  lib/wizzo
        create  History.txt
        create  Rakefile
        create  README.rdoc
        create  PostInstall.txt
        create  lib/wizzo.rb
    dependency  install_test_unit
        create    test
        create    test/test_helper.rb
        create    test/test_wizzo.rb
    dependency  install_website
        create    website/javascripts
        create    website/stylesheets
        create    config
        exists    script
        exists    tasks
        create    website/index.txt
        create    website/index.html
        create    config/website.yml.sample
        create    script/txt2html
    dependency    plain_theme
        exists      website/javascripts
        exists      website/stylesheets
        create      website/template.html.erb
        create      website/stylesheets/screen.css
        create      website/javascripts/rounded_corners_lite.inc.js
    dependency  install_rubigen_scripts
        exists    script
        create    script/generate
        create    script/destroy
        create  script/console
        create  Manifest.txt
        readme  readme
  Important
  ======           * Open Rakefile
  * Update missing details (gem description, dependent gems, etc.)

You can generate test::unit or rspec test stubs via the -T, –test-with options (shoulda coming soon)

SYNOPSIS:

Now modify the constants at the top of config/hoe.rb, with your name, email and the location where you'll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website.

REQUIREMENTS:

  • hoe

  • rubyforge

INSTALL:

The newgem application is distributed itself as a RubyGem and is available immediately after installation.

sudo gem install newgem

Alternately, download the gem and install manually.

TICKETS:

Tickets or suggestions can be raised at drnic.lighthouseapp.com/projects/18881-newgem/overview

DOES IT WORK?

Much of newgem's behaviour is covered by functional tests (see features at github.com/drnic/newgem/tree/master/features).

With each commit to the master branch of the git repository, these functional tests and the unit tests are run via a continuous integration server.

Current build status: runcoderun.com/drnic/newgem

TUTORIALS:

LICENSE:

(The MIT License)

Copyright © 2006-2008 Dr Nic Williams

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.