Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10034 (assigned enhancement)

Opened 7 months ago

Last modified 6 months ago

[PATCH] Add support to install plugins imported via piston.

Reported by: brainopia Assigned to: brainopia (accepted)
Priority: normal Milestone: 2.x
Component: Plugins Version: edge
Severity: minor Keywords: piston plugins
Cc:

Description

Its already a known fact that piston is better than svn:externals in many ways. Nevertheless there is no simple way to install a plugin (execute install.rb) what you initially import via piston. This patch settle it.

Now you can install plugin via piston in two steps. Following code is an example for ActiveScaffold:

piston import  http://activescaffold.googlecode.com/svn/tags/active_scaffold vendor/plugins/active_scaffold
script/plugin install vendor/plugins/active_scaffold

Without this patch the second line will produce error - something like "Plugin "ActiveScaffold" is already installed". With patch - its just perform file "install.rb" as it need to be.

Attachments

piston_support.diff (1.2 kB) - added by brainopia on 11/10/07 19:45:27.

Change History

(follow-up: ↓ 2 ) 11/10/07 19:38:20 changed by jamesh

Interesting idea. I should note that you kind of stray from Rails core coding conventions a bit. You might want to alter your patch as follows:

# From...

 	176	  def installed? 
 	177	    plugin_folder_exist? and not under_piston_control? 
 	178	  end 

# To...

 	176	  def installed? 
 	177	    plugin_folder_exist? && !under_piston_control? 
 	178	  end 

11/10/07 19:45:27 changed by brainopia

  • attachment piston_support.diff added.

(in reply to: ↑ 1 ; follow-up: ↓ 3 ) 11/10/07 19:47:05 changed by brainopia

  • owner changed from core to brainopia.
  • status changed from new to assigned.

Replying to jamesh:

Done =)

(in reply to: ↑ 2 ; follow-up: ↓ 4 ) 11/10/07 22:42:16 changed by jamesh

Replying to brainopia:

Replying to jamesh: Done =)

I'm having a little trouble applying your path. Have you had any luck applying it, or are you just running the code directly in your modified copy of Edge?

(in reply to: ↑ 3 ) 11/10/07 23:25:39 changed by brainopia

Replying to jamesh:

Replying to brainopia:

Replying to jamesh: Done =)

I'm having a little trouble applying your path. Have you had any luck applying it, or are you just running the code directly in your modified copy of Edge?

I'm using it with 1.2.5 as well. What kind of trouble do you have?