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 'spec_helper' | |
| require_relative '../../app' | |
| describe :index do | |
| before(:all) do | |
| @app = Sinatra::Application.new! | |
| end | |
| let(:template_name) { example.full_description.sub(/ .*/, '').to_sym } | |
| let(:vars) { {} } |
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
| description "Movable Type" | |
| start on runlevel [2345] or mysql | |
| stop on runlevel [!2345] | |
| respawn | |
| respawn limit 2 5 | |
| env PLACK_ENV=deployment | |
| env MT_HOME=/home/movabletype/public_html/movabletype |
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
| [Unit] | |
| Description=Movable Type | |
| After=syslog.target | |
| After=network.target | |
| After=mysqld.service | |
| [Service] | |
| User=movabletype | |
| Group=movabletype |
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
| package MT::Plguin::StackTrace; | |
| # Some code delivered from Plack::Middleware::StackTrace | |
| use warnings; | |
| use strict; | |
| our $StackTraceClass = "Devel::StackTrace"; | |
| # Optional since it needs PadWalker |
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
| puts ('%d千%d百%d十%d'%('%04d'%$*).split('')).gsub(/1(.)|0.?|(\d)/){$1||'一二三四五六七八九'[$2?$2.to_i-1:'']} |
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
| puts ('%d千%d百%d十%d'%('%04d'%$*).split('')).gsub(/1(.)|0.?|(\d)/){$1or$2&&'.一二三四五六七八九'[$2.to_i]} |
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
| $><<('%d千%d百%d十%d'%('%04d'%$*).chars).gsub(/1(.)|0.?|(\d)/){$2?'.一二三四五六七八九'[eval$2]:$1} |
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
| import sys,re | |
| print(re.sub('1(.)|0.?|(\d)',lambda m:m.group(1)or m.group(2)and '.一二三四五六七八九'[int(m.group(2))],'%s千%s百%s十%s'%tuple('%04d'%int(sys.argv[1])))) |
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
| name: P-M-Auth-Basic | |
| version: 1.00 | |
| plack_middlewares: | |
| - name: Auth::Basic | |
| options: | |
| - key: authenticator | |
| handler: | | |
| sub { | |
| my($username, $password, $env) = @_; |
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
| name: P-M-DebugRequestParams | |
| version: 1.00 | |
| plack_middlewares: | |
| - name: DebugRequestParams | |
| condition: sub { MT->config->DebugMode } | |
| apply_to: | |
| - all |