Skip to content

majioa/setup

 
 

Repository files navigation

Setup

Gem Version Build Status BSD-2-Clause License Total Downloads Downloads Code Climate Open Source Helpers

Introduction

%ruby_use_gem_version

%ruby_use_gem_dependency simplecov >= 0.16.1,simplecov < 1
%ruby_use_gem_version coveralls:0.8.23.1
%ruby_alias_names parser_p,parser-p
%ruby_on_build_rake_tasks build

sudo /usr/bin/setup.rb -s $(find -name "*.spec~") -o _.spec --maintainer-name="Pavel Skrylev" --maintainer-email="[email protected]" -g/home/majioa/available-list.yaml spec --debug-io=- --verbose=debug --ignore-path-tokens=templates,example,examples,sample,samples,spec,test,features,fixtures,doc,docs,contrib,demo,acceptance,conformance,myapp,website,benchmarks,benchmark,gemfiles,misc,steep 2>/dev/null; sudo chown majioa:majioa . -R

sudo /usr/bin/setup.rb -o $(echo $(pwd)|sed "s|.*/||").spec --maintainer-name="Pavel Skrylev" --maintainer-email="[email protected]" -g/home/majioa/available-list.yaml spec --debug-io=- --verbose=debug --ignore-path-tokens=templates,example,examples,sample,samples,spec,test,features,fixtures,doc,docs,contrib,demo,acceptance,conformance,myapp,website,benchmarks,benchmark,gemfiles,misc,steep 2>/dev/null; sudo chown majioa:majioa . -R

Every well practiced Rubyist is aware of Minero Aoki's ever setup.rb script. It's how most of us used to install our Ruby programs before RubyGems came along. And it's still mighty useful in certain scenarios, not the least of which is the job of the distro package maintainer.

Ruby Setup converts setup.rb into a stand-alone application. No longer requiring the distribution of the setup.rb script with every Ruby package. Just instruct one's users to install Ruby Setup (gem install setup) and go from there. As long as a project is setup.rb compliant, as most are, then there is little to nothing it's developer must do.

Important

There a couple very important difference between the old 5.2.0 verison of the setup.rb and Ruby Setup.

  • No longer supports versions of Ruby older than v2.4.0.
  • The compile phase has been renamed to the make phase.

Installation

Add this line to your application's Gemfile:

gem 'setup'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install setup

Usage

Instruction

To use setup.rb, a project must conform to the setup.rb standard layout. Please see the documentation on the website if you need to know more about what this entails. Most projects already follow the standard since it was setup.rb that originally popularized most of the current layout conventions. (Note that the on-line documentation is slightly out of sync with the latest release.)

Usage is as simple as:

$ setup.rb

This is the same as using the all action.

$ setup.rb all

And is equivalent to running the two main phases in sequence.

$ setup.rb compile $ setup.rb install

Where make compiles any extensions and install copies project files to the appropriate places on your system.

For setup.rb to install a project's documentation and library files properly it is best to supply it was basic information about the project. Setup.rb also supports two optional phases, config and test.

$ setup config

Configuration can be run before any other phase in order to be of used. Running config creates a .setup file which you can then edit to make any adjustments neccessary to the installation. When finished editing this file, use setup.rb as before and your custom configuration will be used instead of the standard defaults.

$ setup.rb test

This will run tests if a ruby app tests are presented. It must be run after make, but before install. Because there are now a deverse selection of testing tools available for Ruby, testing only happens if the developer has provided a test coverage, either.

If you later decide you want to remove a program from your system, use uninstall.

$ setup.rb uninstall

This will remove all files previously installed via the setup.rb app. Uninstalling is made possible by the .receipt file, installed into the root of the tagrget project that is generated by the install process. If that file is deleted than you will not be able to uninstall. (You can usually get around this be reinstalling first though).

During the make phase, by-product files are typically created. You can clean up any of these by-products with:

$ setup.rb clean

And restore them to their absolute pristine state with:

$ setup.rb distclean

For further details on using setup.rb, or developing a project that can take advantage of setup.rb's special features, please see the website and associated wiki.

Development

After checking out the repo, run bundle to install dependencies. You can also run pry for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/majioa/setup.

Copyrights

Setup.rb is copyrighted open source software.

Copyright (c) 2018 ALT (BSD-2-Clause)

It can be modified and redistributed in accordance with the BSD-2-Clause license.

Setup.rb is a rewrite of the original setup.rb script by (Rubyworks)[https://github.com/rubyworks/setup], and earlier by (Minero Aoki)[http://i.loveruby.net].

Copyright (c) 2008 Rubyworks (BSD-2-Clause)
Copyright (c) 2002 Minero Aoki (GNU LGPL 2.1+)

See LICENSE for details.

About

Ruby's Classic Site Installer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 71.7%
  • Gherkin 27.1%
  • HTML 1.2%