This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb | |
index 1f2ecdc..b6f3c01 100644 | |
--- a/Library/Formula/mysql.rb | |
+++ b/Library/Formula/mysql.rb | |
@@ -1,5 +1,11 @@ | |
require 'formula' | |
+class PerconaXtradb < Formula | |
+ url 'http://www.percona.com/percona-builds/Percona-Server/Percona-Server-5.1.45-10/source/percona-xtradb-1.0.6-10.tar.gz' | |
+ md5 'd20bc3befd6e732c40fd41a9adcec9d9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :hello do | |
puts 'hello' | |
end | |
Rake.application[:hello].clear | |
task :hello do | |
puts 'hello, world' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :hello do | |
puts 'hello' | |
end | |
task :before do | |
puts 'before all' | |
end | |
task :hello => :before |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :hello do | |
puts 'hello' | |
end | |
task :hello do | |
puts 'world!' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def from_russia? | |
if MAXMIND_GEOIP_DB | |
info = MAXMIND_GEOIP_DB.look_up(ip_address) || {} | |
info[:country_code].to_s.upcase == 'RU' | |
else | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Schema Information | |
# Schema version: 20090420101231 | |
# | |
# Table name: loop_locks | |
# | |
# entity_id :integer(4) not null | |
# loop :string(255) not null | |
# created_at :datetime not null | |
# timeout_at :datetime not null | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Module | |
def name_finder(*methods) | |
methods.each do |method| | |
raise TypeError.new("method name is not symbol") unless method.is_a?(Symbol) | |
metaclass = class << self; self; end | |
metaclass.send(:define_method, method) do | |
instance_variable_get(self.find_by_name(method.to_s)) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: User login | |
In order to use application | |
As a user | |
I want to be able to login and logout from the application | |
Scenario: Access restricted to an anonymous user | |
Given Anonymous user | |
When I go to the home page | |
Then I should be on the login page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Nagios | |
In order stop SMS flood in case of emergency | |
As an admin | |
I want to be able to enable or disable SMS notifications | |
Scenario: Disable SMS notifications | |
Given Nagios SMS notifications enabled | |
And I am logged in as an admin user | |
When I go to the path "/nagios" | |
And I press "Disable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
desc 'Bundle and minify the JS and CSS files' | |
task :precache_assets, :roles => :app do | |
root_path = File.expand_path(File.dirname(__FILE__) + '/..') | |
jammit_path = Dir["#{root_path}/vendor/gems/jammit-*/bin/jammit"].first | |
yui_lib_path = Dir["#{root_path}/vendor/gems/yui-compressor-*/lib"].first | |
assets_path = "#{root_path}/public/assets" | |
# Precaching assets | |
run_locally "ruby -I#{yui_lib_path} #{jammit_path}" |