Sha256: 9e0e1b1345205b8619ce4be71bd45f10fed157e5928e1d68f6439bc48adb5cc7

Contents?: true

Size: 441 Bytes

Versions: 8

Compression:

Stored size: 441 Bytes

Contents

require 'active_resource'

class Project < ActiveResource::Base
  def self.configure(config)
    Project.site = config[:webistrano_home]
    Project.user = config[:user]
    Project.password = config[:password]
  end
  
  def self.find_by_name(name)
    project = find(:all).find {|project| project.name == name}
  end
  
  def find_stage(name)
    Stage.find(:all, :params => {:project_id => id}).find {|stage| stage.name == name}
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
chrismetcalf-cap-ext-webistrano-0.1.2 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.0.3 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.0.4 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.1.0 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.1.1 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.1.2 lib/cap_ext_webistrano/project.rb
mattmatt-cap-ext-webistrano-0.1.4 lib/cap_ext_webistrano/project.rb
cap-ext-webistrano-0.1.4 lib/cap_ext_webistrano/project.rb