This file contains hidden or 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
FROM httpd:2.4 | |
ENV TDIARY_VERSION 5.0.7 | |
WORKDIR /usr/local/apache2/htdocs | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
ruby \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains hidden or 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
# = CachedPStore -- PStore extension w/ cache mechanism | |
# | |
# Copyright (C) 2010, MATSUOKA Kohei | |
# You can redistribute it and/or modify it under GPL2. | |
# | |
# == Usage examle: | |
# | |
# require 'cached_pstore' | |
# | |
# db = CachedPStore.new('test.dat', :expire => 3600) {|db, key| |
This file contains hidden or 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/misc/lib/compatible.rb b/misc/lib/compatible.rb | |
index 6f5b5cf..9968536 100644 | |
--- a/misc/lib/compatible.rb | |
+++ b/misc/lib/compatible.rb | |
@@ -34,23 +34,6 @@ unless "".respond_to?('each') | |
end | |
end | |
-# Auto convert ASCII_8BIT pstore data (created by Ruby-1.8) to UTF-8. | |
-if "".respond_to?('force_encoding') |
This file contains hidden or 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
require 'rubygems' | |
require 'rack/auth/twitter' | |
class ProtectedApp | |
def call(env) | |
Rack::Response.new("Hello, #{env['REMOTE_USER']}").finish | |
end | |
end | |
use Rack::Session::Pool, :expire_after => 2592000 |
This file contains hidden or 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
# This is the Apache server configuration file for providing FastCGI support | |
# through mod_fcgid | |
# | |
# Documentation is available at http://fastcgi.coremail.cn/doc.htm | |
LoadModule fcgid_module modules/mod_fcgid.so | |
# Use FastCGI to process .fcg .fcgi & .fpl scripts | |
# Don't do this if mod_fastcgi is present, as it will try to do the same thing | |
<IfModule !mod_fastcgi.c> |
This file contains hidden or 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
module Safe | |
def safe( level = 4 ) | |
result = nil | |
if $SAFE < level then | |
Proc.new { | |
$SAFE = level | |
result = yield | |
}.call | |
else | |
result = yield |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'safe' | |
describe Safe, "safe mode module" do | |
before(:each) do | |
$SAFE = 1 | |
ENV["sample"] = "default" | |
end |
NewerOlder