update to 0.0.4

This commit is contained in:
John Bintz 2010-03-21 20:16:17 -04:00
parent 3b32421428
commit 72ac707471
5 changed files with 11 additions and 46 deletions

View File

@ -2,7 +2,7 @@ require 'rubygems'
require 'rake'
require 'echoe'
Echoe.new('trivial', '0.0.3') do |p|
Echoe.new('trivial', '0.0.4') do |p|
p.summary = "Ultra-lightweight website framework for PHP"
p.description = <<-EOT
For those who are using PHP to build their sites and want a very simple framework

View File

@ -19,7 +19,11 @@ end
[ [File.dirname(__FILE__), '..', 'content', 'index.html'], [ARGV[0], 'content', 'index.html'] ],
[ [File.dirname(__FILE__), '..', 'styles', 'application.css'], [ARGV[0], 'styles', 'application.css'] ]
].each do |src, dest|
FileUtils.cp(File.join(*src), File.join(*dest))
if !File.exists? File.join(*dest)
FileUtils.cp(File.join(*src), File.join(*dest))
else
puts "Won't overwrite existing #{File.join(*dest)}!"
end
end
puts "Done! Make sure you can use .htaccess files in your Webserver setup."

3
dist/htaccess.dist vendored
View File

@ -5,5 +5,4 @@ RewriteRule ^$ lib/trivial.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !.*\.inc$
RewriteRule /(.*) lib/trivial.php [L]
RewriteRule (.*) lib/trivial.php [L]

View File

@ -38,12 +38,12 @@ $trim = str_replace(realpath($_SERVER['DOCUMENT_ROOT']), '', realpath($root_dir)
$requested = preg_replace('#/$#', '/index.html', $_SERVER['REDIRECT_URL']);
$requested = preg_replace("#${trim}/(.*)\.[^\.]+\$#", '\1', $requested);
function styles($additional = array()) {
return head_component($additional, 'styles/%s.css', '<link rel="stylesheet" href="styles/%s.css" type="text/css" />');
function styles() {
return head_component(func_get_args(), 'styles/%s.css', '<link rel="stylesheet" href="styles/%s.css" type="text/css" />');
}
function scripts($additional = array()) {
return head_component($additional, 'scripts/%s.js', '<script type="text/javascript" src="scripts/%s.js"></script>');
function scripts() {
return head_component(func_get_args(), 'scripts/%s.js', '<script type="text/javascript" src="scripts/%s.js"></script>');
}
function head_component($additional, $search, $format) {

View File

@ -1,38 +0,0 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{trivial}
s.version = "0.0.3"
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["John Bintz"]
s.date = %q{2010-03-21}
s.default_executable = %q{trivialize}
s.description = %q{ For those who are using PHP to build their sites and want a very simple framework
in which to organize their files, trivial is the solution. It's one PHP file
that can include a few other pre-determined PHP and HTML files based on the
request URI. This very simple division of content, actions (controllers), and
views allows for multiple people to easily work on a smaller project without
the overhead of a larger framework.
}
s.email = %q{john@coswelproductions.com}
s.executables = ["trivialize"]
s.extra_rdoc_files = ["bin/trivialize", "lib/trivial.php"]
s.files = ["Manifest", "Rakefile", "bin/trivialize", "content/index.html", "dist/htaccess.dist", "lib/trivial.php", "readme.md", "styles/application.css", "trivial.gemspec", "views/application.inc"]
s.homepage = %q{http://github.com/johnbintz/trivial}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Trivial", "--main", "readme.md"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{trivial}
s.rubygems_version = %q{1.3.6}
s.summary = %q{Ultra-lightweight website framework for PHP}
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
end