Skip to content

Commit

Permalink
rdoc formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Guidi committed Jul 12, 2008
1 parent d3a8702 commit 98c1062
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 35 deletions.
50 changes: 24 additions & 26 deletions README
@@ -1,82 +1,80 @@
Sashimi
=======
= Sashimi

Sashimi is a Rails plugins manager.

It allows to install your favourite plugins in a local repository and add them to your Rails apps.
The main goal is to allow the plugins offline installation.



Installation
============
= Installation

$ (sudo) gem install sashimi
$ (sudo) gem install sashimi

or

$ (sudo) gem install jodosha-sashimi --source=http://gems.github.com
$ (sudo) gem install jodosha-sashimi --source=http://gems.github.com



Usage
=====
= Usage

Install a plugin from a subversion URL:
$ sashimi install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder
$ sashimi install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder

Install a plugin from a git URL:
$ sashimi install git://github.com/jodosha/click-to-globalize.git
$ sashimi install git://github.com/jodosha/click-to-globalize.git

Uninstall a plugin:
$ sashimi uninstall continuous_builder
$ sashimi uninstall continuous_builder

Update a plugin:
$ sashimi update click-to-globalize
$ sashimi update click-to-globalize

Update a plugin of a Rails app:
$ sashimi update --rails click-to-globalize
$ sashimi update --rails click-to-globalize

NOTE: If your application is versioned with Svn or Git, Sashimi will automatically schedules for add/remove the added/removed files.

List all installed plugins:
$ sashimi list
$ sashimi list

Add installed plugin(s) to a Rails app:
$ sashimi add click-to-globalize
$ sashimi install --rails click-to-globalize
$ sashimi add click-to-globalize
or
$ sashimi install --rails click-to-globalize



Known And Common Issues
=======================
= Known And Common Issues

* When add a plugin to an app, make sure your current directory is the rails root.

* Only Subversion and Git repositories are currently supported.


Contribute
==========
= Contribute

* Check out the code and test it:

$ git clone git://github.com/jodosha/sashimi.git

$ rake

* Create a ticket to: http://sushistar.lighthouseapp.com
* Create a ticket to the {Sushistar Lighthouse page}[http://sushistar.lighthouseapp.com]

* Create a patch and add as attachement to the ticket.


Credits
=======
= Credits

Partially inspired to RaPT[http://rapt.rubyforge.org/].



Home Page
=========
http://lucaguidi.com/pages/sashimi
= Home Page

The Sashimi homepage is http://lucaguidi.com/pages/sashimi



Expand Down
23 changes: 23 additions & 0 deletions lib/sashimi.rb
@@ -1,3 +1,26 @@
#--
# Copyright (c) 2008 Luca Guidi
#
# 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.
#++

$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

Expand Down
11 changes: 6 additions & 5 deletions lib/sashimi/core_ext/array.rb
@@ -1,9 +1,10 @@
class Array
# Transform the current +Array+ to a path.
# It's an alias for +File#join+
#
# %w(path to app).to_path # => path/to/app
# %w(path to app).to_path(true) # => /Users/luca/path/to/app
# It's an alias for <tt>File#join</tt>.
#
# %w(path to app).to_path # => path/to/app+
# %w(path to app).to_path(true) # => /Users/luca/path/to/app
def to_path(absolute = false)
path = File.join(self)
path = File.expand_path(path) if absolute
Expand All @@ -12,8 +13,8 @@ def to_path(absolute = false)

# Transform the current +Array+ to an absolute path.
#
# %w(path to app).to_absolute_path # => /Users/luca/path/to/app
# %w(path to app).to_abs_path # => /Users/luca/path/to/app
# %w(path to app).to_absolute_path # => /Users/luca/path/to/app
# %w(path to app).to_abs_path # => /Users/luca/path/to/app
def to_absolute_path
to_path(true)
end
Expand Down
7 changes: 3 additions & 4 deletions lib/sashimi/plugin.rb
Expand Up @@ -30,9 +30,8 @@ def add
def repository #:nodoc:
@repository ||= instantiate_repository
end

# Read the content of the <tt>about.yml</tt>.
# New feature of Rails 2.1.x http:://dev.rubyonrails.org/changeset/9098

# Returns the informations about the plugin.
def about
@about ||= repository.about
end
Expand All @@ -52,7 +51,7 @@ def guess_name
name
end

# Serialize the plugin to Hash format.
# Serialize the plugin to +Hash+ format.
def to_hash
{ self.guess_name =>
{ 'type' => repository.scm_type,
Expand Down
1 change: 1 addition & 0 deletions lib/sashimi/repositories/abstract_repository.rb
Expand Up @@ -223,6 +223,7 @@ def scm_type
end

# Read the content of the <tt>about.yml</tt>.
#
# New feature of Rails 2.1.0 http://github.com/rails/rails/commit/f5b991d76dc5d21f1870da067fb3101440256fba
def about
with_path plugin_path do
Expand Down

0 comments on commit 98c1062

Please sign in to comment.