Игра про плохого парня в городе. Еще одна моя мечта.
Gist test
Кстати, этот код рилли работает. Ну а заодно потестим вставку из гиста. Кстати, вы знали что можно получить код вот так: http://gist.github.com/66224.pibb ?
# In boot.rb
require File.join RAILS_ROOT, 'config/autogit_libs.rb'
require "railties/lib/initializer"
Rails::Initializer.run(:set_load_path)
# Rails.boot!
class AutogitPluginLocator < Rails::Plugin::Locator
def plugins
AutogitPlugins.map {|path, commit| Rails::Plugin.new(File.join(autogit(AutogitSources.map{|s| s + path }, commit), '..')) }
end
end # autogit_libs.rb
require File.join RAILS_ROOT, 'lib/autogit.rb'
AutogitSources = %w{
git://github.com/ }
AutogitLibs = {
"marcel/aws-s3" => "ac97d4715c859500d03970d802eafaf2166f5f1a",
"rails/rails" => "v2.2.2", "jgarber/redcloth" => "RELEASE_4_1_1",
"jamis/capistrano" => "v2.5.4",
"cpjolicoeur/bb-ruby" => "REL-0.8.4",
"jamis/capistrano-ext" => "a76b7f6e1d114c89a0e97a75f7f04c1fc9b308df",
"tenderlove/mechanize" => "REL_0.8.5"
}
AutogitPlugins = {
"mislav/will_paginate" => "v2.3.7",
"paladiy/acts_as_taggable_on_steroids" => "e91472fb7e30e11ecfca8cb08d9618fb115d82c4",
"thoughtbot/paperclip" => "v2.2.5",
}
AutogitPaths = {}
AutogitLibs.each do |path, commit|
AutogitPaths[path] = autogit(AutogitSources.map{|s| s + path }, commit)
end # and rewrite autogit method for Rails repo def set_load_path!(path)
Dir.new(path).select {|v| v != '.' && v != '..' }.each do |sub_path|
lib_path = File.join(path, sub_path, "lib")
$LOAD_PATH.push(lib_path) if File.exists?(lib_path)
end
with_lib = File.join(path, "lib")
path = File.exists?(with_lib) ? with_lib : path
$LOAD_PATH.push(path)
path
end
Network Issues
We’re aware of some network connectivity issues affecting Codebase.
We’re working to resolve this as quickly as possible.
И вся компания курит в это время.
AutoGit for Rails and Plugins
Oleg Andreev wrote a nice tool to replace the gems and git submodules. In order to make it work with Rails and plugins, I did like this: http://gist.github.com/66224
1 of 1