repo
stringlengths 5
75
| commit
stringlengths 40
40
| message
stringlengths 6
18.2k
| diff
stringlengths 60
262k
|
---|---|---|---|
youpy/scissor-echonest | edcad7e45f3a1c0511e24bfd35ad99d9104e857c | added Scissor::Echonest::Meta::Beat, Scissor::Echonest::Meta::Segment to hold meta information into Scissor#Chunk | diff --git a/lib/scissor/echonest.rb b/lib/scissor/echonest.rb
index 7b4ecb6..a37e37a 100644
--- a/lib/scissor/echonest.rb
+++ b/lib/scissor/echonest.rb
@@ -1,54 +1,59 @@
require 'scissor'
require 'echonest'
+require 'scissor/echonest/meta'
module Scissor
def self.echonest_api_key=(echonest_api_key)
Scissor::Chunk.echonest_api_key = echonest_api_key
end
class Chunk
class << self
attr_accessor :echonest_api_key
end
def echonest
Echonest(self.class.echonest_api_key)
end
def beats
tempfile_for_echonest do |tmpfile|
chunks = []
scissor = to_file(tmpfile)
beats = echonest.get_beats(tmpfile)
beats.inject do |m, beat|
- chunks << self[m.start, beat.start - m.start]
+ chunk = self[m.start, beat.start - m.start]
+ Echonest::Meta::Beat.init(chunk, m)
+ chunks << chunk
beat
end
chunks
end
end
def segments
tempfile_for_echonest do |tmpfile|
scissor = to_file(tmpfile)
segments = echonest.get_segments(tmpfile)
segments.inject([]) do |chunks, segment|
- chunks << self[segment.start, segment.duration]
+ chunk = self[segment.start, segment.duration]
+ Echonest::Meta::Segment.init(chunk, segment )
+ chunks << chunk
chunks
end
end
end
private
def tempfile_for_echonest
tmpfile = Pathname.new('/tmp/scissor_echonest_temp_' + $$.to_s + '.mp3')
yield tmpfile
ensure
tmpfile.unlink
end
end
end
diff --git a/lib/scissor/echonest/meta.rb b/lib/scissor/echonest/meta.rb
new file mode 100644
index 0000000..3c7b92c
--- /dev/null
+++ b/lib/scissor/echonest/meta.rb
@@ -0,0 +1,32 @@
+module Scissor
+ module Echonest
+ module Meta
+ module Beat
+ def self.init(obj, beat)
+ obj.extend self
+ obj.instance_eval {
+ @confidence = beat.confidence
+ @start = beat.start
+ }
+ end
+
+ attr_reader :confidence, :start
+ end
+
+ module Segment
+ def self.init(obj, segment)
+ obj.extend self
+ obj.instance_eval {
+ @start = segment.start
+ @loudness = segment.loudness
+ @max_loudness = segment.max_loudness
+ @pitches = segment.pitches
+ @timbre = segment.timbre
+ }
+ end
+
+ attr_reader :start, :loudness, :max_loudness, :pitches, :timbre
+ end
+ end
+ end
+end
diff --git a/spec/scissor-echonest_spec.rb b/spec/scissor-echonest_spec.rb
index 0b022eb..07ef414 100755
--- a/spec/scissor-echonest_spec.rb
+++ b/spec/scissor-echonest_spec.rb
@@ -1,45 +1,53 @@
$:.unshift File.dirname(__FILE__)
require 'spec_helper'
include SpecHelper
describe Scissor do
it 'should set Echo Nest API key' do
Scissor.echonest_api_key = 'XXX'
Scissor::Chunk.echonest_api_key.should eql('XXX')
end
it 'should get beats' do
Scissor.echonest_api_key = 'XXX'
api = Echonest::Api.new('XXX')
api.connection.stub!(:request).and_return(open(fixture('get_beats.xml')).read)
scissor = Scissor(fixture('sample.mp3'))
scissor.stub!(:echonest).and_return(api)
beats = scissor.beats
beats.size.should eql(384)
beats[0].should be_an_instance_of(Scissor::Chunk)
beats[0].duration.should eql(0.47604)
beats[0].fragments.first.filename.should eql(fixture('sample.mp3'))
+ beats[0].confidence.should eql(0.296)
end
it 'should get segments' do
Scissor.echonest_api_key = 'XXX'
api = Echonest::Api.new('XXX')
api.connection.stub!(:request).and_return(open(fixture('get_segments.xml')).read)
scissor = Scissor(fixture('sample.mp3'))
scissor.stub!(:echonest).and_return(api)
segments = scissor.segments
segments.size.should eql(830)
segments[0].should be_an_instance_of(Scissor::Chunk)
segments[0].duration.should eql(0.30327)
segments[0].fragments.first.filename.should eql(fixture('sample.mp3'))
+ segments[0].start.should eql(0.0)
+ segments[0].loudness.time.should eql(0.0)
+ segments[0].loudness.value.should eql(-60.0)
+ segments[0].max_loudness.time.should eql(0.31347)
+ segments[0].max_loudness.value.should eql(-56.818)
+ segments[0].pitches.first.should eql(0.835)
+ segments[0].timbre.first.should eql(0.079)
end
end
|
youpy/scissor-echonest | b80d7e60e98ecd0498abc4c8f2248d441318d862 | fix examples | diff --git a/spec/scissor-echonest_spec.rb b/spec/scissor-echonest_spec.rb
index ddfe7c0..0b022eb 100755
--- a/spec/scissor-echonest_spec.rb
+++ b/spec/scissor-echonest_spec.rb
@@ -1,45 +1,45 @@
$:.unshift File.dirname(__FILE__)
require 'spec_helper'
include SpecHelper
describe Scissor do
it 'should set Echo Nest API key' do
Scissor.echonest_api_key = 'XXX'
Scissor::Chunk.echonest_api_key.should eql('XXX')
end
it 'should get beats' do
Scissor.echonest_api_key = 'XXX'
api = Echonest::Api.new('XXX')
api.connection.stub!(:request).and_return(open(fixture('get_beats.xml')).read)
scissor = Scissor(fixture('sample.mp3'))
scissor.stub!(:echonest).and_return(api)
beats = scissor.beats
beats.size.should eql(384)
beats[0].should be_an_instance_of(Scissor::Chunk)
beats[0].duration.should eql(0.47604)
- beats[0].fragments.first.filename.to_s.should eql(fixture('sample.mp3'))
+ beats[0].fragments.first.filename.should eql(fixture('sample.mp3'))
end
it 'should get segments' do
Scissor.echonest_api_key = 'XXX'
api = Echonest::Api.new('XXX')
api.connection.stub!(:request).and_return(open(fixture('get_segments.xml')).read)
scissor = Scissor(fixture('sample.mp3'))
scissor.stub!(:echonest).and_return(api)
segments = scissor.segments
segments.size.should eql(830)
segments[0].should be_an_instance_of(Scissor::Chunk)
segments[0].duration.should eql(0.30327)
- segments[0].fragments.first.filename.to_s.should eql(fixture('sample.mp3'))
+ segments[0].fragments.first.filename.should eql(fixture('sample.mp3'))
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 30874b4..fedba43 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,9 +1,10 @@
$:.unshift File.dirname(__FILE__) + '/../lib/'
require "scissor/echonest"
+require "pathname"
module SpecHelper
def fixture(filename)
- File.dirname(__FILE__) + '/fixtures/' + filename
+ Pathname.new(File.dirname(__FILE__) + '/fixtures/' + filename).realpath
end
end
|
youpy/scissor-echonest | 4eb579080f00a374e40912a255cf08c020d44b1d | fix dependency | diff --git a/Rakefile b/Rakefile
index 89c5249..30d6730 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,110 +1,110 @@
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'rake/contrib/sshpublisher'
require 'spec/rake/spectask'
require 'fileutils'
include FileUtils
$LOAD_PATH.unshift "lib"
require "scissor/echonest"
NAME = "scissor-echonest"
AUTHOR = "youpy"
EMAIL = "[email protected]"
DESCRIPTION = "Scissor extension to use Echo Nest Developers API"
RUBYFORGE_PROJECT = "scissorechonest"
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
BIN_FILES = %w( )
VERS = "0.0.2"
REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
RDOC_OPTS = [
'--title', "#{NAME} documentation",
"--charset", "utf-8",
"--opname", "index.html",
"--line-numbers",
"--main", "README.rdoc",
"--inline-source",
]
task :default => [:spec]
task :package => [:clean]
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/*_spec.rb']
t.rcov = true
end
spec = Gem::Specification.new do |s|
s.name = NAME
s.version = VERS
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "ChangeLog"]
s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/']
s.summary = DESCRIPTION
s.description = DESCRIPTION
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPATH
s.executables = BIN_FILES
s.rubyforge_project = RUBYFORGE_PROJECT
s.bindir = "bin"
s.require_path = "lib"
s.test_files = Dir["test/test_*.rb"]
- s.add_dependency('scissor', '>=0.0.19')
- s.add_dependency('ruby-echonest', '>=0.0.3')
+ s.add_dependency('youpy-scissor', '>=0.0.19')
+ s.add_dependency('youpy-ruby-echonest', '>=0.0.3')
#s.required_ruby_version = '>= 1.8.2'
s.files = %w(README.rdoc ChangeLog Rakefile) +
Dir.glob("{bin,doc,spec,test,lib,templates,generator,extras,website,script}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")
s.extensions = FileList["ext/**/extconf.rb"].to_a
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end
task :install do
name = "#{NAME}-#{VERS}.gem"
sh %{rake package}
sh %{sudo gem install pkg/#{name}}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall #{NAME}}
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'html'
rdoc.options += RDOC_OPTS
rdoc.template = "resh"
#rdoc.template = "#{ENV['template']}.rb" if ENV['template']
if ENV['DOC_FILES']
rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
else
rdoc.rdoc_files.include('README.rdoc', 'ChangeLog')
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.include('ext/**/*.c')
end
end
desc "Show information about the gem"
task :debug_gem do
puts spec.to_ruby
end
|
youpy/scissor-echonest | d494908284d3d910bffd63ad61e6a88bb3879fc1 | version 0.0.2 | diff --git a/Rakefile b/Rakefile
index 2fcaa66..89c5249 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,109 +1,110 @@
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'rake/contrib/sshpublisher'
require 'spec/rake/spectask'
require 'fileutils'
include FileUtils
$LOAD_PATH.unshift "lib"
require "scissor/echonest"
NAME = "scissor-echonest"
AUTHOR = "youpy"
EMAIL = "[email protected]"
DESCRIPTION = "Scissor extension to use Echo Nest Developers API"
RUBYFORGE_PROJECT = "scissorechonest"
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
BIN_FILES = %w( )
-VERS = "0.0.1"
+VERS = "0.0.2"
REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
CLEAN.include ['**/.*.sw?', '*.gem', '.config']
RDOC_OPTS = [
'--title', "#{NAME} documentation",
"--charset", "utf-8",
"--opname", "index.html",
"--line-numbers",
"--main", "README.rdoc",
"--inline-source",
]
task :default => [:spec]
task :package => [:clean]
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/*_spec.rb']
t.rcov = true
end
spec = Gem::Specification.new do |s|
s.name = NAME
s.version = VERS
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README.rdoc", "ChangeLog"]
s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/']
s.summary = DESCRIPTION
s.description = DESCRIPTION
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPATH
s.executables = BIN_FILES
s.rubyforge_project = RUBYFORGE_PROJECT
s.bindir = "bin"
s.require_path = "lib"
s.test_files = Dir["test/test_*.rb"]
- #s.add_dependency('activesupport', '>=1.3.1')
+ s.add_dependency('scissor', '>=0.0.19')
+ s.add_dependency('ruby-echonest', '>=0.0.3')
#s.required_ruby_version = '>= 1.8.2'
s.files = %w(README.rdoc ChangeLog Rakefile) +
Dir.glob("{bin,doc,spec,test,lib,templates,generator,extras,website,script}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")
s.extensions = FileList["ext/**/extconf.rb"].to_a
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end
task :install do
name = "#{NAME}-#{VERS}.gem"
sh %{rake package}
sh %{sudo gem install pkg/#{name}}
end
task :uninstall => [:clean] do
sh %{sudo gem uninstall #{NAME}}
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'html'
rdoc.options += RDOC_OPTS
rdoc.template = "resh"
#rdoc.template = "#{ENV['template']}.rb" if ENV['template']
if ENV['DOC_FILES']
rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
else
rdoc.rdoc_files.include('README.rdoc', 'ChangeLog')
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.include('ext/**/*.c')
end
end
desc "Show information about the gem"
task :debug_gem do
puts spec.to_ruby
end
diff --git a/scissor-echonest.gemspec b/scissor-echonest.gemspec
index fdd3968..f24d7d3 100644
--- a/scissor-echonest.gemspec
+++ b/scissor-echonest.gemspec
@@ -1,32 +1,37 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{scissor-echonest}
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["youpy"]
- s.autorequire = %q{}
- s.date = %q{2009-07-02}
+ s.date = %q{2009-07-06}
s.description = %q{Scissor extension to use Echo Nest Developers API}
s.email = %q{[email protected]}
s.extra_rdoc_files = ["README.rdoc", "ChangeLog"]
- s.files = ["README.rdoc", "ChangeLog", "Rakefile", "spec/fixtures", "spec/fixtures/get_beats.xml", "spec/fixtures/sample.mp3", "spec/scissor-echonest_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "lib/scissor", "lib/scissor/echonest.rb"]
+ s.files = ["README.rdoc", "ChangeLog", "Rakefile", "spec/fixtures", "spec/fixtures/get_beats.xml", "spec/fixtures/get_segments.xml", "spec/fixtures/sample.mp3", "spec/scissor-echonest_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "lib/scissor", "lib/scissor/echonest.rb"]
s.has_rdoc = true
s.homepage = %q{http://scissorechonest.rubyforge.org}
s.rdoc_options = ["--title", "scissor-echonest documentation", "--charset", "utf-8", "--opname", "index.html", "--line-numbers", "--main", "README.rdoc", "--inline-source", "--exclude", "^(examples|extras)/"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{scissorechonest}
s.rubygems_version = %q{1.3.1}
s.summary = %q{Scissor extension to use Echo Nest Developers API}
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<scissor>, [">= 0.0.19"])
+ s.add_runtime_dependency(%q<ruby-echonest>, [">= 0.0.3"])
else
+ s.add_dependency(%q<scissor>, [">= 0.0.19"])
+ s.add_dependency(%q<ruby-echonest>, [">= 0.0.3"])
end
else
+ s.add_dependency(%q<scissor>, [">= 0.0.19"])
+ s.add_dependency(%q<ruby-echonest>, [">= 0.0.3"])
end
end
|
npverni/rails3-rumble-template | f3d07ae57809a2b98c8e8f1b56333e0c111dc889 | bumping rspec-rails to 2.0.1 | diff --git a/template.rb b/template.rb
index d51fac7..aea7659 100644
--- a/template.rb
+++ b/template.rb
@@ -1,343 +1,343 @@
# Application Generator Template
# Modifies a Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise...
# Based on: http://github.com/fortuity/rails3-mongoid-devise/
# If you are customizing this template, you can use any methods provided by Thor::Actions
# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
# and Rails::Generators::Actions
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
puts "Modifying a new Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise"
#----------------------------------------------------------------------------
# Configure
#----------------------------------------------------------------------------
if yes?('Would you like to use the Haml template system? (yes/no)')
haml_flag = true
else
haml_flag = false
end
#----------------------------------------------------------------------------
# Create the database
#----------------------------------------------------------------------------
puts "creating the database..."
run 'rake db:create:all'
#----------------------------------------------------------------------------
# Set up git
#----------------------------------------------------------------------------
puts "setting up source control with 'git'..."
# specific to Mac OS X
append_file '.gitignore' do <<-FILE
'.DS_Store'
'.rvmrc'
FILE
end
git :init
git :add => '.'
git :commit => "-m 'Initial commit of unmodified new Rails app'"
#----------------------------------------------------------------------------
# Remove the usual cruft
#----------------------------------------------------------------------------
puts "removing unneeded files..."
run 'rm public/index.html'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
run 'rm README'
run 'touch README'
puts "banning spiders from your site by changing robots.txt..."
gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
#----------------------------------------------------------------------------
# Haml Option
#----------------------------------------------------------------------------
if haml_flag
puts "setting up Gemfile for Haml..."
append_file 'Gemfile', "\n# Bundle gems needed for Haml\n"
gem 'haml', '3.0.18'
gem 'haml-rails', '0.2', :group => :development
# the following gems are used to generate Devise views for Haml
gem 'hpricot', '0.8.2', :group => :development
gem 'ruby_parser', '2.0.5', :group => :development
end
#----------------------------------------------------------------------------
# jQuery Option
#----------------------------------------------------------------------------
gem 'jquery-rails', '0.2.3'
#----------------------------------------------------------------------------
# Set up jQuery
#----------------------------------------------------------------------------
run 'rm public/javascripts/rails.js'
puts "replacing Prototype with jQuery"
# "--ui" enables optional jQuery UI
run 'rails generate jquery:install --ui'
#----------------------------------------------------------------------------
# Set up Devise
#----------------------------------------------------------------------------
puts "setting up Gemfile for Devise..."
append_file 'Gemfile', "\n# Bundle gem needed for Devise\n"
gem 'devise', '1.1.3'
puts "installing Devise gem (takes a few minutes!)..."
run 'bundle install'
puts "creating 'config/initializers/devise.rb' Devise configuration file..."
run 'rails generate devise:install'
run 'rails generate devise:views'
puts "modifying environment configuration files for Devise..."
gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '### ActionMailer Config'
gsub_file 'config/environments/development.rb', /config.action_mailer.raise_delivery_errors = false/ do
<<-RUBY
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
# A dummy setup for development - no deliveries, but logged
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"
RUBY
end
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do
<<-RUBY
config.i18n.fallbacks = true
config.action_mailer.default_url_options = { :host => 'yourhost.com' }
### ActionMailer Config
# Setup for production - deliveries, no errors raised
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"
RUBY
end
puts "creating a User model and modifying routes for Devise..."
run 'rails generate devise User'
run 'rake db:migrate'
#----------------------------------------------------------------------------
# Create a home page
#----------------------------------------------------------------------------
puts "create a home controller and view"
generate(:controller, "home index")
gsub_file 'config/routes.rb', /get \"home\/index\"/, 'root :to => "home#index"'
puts "set up a simple demonstration of Devise"
gsub_file 'app/controllers/home_controller.rb', /def index/ do
<<-RUBY
def index
@users = User.all
RUBY
end
if haml_flag
run 'rm app/views/home/index.html.haml'
# we have to use single-quote-style-heredoc to avoid interpolation
create_file 'app/views/home/index.html.haml' do
<<-'FILE'
- @users.each do |user|
%p User: #{link_to user.email, user}
FILE
end
else
append_file 'app/views/home/index.html.erb' do <<-FILE
<% @users.each do |user| %>
<p>User: <%=link_to user.email, user %></p>
<% end %>
FILE
end
end
#----------------------------------------------------------------------------
# Create a users page
#----------------------------------------------------------------------------
generate(:controller, "users show")
gsub_file 'config/routes.rb', /get \"users\/show\"/, '#get \"users\/show\"'
gsub_file 'config/routes.rb', /devise_for :users/ do
<<-RUBY
devise_for :users
resources :users, :only => :show
RUBY
end
gsub_file 'app/controllers/users_controller.rb', /def show/ do
<<-RUBY
before_filter :authenticate_user!
def show
@user = User.find(params[:id])
RUBY
end
if haml_flag
run 'rm app/views/users/show.html.haml'
# we have to use single-quote-style-heredoc to avoid interpolation
create_file 'app/views/users/show.html.haml' do <<-'FILE'
%p
User: #{@user.email}
FILE
end
else
append_file 'app/views/users/show.html.erb' do <<-FILE
<p>User: <%= @user.email %></p>
FILE
end
end
if haml_flag
create_file "app/views/devise/menu/_login_items.html.haml" do <<-'FILE'
- if user_signed_in?
%li
= link_to('Logout', destroy_user_session_path)
- else
%li
= link_to('Login', new_user_session_path)
FILE
end
else
create_file "app/views/devise/menu/_login_items.html.erb" do <<-FILE
<% if user_signed_in? %>
<li>
<%= link_to('Logout', destroy_user_session_path) %>
</li>
<% else %>
<li>
<%= link_to('Login', new_user_session_path) %>
</li>
<% end %>
FILE
end
end
if haml_flag
create_file "app/views/devise/menu/_registration_items.html.haml" do <<-'FILE'
- if user_signed_in?
%li
= link_to('Edit account', edit_user_registration_path)
- else
%li
= link_to('Sign up', new_user_registration_path)
FILE
end
else
create_file "app/views/devise/menu/_registration_items.html.erb" do <<-FILE
<% if user_signed_in? %>
<li>
<%= link_to('Edit account', edit_user_registration_path) %>
</li>
<% else %>
<li>
<%= link_to('Sign up', new_user_registration_path) %>
</li>
<% end %>
FILE
end
end
#----------------------------------------------------------------------------
# Generate Application Layout
#----------------------------------------------------------------------------
if haml_flag
run 'rm app/views/layouts/application.html.erb'
create_file 'app/views/layouts/application.html.haml' do <<-FILE
!!!
%html
%head
%title Testapp
= stylesheet_link_tag :all
= javascript_include_tag :defaults
= csrf_meta_tag
%body
%ul.hmenu
= render 'devise/menu/registration_items'
= render 'devise/menu/login_items'
%p{:style => "color: green"}= notice
%p{:style => "color: red"}= alert
= yield
FILE
end
else
inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
<<-RUBY
<ul class="hmenu">
<%= render 'devise/menu/registration_items' %>
<%= render 'devise/menu/login_items' %>
</ul>
<p style="color: green"><%= notice %></p>
<p style="color: red"><%= alert %></p>
RUBY
end
end
#----------------------------------------------------------------------------
# Add Stylesheets
#----------------------------------------------------------------------------
create_file 'public/stylesheets/application.css' do <<-FILE
ul.hmenu {
list-style: none;
margin: 0 0 2em;
padding: 0;
}
ul.hmenu li {
display: inline;
}
FILE
end
#----------------------------------------------------------------------------
# Create a default user
#----------------------------------------------------------------------------
puts "creating a default user"
append_file 'db/seeds.rb' do <<-FILE
puts 'SETTING UP DEFAULT USER LOGIN'
user = User.create! :email => '[email protected]', :password => 'please', :password_confirmation => 'please'
puts 'New user created'
FILE
end
run 'rake db:seed'
#----------------------------------------------------------------------------
# Setup RSpec & Cucumber
#----------------------------------------------------------------------------
puts 'Setting up RSpec, Cucumber, factory_girl, faker'
append_file 'Gemfile' do <<-FILE
group :development, :test do
- gem "rspec-rails", ">= 2.0.0"
+ gem "rspec-rails", ">= 2.0.1"
gem "cucumber-rails", ">= 0.3.2"
gem "webrat", ">= 0.7.2.beta.2"
gem "factory_girl_rails"
gem "faker"
end
FILE
end
run 'bundle install'
run 'script/rails generate rspec:install'
run 'script/rails generate cucumber:install'
run 'rake db:migrate'
run 'rake db:test:prepare'
run 'touch spec/factories.rb'
#----------------------------------------------------------------------------
# Finish up
#----------------------------------------------------------------------------
puts "checking everything into git..."
git :add => '.'
git :commit => "-am 'initial setup'"
puts "Done setting up your Rails app."
|
npverni/rails3-rumble-template | 400faa98bf21b80b0cc6f34c79b4f51b6bec0d56 | fixed cucumber, added factory_girl, faker | diff --git a/template.rb b/template.rb
index 2c3bb92..d51fac7 100644
--- a/template.rb
+++ b/template.rb
@@ -1,348 +1,343 @@
# Application Generator Template
# Modifies a Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise...
# Based on: http://github.com/fortuity/rails3-mongoid-devise/
# If you are customizing this template, you can use any methods provided by Thor::Actions
# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
# and Rails::Generators::Actions
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
puts "Modifying a new Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise"
#----------------------------------------------------------------------------
# Configure
#----------------------------------------------------------------------------
if yes?('Would you like to use the Haml template system? (yes/no)')
haml_flag = true
else
haml_flag = false
end
#----------------------------------------------------------------------------
# Create the database
#----------------------------------------------------------------------------
puts "creating the database..."
run 'rake db:create:all'
#----------------------------------------------------------------------------
# Set up git
#----------------------------------------------------------------------------
puts "setting up source control with 'git'..."
# specific to Mac OS X
append_file '.gitignore' do <<-FILE
'.DS_Store'
'.rvmrc'
FILE
end
git :init
git :add => '.'
git :commit => "-m 'Initial commit of unmodified new Rails app'"
#----------------------------------------------------------------------------
# Remove the usual cruft
#----------------------------------------------------------------------------
puts "removing unneeded files..."
run 'rm public/index.html'
run 'rm public/favicon.ico'
run 'rm public/images/rails.png'
run 'rm README'
run 'touch README'
puts "banning spiders from your site by changing robots.txt..."
gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
#----------------------------------------------------------------------------
# Haml Option
#----------------------------------------------------------------------------
if haml_flag
puts "setting up Gemfile for Haml..."
append_file 'Gemfile', "\n# Bundle gems needed for Haml\n"
gem 'haml', '3.0.18'
gem 'haml-rails', '0.2', :group => :development
# the following gems are used to generate Devise views for Haml
gem 'hpricot', '0.8.2', :group => :development
gem 'ruby_parser', '2.0.5', :group => :development
end
#----------------------------------------------------------------------------
# jQuery Option
#----------------------------------------------------------------------------
gem 'jquery-rails', '0.2.3'
#----------------------------------------------------------------------------
# Set up jQuery
#----------------------------------------------------------------------------
run 'rm public/javascripts/rails.js'
puts "replacing Prototype with jQuery"
# "--ui" enables optional jQuery UI
run 'rails generate jquery:install --ui'
#----------------------------------------------------------------------------
# Set up Devise
#----------------------------------------------------------------------------
puts "setting up Gemfile for Devise..."
append_file 'Gemfile', "\n# Bundle gem needed for Devise\n"
gem 'devise', '1.1.3'
puts "installing Devise gem (takes a few minutes!)..."
run 'bundle install'
puts "creating 'config/initializers/devise.rb' Devise configuration file..."
run 'rails generate devise:install'
run 'rails generate devise:views'
puts "modifying environment configuration files for Devise..."
gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '### ActionMailer Config'
gsub_file 'config/environments/development.rb', /config.action_mailer.raise_delivery_errors = false/ do
<<-RUBY
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
# A dummy setup for development - no deliveries, but logged
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"
RUBY
end
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do
<<-RUBY
config.i18n.fallbacks = true
config.action_mailer.default_url_options = { :host => 'yourhost.com' }
### ActionMailer Config
# Setup for production - deliveries, no errors raised
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"
RUBY
end
puts "creating a User model and modifying routes for Devise..."
run 'rails generate devise User'
run 'rake db:migrate'
#----------------------------------------------------------------------------
# Create a home page
#----------------------------------------------------------------------------
puts "create a home controller and view"
generate(:controller, "home index")
gsub_file 'config/routes.rb', /get \"home\/index\"/, 'root :to => "home#index"'
puts "set up a simple demonstration of Devise"
gsub_file 'app/controllers/home_controller.rb', /def index/ do
<<-RUBY
def index
@users = User.all
RUBY
end
if haml_flag
run 'rm app/views/home/index.html.haml'
# we have to use single-quote-style-heredoc to avoid interpolation
create_file 'app/views/home/index.html.haml' do
<<-'FILE'
- @users.each do |user|
%p User: #{link_to user.email, user}
FILE
end
else
append_file 'app/views/home/index.html.erb' do <<-FILE
<% @users.each do |user| %>
<p>User: <%=link_to user.email, user %></p>
<% end %>
FILE
end
end
#----------------------------------------------------------------------------
# Create a users page
#----------------------------------------------------------------------------
generate(:controller, "users show")
gsub_file 'config/routes.rb', /get \"users\/show\"/, '#get \"users\/show\"'
gsub_file 'config/routes.rb', /devise_for :users/ do
<<-RUBY
devise_for :users
resources :users, :only => :show
RUBY
end
gsub_file 'app/controllers/users_controller.rb', /def show/ do
<<-RUBY
before_filter :authenticate_user!
def show
@user = User.find(params[:id])
RUBY
end
if haml_flag
run 'rm app/views/users/show.html.haml'
# we have to use single-quote-style-heredoc to avoid interpolation
create_file 'app/views/users/show.html.haml' do <<-'FILE'
%p
User: #{@user.email}
FILE
end
else
append_file 'app/views/users/show.html.erb' do <<-FILE
<p>User: <%= @user.email %></p>
FILE
end
end
if haml_flag
create_file "app/views/devise/menu/_login_items.html.haml" do <<-'FILE'
- if user_signed_in?
%li
= link_to('Logout', destroy_user_session_path)
- else
%li
= link_to('Login', new_user_session_path)
FILE
end
else
create_file "app/views/devise/menu/_login_items.html.erb" do <<-FILE
<% if user_signed_in? %>
<li>
<%= link_to('Logout', destroy_user_session_path) %>
</li>
<% else %>
<li>
<%= link_to('Login', new_user_session_path) %>
</li>
<% end %>
FILE
end
end
if haml_flag
create_file "app/views/devise/menu/_registration_items.html.haml" do <<-'FILE'
- if user_signed_in?
%li
= link_to('Edit account', edit_user_registration_path)
- else
%li
= link_to('Sign up', new_user_registration_path)
FILE
end
else
create_file "app/views/devise/menu/_registration_items.html.erb" do <<-FILE
<% if user_signed_in? %>
<li>
<%= link_to('Edit account', edit_user_registration_path) %>
</li>
<% else %>
<li>
<%= link_to('Sign up', new_user_registration_path) %>
</li>
<% end %>
FILE
end
end
#----------------------------------------------------------------------------
# Generate Application Layout
#----------------------------------------------------------------------------
if haml_flag
run 'rm app/views/layouts/application.html.erb'
create_file 'app/views/layouts/application.html.haml' do <<-FILE
!!!
%html
%head
%title Testapp
= stylesheet_link_tag :all
= javascript_include_tag :defaults
= csrf_meta_tag
%body
%ul.hmenu
= render 'devise/menu/registration_items'
= render 'devise/menu/login_items'
%p{:style => "color: green"}= notice
%p{:style => "color: red"}= alert
= yield
FILE
end
else
inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
<<-RUBY
<ul class="hmenu">
<%= render 'devise/menu/registration_items' %>
<%= render 'devise/menu/login_items' %>
</ul>
<p style="color: green"><%= notice %></p>
<p style="color: red"><%= alert %></p>
RUBY
end
end
#----------------------------------------------------------------------------
# Add Stylesheets
#----------------------------------------------------------------------------
create_file 'public/stylesheets/application.css' do <<-FILE
ul.hmenu {
list-style: none;
margin: 0 0 2em;
padding: 0;
}
ul.hmenu li {
display: inline;
}
FILE
end
#----------------------------------------------------------------------------
# Create a default user
#----------------------------------------------------------------------------
puts "creating a default user"
append_file 'db/seeds.rb' do <<-FILE
puts 'SETTING UP DEFAULT USER LOGIN'
user = User.create! :email => '[email protected]', :password => 'please', :password_confirmation => 'please'
puts 'New user created'
FILE
end
run 'rake db:seed'
#----------------------------------------------------------------------------
# Setup RSpec & Cucumber
#----------------------------------------------------------------------------
-puts 'Setting up RSpec and Cucumber'
+puts 'Setting up RSpec, Cucumber, factory_girl, faker'
append_file 'Gemfile' do <<-FILE
-group :test do
- gem "rspec"
- gem "rspec-rails", ">= 2.0.0.beta"
- gem "machinist", :git => "git://github.com/notahat/machinist.git"
+group :development, :test do
+ gem "rspec-rails", ">= 2.0.0"
+ gem "cucumber-rails", ">= 0.3.2"
+ gem "webrat", ">= 0.7.2.beta.2"
+ gem "factory_girl_rails"
gem "faker"
- gem "ZenTest"
- gem "autotest"
- gem "autotest-rails"
- gem "cucumber", :git => "git://github.com/aslakhellesoy/cucumber.git"
- gem "database_cleaner", :git => 'git://github.com/bmabey/database_cleaner.git'
- gem "cucumber-rails", :git => "git://github.com/aslakhellesoy/cucumber-rails.git"
- gem "capybara"
- gem "capybara-envjs"
- gem "launchy"
- gem "ruby-debug"
end
FILE
end
run 'bundle install'
-run 'rails generate rspec:install'
-run 'rails generate cucumber:skeleton --capybara --rspec'
+run 'script/rails generate rspec:install'
+run 'script/rails generate cucumber:install'
+run 'rake db:migrate'
+run 'rake db:test:prepare'
+
+run 'touch spec/factories.rb'
#----------------------------------------------------------------------------
# Finish up
#----------------------------------------------------------------------------
puts "checking everything into git..."
git :add => '.'
git :commit => "-am 'initial setup'"
puts "Done setting up your Rails app."
|
npverni/rails3-rumble-template | d064d7f8de3d586affb3bac66b3a72746233f90e | first pass | diff --git a/template.rb b/template.rb
new file mode 100644
index 0000000..a2005eb
--- /dev/null
+++ b/template.rb
@@ -0,0 +1,349 @@
+# Application Generator Template
+# Modifies a Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise...
+# Usage: rails new app2_name -d mysql -m /Users/npverni/apps/rails3-rumble-template/template.rb
+
+# More info: http://github.com/fortuity/rails3-mongoid-devise/
+
+# If you are customizing this template, you can use any methods provided by Thor::Actions
+# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
+# and Rails::Generators::Actions
+# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
+
+puts "Modifying a new Rails app to use RSpec, Cucumber, Factory Girl, MySQL and Devise"
+
+#----------------------------------------------------------------------------
+# Configure
+#----------------------------------------------------------------------------
+
+if yes?('Would you like to use the Haml template system? (yes/no)')
+ haml_flag = true
+else
+ haml_flag = false
+end
+
+#----------------------------------------------------------------------------
+# Create the database
+#----------------------------------------------------------------------------
+puts "creating the database..."
+run 'rake db:create:all'
+
+#----------------------------------------------------------------------------
+# Set up git
+#----------------------------------------------------------------------------
+puts "setting up source control with 'git'..."
+# specific to Mac OS X
+
+append_file '.gitignore' do <<-FILE
+'.DS_Store'
+'.rvmrc'
+FILE
+end
+git :init
+git :add => '.'
+git :commit => "-m 'Initial commit of unmodified new Rails app'"
+
+#----------------------------------------------------------------------------
+# Remove the usual cruft
+#----------------------------------------------------------------------------
+puts "removing unneeded files..."
+run 'rm public/index.html'
+run 'rm public/favicon.ico'
+run 'rm public/images/rails.png'
+run 'rm README'
+run 'touch README'
+
+puts "banning spiders from your site by changing robots.txt..."
+gsub_file 'public/robots.txt', /# User-Agent/, 'User-Agent'
+gsub_file 'public/robots.txt', /# Disallow/, 'Disallow'
+
+#----------------------------------------------------------------------------
+# Haml Option
+#----------------------------------------------------------------------------
+if haml_flag
+ puts "setting up Gemfile for Haml..."
+ append_file 'Gemfile', "\n# Bundle gems needed for Haml\n"
+ gem 'haml', '3.0.18'
+ gem 'haml-rails', '0.2', :group => :development
+ # the following gems are used to generate Devise views for Haml
+ gem 'hpricot', '0.8.2', :group => :development
+ gem 'ruby_parser', '2.0.5', :group => :development
+end
+
+#----------------------------------------------------------------------------
+# jQuery Option
+#----------------------------------------------------------------------------
+gem 'jquery-rails', '0.2.3'
+
+#----------------------------------------------------------------------------
+# Set up jQuery
+#----------------------------------------------------------------------------
+
+run 'rm public/javascripts/rails.js'
+puts "replacing Prototype with jQuery"
+# "--ui" enables optional jQuery UI
+run 'rails generate jquery:install --ui'
+
+#----------------------------------------------------------------------------
+# Set up Devise
+#----------------------------------------------------------------------------
+puts "setting up Gemfile for Devise..."
+append_file 'Gemfile', "\n# Bundle gem needed for Devise\n"
+gem 'devise', '1.1.3'
+
+puts "installing Devise gem (takes a few minutes!)..."
+run 'bundle install'
+
+puts "creating 'config/initializers/devise.rb' Devise configuration file..."
+run 'rails generate devise:install'
+run 'rails generate devise:views'
+
+puts "modifying environment configuration files for Devise..."
+gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '### ActionMailer Config'
+gsub_file 'config/environments/development.rb', /config.action_mailer.raise_delivery_errors = false/ do
+<<-RUBY
+config.action_mailer.default_url_options = { :host => 'localhost:3000' }
+ # A dummy setup for development - no deliveries, but logged
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.perform_deliveries = false
+ config.action_mailer.raise_delivery_errors = true
+ config.action_mailer.default :charset => "utf-8"
+RUBY
+end
+gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do
+<<-RUBY
+config.i18n.fallbacks = true
+
+ config.action_mailer.default_url_options = { :host => 'yourhost.com' }
+ ### ActionMailer Config
+ # Setup for production - deliveries, no errors raised
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.perform_deliveries = true
+ config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.default :charset => "utf-8"
+RUBY
+end
+
+puts "creating a User model and modifying routes for Devise..."
+run 'rails generate devise User'
+run 'rake db:migrate'
+
+
+
+
+#----------------------------------------------------------------------------
+# Create a home page
+#----------------------------------------------------------------------------
+puts "create a home controller and view"
+generate(:controller, "home index")
+gsub_file 'config/routes.rb', /get \"home\/index\"/, 'root :to => "home#index"'
+
+puts "set up a simple demonstration of Devise"
+gsub_file 'app/controllers/home_controller.rb', /def index/ do
+<<-RUBY
+def index
+ @users = User.all
+RUBY
+end
+
+if haml_flag
+ run 'rm app/views/home/index.html.haml'
+ # we have to use single-quote-style-heredoc to avoid interpolation
+ create_file 'app/views/home/index.html.haml' do
+<<-'FILE'
+- @users.each do |user|
+ %p User: #{link_to user.email, user}
+FILE
+ end
+else
+ append_file 'app/views/home/index.html.erb' do <<-FILE
+<% @users.each do |user| %>
+ <p>User: <%=link_to user.email, user %></p>
+<% end %>
+ FILE
+ end
+end
+
+#----------------------------------------------------------------------------
+# Create a users page
+#----------------------------------------------------------------------------
+generate(:controller, "users show")
+gsub_file 'config/routes.rb', /get \"users\/show\"/, '#get \"users\/show\"'
+gsub_file 'config/routes.rb', /devise_for :users/ do
+<<-RUBY
+devise_for :users
+ resources :users, :only => :show
+RUBY
+end
+
+gsub_file 'app/controllers/users_controller.rb', /def show/ do
+<<-RUBY
+before_filter :authenticate_user!
+
+ def show
+ @user = User.find(params[:id])
+RUBY
+end
+
+if haml_flag
+ run 'rm app/views/users/show.html.haml'
+ # we have to use single-quote-style-heredoc to avoid interpolation
+ create_file 'app/views/users/show.html.haml' do <<-'FILE'
+%p
+ User: #{@user.email}
+ FILE
+ end
+else
+ append_file 'app/views/users/show.html.erb' do <<-FILE
+<p>User: <%= @user.email %></p>
+ FILE
+ end
+end
+
+if haml_flag
+ create_file "app/views/devise/menu/_login_items.html.haml" do <<-'FILE'
+- if user_signed_in?
+ %li
+ = link_to('Logout', destroy_user_session_path)
+- else
+ %li
+ = link_to('Login', new_user_session_path)
+ FILE
+ end
+else
+ create_file "app/views/devise/menu/_login_items.html.erb" do <<-FILE
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Logout', destroy_user_session_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Login', new_user_session_path) %>
+ </li>
+<% end %>
+ FILE
+ end
+end
+
+if haml_flag
+ create_file "app/views/devise/menu/_registration_items.html.haml" do <<-'FILE'
+- if user_signed_in?
+ %li
+ = link_to('Edit account', edit_user_registration_path)
+- else
+ %li
+ = link_to('Sign up', new_user_registration_path)
+ FILE
+ end
+else
+ create_file "app/views/devise/menu/_registration_items.html.erb" do <<-FILE
+<% if user_signed_in? %>
+ <li>
+ <%= link_to('Edit account', edit_user_registration_path) %>
+ </li>
+<% else %>
+ <li>
+ <%= link_to('Sign up', new_user_registration_path) %>
+ </li>
+<% end %>
+ FILE
+ end
+end
+
+#----------------------------------------------------------------------------
+# Generate Application Layout
+#----------------------------------------------------------------------------
+if haml_flag
+ run 'rm app/views/layouts/application.html.erb'
+ create_file 'app/views/layouts/application.html.haml' do <<-FILE
+!!!
+%html
+ %head
+ %title Testapp
+ = stylesheet_link_tag :all
+ = javascript_include_tag :defaults
+ = csrf_meta_tag
+ %body
+ %ul.hmenu
+ = render 'devise/menu/registration_items'
+ = render 'devise/menu/login_items'
+ %p{:style => "color: green"}= notice
+ %p{:style => "color: red"}= alert
+ = yield
+FILE
+ end
+else
+ inject_into_file 'app/views/layouts/application.html.erb', :after => "<body>\n" do
+ <<-RUBY
+<ul class="hmenu">
+ <%= render 'devise/menu/registration_items' %>
+ <%= render 'devise/menu/login_items' %>
+</ul>
+<p style="color: green"><%= notice %></p>
+<p style="color: red"><%= alert %></p>
+RUBY
+ end
+end
+
+#----------------------------------------------------------------------------
+# Add Stylesheets
+#----------------------------------------------------------------------------
+create_file 'public/stylesheets/application.css' do <<-FILE
+ul.hmenu {
+ list-style: none;
+ margin: 0 0 2em;
+ padding: 0;
+}
+
+ul.hmenu li {
+ display: inline;
+}
+FILE
+end
+
+#----------------------------------------------------------------------------
+# Create a default user
+#----------------------------------------------------------------------------
+puts "creating a default user"
+append_file 'db/seeds.rb' do <<-FILE
+puts 'SETTING UP DEFAULT USER LOGIN'
+user = User.create! :email => '[email protected]', :password => 'please', :password_confirmation => 'please'
+puts 'New user created'
+FILE
+end
+run 'rake db:seed'
+
+#----------------------------------------------------------------------------
+# Setup RSpec & Cucumber
+#----------------------------------------------------------------------------
+puts 'Setting up RSpec and Cucumber'
+append_file 'Gemfile' do <<-FILE
+group :test do
+ gem "rspec"
+ gem "rspec-rails", ">= 2.0.0.beta"
+ gem "machinist", :git => "git://github.com/notahat/machinist.git"
+ gem "faker"
+ gem "ZenTest"
+ gem "autotest"
+ gem "autotest-rails"
+ gem "cucumber", :git => "git://github.com/aslakhellesoy/cucumber.git"
+ gem "database_cleaner", :git => 'git://github.com/bmabey/database_cleaner.git'
+ gem "cucumber-rails", :git => "git://github.com/aslakhellesoy/cucumber-rails.git"
+ gem "capybara"
+ gem "capybara-envjs"
+ gem "launchy"
+ gem "ruby-debug"
+end
+FILE
+end
+
+run 'bundle install'
+run 'rails generate rspec:install'
+run 'rails cucumber:skeleton --capybara --rspec'
+#----------------------------------------------------------------------------
+# Finish up
+#----------------------------------------------------------------------------
+puts "checking everything into git..."
+git :add => '.'
+git :commit => "-am 'initial setup'"
+
+puts "Done setting up your Rails app."
|
kohana/kohanaframework.org | 39c8014cc5c6bcd22e5cd273d43b8c13d902cc4e | submodule 'guides/3.3' update to Kohana v3.3.4 | diff --git a/guides/3.3 b/guides/3.3
index ffc48d1..363c59e 160000
--- a/guides/3.3
+++ b/guides/3.3
@@ -1 +1 @@
-Subproject commit ffc48d1d55da6aa4a0ced7f973f6043e547c9048
+Subproject commit 363c59ee298e1f5abe797e5efdf1c44431800a78
|
kohana/kohanaframework.org | 30cb2c05623c6bf6d7bfe7dfb1592cb5ab18f9a2 | Add missing class to download button | diff --git a/application/templates/partials/home/banner.mustache b/application/templates/partials/home/banner.mustache
index ff93dba..7c2809d 100644
--- a/application/templates/partials/home/banner.mustache
+++ b/application/templates/partials/home/banner.mustache
@@ -1,4 +1,4 @@
<h2>An elegant HMVC PHP5 framework that provides a rich set of components for building web applications.</h2>
<div class="download">
- <a href="{{github_releases_url}}">Download on Github</a>
+ <a href="{{github_releases_url}}" class="cta">Download on Github</a>
</div>
|
kohana/kohanaframework.org | c7bb426d432668ccb63d9226e6b70782737a4661 | Complete fixes for download links | diff --git a/application/classes/controller/home.php b/application/classes/controller/home.php
index 2872106..b3b57da 100644
--- a/application/classes/controller/home.php
+++ b/application/classes/controller/home.php
@@ -1,22 +1,21 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Home extends Controller {
public function action_index()
{
$view = new View_Home_Index;
- $view->set('download', Kohana::$config->load('files')->{'kohana-latest'});
$this->response->body($view);
}
/**
* Demo action to generate a 500 error
*
* @return null
*/
public function action_error()
{
throw new Kohana_Exception('This is an intentional exception');
}
-}
\ No newline at end of file
+}
diff --git a/application/classes/kostache.php b/application/classes/kostache.php
index 384b87f..f6116c6 100644
--- a/application/classes/kostache.php
+++ b/application/classes/kostache.php
@@ -1,168 +1,174 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Kostache extends Kohana_Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
);
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
/**
* Returns donate page url
*
* @return string
*/
public function donate_url()
{
return Route::url('donate');
}
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
+
+ public function github_releases_url()
+ {
+ return 'https://github.com/kohana/kohana/releases';
+ }
+
/**
* Returns current kohana version
*
* @return string
*/
public function kohana_version()
{
return Kohana::VERSION;
}
/**
* Returns current kohana codename
*
* @return string
*/
public function kohana_codename()
{
return Kohana::CODENAME;
}
}
diff --git a/application/classes/view/home/index.php b/application/classes/view/home/index.php
index 81e2421..518103f 100644
--- a/application/classes/view/home/index.php
+++ b/application/classes/view/home/index.php
@@ -1,37 +1,28 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Home_Index extends Kostache_Layout
{
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'banner' => 'partials/home/banner',
'features' => 'home/features',
'gallery' => 'home/gallery',
'social' => 'home/social',
'whouses' => 'home/whouses',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_home = TRUE;
- public function download_version()
- {
- return $this->download['version'].' ('.$this->download['status'].')';
- }
-
- public function download_link()
- {
- return $this->download['download'];
- }
-}
\ No newline at end of file
+}
diff --git a/application/templates/download/index.mustache b/application/templates/download/index.mustache
index 094383f..7a146b8 100644
--- a/application/templates/download/index.mustache
+++ b/application/templates/download/index.mustache
@@ -1,5 +1,5 @@
<section class="textHeavy">
<h1>Download</h1>
- <p>All releases of Kohana are available from <a href="https://github.com/kohana/kohana/releases">Github Releases</a>.</p>
+ <p>All releases of Kohana are available from <a href="{{github_releases_url}}">Github Releases</a>.</p>
<p><small><em>Github is the only official release channel!</em></small>
</section>
diff --git a/application/templates/partials/home/banner.mustache b/application/templates/partials/home/banner.mustache
index 732e050..ff93dba 100644
--- a/application/templates/partials/home/banner.mustache
+++ b/application/templates/partials/home/banner.mustache
@@ -1,5 +1,4 @@
<h2>An elegant HMVC PHP5 framework that provides a rich set of components for building web applications.</h2>
<div class="download">
- <a class="cta" href="{{download_link}}"><span>Download</span> <br />{{download_version}}</a>
- <a href="{{download_url}}">Or download other releases</a>
-</div>
\ No newline at end of file
+ <a href="{{github_releases_url}}">Download on Github</a>
+</div>
|
kohana/kohanaframework.org | 599466dbbad5b837c254287defdf76f461dc96e5 | Remove http extension for Pagodabox | diff --git a/Boxfile b/Boxfile
index 3502875..5ea07fa 100644
--- a/Boxfile
+++ b/Boxfile
@@ -1,21 +1,20 @@
---
web1:
document_root: /public/
name: www-kohanaframework
shared_writable_dirs:
- application/cache
- application/logs
- guides/3.0/application/cache
- guides/3.0/application/logs
- guides/3.1/application/cache
- guides/3.1/application/logs
- guides/3.2/application/cache
- guides/3.2/application/logs
- guides/3.3/application/cache
- guides/3.3/application/logs
php_extensions:
- curl
- - http
- iconv
- mbstring
- mcrypt
|
kohana/kohanaframework.org | 6165ea8abf68e81007e6c61f88d663a4db1452dc | switch to original logo, fixes #23 | diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 696fa1e..436135e 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,512 +1,512 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who { height: 220px; width:280px; float:left; }
#gallery { height:254px; width:660px; float:right; position:relative; overflow: hidden; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
-header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
+header h1 a { background:url(../img/kohana-logo.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
#banner h2.error { width: auto; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who div#whoGallery { margin:0; overflow:hidden; width: 280px; height: 100px }
#who img { vertical-align:middle; padding-bottom:40px; }
#who p { margin-top: 20px }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
#gallery { padding: 0px; margin: 0px; }
#gallery h2 { display: block; overflow: hidden; height: 0; width: 0; padding: 0; margin: 0 }
#gallery div.information { position: absolute; display: block; background: rgba(20,40,20,0.6); width: 635px; top: 255px; height: 50px; padding-left: 25px; padding-top: 25px; padding-bottom: 0px; }
#gallery .information h3 { padding: 0; margin: 0; font-size: 25px; float: left }
#gallery .information a { color: rgb(210, 220, 190); float: left; margin: 10px; font:italic 14px Georgia, "Times New Roman", Times, serif; font-weight: 100; }
#gallery .information a:hover { text-decoration: none;}
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#odesk { background-image: url('../img/icon/odesk.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/famfamfam/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/famfamfam/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/famfamfam/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
div#error { padding-left: 5em; }
div#error img#not-found { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#not-found-server { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
/*
* Notices
*/
div.notice {
padding: 5px 5px;
padding-left: 25px;
margin: 5px 0px;
/* Rounded Corners and Shadow */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
/* Shadow */
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
div.notice-error {
background: #ff0000 url(../img/icon/famfamfam/exclamation.png) no-repeat 5px center;
}
div.notice-warning {
background: #ffff00 url(../img/icon/famfamfam/error.png) no-repeat 5px center;
}
div.notice-information {
background: #0000ff url(../img/icon/famfamfam/information.png) no-repeat 5px center;
}
div.notice-success {
background: #00ff00 url(../img/icon/famfamfam/accept.png) no-repeat 5px center;
}
/*
* END Notices
*/
/*
* Pagodabox
*/
div#pagodabox {
height: 100px;
}
div#pagodabox a {
display: block;
overflow: hidden;
background: url(../img/pagodaFloat.png) no-repeat;
width: 104px;
height: 0px;
padding-top: 54px;
margin-top: 25px;
float: right;
}
/*
* END Pagodabox
- */
\ No newline at end of file
+ */
diff --git a/public/assets/img/kohana-logo.png b/public/assets/img/kohana-logo.png
new file mode 100644
index 0000000..e87373f
Binary files /dev/null and b/public/assets/img/kohana-logo.png differ
|
kohana/kohanaframework.org | dc1b6164659fe2f09893a8ccce01002e17fc2462 | added responsive styles for kohanaframework.org website | diff --git a/application/templates/layout.mustache b/application/templates/layout.mustache
index 49ef58e..84ad303 100644
--- a/application/templates/layout.mustache
+++ b/application/templates/layout.mustache
@@ -1,85 +1,86 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
<link rel="stylesheet" href="{{base_url}}assets/css/style.css?v=1.1">
+<link rel="stylesheet" href="{{base_url}}assets/css/responsive.css?v=1.0">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="notices">
{{>notices}}
</div>
<div class="container">
{{>content}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
<div id="pagodabox">
<a href="http://www.pagodabox.com">Powered by Pagoda Box, PHP as a Service</a>
</div>
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
<script src="{{base_url}}assets/js/lib/slides.js"></script>
<script src="{{base_url}}assets/js/global.js"></script>
<script src="{{base_url}}assets/js/gallery.js"></script>
<!--[if lt IE 7 ]>
<script src="{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
diff --git a/public/assets/css/responsive.css b/public/assets/css/responsive.css
new file mode 100644
index 0000000..3cbe8a4
--- /dev/null
+++ b/public/assets/css/responsive.css
@@ -0,0 +1,57 @@
+/*
+Responsive styles for the kohanaframework.org website
+
+By: Samnan ur Rehman
+http://about.me/samnan
+http://samnan.github.io
+*/
+
+@media screen and (max-width: 930px) {
+
+/* home */
+body { padding:0 10px 10px 10px; }
+.wrapper { width: 100%; margin:auto; }
+#banner h2 { font-size: 20px; width: 55%; }
+#features li { width: 38%; min-height: 80px; }
+#features li:nth-child(3n+1) { clear: none; }
+#features li:nth-last-child(-n+3) { margin: 0px 20px 38px 0px; }
+#community { width: 470px; }
+#community li { border-width: 0; }
+#community li:nth-child(3n+1) { padding: 8px; }
+#community li:nth-child(-n+3) { padding: 8px; }
+#community li:nth-child(3n+2) { width: 212px; }
+
+/* downloads */
+.container .textHeavy { padding-right: 5px; }
+
+}
+
+@media screen and (max-width: 680px) {
+ nav { float: none; width: 95%; }
+ #features li { width: 35%; min-height: 115px; }
+ #community { width: 55%; }
+ #community li { width: 100%; }
+ #community li:nth-child(3n+1) { padding: 0; }
+ #community li:nth-child(-n+3) { padding: 0; }
+ #community li:nth-child(3n+2) { width: 100%; }
+}
+
+@media screen and (max-width: 610px) {
+ #banner h2 { width: 100%; font-size: 18px; }
+ .download { width: 240px; float: none; margin: 0 auto; }
+ #features li { width: 95%; min-height: 60px; }
+ #community { width: 100%; }
+ #giving { width: 95%; }
+
+ #stable .download { margin-left: auto; }
+ #stable h3 { text-align: center; }
+}
+
+@media screen and (max-width: 530px) {
+ #features li { width: 85%; }
+}
+
+@media screen and (max-width: 500px) {
+ nav { font-size: 80%; }
+ nav a:link, nav a:visited { padding: 8px; }
+}
\ No newline at end of file
|
kohana/kohanaframework.org | 4821cde4c6300caac20ce5367e28afa8a2f35e04 | submodule guides/3.3 to the latest track its own submodules | diff --git a/guides/3.3 b/guides/3.3
index 27a9a50..ffc48d1 160000
--- a/guides/3.3
+++ b/guides/3.3
@@ -1 +1 @@
-Subproject commit 27a9a50e339f0168c76bd3b8cd77ed03a7cf734c
+Subproject commit ffc48d1d55da6aa4a0ced7f973f6043e547c9048
|
kohana/kohanaframework.org | c21010705bcabf3fa1963d11b7b171816c82195f | Add Kohana required extensions to Boxfile | diff --git a/Boxfile b/Boxfile
index 53ea4dd..3502875 100644
--- a/Boxfile
+++ b/Boxfile
@@ -1,17 +1,21 @@
---
web1:
document_root: /public/
name: www-kohanaframework
shared_writable_dirs:
- application/cache
- application/logs
- guides/3.0/application/cache
- guides/3.0/application/logs
- guides/3.1/application/cache
- guides/3.1/application/logs
- guides/3.2/application/cache
- guides/3.2/application/logs
- guides/3.3/application/cache
- guides/3.3/application/logs
php_extensions:
- curl
+ - http
+ - iconv
+ - mbstring
+ - mcrypt
|
kohana/kohanaframework.org | c6dfeebeb15443e4fcb8628e49c601d3c0623484 | Proper release of 3.2.3.1 | diff --git a/application/config/files.php b/application/config/files.php
index 36d1409..38c39c0 100644
--- a/application/config/files.php
+++ b/application/config/files.php
@@ -1,24 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'kohana-latest' => array(
'version' => 'v3.3.2',
'codename' => 'dryocopus',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1715/kohana-3.3.2.zip',
'changelog' => 'http://dev.kohanaframework.org/versions/212',
'documentation' => 'http://kohanaframework.org/3.3/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=66',
'support_until' => 'Final'
),
'support' => array(
- 'version' => 'v3.2.3',
+ 'version' => 'v3.2.3.1',
'codename' => 'turdus',
'status' => 'stable',
- 'download' => 'http://dev.kohanaframework.org/attachments/download/1714/kohana-3.2.3.zip',
+ 'download' => 'http://dev.kohanaframework.org/attachments/download/1716/kohana-3.2.3.1.zip',
'changelog' => 'http://dev.kohanaframework.org/versions/210',
'documentation' => 'http://kohanaframework.org/3.2/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=62',
'support_until' => 'Final'
),
);
|
kohana/kohanaframework.org | db99961c827945bd1f3aa8cae28a77f49922d106 | forgot to update 3.3 download link | diff --git a/application/config/files.php b/application/config/files.php
index fe424ae..36d1409 100644
--- a/application/config/files.php
+++ b/application/config/files.php
@@ -1,24 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'kohana-latest' => array(
'version' => 'v3.3.2',
'codename' => 'dryocopus',
'status' => 'stable',
- 'download' => 'https://github.com/kohana/kohana/releases/download/v3.3.1/kohana-v3.3.1.zip',
+ 'download' => 'http://dev.kohanaframework.org/attachments/download/1715/kohana-3.3.2.zip',
'changelog' => 'http://dev.kohanaframework.org/versions/212',
'documentation' => 'http://kohanaframework.org/3.3/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=66',
'support_until' => 'Final'
),
'support' => array(
'version' => 'v3.2.3',
'codename' => 'turdus',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1714/kohana-3.2.3.zip',
'changelog' => 'http://dev.kohanaframework.org/versions/210',
'documentation' => 'http://kohanaframework.org/3.2/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=62',
'support_until' => 'Final'
),
);
|
kohana/kohanaframework.org | 18dca273e3bb18e6732cb0efe7c2834232b13936 | Add Zeptol-Ti to home page gallery | diff --git a/application/templates/home/gallery.mustache b/application/templates/home/gallery.mustache
index 125cc89..5215e40 100644
--- a/application/templates/home/gallery.mustache
+++ b/application/templates/home/gallery.mustache
@@ -1,40 +1,47 @@
<section id="gallery" class="medBkg inset">
<h2>Gallery</h2>
<div class="sliderContent" id="galleryContainer">
<div>
<div class="information">
<h3>Sittercity</h3>
<a href="http://www.sittercity.com">www.sittercity.com</a>
</div>
<img src="{{base_url}}assets/img/gallery/sittercity.jpg" alt="sittercity" />
</div>
<div>
<div class="information">
<h3>Couch Surfing</h3>
<a href="http://www.couchsurfing.org">www.couchsurfing.org</a>
</div>
<img src="{{base_url}}assets/img/gallery/couchsurfing.jpg" alt="Couch Surfing web site" />
</div>
<div>
<div class="information">
<h3>We Pay</h3>
<a href="http://www.wepay.com">www.wepay.com</a>
</div>
<img src="{{base_url}}assets/img/gallery/wepay.jpg" alt="We Pay website" />
</div>
<div>
<div class="information">
<h3>Mukuru</h3>
<a href="http://www.mukuru.com">www.mukuru.com</a>
</div>
<img src="{{base_url}}assets/img/gallery/mukuru.jpg" alt="Mukuru website" />
</div>
<div>
<div class="information">
<h3>National Geographic Kids</h3>
<a href="http://kids-myshot.nationalgeographic.com/">http://kids-myshot.nationalgeographic.com/</a>
</div>
<img src="{{base_url}}assets/img/gallery/nationalgeographic.jpg" alt="National Geographic Kids My-Shot website" />
</div>
+ <div>
+ <div class="information">
+ <h3>Zepol-Ti</h3>
+ <a href="http://zepol.com.br/">http://zepol.com.br/</a>
+ </div>
+ <img src="{{base_url}}assets/img/gallery/zepol-ti.jpg" alt="Zepol-Ti: e-commerce and institutional sites" />
+ </div>
</div>
</section> <!-- END section#gallery -->
\ No newline at end of file
diff --git a/application/templates/home/whouses.mustache b/application/templates/home/whouses.mustache
index 29d712b..18869d9 100644
--- a/application/templates/home/whouses.mustache
+++ b/application/templates/home/whouses.mustache
@@ -1,11 +1,12 @@
<section id="who" class="darkBkg inset">
<h2>Who uses Kohana?</h2>
<div id="whoGallery">
<img src="{{base_url}}assets/img/gallery/logos/sittercity.png" width="280" height="100" alt="Sittercity" />
<img src="{{base_url}}assets/img/gallery/logos/couchsurfing.png" width="280" height="100" alt="Couch Surfing" />
<img src="{{base_url}}assets/img/gallery/logos/wepay.png" width="280" height="100" alt="We Pay" />
<img src="{{base_url}}assets/img/gallery/logos/mukuru.png" width="280" height="100" alt="Mukuru" />
<img src="{{base_url}}assets/img/gallery/logos/nationalgeographic.png" width="280" height="100" alt="National Geographic" />
+ <img src="{{base_url}}assets/img/gallery/logos/zepol-ti.png" width="280" height="100" alt="Zepol-Ti" />
</div>
<p>These are some of the people already using Kohana. <a href="http://forum.kohanaframework.org">See more on the Forums.</a></p>
</section> <!-- END section#who -->
\ No newline at end of file
diff --git a/public/assets/img/gallery/logos/zepol-ti.png b/public/assets/img/gallery/logos/zepol-ti.png
new file mode 100644
index 0000000..a441e1c
Binary files /dev/null and b/public/assets/img/gallery/logos/zepol-ti.png differ
diff --git a/public/assets/img/gallery/zepol-ti.jpg b/public/assets/img/gallery/zepol-ti.jpg
new file mode 100644
index 0000000..05b1363
Binary files /dev/null and b/public/assets/img/gallery/zepol-ti.jpg differ
|
kohana/kohanaframework.org | 30af0cf1eb5b32f06a33d4685d5e45e33642bd49 | add kostache files instead of using submodule (temporary fix) | diff --git a/modules/kostache/LICENSE.md b/modules/kostache/LICENSE.md
new file mode 100644
index 0000000..2118430
--- /dev/null
+++ b/modules/kostache/LICENSE.md
@@ -0,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2010-2011 Jeremy Bush
+Copyright (c) 2011 Woody Gilk
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/modules/kostache/README.markdown b/modules/kostache/README.markdown
new file mode 100644
index 0000000..80b6918
--- /dev/null
+++ b/modules/kostache/README.markdown
@@ -0,0 +1,146 @@
+# Kostache
+
+Kostache is a [Kohana 3](https://github.com/kohana/kohana) module for using [Mustache](http://defunkt.github.com/mustache/) templates in your application.
+
+Mustache is a logic-less template class. It is impossible to embed logic into mustache files.
+
+## Example
+
+Did you know the pagination view in Kohana is terrible? We are going to fix it:
+
+### How it exists now:
+
+ <p class="pagination">
+
+ <?php if ($first_page !== FALSE): ?>
+ <a href="<?php echo $page->url($first_page) ?>" rel="first"><?php echo __('First') ?></a>
+ <?php else: ?>
+ <?php echo __('First') ?>
+ <?php endif ?>
+
+ <?php if ($previous_page !== FALSE): ?>
+ <a href="<?php echo $page->url($previous_page) ?>" rel="prev"><?php echo __('Previous') ?></a>
+ <?php else: ?>
+ <?php echo __('Previous') ?>
+ <?php endif ?>
+
+ <?php for ($i = 1; $i <= $total_pages; $i++): ?>
+
+ <?php if ($i == $current_page): ?>
+ <strong><?php echo $i ?></strong>
+ <?php else: ?>
+ <a href="<?php echo $page->url($i) ?>"><?php echo $i ?></a>
+ <?php endif ?>
+
+ <?php endfor ?>
+
+ <?php if ($next_page !== FALSE): ?>
+ <a href="<?php echo $page->url($next_page) ?>" rel="next"><?php echo __('Next') ?></a>
+ <?php else: ?>
+ <?php echo __('Next') ?>
+ <?php endif ?>
+
+ <?php if ($last_page !== FALSE): ?>
+ <a href="<?php echo $page->url($last_page) ?>" rel="last"><?php echo __('Last') ?></a>
+ <?php else: ?>
+ <?php echo __('Last') ?>
+ <?php endif ?>
+
+ </p><!-- .pagination -->
+
+Wow, look at all that logic in there! How do you plan on effectively maintaining that?!?
+
+### Our new View Class (classes/view/pagination/basic.php)
+
+ <?php defined('SYSPATH') or die('No direct script access.');
+
+ class View_Pagination_Basic extends kostache {
+
+ protected $pagination;
+
+ protected function items()
+ {
+ $items = array();
+
+ // First.
+ $first['title'] = 'first';
+ $first['name'] = __('first');
+ $first['url'] = ($this->pagination->first_page !== FALSE) ? $this->pagination->url($this->pagination->first_page) : FALSE;
+ $items[] = $first;
+
+ // Prev.
+ $prev['title'] = 'prev';
+ $prev['name'] = __('previous');
+ $prev['url'] = ($this->pagination->previous_page !== FALSE) ? $this->pagination->url($this->pagination->previous_page) : FALSE;
+ $items[] = $prev;
+
+ // Numbers.
+ for ($i=1; $i<=$this->pagination->total_pages; $i++)
+ {
+ $item = array();
+
+ $item['num'] = TRUE;
+ $item['name'] = $i;
+ $item['url'] = ($i != $this->pagination->current_page) ? $this->pagination->url($i) : FALSE;
+
+ $items[] = $item;
+ }
+
+ // Next.
+ $next['title'] = 'next';
+ $next['name'] = __('next');
+ $next['url'] = ($this->pagination->next_page !== FALSE) ? $this->pagination->url($this->pagination->next_page) : FALSE;
+ $items[] = $next;
+
+ // Last.
+ $last['title'] = 'last';
+ $last['name'] = __('last');
+ $last['url'] = ($this->pagination->last_page !== FALSE) ? $this->pagination->url($this->pagination->last_page) : FALSE;
+ $items[] = $last;
+
+ return $items;
+ }
+ }
+
+Yum, logic in a class, where it belongs :)
+
+### Our mustache template (templates/pagination/basic.mustache)
+
+ <p class="pagination">
+ {{#items}}
+ {{#url}}<a href="{{url}}" {{#title}}rel="{{rel}}"{{/title}}>{{/url}}{{#num}}<strong>{{/num}}{{name}}{{#num}}</strong>{{/num}}{{#url}}</a>{{/url}}
+ {{/items}}
+ </p>
+
+Holy cow, that's more maintainable :)
+
+## Partials
+
+To use a partial in your template you use the greater than sign (>) and the name, e.g. {{>header}}.
+
+You must define partials within the $_partials array in your view class. The key is the name that you use in your template and the value is a path to your partial file.
+
+ protected $_partials = array(
+ 'header' => 'header', // Loads templates/header.mustache
+ 'footer' => 'footer/default', // Loads templates/footer/default.mustache
+ );
+
+## Using the View_Layout class
+
+Kostache comes with a View_Layout class instead of a template controller. This allows your layouts to be more OOP and self contained, and they do not rely on your controllers so much.
+
+To use it, have your view extend the View_Layout class. You can then specify your own layout file by placing it in templates/layout.mustache. At a minimum, it needs to have a {{>body}} partial defined in it.
+
+If you have a view that extends the View_Layout class, but wish to render only the template and not the entire layout, you can set the public $render_layout property to FALSE. This is useful if you want to use the same view class for external requests and HMVC requests.
+
+ $view = new View_Post_List;
+ if ($this->request !== Request::instance) // Is internal request
+ {
+ $view->render_layout = FALSE;
+ }
+
+For specific usage and documentation, see:
+
+[PHP Mustache](http://github.com/bobthecow/mustache.php)
+
+[Original Mustache](http://defunkt.github.com/mustache/)
\ No newline at end of file
diff --git a/modules/kostache/classes/kohana/kostache.php b/modules/kostache/classes/kohana/kostache.php
new file mode 100644
index 0000000..34fa87e
--- /dev/null
+++ b/modules/kostache/classes/kohana/kostache.php
@@ -0,0 +1,271 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+/**
+ * Mustache templates for Kohana.
+ *
+ * @package Kostache
+ * @category Base
+ * @author Jeremy Bush <[email protected]>
+ * @author Woody Gilk <[email protected]>
+ * @copyright (c) 2010-2011 Jeremy Bush
+ * @copyright (c) 2011 Woody Gilk
+ * @license MIT
+ */
+abstract class Kohana_Kostache {
+
+ const VERSION = '2.0.4';
+
+ /**
+ * Factory method for Kostache views. Accepts a template path and an
+ * optional array of partial paths.
+ *
+ * @param string template path
+ * @param array partial paths
+ * @return Kostache
+ * @throws Kohana_Exception if the view class does not exist
+ */
+ public static function factory($path, array $partials = NULL)
+ {
+ $class = 'View_'.str_replace('/', '_', $path);
+
+ if ( ! class_exists($class))
+ {
+ throw new Kohana_Exception('View class does not exist: :class', array(
+ ':class' => $class,
+ ));
+ }
+
+ return new $class(NULL, $partials);
+ }
+
+ /**
+ * @var string Mustache template
+ */
+ protected $_template;
+
+ /**
+ * @var array Mustache partials
+ */
+ protected $_partials = array();
+
+ /**
+ * Loads the template and partial paths.
+ *
+ * @param string template path
+ * @param array partial paths
+ * @return void
+ * @uses Kostache::template
+ * @uses Kostache::partial
+ */
+ public function __construct($template = NULL, array $partials = NULL)
+ {
+ if ( ! $template)
+ {
+ if ($this->_template)
+ {
+ // Load the template defined in the view
+ $template = $this->_template;
+ }
+ else
+ {
+ // Detect the template for this class
+ $template = $this->_detect_template();
+ }
+ }
+
+ // Load the template
+ $this->template($template);
+
+ if ($this->_partials)
+ {
+ foreach ($this->_partials as $name => $path)
+ {
+ // Load the partials defined in the view
+ $this->partial($name, $path);
+ }
+ }
+
+ if ($partials)
+ {
+ foreach ($partials as $name => $path)
+ {
+ // Load the partial
+ $this->partial($name, $path);
+ }
+ }
+ }
+
+ /**
+ * Magic method, returns the output of [Kostache::render].
+ *
+ * @return string
+ * @uses Kostache::render
+ */
+ public function __toString()
+ {
+ try
+ {
+ return $this->render();
+ }
+ catch (Exception $e)
+ {
+ ob_start();
+
+ // Render the exception
+ Kohana_Exception::handler($e);
+
+ return (string) ob_get_clean();
+ }
+ }
+
+ /**
+ * Loads a new template from a path.
+ *
+ * @return Kostache
+ */
+ public function template($path)
+ {
+ $this->_template = $this->_load($path);
+
+ return $this;
+ }
+
+ /**
+ * Loads a new partial from a path. If the path is empty, the partial will
+ * be removed.
+ *
+ * @param string partial name
+ * @param mixed partial path, FALSE to remove the partial
+ * @return Kostache
+ */
+ public function partial($name, $path)
+ {
+ if ( ! $path)
+ {
+ unset($this->_partials[$name]);
+ }
+ else
+ {
+ $this->_partials[$name] = $this->_load($path);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Assigns a variable by name.
+ *
+ * // This value can be accessed as {{foo}} within the template
+ * $view->set('foo', 'my value');
+ *
+ * You can also use an array to set several values at once:
+ *
+ * // Create the values {{food}} and {{beverage}} in the template
+ * $view->set(array('food' => 'bread', 'beverage' => 'water'));
+ *
+ * @param string variable name or an array of variables
+ * @param mixed value
+ * @return $this
+ */
+ public function set($key, $value = NULL)
+ {
+ if (is_array($key))
+ {
+ foreach ($key as $name => $value)
+ {
+ $this->{$name} = $value;
+ }
+ }
+ else
+ {
+ $this->{$key} = $value;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Assigns a value by reference. The benefit of binding is that values can
+ * be altered without re-setting them. It is also possible to bind variables
+ * before they have values. Assigned values will be available as a
+ * variable within the template file:
+ *
+ * // This reference can be accessed as {{ref}} within the template
+ * $view->bind('ref', $bar);
+ *
+ * @param string variable name
+ * @param mixed referenced variable
+ * @return $this
+ */
+ public function bind($key, & $value)
+ {
+ $this->{$key} =& $value;
+
+ return $this;
+ }
+
+ /**
+ * Renders the template using the current view.
+ *
+ * @return string
+ */
+ public function render()
+ {
+ return $this->_stash($this->_template, $this, $this->_partials)->render();
+ }
+
+ /**
+ * Return a new Mustache for the given template, view, and partials.
+ *
+ * @param string template
+ * @param Kostache view object
+ * @param array partial templates
+ * @return Mustache
+ */
+ protected function _stash($template, Kostache $view, array $partials)
+ {
+ return new Kohana_Mustache($template, $view, $partials, array(
+ 'charset' => Kohana::$charset,
+ ));
+ }
+
+ /**
+ * Load a template and return it.
+ *
+ * @param string template path
+ * @return string
+ * @throws Kohana_Exception if the template does not exist
+ */
+ protected function _load($path)
+ {
+ $file = Kohana::find_file('templates', $path, 'mustache');
+
+ if ( ! $file)
+ {
+ throw new Kohana_Exception('Template file does not exist: :path', array(
+ ':path' => 'templates/'.$path,
+ ));
+ }
+
+ return file_get_contents($file);
+ }
+
+ /**
+ * Detect the template name from the class name.
+ *
+ * @return string
+ */
+ protected function _detect_template()
+ {
+ // Start creating the template path from the class name
+ $template = explode('_', get_class($this));
+
+ // Remove "View" prefix
+ array_shift($template);
+
+ // Convert name parts into a path
+ $template = strtolower(implode('/', $template));
+
+ return $template;
+ }
+
+}
diff --git a/modules/kostache/classes/kohana/kostache/layout.php b/modules/kostache/classes/kohana/kostache/layout.php
new file mode 100644
index 0000000..46bb758
--- /dev/null
+++ b/modules/kostache/classes/kohana/kostache/layout.php
@@ -0,0 +1,46 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+/**
+ * Mustache templates for Kohana.
+ *
+ * @package Kostache
+ * @category Base
+ * @author Jeremy Bush <[email protected]>
+ * @author Woody Gilk <[email protected]>
+ * @copyright (c) 2010-2011 Jeremy Bush
+ * @copyright (c) 2011 Woody Gilk
+ * @license MIT
+ */
+abstract class Kohana_Kostache_Layout extends Kostache {
+
+ /**
+ * @var string partial name for content
+ */
+ const CONTENT_PARTIAL = 'content';
+
+ /**
+ * @var boolean render template in layout?
+ */
+ public $render_layout = TRUE;
+
+ /**
+ * @var string layout path
+ */
+ protected $_layout = 'layout';
+
+ public function render()
+ {
+ if ( ! $this->render_layout)
+ {
+ return parent::render();
+ }
+
+ $partials = $this->_partials;
+
+ $partials[Kostache_Layout::CONTENT_PARTIAL] = $this->_template;
+
+ $template = $this->_load($this->_layout);
+
+ return $this->_stash($template, $this, $partials)->render();
+ }
+
+}
diff --git a/modules/kostache/classes/kohana/mustache.php b/modules/kostache/classes/kohana/mustache.php
new file mode 100644
index 0000000..49ed1ec
--- /dev/null
+++ b/modules/kostache/classes/kohana/mustache.php
@@ -0,0 +1,3 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Kohana_Mustache extends Mustache {}
diff --git a/modules/kostache/classes/kostache.php b/modules/kostache/classes/kostache.php
new file mode 100644
index 0000000..9566dc3
--- /dev/null
+++ b/modules/kostache/classes/kostache.php
@@ -0,0 +1,3 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+abstract class Kostache extends Kohana_Kostache { }
diff --git a/modules/kostache/classes/kostache/layout.php b/modules/kostache/classes/kostache/layout.php
new file mode 100644
index 0000000..7feeb1d
--- /dev/null
+++ b/modules/kostache/classes/kostache/layout.php
@@ -0,0 +1,3 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+abstract class Kostache_Layout extends Kohana_Kostache_Layout { }
diff --git a/modules/kostache/config/userguide.php b/modules/kostache/config/userguide.php
new file mode 100644
index 0000000..353acf1
--- /dev/null
+++ b/modules/kostache/config/userguide.php
@@ -0,0 +1,23 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+return array(
+ // Leave this alone
+ 'modules' => array(
+
+ // This should be the path to this modules userguide pages, without the 'guide/'. Ex: '/guide/modulename/' would be 'modulename'
+ 'kostache' => array(
+
+ // Whether this modules userguide pages should be shown
+ 'enabled' => TRUE,
+
+ // The name that should show up on the userguide index page
+ 'name' => 'KOstache',
+
+ // A short description of this module, shown on the index page
+ 'description' => 'Logic-less View/Mustache Module for Kohana v3',
+
+ // Copyright message, shown in the footer for this module
+ 'copyright' => 'Zombor',
+ )
+ )
+);
\ No newline at end of file
diff --git a/modules/kostache/guide/kostache/examples.md b/modules/kostache/guide/kostache/examples.md
new file mode 100644
index 0000000..6068751
--- /dev/null
+++ b/modules/kostache/guide/kostache/examples.md
@@ -0,0 +1,139 @@
+# Kostache Examples
+
+## Complex Example
+
+Model (This example uses [AutoModeler](http://github.com/zombor/Auto-Modeler)):
+
+ class Model_Test extends AutoModeler
+ {
+ protected $_table_name = 'tests';
+
+ protected $_data = array(
+ 'id' => '',
+ 'name' => '',
+ 'value' => '',
+ );
+
+ protected $_rules = array(
+ 'name' => array('not_empty'),
+ 'value' => array('not_empty'),
+ );
+ }
+
+View:
+
+ class View_Example extends Kostache
+ {
+ public $title = 'Testing';
+
+ public function things()
+ {
+ return Inflector::plural(get_class(new Model_Test));
+ }
+
+ public function tests()
+ {
+ $tests = array();
+ foreach (AutoModeler::factory('test')->fetch_all() as $test)
+ {
+ $tests[] = $test->as_array();
+ }
+ return $tests;
+ }
+ }
+
+Template:
+
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>{{title}}</title>
+ </head>
+ <body>
+ <h1>{{title}}</h1>
+ <p>Here are all my {{things}}:</p>
+ <ul>
+ {{#tests}}
+ <li><strong>{{id}}:</strong> ({{name}}:{{value}})</li>
+ {{/tests}}
+ </ul>
+ </body>
+ </html>
+
+Controller:
+
+ class Controller_Welcome extends Controller {
+
+ public function action_index()
+ {
+ echo new View_Example;
+ }
+
+ } // End Welcome
+
+## Grabbing a single model value
+
+Model (This example uses [AutoModeler](http://github.com/zombor/Auto-Modeler)):
+
+ class Model_Test extends AutoModeler
+ {
+ protected $_table_name = 'tests';
+
+ protected $_data = array(
+ 'id' => '',
+ 'name' => '',
+ 'value' => '',
+ );
+
+ protected $_rules = array(
+ 'name' => array('not_empty'),
+ 'value' => array('not_empty'),
+ );
+ }
+
+View:
+
+ class View_Singular extends Kostache
+ {
+ protected $_pragmas = array(Kostache::PRAGMA_DOT_NOTATION => TRUE);
+
+ public $thing_id = NULL;
+ public $title = 'Testing';
+
+ public function thing()
+ {
+ return new Model_Test($this->thing_id);
+ }
+ }
+
+Template:
+
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>{{title}}</title>
+ </head>
+ <body>
+ <h1>{{title}}</h1>
+ <p>This is just one thing:</p>
+ <h2>{{thing.id}}</h2>
+ <ul>
+ <li>Name: {{thing.name}}</li>
+ <li>Value: {{thing.value}}</li>
+ </ul>
+ </body>
+ </html>
+
+Controller:
+
+ class Controller_Welcome extends Controller {
+
+ public function action_singular($id)
+ {
+ $view = new View_Singular;
+ $view->thing_id = $id;
+ echo $view;
+ }
+ } // End Welcome
diff --git a/modules/kostache/guide/kostache/index.md b/modules/kostache/guide/kostache/index.md
new file mode 100644
index 0000000..72aefac
--- /dev/null
+++ b/modules/kostache/guide/kostache/index.md
@@ -0,0 +1,7 @@
+# About Kostache
+
+Kostache is a Kohana module for using [Mustache](http://defunkt.github.com/mustache/) templates in your application.
+
+Mustache is a logic-less template class. It is impossible to embed logic into mustache files.
+
+This module requires mustache.php and includes it as a git submodule. See [Working With Git](tutorials.git) for more information about managing submodules.
\ No newline at end of file
diff --git a/modules/kostache/guide/kostache/menu.md b/modules/kostache/guide/kostache/menu.md
new file mode 100644
index 0000000..a76cf3f
--- /dev/null
+++ b/modules/kostache/guide/kostache/menu.md
@@ -0,0 +1,4 @@
+1. **Kostache**
+ - [About](index)
+ - [Usage](usage)
+ - [Examples](examples)
\ No newline at end of file
diff --git a/modules/kostache/guide/kostache/usage.md b/modules/kostache/guide/kostache/usage.md
new file mode 100644
index 0000000..d7eafb3
--- /dev/null
+++ b/modules/kostache/guide/kostache/usage.md
@@ -0,0 +1,58 @@
+# Kostache Usage
+
+View classes go in classes/view/
+
+classes/view/example.php
+
+ class View_Example extends Kostache
+ {
+ public $foo = 'bar';
+ }
+
+Template files go in templates/
+
+templates/example.mustache
+
+ This is a {{foo}}
+
+In your controller, just do:
+
+ $view = new View_Example;
+ echo $view;
+
+And you get:
+
+ "This is a bar"
+
+## Partials
+
+To use a partial in your template you use the greater than sign (>) and the name, e.g. {{>header}}.
+
+You must define partials within the $_partials array in your view class. The key is the name that you use in your template and the value is a path to your partial file.
+
+ protected $_partials = array(
+ 'header' => 'header', // Loads templates/header.mustache
+ 'footer' => 'footer/default', // Loads templates/footer/default.mustache
+ );
+
+## Using the View_Layout class
+
+Kostache comes with a View_Layout class instead of a template controller. This allows your layouts to be more OOP and self contained, and they do not rely on your controllers so much.
+
+To use it, have your view extend the View_Layout class. You can then specify your own layout file by placing it in templates/layout.mustache. At a minimum, it needs to have a {{>body}}; partial defined in it.
+
+If you have a view that extends the View_Layout class, but wish to render only the template and not the entire layout, you can set the public $render_layout property to FALSE. This is useful if you want to use the same view class for external requests and HMVC requests.
+
+ $view = new View_Post_List;
+ if ($this->request !== Request::instance) // Is internal request
+ {
+ $view->render_layout = FALSE;
+ }
+
+## Mustache Documentation
+
+For specific usage and documentation, see:
+
+[PHP Mustache](http://github.com/bobthecow/mustache.php)
+
+[Original Mustache](http://defunkt.github.com/mustache/)
\ No newline at end of file
diff --git a/modules/kostache/init.php b/modules/kostache/init.php
new file mode 100644
index 0000000..22b0b8b
--- /dev/null
+++ b/modules/kostache/init.php
@@ -0,0 +1,4 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+// Load Mustache for PHP
+include Kohana::find_file('vendor', 'mustache/Mustache');
diff --git a/modules/kostache/templates/dates/days.mustache b/modules/kostache/templates/dates/days.mustache
new file mode 100644
index 0000000..7c07b70
--- /dev/null
+++ b/modules/kostache/templates/dates/days.mustache
@@ -0,0 +1,33 @@
+<select name="days" id="days">
+ <option value="01">01</option>
+ <option value="02">02</option>
+ <option value="03">03</option>
+ <option value="04">04</option>
+ <option value="05">05</option>
+ <option value="06">06</option>
+ <option value="07">07</option>
+ <option value="08">08</option>
+ <option value="09">09</option>
+ <option value="10">10</option>
+ <option value="11">11</option>
+ <option value="12">12</option>
+ <option value="13">13</option>
+ <option value="14">14</option>
+ <option value="15">15</option>
+ <option value="16">16</option>
+ <option value="17">17</option>
+ <option value="18">18</option>
+ <option value="19">19</option>
+ <option value="20">20</option>
+ <option value="21">21</option>
+ <option value="22">22</option>
+ <option value="23">23</option>
+ <option value="24">24</option>
+ <option value="25">25</option>
+ <option value="26">26</option>
+ <option value="27">27</option>
+ <option value="28">28</option>
+ <option value="29">29</option>
+ <option value="30">30</option>
+ <option value="31">31</option>
+</select>
\ No newline at end of file
diff --git a/modules/kostache/templates/dates/months.mustache b/modules/kostache/templates/dates/months.mustache
new file mode 100644
index 0000000..fec51fa
--- /dev/null
+++ b/modules/kostache/templates/dates/months.mustache
@@ -0,0 +1,4 @@
+<select name="months" id="months">
+ {{#months}}<option value="{{value}}" {{#selected}}selected="selected"{{/selected}}>{{month}}</option>
+ {{/months}}
+</select>
\ No newline at end of file
diff --git a/modules/kostache/templates/dates/years.mustache b/modules/kostache/templates/dates/years.mustache
new file mode 100644
index 0000000..7e55a4e
--- /dev/null
+++ b/modules/kostache/templates/dates/years.mustache
@@ -0,0 +1,4 @@
+<select name="years" id="years">
+ {{#years}}<option value="{{value}}" {{#selected}}selected="selected"{{/selected}}>{{year}}</option>
+ {{/years}}
+</select>
\ No newline at end of file
diff --git a/modules/kostache/templates/layout.mustache b/modules/kostache/templates/layout.mustache
new file mode 100644
index 0000000..5be28d4
--- /dev/null
+++ b/modules/kostache/templates/layout.mustache
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>{{title}}</title>
+ </head>
+ <body>
+ <h1>{{title}}</h1>
+ <p>{{>content}}</p>
+ </body>
+</html>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/LICENSE b/modules/kostache/vendor/mustache/LICENSE
new file mode 100644
index 0000000..63c95ac
--- /dev/null
+++ b/modules/kostache/vendor/mustache/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2010 Justin Hileman
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/modules/kostache/vendor/mustache/Mustache.php b/modules/kostache/vendor/mustache/Mustache.php
new file mode 100644
index 0000000..3b43a4f
--- /dev/null
+++ b/modules/kostache/vendor/mustache/Mustache.php
@@ -0,0 +1,795 @@
+<?php
+
+/**
+ * A Mustache implementation in PHP.
+ *
+ * {@link http://defunkt.github.com/mustache}
+ *
+ * Mustache is a framework-agnostic logic-less templating language. It enforces separation of view
+ * logic from template files. In fact, it is not even possible to embed logic in the template.
+ *
+ * This is very, very rad.
+ *
+ * @author Justin Hileman {@link http://justinhileman.com}
+ */
+class Mustache {
+
+ /**
+ * Should this Mustache throw exceptions when it finds unexpected tags?
+ *
+ * @see self::_throwsException()
+ */
+ protected $_throwsExceptions = array(
+ MustacheException::UNKNOWN_VARIABLE => false,
+ MustacheException::UNCLOSED_SECTION => true,
+ MustacheException::UNEXPECTED_CLOSE_SECTION => true,
+ MustacheException::UNKNOWN_PARTIAL => false,
+ MustacheException::UNKNOWN_PRAGMA => true,
+ );
+
+ // Override charset passed to htmlentities() and htmlspecialchars(). Defaults to UTF-8.
+ protected $_charset = 'UTF-8';
+
+ /**
+ * Pragmas are macro-like directives that, when invoked, change the behavior or
+ * syntax of Mustache.
+ *
+ * They should be considered extremely experimental. Most likely their implementation
+ * will change in the future.
+ */
+
+ /**
+ * The {{%DOT-NOTATION}} pragma allows context traversal via dots. Given the following context:
+ *
+ * $context = array('foo' => array('bar' => array('baz' => 'qux')));
+ *
+ * One could access nested properties using dot notation:
+ *
+ * {{%DOT-NOTATION}}{{foo.bar.baz}}
+ *
+ * Which would render as `qux`.
+ */
+ const PRAGMA_DOT_NOTATION = 'DOT-NOTATION';
+
+ /**
+ * The {{%IMPLICIT-ITERATOR}} pragma allows access to non-associative array data in an
+ * iterable section:
+ *
+ * $context = array('items' => array('foo', 'bar', 'baz'));
+ *
+ * With this template:
+ *
+ * {{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}}
+ *
+ * Would render as `foobarbaz`.
+ *
+ * {{%IMPLICIT-ITERATOR}} accepts an optional 'iterator' argument which allows implicit
+ * iterator tags other than {{.}} ...
+ *
+ * {{%IMPLICIT-ITERATOR iterator=i}}{{#items}}{{i}}{{/items}}
+ */
+ const PRAGMA_IMPLICIT_ITERATOR = 'IMPLICIT-ITERATOR';
+
+ /**
+ * The {{%UNESCAPED}} pragma swaps the meaning of the {{normal}} and {{{unescaped}}}
+ * Mustache tags. That is, once this pragma is activated the {{normal}} tag will not be
+ * escaped while the {{{unescaped}}} tag will be escaped.
+ *
+ * Pragmas apply only to the current template. Partials, even those included after the
+ * {{%UNESCAPED}} call, will need their own pragma declaration.
+ *
+ * This may be useful in non-HTML Mustache situations.
+ */
+ const PRAGMA_UNESCAPED = 'UNESCAPED';
+
+ /**
+ * Constants used for section and tag RegEx
+ */
+ const SECTION_TYPES = '\^#\/';
+ const TAG_TYPES = '#\^\/=!<>\\{&';
+
+ public $_otag = '{{';
+ public $_ctag = '}}';
+
+ protected $_tagRegEx;
+
+ protected $_template = '';
+ protected $_context = array();
+ protected $_partials = array();
+ protected $_pragmas = array();
+
+ protected $_pragmasImplemented = array(
+ self::PRAGMA_DOT_NOTATION,
+ self::PRAGMA_IMPLICIT_ITERATOR,
+ self::PRAGMA_UNESCAPED
+ );
+
+ protected $_localPragmas = array();
+
+ /**
+ * Mustache class constructor.
+ *
+ * This method accepts a $template string and a $view object. Optionally, pass an associative
+ * array of partials as well.
+ *
+ * @access public
+ * @param string $template (default: null)
+ * @param mixed $view (default: null)
+ * @param array $partials (default: null)
+ * @return void
+ */
+ public function __construct($template = null, $view = null, $partials = null) {
+ if ($template !== null) $this->_template = $template;
+ if ($partials !== null) $this->_partials = $partials;
+ if ($view !== null) $this->_context = array($view);
+ }
+
+ /**
+ * Mustache class clone method.
+ *
+ * A cloned Mustache instance should have pragmas, delimeters and root context
+ * reset to default values.
+ *
+ * @access public
+ * @return void
+ */
+ public function __clone() {
+ $this->_otag = '{{';
+ $this->_ctag = '}}';
+ $this->_localPragmas = array();
+
+ if ($keys = array_keys($this->_context)) {
+ $last = array_pop($keys);
+ if ($this->_context[$last] instanceof Mustache) {
+ $this->_context[$last] =& $this;
+ }
+ }
+ }
+
+ /**
+ * Render the given template and view object.
+ *
+ * Defaults to the template and view passed to the class constructor unless a new one is provided.
+ * Optionally, pass an associative array of partials as well.
+ *
+ * @access public
+ * @param string $template (default: null)
+ * @param mixed $view (default: null)
+ * @param array $partials (default: null)
+ * @return string Rendered Mustache template.
+ */
+ public function render($template = null, $view = null, $partials = null) {
+ if ($template === null) $template = $this->_template;
+ if ($partials !== null) $this->_partials = $partials;
+
+ if ($view) {
+ $this->_context = array($view);
+ } else if (empty($this->_context)) {
+ $this->_context = array($this);
+ }
+
+ $template = $this->_renderPragmas($template);
+ return $this->_renderTemplate($template, $this->_context);
+ }
+
+ /**
+ * Wrap the render() function for string conversion.
+ *
+ * @access public
+ * @return string
+ */
+ public function __toString() {
+ // PHP doesn't like exceptions in __toString.
+ // catch any exceptions and convert them to strings.
+ try {
+ $result = $this->render();
+ return $result;
+ } catch (Exception $e) {
+ return "Error rendering mustache: " . $e->getMessage();
+ }
+ }
+
+ /**
+ * Internal render function, used for recursive calls.
+ *
+ * @access protected
+ * @param string $template
+ * @return string Rendered Mustache template.
+ */
+ protected function _renderTemplate($template) {
+ $template = $this->_renderSections($template);
+ return $this->_renderTags($template);
+ }
+
+ /**
+ * Render boolean, enumerable and inverted sections.
+ *
+ * @access protected
+ * @param string $template
+ * @return string
+ */
+ protected function _renderSections($template) {
+ while ($section_data = $this->_findSection($template)) {
+ list($section, $offset, $type, $tag_name, $content) = $section_data;
+
+ $replace = '';
+ $val = $this->_getVariable($tag_name);
+ switch($type) {
+ // inverted section
+ case '^':
+ if (empty($val)) {
+ $replace .= $content;
+ }
+ break;
+
+ // regular section
+ case '#':
+ if ($this->_varIsIterable($val)) {
+ if ($this->_hasPragma(self::PRAGMA_IMPLICIT_ITERATOR)) {
+ if ($opt = $this->_getPragmaOptions(self::PRAGMA_IMPLICIT_ITERATOR)) {
+ $iterator = $opt['iterator'];
+ } else {
+ $iterator = '.';
+ }
+ } else {
+ $iterator = false;
+ }
+
+ foreach ($val as $local_context) {
+
+ if ($iterator) {
+ $iterator_context = array($iterator => $local_context);
+ $this->_pushContext($iterator_context);
+ } else {
+ $this->_pushContext($local_context);
+ }
+ $replace .= $this->_renderTemplate($content);
+ $this->_popContext();
+ }
+ } else if ($val) {
+ if (is_array($val) || is_object($val)) {
+ $this->_pushContext($val);
+ $replace .= $this->_renderTemplate($content);
+ $this->_popContext();
+ } else {
+ $replace .= $content;
+ }
+ }
+ break;
+ }
+
+ $template = substr_replace($template, $replace, $offset, strlen($section));
+ }
+
+ return $template;
+ }
+
+ /**
+ * Prepare a section RegEx string for the given opening/closing tags.
+ *
+ * @access protected
+ * @param string $otag
+ * @param string $ctag
+ * @return string
+ */
+ protected function _prepareSectionRegEx($otag, $ctag) {
+ return sprintf(
+ '/(?:(?<=\\n)[ \\t]*)?%s(?<type>[%s])(?<tag_name>.+?)%s\\n?/s',
+ preg_quote($otag, '/'),
+ self::SECTION_TYPES,
+ preg_quote($ctag, '/')
+ );
+ }
+
+ /**
+ * Extract a section from $template.
+ *
+ * This is a helper function to find sections needed by _renderSections.
+ *
+ * @access protected
+ * @param string $template
+ * @return array $section, $offset, $type, $tag_name and $content
+ */
+ protected function _findSection($template) {
+ $regEx = $this->_prepareSectionRegEx($this->_otag, $this->_ctag);
+
+ $section_start = null;
+ $section_type = null;
+ $content_start = null;
+
+ $search_offset = 0;
+
+ $section_stack = array();
+ $matches = array();
+ while (preg_match($regEx, $template, $matches, PREG_OFFSET_CAPTURE, $search_offset)) {
+
+ $match = $matches[0][0];
+ $offset = $matches[0][1];
+ $type = $matches['type'][0];
+ $tag_name = trim($matches['tag_name'][0]);
+
+ $search_offset = $offset + strlen($match);
+
+ switch ($type) {
+ case '^':
+ case '#':
+ if (empty($section_stack)) {
+ $section_start = $offset;
+ $section_type = $type;
+ $content_start = $search_offset;
+ }
+ array_push($section_stack, $tag_name);
+ break;
+ case '/':
+ if (empty($section_stack) || ($tag_name !== array_pop($section_stack))) {
+ if ($this->_throwsException(MustacheException::UNEXPECTED_CLOSE_SECTION)) {
+ throw new MustacheException('Unexpected close section: ' . $tag_name, MustacheException::UNEXPECTED_CLOSE_SECTION);
+ }
+ }
+
+ if (empty($section_stack)) {
+ $section = substr($template, $section_start, $search_offset - $section_start);
+ $content = substr($template, $content_start, $offset - $content_start);
+
+ return array($section, $section_start, $section_type, $tag_name, $content);
+ }
+ break;
+ }
+ }
+
+ if (!empty($section_stack)) {
+ if ($this->_throwsException(MustacheException::UNCLOSED_SECTION)) {
+ throw new MustacheException('Unclosed section: ' . $section_stack[0], MustacheException::UNCLOSED_SECTION);
+ }
+ }
+ }
+
+ /**
+ * Prepare a pragma RegEx for the given opening/closing tags.
+ *
+ * @access protected
+ * @param string $otag
+ * @param string $ctag
+ * @return string
+ */
+ protected function _preparePragmaRegEx($otag, $ctag) {
+ return sprintf(
+ '/%s%%\\s*(?<pragma_name>[\\w_-]+)(?<options_string>(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s',
+ preg_quote($otag, '/'),
+ preg_quote($ctag, '/')
+ );
+ }
+
+ /**
+ * Initialize pragmas and remove all pragma tags.
+ *
+ * @access protected
+ * @param string $template
+ * @return string
+ */
+ protected function _renderPragmas($template) {
+ $this->_localPragmas = $this->_pragmas;
+
+ // no pragmas
+ if (strpos($template, $this->_otag . '%') === false) {
+ return $template;
+ }
+
+ $regEx = $this->_preparePragmaRegEx($this->_otag, $this->_ctag);
+ return preg_replace_callback($regEx, array($this, '_renderPragma'), $template);
+ }
+
+ /**
+ * A preg_replace helper to remove {{%PRAGMA}} tags and enable requested pragma.
+ *
+ * @access protected
+ * @param mixed $matches
+ * @return void
+ * @throws MustacheException unknown pragma
+ */
+ protected function _renderPragma($matches) {
+ $pragma = $matches[0];
+ $pragma_name = $matches['pragma_name'];
+ $options_string = $matches['options_string'];
+
+ if (!in_array($pragma_name, $this->_pragmasImplemented)) {
+ throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA);
+ }
+
+ $options = array();
+ foreach (explode(' ', trim($options_string)) as $o) {
+ if ($p = trim($o)) {
+ $p = explode('=', $p);
+ $options[$p[0]] = $p[1];
+ }
+ }
+
+ if (empty($options)) {
+ $this->_localPragmas[$pragma_name] = true;
+ } else {
+ $this->_localPragmas[$pragma_name] = $options;
+ }
+
+ return '';
+ }
+
+ /**
+ * Check whether this Mustache has a specific pragma.
+ *
+ * @access protected
+ * @param string $pragma_name
+ * @return bool
+ */
+ protected function _hasPragma($pragma_name) {
+ if (array_key_exists($pragma_name, $this->_localPragmas) && $this->_localPragmas[$pragma_name]) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Return pragma options, if any.
+ *
+ * @access protected
+ * @param string $pragma_name
+ * @return mixed
+ * @throws MustacheException Unknown pragma
+ */
+ protected function _getPragmaOptions($pragma_name) {
+ if (!$this->_hasPragma($pragma_name)) {
+ throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA);
+ }
+
+ return (is_array($this->_localPragmas[$pragma_name])) ? $this->_localPragmas[$pragma_name] : array();
+ }
+
+ /**
+ * Check whether this Mustache instance throws a given exception.
+ *
+ * Expects exceptions to be MustacheException error codes (i.e. class constants).
+ *
+ * @access protected
+ * @param mixed $exception
+ * @return void
+ */
+ protected function _throwsException($exception) {
+ return (isset($this->_throwsExceptions[$exception]) && $this->_throwsExceptions[$exception]);
+ }
+
+ /**
+ * Prepare a tag RegEx for the given opening/closing tags.
+ *
+ * @access protected
+ * @param string $otag
+ * @param string $ctag
+ * @return string
+ */
+ protected function _prepareTagRegEx($otag, $ctag) {
+ return sprintf(
+ '/(?<whitespace>(?<=\\n)[ \\t]*)?%s(?<type>[%s]?)(?<tag_name>.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s',
+ preg_quote($otag, '/'),
+ self::TAG_TYPES,
+ preg_quote($ctag, '/')
+ );
+ }
+
+ /**
+ * Loop through and render individual Mustache tags.
+ *
+ * @access protected
+ * @param string $template
+ * @return void
+ */
+ protected function _renderTags($template) {
+ if (strpos($template, $this->_otag) === false) {
+ return $template;
+ }
+
+ $otag_orig = $this->_otag;
+ $ctag_orig = $this->_ctag;
+
+ $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag);
+
+ $html = '';
+ $matches = array();
+ while (preg_match($this->_tagRegEx, $template, $matches, PREG_OFFSET_CAPTURE)) {
+ $tag = $matches[0][0];
+ $offset = $matches[0][1];
+ $modifier = $matches['type'][0];
+ $tag_name = trim($matches['tag_name'][0]);
+
+ if (isset($matches['whitespace']) && $matches['whitespace'][1] > -1) {
+ $whitespace = $matches['whitespace'][0];
+ } else {
+ $whitespace = null;
+ }
+
+ $html .= substr($template, 0, $offset);
+
+ $next_offset = $offset + strlen($tag);
+ if ((substr($html, -1) == "\n") && (substr($template, $next_offset, 1) == "\n")) {
+ $next_offset++;
+ }
+ $template = substr($template, $next_offset);
+
+ $html .= $this->_renderTag($modifier, $tag_name, $whitespace);
+ }
+
+ $this->_otag = $otag_orig;
+ $this->_ctag = $ctag_orig;
+
+ return $html . $template;
+ }
+
+ /**
+ * Render the named tag, given the specified modifier.
+ *
+ * Accepted modifiers are `=` (change delimiter), `!` (comment), `>` (partial)
+ * `{` or `&` (don't escape output), or none (render escaped output).
+ *
+ * @access protected
+ * @param string $modifier
+ * @param string $tag_name
+ * @throws MustacheException Unmatched section tag encountered.
+ * @return string
+ */
+ protected function _renderTag($modifier, $tag_name, $whitespace) {
+ switch ($modifier) {
+ case '=':
+ return $this->_changeDelimiter($tag_name);
+ break;
+ case '!':
+ return $this->_renderComment($tag_name);
+ break;
+ case '>':
+ case '<':
+ return $this->_renderPartial($tag_name, $whitespace);
+ break;
+ case '{':
+ // strip the trailing } ...
+ if ($tag_name[(strlen($tag_name) - 1)] == '}') {
+ $tag_name = substr($tag_name, 0, -1);
+ }
+ case '&':
+ if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) {
+ return $this->_renderEscaped($tag_name);
+ } else {
+ return $this->_renderUnescaped($tag_name);
+ }
+ break;
+ case '#':
+ case '^':
+ case '/':
+ // remove any leftovers from _renderSections
+ return '';
+ break;
+ }
+
+ if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) {
+ return $this->_renderUnescaped($modifier . $tag_name);
+ } else {
+ return $this->_renderEscaped($modifier . $tag_name);
+ }
+ }
+
+ /**
+ * Escape and return the requested tag.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @return string
+ */
+ protected function _renderEscaped($tag_name) {
+ return htmlentities($this->_getVariable($tag_name), ENT_COMPAT, $this->_charset);
+ }
+
+ /**
+ * Render a comment (i.e. return an empty string).
+ *
+ * @access protected
+ * @param string $tag_name
+ * @return string
+ */
+ protected function _renderComment($tag_name) {
+ return '';
+ }
+
+ /**
+ * Return the requested tag unescaped.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @return string
+ */
+ protected function _renderUnescaped($tag_name) {
+ return $this->_getVariable($tag_name);
+ }
+
+ /**
+ * Render the requested partial.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @return string
+ */
+ protected function _renderPartial($tag_name, $whitespace = '') {
+ $view = clone($this);
+
+ return $whitespace . preg_replace('/\n(?!$)/s', "\n" . $whitespace, $view->render($this->_getPartial($tag_name)));
+ }
+
+ /**
+ * Change the Mustache tag delimiter. This method also replaces this object's current
+ * tag RegEx with one using the new delimiters.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @return string
+ */
+ protected function _changeDelimiter($tag_name) {
+ list($otag, $ctag) = explode(' ', $tag_name);
+ $this->_otag = $otag;
+ $this->_ctag = $ctag;
+
+ $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag);
+
+ return '';
+ }
+
+ /**
+ * Push a local context onto the stack.
+ *
+ * @access protected
+ * @param array &$local_context
+ * @return void
+ */
+ protected function _pushContext(&$local_context) {
+ $new = array();
+ $new[] =& $local_context;
+ foreach (array_keys($this->_context) as $key) {
+ $new[] =& $this->_context[$key];
+ }
+ $this->_context = $new;
+ }
+
+ /**
+ * Remove the latest context from the stack.
+ *
+ * @access protected
+ * @return void
+ */
+ protected function _popContext() {
+ $new = array();
+
+ $keys = array_keys($this->_context);
+ array_shift($keys);
+ foreach ($keys as $key) {
+ $new[] =& $this->_context[$key];
+ }
+ $this->_context = $new;
+ }
+
+ /**
+ * Get a variable from the context array.
+ *
+ * If the view is an array, returns the value with array key $tag_name.
+ * If the view is an object, this will check for a public member variable
+ * named $tag_name. If none is available, this method will execute and return
+ * any class method named $tag_name. Failing all of the above, this method will
+ * return an empty string.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @throws MustacheException Unknown variable name.
+ * @return string
+ */
+ protected function _getVariable($tag_name) {
+ if ($tag_name != '.' && strpos($tag_name, '.') !== false && $this->_hasPragma(self::PRAGMA_DOT_NOTATION)) {
+ $chunks = explode('.', $tag_name);
+ $first = array_shift($chunks);
+
+ $ret = $this->_findVariableInContext($first, $this->_context);
+ while ($next = array_shift($chunks)) {
+ // Slice off a chunk of context for dot notation traversal.
+ $c = array($ret);
+ $ret = $this->_findVariableInContext($next, $c);
+ }
+ return $ret;
+ } else {
+ return $this->_findVariableInContext($tag_name, $this->_context);
+ }
+ }
+
+ /**
+ * Get a variable from the context array. Internal helper used by getVariable() to abstract
+ * variable traversal for dot notation.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @param array $context
+ * @throws MustacheException Unknown variable name.
+ * @return string
+ */
+ protected function _findVariableInContext($tag_name, $context) {
+ foreach ($context as $view) {
+ if (is_object($view)) {
+ if (method_exists($view, $tag_name)) {
+ return $view->$tag_name();
+ } else if (isset($view->$tag_name)) {
+ return $view->$tag_name;
+ }
+ } else if (array_key_exists($tag_name, $view)) {
+ return $view[$tag_name];
+ }
+ }
+
+ if ($this->_throwsException(MustacheException::UNKNOWN_VARIABLE)) {
+ throw new MustacheException("Unknown variable: " . $tag_name, MustacheException::UNKNOWN_VARIABLE);
+ } else {
+ return '';
+ }
+ }
+
+ /**
+ * Retrieve the partial corresponding to the requested tag name.
+ *
+ * Silently fails (i.e. returns '') when the requested partial is not found.
+ *
+ * @access protected
+ * @param string $tag_name
+ * @throws MustacheException Unknown partial name.
+ * @return string
+ */
+ protected function _getPartial($tag_name) {
+ if (is_array($this->_partials) && isset($this->_partials[$tag_name])) {
+ return $this->_partials[$tag_name];
+ }
+
+ if ($this->_throwsException(MustacheException::UNKNOWN_PARTIAL)) {
+ throw new MustacheException('Unknown partial: ' . $tag_name, MustacheException::UNKNOWN_PARTIAL);
+ } else {
+ return '';
+ }
+ }
+
+ /**
+ * Check whether the given $var should be iterated (i.e. in a section context).
+ *
+ * @access protected
+ * @param mixed $var
+ * @return bool
+ */
+ protected function _varIsIterable($var) {
+ return $var instanceof Traversable || (is_array($var) && !array_diff_key($var, array_keys(array_keys($var))));
+ }
+}
+
+
+/**
+ * MustacheException class.
+ *
+ * @extends Exception
+ */
+class MustacheException extends Exception {
+
+ // An UNKNOWN_VARIABLE exception is thrown when a {{variable}} is not found
+ // in the current context.
+ const UNKNOWN_VARIABLE = 0;
+
+ // An UNCLOSED_SECTION exception is thrown when a {{#section}} is not closed.
+ const UNCLOSED_SECTION = 1;
+
+ // An UNEXPECTED_CLOSE_SECTION exception is thrown when {{/section}} appears
+ // without a corresponding {{#section}} or {{^section}}.
+ const UNEXPECTED_CLOSE_SECTION = 2;
+
+ // An UNKNOWN_PARTIAL exception is thrown whenever a {{>partial}} tag appears
+ // with no associated partial.
+ const UNKNOWN_PARTIAL = 3;
+
+ // An UNKNOWN_PRAGMA exception is thrown whenever a {{%PRAGMA}} tag appears
+ // which can't be handled by this Mustache instance.
+ const UNKNOWN_PRAGMA = 4;
+
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/README.markdown b/modules/kostache/vendor/mustache/README.markdown
new file mode 100644
index 0000000..3662d3c
--- /dev/null
+++ b/modules/kostache/vendor/mustache/README.markdown
@@ -0,0 +1,92 @@
+Mustache.php
+============
+
+A [Mustache](http://defunkt.github.com/mustache/) implementation in PHP.
+
+
+Usage
+-----
+
+A quick example:
+
+ <?php
+ include('Mustache.php');
+ $m = new Mustache;
+ echo $m->render('Hello {{planet}}', array('planet' => 'World!'));
+ // "Hello World!"
+ ?>
+
+
+And a more in-depth example--this is the canonical Mustache template:
+
+ Hello {{name}}
+ You have just won ${{value}}!
+ {{#in_ca}}
+ Well, ${{taxed_value}}, after taxes.
+ {{/in_ca}}
+
+
+Along with the associated Mustache class:
+
+ <?php
+ class Chris extends Mustache {
+ public $name = "Chris";
+ public $value = 10000;
+
+ public function taxed_value() {
+ return $this->value - ($this->value * 0.4);
+ }
+
+ public $in_ca = true;
+ }
+
+
+Render it like so:
+
+ <?php
+ $c = new Chris;
+ echo $chris->render($template);
+ ?>
+
+
+Here's the same thing, a different way:
+
+Create a view object--which could also be an associative array, but those don't do functions quite as well:
+
+ <?php
+ class Chris {
+ public $name = "Chris";
+ public $value = 10000;
+
+ public function taxed_value() {
+ return $this->value - ($this->value * 0.4);
+ }
+
+ public $in_ca = true;
+ }
+ ?>
+
+
+And render it:
+
+ <?php
+ $chris = new Chris;
+ $m = new Mustache;
+ echo $m->render($template, $chris);
+ ?>
+
+
+
+
+Known Issues
+------------
+
+ * Things get weird when you change delimiters inside a section -- `delimiters` example currently fails with an
+ "unclosed section" exception.
+
+
+See Also
+--------
+
+ * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md).
+ * [mustache(1)](http://defunkt.github.com/mustache/mustache.1.html) and [mustache(5)](http://defunkt.github.com/mustache/mustache.5.html) man pages.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/child_context/ChildContext.php b/modules/kostache/vendor/mustache/examples/child_context/ChildContext.php
new file mode 100644
index 0000000..b652356
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/child_context/ChildContext.php
@@ -0,0 +1,13 @@
+<?php
+
+class ChildContext extends Mustache {
+ public $parent = array(
+ 'child' => 'child works',
+ );
+
+ public $grandparent = array(
+ 'parent' => array(
+ 'child' => 'grandchild works',
+ ),
+ );
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/child_context/child_context.mustache b/modules/kostache/vendor/mustache/examples/child_context/child_context.mustache
new file mode 100644
index 0000000..e1f2ebc
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/child_context/child_context.mustache
@@ -0,0 +1,2 @@
+<h1>{{#parent}}{{child}}{{/parent}}</h1>
+<h2>{{#grandparent}}{{#parent}}{{child}}{{/parent}}{{/grandparent}}</h2>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/child_context/child_context.txt b/modules/kostache/vendor/mustache/examples/child_context/child_context.txt
new file mode 100644
index 0000000..cfb76bf
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/child_context/child_context.txt
@@ -0,0 +1,2 @@
+<h1>child works</h1>
+<h2>grandchild works</h2>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/comments/Comments.php b/modules/kostache/vendor/mustache/examples/comments/Comments.php
new file mode 100644
index 0000000..7f028ba
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/comments/Comments.php
@@ -0,0 +1,7 @@
+<?php
+
+class Comments extends Mustache {
+ public function title() {
+ return 'A Comedy of Errors';
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/comments/comments.mustache b/modules/kostache/vendor/mustache/examples/comments/comments.mustache
new file mode 100644
index 0000000..846e449
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/comments/comments.mustache
@@ -0,0 +1 @@
+<h1>{{title}}{{! just something interesting... #or ^not... }}</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/comments/comments.txt b/modules/kostache/vendor/mustache/examples/comments/comments.txt
new file mode 100644
index 0000000..9f40e77
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/comments/comments.txt
@@ -0,0 +1 @@
+<h1>A Comedy of Errors</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/complex/complex.mustache b/modules/kostache/vendor/mustache/examples/complex/complex.mustache
new file mode 100644
index 0000000..807c201
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/complex/complex.mustache
@@ -0,0 +1,16 @@
+<h1>{{header}}</h1>
+{{#notEmpty}}
+<ul>
+{{#item}}
+{{#current}}
+ <li><strong>{{name}}</strong></li>
+{{/current}}
+{{^current}}
+ <li><a href="{{url}}">{{name}}</a></li>
+{{/current}}
+{{/item}}
+</ul>
+{{/notEmpty}}
+{{#isEmpty}}
+<p>The list is empty.</p>
+{{/isEmpty}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/complex/complex.php b/modules/kostache/vendor/mustache/examples/complex/complex.php
new file mode 100644
index 0000000..32b0917
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/complex/complex.php
@@ -0,0 +1,19 @@
+<?php
+
+class Complex extends Mustache {
+ public $header = 'Colors';
+
+ public $item = array(
+ array('name' => 'red', 'current' => true, 'url' => '#Red'),
+ array('name' => 'green', 'current' => false, 'url' => '#Green'),
+ array('name' => 'blue', 'current' => false, 'url' => '#Blue'),
+ );
+
+ public function notEmpty() {
+ return !($this->isEmpty());
+ }
+
+ public function isEmpty() {
+ return count($this->item) === 0;
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/complex/complex.txt b/modules/kostache/vendor/mustache/examples/complex/complex.txt
new file mode 100644
index 0000000..facee6d
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/complex/complex.txt
@@ -0,0 +1,6 @@
+<h1>Colors</h1>
+<ul>
+ <li><strong>red</strong></li>
+ <li><a href="#Green">green</a></li>
+ <li><a href="#Blue">blue</a></li>
+</ul>
diff --git a/modules/kostache/vendor/mustache/examples/delimiters/Delimiters.php b/modules/kostache/vendor/mustache/examples/delimiters/Delimiters.php
new file mode 100644
index 0000000..be372fa
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/delimiters/Delimiters.php
@@ -0,0 +1,14 @@
+<?php
+
+class Delimiters extends Mustache {
+ public $start = "It worked the first time.";
+
+ public function middle() {
+ return array(
+ array('item' => "And it worked the second time."),
+ array('item' => "As well as the third."),
+ );
+ }
+
+ public $final = "Then, surprisingly, it worked the final time.";
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/delimiters/delimiters.mustache b/modules/kostache/vendor/mustache/examples/delimiters/delimiters.mustache
new file mode 100644
index 0000000..e9b0332
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/delimiters/delimiters.mustache
@@ -0,0 +1,8 @@
+{{=<% %>=}}
+* <% start %>
+<%=| |=%>
+|# middle |
+* | item |
+|/ middle |
+|={{ }}=|
+* {{ final }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/delimiters/delimiters.txt b/modules/kostache/vendor/mustache/examples/delimiters/delimiters.txt
new file mode 100644
index 0000000..e6b2d7a
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/delimiters/delimiters.txt
@@ -0,0 +1,4 @@
+* It worked the first time.
+* And it worked the second time.
+* As well as the third.
+* Then, surprisingly, it worked the final time.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/dot_notation/DotNotation.php b/modules/kostache/vendor/mustache/examples/dot_notation/DotNotation.php
new file mode 100644
index 0000000..0274e19
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/dot_notation/DotNotation.php
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * DotNotation example class. Uses DOT_NOTATION pragma.
+ *
+ * @extends Mustache
+ */
+class DotNotation extends Mustache {
+ public $person = array(
+ 'name' => array('first' => 'Chris', 'last' => 'Firescythe'),
+ 'age' => 24,
+ 'hometown' => array(
+ 'city' => 'Cincinnati',
+ 'state' => 'OH',
+ )
+ );
+
+ public $normal = 'Normal';
+}
diff --git a/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.mustache b/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.mustache
new file mode 100644
index 0000000..4831386
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.mustache
@@ -0,0 +1,5 @@
+{{%DOT-NOTATION}}
+* {{person.name.first}} {{person.name.last}}
+* {{person.age}}
+* {{person.hometown.city}}, {{person.hometown.state}}
+* {{normal}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.txt b/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.txt
new file mode 100644
index 0000000..f8cf1fa
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/dot_notation/dot_notation.txt
@@ -0,0 +1,4 @@
+* Chris Firescythe
+* 24
+* Cincinnati, OH
+* Normal
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/double_section/DoubleSection.php b/modules/kostache/vendor/mustache/examples/double_section/DoubleSection.php
new file mode 100644
index 0000000..f9d3dbb
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/double_section/DoubleSection.php
@@ -0,0 +1,9 @@
+<?php
+
+class DoubleSection extends Mustache {
+ public function t() {
+ return true;
+ }
+
+ public $two = "second";
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/double_section/double_section.mustache b/modules/kostache/vendor/mustache/examples/double_section/double_section.mustache
new file mode 100644
index 0000000..c831645
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/double_section/double_section.mustache
@@ -0,0 +1,7 @@
+{{#t}}
+* first
+{{/t}}
+* {{two}}
+{{#t}}
+* third
+{{/t}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/double_section/double_section.txt b/modules/kostache/vendor/mustache/examples/double_section/double_section.txt
new file mode 100644
index 0000000..5433688
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/double_section/double_section.txt
@@ -0,0 +1,3 @@
+* first
+* second
+* third
diff --git a/modules/kostache/vendor/mustache/examples/escaped/Escaped.php b/modules/kostache/vendor/mustache/examples/escaped/Escaped.php
new file mode 100644
index 0000000..2852196
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/escaped/Escaped.php
@@ -0,0 +1,5 @@
+<?php
+
+class Escaped extends Mustache {
+ public $title = '"Bear" > "Shark"';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/escaped/escaped.mustache b/modules/kostache/vendor/mustache/examples/escaped/escaped.mustache
new file mode 100644
index 0000000..8be4ccb
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/escaped/escaped.mustache
@@ -0,0 +1 @@
+<h1>{{title}}</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/escaped/escaped.txt b/modules/kostache/vendor/mustache/examples/escaped/escaped.txt
new file mode 100644
index 0000000..6ba3657
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/escaped/escaped.txt
@@ -0,0 +1 @@
+<h1>"Bear" > "Shark"</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/grand_parent_context/GrandParentContext.php b/modules/kostache/vendor/mustache/examples/grand_parent_context/GrandParentContext.php
new file mode 100644
index 0000000..5a59ed9
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/grand_parent_context/GrandParentContext.php
@@ -0,0 +1,24 @@
+<?php
+
+class GrandParentContext extends Mustache {
+ public $grand_parent_id = 'grand_parent1';
+ public $parent_contexts = array();
+
+ public function __construct() {
+ parent::__construct();
+
+ $this->parent_contexts[] = array('parent_id' => 'parent1', 'child_contexts' => array(
+ array('child_id' => 'parent1-child1'),
+ array('child_id' => 'parent1-child2')
+ ));
+
+ $parent2 = new stdClass();
+ $parent2->parent_id = 'parent2';
+ $parent2->child_contexts = array(
+ array('child_id' => 'parent2-child1'),
+ array('child_id' => 'parent2-child2')
+ );
+
+ $this->parent_contexts[] = $parent2;
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.mustache b/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.mustache
new file mode 100644
index 0000000..6d03ddf
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.mustache
@@ -0,0 +1,7 @@
+{{grand_parent_id}}
+{{#parent_contexts}}
+ {{parent_id}} ({{grand_parent_id}})
+ {{#child_contexts}}
+ {{child_id}} ({{parent_id}} << {{grand_parent_id}})
+ {{/child_contexts}}
+{{/parent_contexts}}
diff --git a/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.txt b/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.txt
new file mode 100644
index 0000000..2687f84
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/grand_parent_context/grand_parent_context.txt
@@ -0,0 +1,7 @@
+grand_parent1
+ parent1 (grand_parent1)
+ parent1-child1 (parent1 << grand_parent1)
+ parent1-child2 (parent1 << grand_parent1)
+ parent2 (grand_parent1)
+ parent2-child1 (parent2 << grand_parent1)
+ parent2-child2 (parent2 << grand_parent1)
diff --git a/modules/kostache/vendor/mustache/examples/implicit_iterator/ImplicitIterator.php b/modules/kostache/vendor/mustache/examples/implicit_iterator/ImplicitIterator.php
new file mode 100644
index 0000000..c01fef0
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/implicit_iterator/ImplicitIterator.php
@@ -0,0 +1,5 @@
+<?php
+
+class ImplicitIterator extends Mustache {
+ protected $data = array('Donkey Kong', 'Luigi', 'Mario', 'Peach', 'Yoshi');
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.mustache b/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.mustache
new file mode 100644
index 0000000..94b82e1
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.mustache
@@ -0,0 +1,4 @@
+{{%IMPLICIT-ITERATOR}}
+{{#data}}
+* {{.}}
+{{/data}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.txt b/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.txt
new file mode 100644
index 0000000..bd7e945
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/implicit_iterator/implicit_iterator.txt
@@ -0,0 +1,5 @@
+* Donkey Kong
+* Luigi
+* Mario
+* Peach
+* Yoshi
diff --git a/modules/kostache/vendor/mustache/examples/inverted_double_section/InvertedDoubleSection.php b/modules/kostache/vendor/mustache/examples/inverted_double_section/InvertedDoubleSection.php
new file mode 100644
index 0000000..3dc2231
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_double_section/InvertedDoubleSection.php
@@ -0,0 +1,6 @@
+<?php
+
+class InvertedDoubleSection extends Mustache {
+ public $t = false;
+ public $two = 'second';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.mustache b/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.mustache
new file mode 100644
index 0000000..acc3ae0
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.mustache
@@ -0,0 +1,7 @@
+{{^t}}
+* first
+{{/t}}
+* {{two}}
+{{^t}}
+* third
+{{/t}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.txt b/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.txt
new file mode 100644
index 0000000..5433688
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_double_section/inverted_double_section.txt
@@ -0,0 +1,3 @@
+* first
+* second
+* third
diff --git a/modules/kostache/vendor/mustache/examples/inverted_section/InvertedSection.php b/modules/kostache/vendor/mustache/examples/inverted_section/InvertedSection.php
new file mode 100644
index 0000000..18eeb86
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_section/InvertedSection.php
@@ -0,0 +1,5 @@
+<?php
+
+class InvertedSection extends Mustache {
+ public $repo = array();
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.mustache b/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.mustache
new file mode 100644
index 0000000..bee60ff
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.mustache
@@ -0,0 +1,2 @@
+{{#repo}}<b>{{name}}</b>{{/repo}}
+{{^repo}}No repos :({{/repo}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.txt b/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.txt
new file mode 100644
index 0000000..2b9ed3f
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/inverted_section/inverted_section.txt
@@ -0,0 +1 @@
+No repos :(
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/partials/Partials.php b/modules/kostache/vendor/mustache/examples/partials/Partials.php
new file mode 100644
index 0000000..093257b
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials/Partials.php
@@ -0,0 +1,13 @@
+<?php
+
+class Partials extends Mustache {
+ public $name = 'ilmich';
+ public $data = array(
+ array('name' => 'federica', 'age' => 27, 'gender' => 'female'),
+ array('name' => 'marco', 'age' => 32, 'gender' => 'male'),
+ );
+
+ protected $_partials = array(
+ 'children' => "{{#data}}{{name}} - {{age}} - {{gender}}\n{{/data}}",
+ );
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/partials/partials.mustache b/modules/kostache/vendor/mustache/examples/partials/partials.mustache
new file mode 100644
index 0000000..037e1b3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials/partials.mustache
@@ -0,0 +1,2 @@
+Children of {{name}}:
+{{>children}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/partials/partials.txt b/modules/kostache/vendor/mustache/examples/partials/partials.txt
new file mode 100644
index 0000000..d967e15
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials/partials.txt
@@ -0,0 +1,3 @@
+Children of ilmich:
+federica - 27 - female
+marco - 32 - male
diff --git a/modules/kostache/vendor/mustache/examples/partials_with_view_class/PartialsWithViewClass.php b/modules/kostache/vendor/mustache/examples/partials_with_view_class/PartialsWithViewClass.php
new file mode 100644
index 0000000..56e0d86
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials_with_view_class/PartialsWithViewClass.php
@@ -0,0 +1,19 @@
+<?php
+
+class PartialsWithViewClass extends Mustache {
+ public function __construct($template = null, $view = null, $partials = null) {
+ // Use an object of an arbitrary class as a View for this Mustache instance:
+ $view = new StdClass();
+ $view->name = 'ilmich';
+ $view->data = array(
+ array('name' => 'federica', 'age' => 27, 'gender' => 'female'),
+ array('name' => 'marco', 'age' => 32, 'gender' => 'male'),
+ );
+
+ $partials = array(
+ 'children' => "{{#data}}{{name}} - {{age}} - {{gender}}\n{{/data}}",
+ );
+
+ parent::__construct($template, $view, $partials);
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.mustache b/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.mustache
new file mode 100644
index 0000000..037e1b3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.mustache
@@ -0,0 +1,2 @@
+Children of {{name}}:
+{{>children}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.txt b/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.txt
new file mode 100644
index 0000000..d967e15
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/partials_with_view_class/partials_with_view_class.txt
@@ -0,0 +1,3 @@
+Children of ilmich:
+federica - 27 - female
+marco - 32 - male
diff --git a/modules/kostache/vendor/mustache/examples/pragma_unescaped/PragmaUnescaped.php b/modules/kostache/vendor/mustache/examples/pragma_unescaped/PragmaUnescaped.php
new file mode 100644
index 0000000..b4e0e21
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragma_unescaped/PragmaUnescaped.php
@@ -0,0 +1,5 @@
+<?php
+
+class PragmaUnescaped extends Mustache {
+ public $vs = 'Bear > Shark';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.mustache b/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.mustache
new file mode 100644
index 0000000..76095d7
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.mustache
@@ -0,0 +1,3 @@
+{{%UNESCAPED}}
+{{vs}}
+{{{vs}}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.txt b/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.txt
new file mode 100644
index 0000000..2860f61
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragma_unescaped/pragma_unescaped.txt
@@ -0,0 +1,2 @@
+Bear > Shark
+Bear > Shark
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/pragmas_in_partials/PragmasInPartials.php b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/PragmasInPartials.php
new file mode 100644
index 0000000..7458289
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/PragmasInPartials.php
@@ -0,0 +1,8 @@
+<?php
+
+class PragmasInPartials extends Mustache {
+ public $say = '< RAWR!! >';
+ protected $_partials = array(
+ 'dinosaur' => '{{say}}'
+ );
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.mustache b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.mustache
new file mode 100644
index 0000000..abd6ef4
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.mustache
@@ -0,0 +1,3 @@
+{{%UNESCAPED}}
+{{say}}
+{{>dinosaur}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.txt b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.txt
new file mode 100644
index 0000000..c8e77e3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/pragmas_in_partials/pragmas_in_partials.txt
@@ -0,0 +1,2 @@
+< RAWR!! >
+< RAWR!! >
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/recursive_partials/RecursivePartials.php b/modules/kostache/vendor/mustache/examples/recursive_partials/RecursivePartials.php
new file mode 100644
index 0000000..04e8af8
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/recursive_partials/RecursivePartials.php
@@ -0,0 +1,16 @@
+<?php
+
+class RecursivePartials extends Mustache {
+ protected $_partials = array(
+ 'child' => " > {{ name }}{{#child}}{{>child}}{{/child}}",
+ );
+
+ public $name = 'George';
+ public $child = array(
+ 'name' => 'Dan',
+ 'child' => array(
+ 'name' => 'Justin',
+ 'child' => false,
+ )
+ );
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.mustache b/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.mustache
new file mode 100644
index 0000000..0bc5d03
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.mustache
@@ -0,0 +1 @@
+{{name}}{{#child}}{{>child}}{{/child}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.txt b/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.txt
new file mode 100644
index 0000000..681cdef
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/recursive_partials/recursive_partials.txt
@@ -0,0 +1 @@
+George > Dan > Justin
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_iterator_objects/SectionIteratorObjects.php b/modules/kostache/vendor/mustache/examples/section_iterator_objects/SectionIteratorObjects.php
new file mode 100644
index 0000000..7b65597
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_iterator_objects/SectionIteratorObjects.php
@@ -0,0 +1,16 @@
+<?php
+
+class SectionIteratorObjects extends Mustache {
+ public $start = "It worked the first time.";
+
+ protected $_data = array(
+ array('item' => 'And it worked the second time.'),
+ array('item' => 'As well as the third.'),
+ );
+
+ public function middle() {
+ return new ArrayIterator($this->_data);
+ }
+
+ public $final = "Then, surprisingly, it worked the final time.";
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.mustache b/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.mustache
new file mode 100644
index 0000000..44dfce4
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.mustache
@@ -0,0 +1,5 @@
+* {{ start }}
+{{# middle }}
+* {{ item }}
+{{/ middle }}
+* {{ final }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.txt b/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.txt
new file mode 100644
index 0000000..e6b2d7a
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_iterator_objects/section_iterator_objects.txt
@@ -0,0 +1,4 @@
+* It worked the first time.
+* And it worked the second time.
+* As well as the third.
+* Then, surprisingly, it worked the final time.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_magic_objects/SectionMagicObjects.php b/modules/kostache/vendor/mustache/examples/section_magic_objects/SectionMagicObjects.php
new file mode 100644
index 0000000..ebb0031
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_magic_objects/SectionMagicObjects.php
@@ -0,0 +1,26 @@
+<?php
+
+class SectionMagicObjects extends Mustache {
+ public $start = "It worked the first time.";
+
+ public function middle() {
+ return new MagicObject();
+ }
+
+ public $final = "Then, surprisingly, it worked the final time.";
+}
+
+class MagicObject {
+ protected $_data = array(
+ 'foo' => 'And it worked the second time.',
+ 'bar' => 'As well as the third.'
+ );
+
+ public function __get($key) {
+ return isset($this->_data[$key]) ? $this->_data[$key] : NULL;
+ }
+
+ public function __isset($key) {
+ return isset($this->_data[$key]);
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.mustache b/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.mustache
new file mode 100644
index 0000000..9119608
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.mustache
@@ -0,0 +1,6 @@
+* {{ start }}
+{{# middle }}
+* {{ foo }}
+* {{ bar }}
+{{/ middle }}
+* {{ final }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.txt b/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.txt
new file mode 100644
index 0000000..e6b2d7a
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_magic_objects/section_magic_objects.txt
@@ -0,0 +1,4 @@
+* It worked the first time.
+* And it worked the second time.
+* As well as the third.
+* Then, surprisingly, it worked the final time.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_objects/SectionObjects.php b/modules/kostache/vendor/mustache/examples/section_objects/SectionObjects.php
new file mode 100644
index 0000000..41b7d84
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_objects/SectionObjects.php
@@ -0,0 +1,16 @@
+<?php
+
+class SectionObjects extends Mustache {
+ public $start = "It worked the first time.";
+
+ public function middle() {
+ return new SectionObject;
+ }
+
+ public $final = "Then, surprisingly, it worked the final time.";
+}
+
+class SectionObject {
+ public $foo = 'And it worked the second time.';
+ public $bar = 'As well as the third.';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_objects/section_objects.mustache b/modules/kostache/vendor/mustache/examples/section_objects/section_objects.mustache
new file mode 100644
index 0000000..9119608
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_objects/section_objects.mustache
@@ -0,0 +1,6 @@
+* {{ start }}
+{{# middle }}
+* {{ foo }}
+* {{ bar }}
+{{/ middle }}
+* {{ final }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/section_objects/section_objects.txt b/modules/kostache/vendor/mustache/examples/section_objects/section_objects.txt
new file mode 100644
index 0000000..e6b2d7a
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/section_objects/section_objects.txt
@@ -0,0 +1,4 @@
+* It worked the first time.
+* And it worked the second time.
+* As well as the third.
+* Then, surprisingly, it worked the final time.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections/Sections.php b/modules/kostache/vendor/mustache/examples/sections/Sections.php
new file mode 100644
index 0000000..fb78354
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections/Sections.php
@@ -0,0 +1,14 @@
+<?php
+
+class Sections extends Mustache {
+ public $start = "It worked the first time.";
+
+ public function middle() {
+ return array(
+ array('item' => "And it worked the second time."),
+ array('item' => "As well as the third."),
+ );
+ }
+
+ public $final = "Then, surprisingly, it worked the final time.";
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections/sections.mustache b/modules/kostache/vendor/mustache/examples/sections/sections.mustache
new file mode 100644
index 0000000..44dfce4
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections/sections.mustache
@@ -0,0 +1,5 @@
+* {{ start }}
+{{# middle }}
+* {{ item }}
+{{/ middle }}
+* {{ final }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections/sections.txt b/modules/kostache/vendor/mustache/examples/sections/sections.txt
new file mode 100644
index 0000000..e6b2d7a
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections/sections.txt
@@ -0,0 +1,4 @@
+* It worked the first time.
+* And it worked the second time.
+* As well as the third.
+* Then, surprisingly, it worked the final time.
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections_nested/SectionsNested.php b/modules/kostache/vendor/mustache/examples/sections_nested/SectionsNested.php
new file mode 100644
index 0000000..ec01b75
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections_nested/SectionsNested.php
@@ -0,0 +1,33 @@
+<?php
+
+class SectionsNested extends Mustache {
+ public $name = 'Little Mac';
+
+ public function enemies() {
+ return array(
+ array(
+ 'name' => 'Von Kaiser',
+ 'enemies' => array(
+ array('name' => 'Super Macho Man'),
+ array('name' => 'Piston Honda'),
+ array('name' => 'Mr. Sandman'),
+ )
+ ),
+ array(
+ 'name' => 'Mike Tyson',
+ 'enemies' => array(
+ array('name' => 'Soda Popinski'),
+ array('name' => 'King Hippo'),
+ array('name' => 'Great Tiger'),
+ array('name' => 'Glass Joe'),
+ )
+ ),
+ array(
+ 'name' => 'Don Flamenco',
+ 'enemies' => array(
+ array('name' => 'Bald Bull'),
+ )
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.mustache b/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.mustache
new file mode 100644
index 0000000..9f8007d
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.mustache
@@ -0,0 +1,7 @@
+Enemies of {{ name }}:
+{{# enemies }}
+{{ name }} ... who also has enemies:
+{{# enemies }}
+--> {{ name }}
+{{/ enemies }}
+{{/ enemies }}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.txt b/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.txt
new file mode 100644
index 0000000..72c44d0
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/sections_nested/sections_nested.txt
@@ -0,0 +1,12 @@
+Enemies of Little Mac:
+Von Kaiser ... who also has enemies:
+--> Super Macho Man
+--> Piston Honda
+--> Mr. Sandman
+Mike Tyson ... who also has enemies:
+--> Soda Popinski
+--> King Hippo
+--> Great Tiger
+--> Glass Joe
+Don Flamenco ... who also has enemies:
+--> Bald Bull
diff --git a/modules/kostache/vendor/mustache/examples/simple/Simple.php b/modules/kostache/vendor/mustache/examples/simple/Simple.php
new file mode 100644
index 0000000..6d07dac
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/simple/Simple.php
@@ -0,0 +1,12 @@
+<?php
+
+class Simple extends Mustache {
+ public $name = "Chris";
+ public $value = 10000;
+
+ public function taxed_value() {
+ return $this->value - ($this->value * 0.4);
+ }
+
+ public $in_ca = true;
+};
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/simple/simple.mustache b/modules/kostache/vendor/mustache/examples/simple/simple.mustache
new file mode 100644
index 0000000..03df206
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/simple/simple.mustache
@@ -0,0 +1,5 @@
+Hello {{name}}
+You have just won ${{value}}!
+{{#in_ca}}
+Well, ${{ taxed_value }}, after taxes.
+{{/in_ca}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/simple/simple.txt b/modules/kostache/vendor/mustache/examples/simple/simple.txt
new file mode 100644
index 0000000..5d75d65
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/simple/simple.txt
@@ -0,0 +1,3 @@
+Hello Chris
+You have just won $10000!
+Well, $6000, after taxes.
diff --git a/modules/kostache/vendor/mustache/examples/unescaped/Unescaped.php b/modules/kostache/vendor/mustache/examples/unescaped/Unescaped.php
new file mode 100644
index 0000000..41b10cb
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/unescaped/Unescaped.php
@@ -0,0 +1,5 @@
+<?php
+
+class Unescaped extends Mustache {
+ public $title = "Bear > Shark";
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/unescaped/unescaped.mustache b/modules/kostache/vendor/mustache/examples/unescaped/unescaped.mustache
new file mode 100644
index 0000000..9982708
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/unescaped/unescaped.mustache
@@ -0,0 +1 @@
+<h1>{{{title}}}</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/unescaped/unescaped.txt b/modules/kostache/vendor/mustache/examples/unescaped/unescaped.txt
new file mode 100644
index 0000000..01fa404
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/unescaped/unescaped.txt
@@ -0,0 +1 @@
+<h1>Bear > Shark</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8/UTF8.php b/modules/kostache/vendor/mustache/examples/utf8/UTF8.php
new file mode 100644
index 0000000..7843f53
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8/UTF8.php
@@ -0,0 +1,5 @@
+<?php
+
+class UTF8Unescaped extends Mustache {
+ public $test = '䏿忥å¦';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8/utf8.mustache b/modules/kostache/vendor/mustache/examples/utf8/utf8.mustache
new file mode 100644
index 0000000..6954d47
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8/utf8.mustache
@@ -0,0 +1 @@
+<h1>䏿 {{test}}</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8/utf8.txt b/modules/kostache/vendor/mustache/examples/utf8/utf8.txt
new file mode 100644
index 0000000..bf17971
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8/utf8.txt
@@ -0,0 +1 @@
+<h1>䏿 䏿忥å¦</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8_unescaped/UTF8Unescaped.php b/modules/kostache/vendor/mustache/examples/utf8_unescaped/UTF8Unescaped.php
new file mode 100644
index 0000000..d097cbe
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8_unescaped/UTF8Unescaped.php
@@ -0,0 +1,5 @@
+<?php
+
+class UTF8 extends Mustache {
+ public $test = '䏿忥å¦';
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.mustache b/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.mustache
new file mode 100644
index 0000000..fd7fe4b
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.mustache
@@ -0,0 +1 @@
+<h1>䏿 {{{test}}}</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.txt b/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.txt
new file mode 100644
index 0000000..bf17971
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/utf8_unescaped/utf8_unescaped.txt
@@ -0,0 +1 @@
+<h1>䏿 䏿忥å¦</h1>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/whitespace/Whitespace.php b/modules/kostache/vendor/mustache/examples/whitespace/Whitespace.php
new file mode 100644
index 0000000..3be9689
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/whitespace/Whitespace.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * Whitespace test for tag names.
+ *
+ * Per http://github.com/janl/mustache.js/issues/issue/34/#comment_244396
+ * tags should strip leading and trailing whitespace in key names.
+ *
+ * `{{> tag }}` and `{{> tag}}` and `{{>tag}}` should all be equivalent.
+ *
+ * @extends Mustache
+ */
+class Whitespace extends Mustache {
+ public $foo = 'alpha';
+
+ public $bar = 'beta';
+
+ public function baz() {
+ return 'gamma';
+ }
+
+ public function qux() {
+ return array(
+ array('key with space' => 'A'),
+ array('key with space' => 'B'),
+ array('key with space' => 'C'),
+ array('key with space' => 'D'),
+ array('key with space' => 'E'),
+ array('key with space' => 'F'),
+ array('key with space' => 'G'),
+ );
+ }
+
+ protected $_partials = array(
+ 'alphabet' => " * {{.}}\n",
+ );
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/whitespace/whitespace.mustache b/modules/kostache/vendor/mustache/examples/whitespace/whitespace.mustache
new file mode 100644
index 0000000..0b3ba00
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/whitespace/whitespace.mustache
@@ -0,0 +1,10 @@
+{{^ inverted section test }}
+These are some things:
+{{/inverted section test }}
+* {{ foo }}
+* {{ bar}}
+* {{ baz }}
+{{# qux }}
+* {{ key with space }}
+{{/ qux }}
+{{#qux}}.{{/qux}}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/examples/whitespace/whitespace.txt b/modules/kostache/vendor/mustache/examples/whitespace/whitespace.txt
new file mode 100644
index 0000000..5226c69
--- /dev/null
+++ b/modules/kostache/vendor/mustache/examples/whitespace/whitespace.txt
@@ -0,0 +1,12 @@
+These are some things:
+* alpha
+* beta
+* gamma
+* A
+* B
+* C
+* D
+* E
+* F
+* G
+.......
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustacheExceptionTest.php b/modules/kostache/vendor/mustache/test/MustacheExceptionTest.php
new file mode 100644
index 0000000..98bddce
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustacheExceptionTest.php
@@ -0,0 +1,120 @@
+<?php
+
+require_once '../Mustache.php';
+
+class MustacheExceptionTest extends PHPUnit_Framework_TestCase {
+
+ const TEST_CLASS = 'Mustache';
+
+ protected $pickyMustache;
+ protected $slackerMustache;
+
+ public function setUp() {
+ $this->pickyMustache = new PickyMustache();
+ $this->slackerMustache = new SlackerMustache();
+ }
+
+ /**
+ * @group interpolation
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnknownVariableException() {
+ $this->pickyMustache->render('{{not_a_variable}}');
+ }
+
+ /**
+ * @group sections
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnclosedSectionException() {
+ $this->pickyMustache->render('{{#unclosed}}');
+ }
+
+ /**
+ * @group sections
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnclosedInvertedSectionException() {
+ $this->pickyMustache->render('{{^unclosed}}');
+ }
+
+ /**
+ * @group sections
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnexpectedCloseSectionException() {
+ $this->pickyMustache->render('{{/unopened}}');
+ }
+
+ /**
+ * @group partials
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnknownPartialException() {
+ $this->pickyMustache->render('{{>impartial}}');
+ }
+
+ /**
+ * @group pragmas
+ * @expectedException MustacheException
+ */
+ public function testThrowsUnknownPragmaException() {
+ $this->pickyMustache->render('{{%SWEET-MUSTACHE-BRO}}');
+ }
+
+ /**
+ * @group sections
+ */
+ public function testDoesntThrowUnclosedSectionException() {
+ $this->assertEquals('', $this->slackerMustache->render('{{#unclosed}}'));
+ }
+
+ /**
+ * @group sections
+ */
+ public function testDoesntThrowUnexpectedCloseSectionException() {
+ $this->assertEquals('', $this->slackerMustache->render('{{/unopened}}'));
+ }
+
+ /**
+ * @group partials
+ */
+ public function testDoesntThrowUnknownPartialException() {
+ $this->assertEquals('', $this->slackerMustache->render('{{>impartial}}'));
+ }
+
+ /**
+ * @group pragmas
+ * @expectedException MustacheException
+ */
+ public function testGetPragmaOptionsThrowsExceptionsIfItThinksYouHaveAPragmaButItTurnsOutYouDont() {
+ $mustache = new TestableMustache();
+ $mustache->testableGetPragmaOptions('PRAGMATIC');
+ }
+}
+
+class PickyMustache extends Mustache {
+ protected $_throwsExceptions = array(
+ MustacheException::UNKNOWN_VARIABLE => true,
+ MustacheException::UNCLOSED_SECTION => true,
+ MustacheException::UNEXPECTED_CLOSE_SECTION => true,
+ MustacheException::UNKNOWN_PARTIAL => true,
+ MustacheException::UNKNOWN_PRAGMA => true,
+ );
+}
+
+class SlackerMustache extends Mustache {
+ protected $_throwsExceptions = array(
+ MustacheException::UNKNOWN_VARIABLE => false,
+ MustacheException::UNCLOSED_SECTION => false,
+ MustacheException::UNEXPECTED_CLOSE_SECTION => false,
+ MustacheException::UNKNOWN_PARTIAL => false,
+ MustacheException::UNKNOWN_PRAGMA => false,
+ );
+}
+
+class TestableMustache extends Mustache {
+ public function testableGetPragmaOptions($pragma_name) {
+ return $this->_getPragmaOptions($pragma_name);
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustacheObjectSectionTest.php b/modules/kostache/vendor/mustache/test/MustacheObjectSectionTest.php
new file mode 100644
index 0000000..82405d6
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustacheObjectSectionTest.php
@@ -0,0 +1,73 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * @group sections
+ */
+class MustacheObjectSectionTest extends PHPUnit_Framework_TestCase {
+ public function testBasicObject() {
+ $alpha = new Alpha();
+ $this->assertEquals('Foo', $alpha->render('{{#foo}}{{name}}{{/foo}}'));
+ }
+
+ public function testObjectWithGet() {
+ $beta = new Beta();
+ $this->assertEquals('Foo', $beta->render('{{#foo}}{{name}}{{/foo}}'));
+ }
+
+ public function testSectionObjectWithGet() {
+ $gamma = new Gamma();
+ $this->assertEquals('Foo', $gamma->render('{{#bar}}{{#foo}}{{name}}{{/foo}}{{/bar}}'));
+ }
+
+ public function testSectionObjectWithFunction() {
+ $alpha = new Alpha();
+ $alpha->foo = new Delta();
+ $this->assertEquals('Foo', $alpha->render('{{#foo}}{{name}}{{/foo}}'));
+ }
+}
+
+class Alpha extends Mustache {
+ public $foo;
+
+ public function __construct() {
+ $this->foo = new StdClass();
+ $this->foo->name = 'Foo';
+ $this->foo->number = 1;
+ }
+}
+
+class Beta extends Mustache {
+ protected $_data = array();
+
+ public function __construct() {
+ $this->_data['foo'] = new StdClass();
+ $this->_data['foo']->name = 'Foo';
+ $this->_data['foo']->number = 1;
+ }
+
+ public function __isset($name) {
+ return array_key_exists($name, $this->_data);
+ }
+
+ public function __get($name) {
+ return $this->_data[$name];
+ }
+}
+
+class Gamma extends Mustache {
+ public $bar;
+
+ public function __construct() {
+ $this->bar = new Beta();
+ }
+}
+
+class Delta extends Mustache {
+ protected $_name = 'Foo';
+
+ public function name() {
+ return $this->_name;
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustachePragmaDotNotationTest.php b/modules/kostache/vendor/mustache/test/MustachePragmaDotNotationTest.php
new file mode 100644
index 0000000..56f6f11
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustachePragmaDotNotationTest.php
@@ -0,0 +1,63 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * @group pragmas
+ */
+class MustachePragmaDotNotationTest extends PHPUnit_Framework_TestCase {
+
+ public function testDotTraversal() {
+ $m = new Mustache('', array('foo' => array('bar' => 'this worked')));
+
+ $this->assertEquals($m->render('{{foo.bar}}'), '',
+ 'Dot notation not enabled, variable should have been replaced with nothing');
+ $this->assertEquals($m->render('{{%DOT-NOTATION}}{{foo.bar}}'), 'this worked',
+ 'Dot notation enabled, variable should have been replaced by "this worked"');
+ }
+
+ public function testDeepTraversal() {
+ $data = array(
+ 'foo' => array('bar' => array('baz' => array('qux' => array('quux' => 'WIN!')))),
+ 'a' => array('b' => array('c' => array('d' => array('e' => 'abcs')))),
+ 'one' => array(
+ 'one' => 'one-one',
+ 'two' => 'one-two',
+ 'three' => 'one-three',
+ ),
+ );
+
+ $m = new Mustache('', $data);
+ $this->assertEquals($m->render('{{%DOT-NOTATION}}{{foo.bar.baz.qux.quux}}'), 'WIN!');
+ $this->assertEquals($m->render('{{%DOT-NOTATION}}{{a.b.c.d.e}}'), 'abcs');
+ $this->assertEquals($m->render('{{%DOT-NOTATION}}{{one.one}}|{{one.two}}|{{one.three}}'), 'one-one|one-two|one-three');
+ }
+
+ public function testDotNotationContext() {
+ $data = array('parent' => array('items' => array(
+ array('item' => array('index' => 1)),
+ array('item' => array('index' => 2)),
+ array('item' => array('index' => 3)),
+ array('item' => array('index' => 4)),
+ array('item' => array('index' => 5)),
+ )));
+
+ $m = new Mustache('', $data);
+ $this->assertEquals('12345', $m->render('{{%DOT-NOTATION}}{{#parent}}{{#items}}{{item.index}}{{/items}}{{/parent}}'));
+ }
+
+ public function testDotNotationSectionNames() {
+ $data = array('parent' => array('items' => array(
+ array('item' => array('index' => 1)),
+ array('item' => array('index' => 2)),
+ array('item' => array('index' => 3)),
+ array('item' => array('index' => 4)),
+ array('item' => array('index' => 5)),
+ )));
+
+ $m = new Mustache('', $data);
+ $this->assertEquals('.....', $m->render('{{%DOT-NOTATION}}{{#parent.items}}.{{/parent.items}}'));
+ $this->assertEquals('12345', $m->render('{{%DOT-NOTATION}}{{#parent.items}}{{item.index}}{{/parent.items}}'));
+ $this->assertEquals('12345', $m->render('{{%DOT-NOTATION}}{{#parent.items}}{{#item}}{{index}}{{/item}}{{/parent.items}}'));
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustachePragmaImplicitIteratorTest.php b/modules/kostache/vendor/mustache/test/MustachePragmaImplicitIteratorTest.php
new file mode 100644
index 0000000..507620d
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustachePragmaImplicitIteratorTest.php
@@ -0,0 +1,87 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * @group pragmas
+ */
+class MustachePragmaImplicitIteratorTest extends PHPUnit_Framework_TestCase {
+
+ public function testEnablePragma() {
+ $m = $this->getMock('Mustache', array('_renderPragma'), array('{{%IMPLICIT-ITERATOR}}'));
+ $m->expects($this->exactly(1))
+ ->method('_renderPragma')
+ ->with(array(
+ 0 => '{{%IMPLICIT-ITERATOR}}',
+ 1 => 'IMPLICIT-ITERATOR', 'pragma_name' => 'IMPLICIT-ITERATOR',
+ 2 => null, 'options_string' => null
+ ));
+ $m->render();
+ }
+
+ public function testImplicitIterator() {
+ $m1 = new Mustache('{{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}}', array('items' => array('a', 'b', 'c')));
+ $this->assertEquals('abc', $m1->render());
+
+ $m2 = new Mustache('{{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}}', array('items' => array(1, 2, 3)));
+ $this->assertEquals('123', $m2->render());
+ }
+
+ public function testDotNotationCollision() {
+ $m = new Mustache(null, array('items' => array('foo', 'bar', 'baz')));
+
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR}}{{%DOT-NOTATION}}{{#items}}{{.}}{{/items}}'));
+ $this->assertEquals('foobarbaz', $m->render('{{%DOT-NOTATION}}{{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}}'));
+ }
+
+ public function testCustomIterator() {
+ $m = new Mustache(null, array('items' => array('foo', 'bar', 'baz')));
+
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}}'));
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR iterator=i}}{{#items}}{{i}}{{/items}}'));
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR iterator=items}}{{#items}}{{items}}{{/items}}'));
+ }
+
+ public function testDotNotationContext() {
+ $m = new Mustache(null, array('items' => array(
+ array('index' => 1, 'name' => 'foo'),
+ array('index' => 2, 'name' => 'bar'),
+ array('index' => 3, 'name' => 'baz'),
+ )));
+
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR}}{{#items}}{{#.}}{{name}}{{/.}}{{/items}}'));
+ $this->assertEquals('123', $m->render('{{%IMPLICIT-ITERATOR iterator=i}}{{%DOT-NOTATION}}{{#items}}{{i.index}}{{/items}}'));
+ $this->assertEquals('foobarbaz', $m->render('{{%IMPLICIT-ITERATOR iterator=i}}{{%DOT-NOTATION}}{{#items}}{{i.name}}{{/items}}'));
+ }
+
+ /**
+ * @dataProvider recursiveSectionData
+ */
+ public function testRecursiveSections($template, $view, $result) {
+ $m = new Mustache();
+ $this->assertEquals($result, $m->render($template, $view));
+ }
+
+ public function recursiveSectionData() {
+ return array(
+ array(
+ '{{%IMPLICIT-ITERATOR}}{{#items}}{{#.}}{{.}}{{/.}}{{/items}}',
+ array('items' => array(array('a', 'b', 'c'), array('d', 'e', 'f'))),
+ 'abcdef'
+ ),
+ array(
+ '{{%IMPLICIT-ITERATOR}}{{#items}}{{#.}}{{#.}}{{.}}{{/.}}{{/.}}{{/items}}',
+ array('items' => array(array(array('a', 'b'), array('c')), array(array('d'), array('e', 'f')))),
+ 'abcdef'
+ ),
+ array(
+ '{{%IMPLICIT-ITERATOR}}{{#items}}{{#.}}{{#items}}{{.}}{{/items}}{{/.}}{{/items}}',
+ array('items' => array(
+ array('items' => array('a', 'b', 'c')),
+ array('items' => array('d', 'e', 'f')),
+ )),
+ 'abcdef'
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustachePragmaTest.php b/modules/kostache/vendor/mustache/test/MustachePragmaTest.php
new file mode 100644
index 0000000..8be6e66
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustachePragmaTest.php
@@ -0,0 +1,50 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * @group pragmas
+ */
+class MustachePragmaTest extends PHPUnit_Framework_TestCase {
+
+ public function testUnknownPragmaException() {
+ $m = new Mustache();
+
+ try {
+ $m->render('{{%I-HAVE-THE-GREATEST-MUSTACHE}}');
+ } catch (MustacheException $e) {
+ $this->assertEquals(MustacheException::UNKNOWN_PRAGMA, $e->getCode(), 'Caught exception code was not MustacheException::UNKNOWN_PRAGMA');
+ return;
+ }
+
+ $this->fail('Mustache should have thrown an unknown pragma exception');
+ }
+
+ public function testPragmaReplace() {
+ $m = new Mustache();
+ $this->assertEquals('', $m->render('{{%DOT-NOTATION}}'), 'Pragma tag not removed');
+ }
+
+ public function testPragmaReplaceMultiple() {
+ $m = new Mustache();
+
+ $this->assertEquals('', $m->render('{{% DOT-NOTATION }}'), 'Pragmas should allow whitespace');
+ $this->assertEquals('', $m->render('{{% DOT-NOTATION foo=bar }}'), 'Pragmas should allow whitespace');
+ $this->assertEquals('', $m->render("{{%DOT-NOTATION}}\n{{%DOT-NOTATION}}"), 'Multiple pragma tags not removed');
+ $this->assertEquals(' ', $m->render('{{%DOT-NOTATION}} {{%DOT-NOTATION}}'), 'Multiple pragma tags not removed');
+ }
+
+ public function testPragmaReplaceNewline() {
+ $m = new Mustache();
+ $this->assertEquals('', $m->render("{{%DOT-NOTATION}}\n"), 'Trailing newline after pragma tag not removed');
+ $this->assertEquals("\n", $m->render("\n{{%DOT-NOTATION}}\n"), 'Too many newlines removed with pragma tag');
+ $this->assertEquals("1\n23", $m->render("1\n2{{%DOT-NOTATION}}\n3"), 'Wrong newline removed with pragma tag');
+ }
+
+ public function testPragmaReset() {
+ $m = new Mustache('', array('symbol' => '>>>'));
+ $this->assertEquals('>>>', $m->render('{{{symbol}}}'));
+ $this->assertEquals('>>>', $m->render('{{%UNESCAPED}}{{symbol}}'));
+ $this->assertEquals('>>>', $m->render('{{{symbol}}}'));
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustachePragmaUnescapedTest.php b/modules/kostache/vendor/mustache/test/MustachePragmaUnescapedTest.php
new file mode 100644
index 0000000..df6d94c
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustachePragmaUnescapedTest.php
@@ -0,0 +1,19 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * @group pragmas
+ */
+class MustachePragmaUnescapedTest extends PHPUnit_Framework_TestCase {
+
+ public function testPragmaUnescaped() {
+ $m = new Mustache(null, array('title' => 'Bear > Shark'));
+
+ $this->assertEquals('Bear > Shark', $m->render('{{%UNESCAPED}}{{title}}'));
+ $this->assertEquals('Bear > Shark', $m->render('{{title}}'));
+ $this->assertEquals('Bear > Shark', $m->render('{{%UNESCAPED}}{{{title}}}'));
+ $this->assertEquals('Bear > Shark', $m->render('{{{title}}}'));
+ }
+
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustacheSpecTest.php b/modules/kostache/vendor/mustache/test/MustacheSpecTest.php
new file mode 100644
index 0000000..d26c701
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustacheSpecTest.php
@@ -0,0 +1,145 @@
+<?php
+
+require_once '../Mustache.php';
+require_once './lib/yaml/lib/sfYamlParser.php';
+
+/**
+ * A PHPUnit test case wrapping the Mustache Spec
+ *
+ * @group mustache-spec
+ */
+class MustacheSpecTest extends PHPUnit_Framework_TestCase {
+
+ /**
+ * For some reason data providers can't mark tests skipped, so this test exists
+ * simply to provide a 'skipped' test if the `spec` submodule isn't initialized.
+ */
+ public function testSpecInitialized() {
+ $spec_dir = dirname(__FILE__) . '/spec/specs/';
+ if (!file_exists($spec_dir)) {
+ $this->markTestSkipped('Mustache spec submodule not initialized: run "git submodule update --init"');
+ }
+ }
+
+ /**
+ * @group comments
+ * @dataProvider loadCommentSpec
+ */
+ public function testCommentSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ /**
+ * @group delimiters
+ * @dataProvider loadDelimitersSpec
+ */
+ public function testDelimitersSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ /**
+ * @group interpolation
+ * @dataProvider loadInterpolationSpec
+ */
+ public function testInterpolationSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ /**
+ * @group inverted-sections
+ * @dataProvider loadInvertedSpec
+ */
+ public function testInvertedSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ // /**
+ // * @group lambdas
+ // * @dataProvider loadLambdasSpec
+ // */
+ // public function testLambdasSpec($template, $data, $partials, $expected, $desc) {
+ // $this->markTestSkipped("Lambdas for PHP haven't made it into the spec yet, so we'll skip them to avoid a bajillion failed tests.");
+ //
+ // if (!version_compare(PHP_VERSION, '5.3.0', '>=')) {
+ // $this->markTestSkipped('Unable to test Lambdas spec with PHP < 5.3.');
+ // }
+ //
+ // $m = new Mustache($template, $data, $partials);
+ // $this->assertEquals($expected, $m->render(), $desc);
+ // }
+
+ /**
+ * @group partials
+ * @dataProvider loadPartialsSpec
+ */
+ public function testPartialsSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ /**
+ * @group sections
+ * @dataProvider loadSectionsSpec
+ */
+ public function testSectionsSpec($template, $data, $partials, $expected, $desc) {
+ $m = new Mustache($template, $data, $partials);
+ $this->assertEquals($expected, $m->render(), $desc);
+ }
+
+ public function loadCommentSpec() {
+ return $this->loadSpec('comments');
+ }
+
+ public function loadDelimitersSpec() {
+ return $this->loadSpec('delimiters');
+ }
+
+ public function loadInterpolationSpec() {
+ return $this->loadSpec('interpolation');
+ }
+
+ public function loadInvertedSpec() {
+ return $this->loadSpec('inverted');
+ }
+
+ // public function loadLambdasSpec() {
+ // return $this->loadSpec('lambdas');
+ // }
+
+ public function loadPartialsSpec() {
+ return $this->loadSpec('partials');
+ }
+
+ public function loadSectionsSpec() {
+ return $this->loadSpec('sections');
+ }
+
+ /**
+ * Data provider for the mustache spec test.
+ *
+ * Loads YAML files from the spec and converts them to PHPisms.
+ *
+ * @access public
+ * @return array
+ */
+ protected function loadSpec($name) {
+ $filename = dirname(__FILE__) . '/spec/specs/' . $name . '.yml';
+ if (!file_exists($filename)) {
+ return array();
+ }
+
+ $data = array();
+
+ $yaml = new sfYamlParser();
+
+ $spec = $yaml->parse(file_get_contents($filename));
+ foreach ($spec['tests'] as $test) {
+ $data[] = array($test['template'], $test['data'], isset($test['partials']) ? $test['partials'] : array(), $test['expected'], $test['desc']);
+ }
+ return $data;
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/MustacheTest.php b/modules/kostache/vendor/mustache/test/MustacheTest.php
new file mode 100644
index 0000000..21714a7
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/MustacheTest.php
@@ -0,0 +1,369 @@
+<?php
+
+require_once '../Mustache.php';
+
+/**
+ * A PHPUnit test case for Mustache.php.
+ *
+ * This is a very basic, very rudimentary unit test case. It's probably more important to have tests
+ * than to have elegant tests, so let's bear with it for a bit.
+ *
+ * This class assumes an example directory exists at `../examples` with the following structure:
+ *
+ * @code
+ * examples
+ * foo
+ * Foo.php
+ * foo.mustache
+ * foo.txt
+ * bar
+ * Bar.php
+ * bar.mustache
+ * bar.txt
+ * @endcode
+ *
+ * To use this test:
+ *
+ * 1. {@link http://www.phpunit.de/manual/current/en/installation.html Install PHPUnit}
+ * 2. run phpunit from the `test` directory:
+ * `phpunit MustacheTest`
+ * 3. Fix bugs. Lather, rinse, repeat.
+ *
+ * @extends PHPUnit_Framework_TestCase
+ */
+class MustacheTest extends PHPUnit_Framework_TestCase {
+
+ const TEST_CLASS = 'Mustache';
+
+ protected $knownIssues = array(
+ 'Delimiters' => "Known issue: sections don't respect delimiter changes",
+ );
+
+ /**
+ * Test Mustache constructor.
+ *
+ * @access public
+ * @return void
+ */
+ public function test__construct() {
+ $template = '{{#mustaches}}{{#last}}and {{/last}}{{type}}{{^last}}, {{/last}}{{/mustaches}}';
+ $data = array(
+ 'mustaches' => array(
+ array('type' => 'Natural'),
+ array('type' => 'Hungarian'),
+ array('type' => 'Dali'),
+ array('type' => 'English'),
+ array('type' => 'Imperial'),
+ array('type' => 'Freestyle', 'last' => 'true'),
+ )
+ );
+ $output = 'Natural, Hungarian, Dali, English, Imperial, and Freestyle';
+
+ $m1 = new Mustache();
+ $this->assertEquals($output, $m1->render($template, $data));
+
+ $m2 = new Mustache($template);
+ $this->assertEquals($output, $m2->render(null, $data));
+
+ $m3 = new Mustache($template, $data);
+ $this->assertEquals($output, $m3->render());
+
+ $m4 = new Mustache(null, $data);
+ $this->assertEquals($output, $m4->render($template));
+ }
+
+ /**
+ * Test __toString() function.
+ *
+ * @access public
+ * @return void
+ */
+ public function test__toString() {
+ $m = new Mustache('{{first_name}} {{last_name}}', array('first_name' => 'Karl', 'last_name' => 'Marx'));
+
+ $this->assertEquals('Karl Marx', $m->__toString());
+ $this->assertEquals('Karl Marx', (string) $m);
+
+ $m2 = $this->getMock(self::TEST_CLASS, array('render'), array());
+ $m2->expects($this->once())
+ ->method('render')
+ ->will($this->returnValue('foo'));
+
+ $this->assertEquals('foo', $m2->render());
+ }
+
+ public function test__toStringException() {
+ $m = $this->getMock(self::TEST_CLASS, array('render'), array());
+ $m->expects($this->once())
+ ->method('render')
+ ->will($this->throwException(new Exception));
+
+ try {
+ $out = (string) $m;
+ } catch (Exception $e) {
+ $this->fail('__toString should catch all exceptions');
+ }
+ }
+
+ /**
+ * Test render().
+ *
+ * @access public
+ * @return void
+ */
+ public function testRender() {
+ $m = new Mustache();
+
+ $this->assertEquals('', $m->render(''));
+ $this->assertEquals('foo', $m->render('foo'));
+ $this->assertEquals('', $m->render(null));
+
+ $m2 = new Mustache('foo');
+ $this->assertEquals('foo', $m2->render());
+
+ $m3 = new Mustache('');
+ $this->assertEquals('', $m3->render());
+
+ $m3 = new Mustache();
+ $this->assertEquals('', $m3->render(null));
+ }
+
+ /**
+ * Test render() with data.
+ *
+ * @group interpolation
+ */
+ public function testRenderWithData() {
+ $m = new Mustache('{{first_name}} {{last_name}}');
+ $this->assertEquals('Charlie Chaplin', $m->render(null, array('first_name' => 'Charlie', 'last_name' => 'Chaplin')));
+ $this->assertEquals('Zappa, Frank', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
+ }
+
+ /**
+ * @group partials
+ */
+ public function testRenderWithPartials() {
+ $m = new Mustache('{{>stache}}', null, array('stache' => '{{first_name}} {{last_name}}'));
+ $this->assertEquals('Charlie Chaplin', $m->render(null, array('first_name' => 'Charlie', 'last_name' => 'Chaplin')));
+ $this->assertEquals('Zappa, Frank', $m->render('{{last_name}}, {{first_name}}', array('first_name' => 'Frank', 'last_name' => 'Zappa')));
+ }
+
+ /**
+ * Mustache should allow newlines (and other whitespace) in comments and all other tags.
+ *
+ * @group comments
+ */
+ public function testNewlinesInComments() {
+ $m = new Mustache("{{! comment \n \t still a comment... }}");
+ $this->assertEquals('', $m->render());
+ }
+
+ /**
+ * Mustache should return the same thing when invoked multiple times.
+ */
+ public function testMultipleInvocations() {
+ $m = new Mustache('x');
+ $first = $m->render();
+ $second = $m->render();
+
+ $this->assertEquals('x', $first);
+ $this->assertEquals($first, $second);
+ }
+
+ /**
+ * Mustache should return the same thing when invoked multiple times.
+ *
+ * @group interpolation
+ */
+ public function testMultipleInvocationsWithTags() {
+ $m = new Mustache('{{one}} {{two}}', array('one' => 'foo', 'two' => 'bar'));
+ $first = $m->render();
+ $second = $m->render();
+
+ $this->assertEquals('foo bar', $first);
+ $this->assertEquals($first, $second);
+ }
+
+ /**
+ * Mustache should not use templates passed to the render() method for subsequent invocations.
+ */
+ public function testResetTemplateForMultipleInvocations() {
+ $m = new Mustache('Sirve.');
+ $this->assertEquals('No sirve.', $m->render('No sirve.'));
+ $this->assertEquals('Sirve.', $m->render());
+
+ $m2 = new Mustache();
+ $this->assertEquals('No sirve.', $m2->render('No sirve.'));
+ $this->assertEquals('', $m2->render());
+ }
+
+ /**
+ * Test the __clone() magic function.
+ *
+ * @group examples
+ * @dataProvider getExamples
+ *
+ * @param string $class
+ * @param string $template
+ * @param string $output
+ */
+ public function test__clone($class, $template, $output) {
+ if (isset($this->knownIssues[$class])) {
+ return $this->markTestSkipped($this->knownIssues[$class]);
+ }
+
+ $m = new $class;
+ $n = clone $m;
+
+ $n_output = $n->render($template);
+
+ $o = clone $n;
+
+ $this->assertEquals($m->render($template), $n_output);
+ $this->assertEquals($n_output, $o->render($template));
+
+ $this->assertNotSame($m, $n);
+ $this->assertNotSame($n, $o);
+ $this->assertNotSame($m, $o);
+ }
+
+ /**
+ * Test everything in the `examples` directory.
+ *
+ * @group examples
+ * @dataProvider getExamples
+ *
+ * @param string $class
+ * @param string $template
+ * @param string $output
+ */
+ public function testExamples($class, $template, $output) {
+ if (isset($this->knownIssues[$class])) {
+ return $this->markTestSkipped($this->knownIssues[$class]);
+ }
+
+ $m = new $class;
+ $this->assertEquals($output, $m->render($template));
+ }
+
+ /**
+ * Data provider for testExamples method.
+ *
+ * Assumes that an `examples` directory exists inside parent directory.
+ * This examples directory should contain any number of subdirectories, each of which contains
+ * three files: one Mustache class (.php), one Mustache template (.mustache), and one output file
+ * (.txt).
+ *
+ * This whole mess will be refined later to be more intuitive and less prescriptive, but it'll
+ * do for now. Especially since it means we can have unit tests :)
+ *
+ * @return array
+ */
+ public function getExamples() {
+ $basedir = dirname(__FILE__) . '/../examples/';
+
+ $ret = array();
+
+ $files = new RecursiveDirectoryIterator($basedir);
+ while ($files->valid()) {
+
+ if ($files->hasChildren() && $children = $files->getChildren()) {
+ $example = $files->getSubPathname();
+ $class = null;
+ $template = null;
+ $output = null;
+
+ foreach ($children as $file) {
+ if (!$file->isFile()) continue;
+
+ $filename = $file->getPathname();
+ $info = pathinfo($filename);
+
+ if (isset($info['extension'])) {
+ switch($info['extension']) {
+ case 'php':
+ $class = $info['filename'];
+ include_once($filename);
+ break;
+
+ case 'mustache':
+ $template = file_get_contents($filename);
+ break;
+
+ case 'txt':
+ $output = file_get_contents($filename);
+ break;
+ }
+ }
+ }
+
+ if (!empty($class)) {
+ $ret[$example] = array($class, $template, $output);
+ }
+ }
+
+ $files->next();
+ }
+ return $ret;
+ }
+
+ /**
+ * @group delimiters
+ */
+ public function testCrazyDelimiters() {
+ $m = new Mustache(null, array('result' => 'success'));
+ $this->assertEquals('success', $m->render('{{=[[ ]]=}}[[ result ]]'));
+ $this->assertEquals('success', $m->render('{{=(( ))=}}(( result ))'));
+ $this->assertEquals('success', $m->render('{{={$ $}=}}{$ result $}'));
+ $this->assertEquals('success', $m->render('{{=<.. ..>=}}<.. result ..>'));
+ $this->assertEquals('success', $m->render('{{=^^ ^^}}^^ result ^^'));
+ $this->assertEquals('success', $m->render('{{=// \\\\}}// result \\\\'));
+ }
+
+ /**
+ * @group delimiters
+ */
+ public function testResetDelimiters() {
+ $m = new Mustache(null, array('result' => 'success'));
+ $this->assertEquals('success', $m->render('{{=[[ ]]=}}[[ result ]]'));
+ $this->assertEquals('success', $m->render('{{=<< >>=}}<< result >>'));
+ $this->assertEquals('success', $m->render('{{=<% %>=}}<% result %>'));
+ }
+
+ /**
+ * @group sections
+ * @dataProvider poorlyNestedSections
+ * @expectedException MustacheException
+ */
+ public function testPoorlyNestedSections($template) {
+ $m = new Mustache($template);
+ $m->render();
+ }
+
+ public function poorlyNestedSections() {
+ return array(
+ array('{{#foo}}'),
+ array('{{#foo}}{{/bar}}'),
+ array('{{#foo}}{{#bar}}{{/foo}}'),
+ array('{{#foo}}{{#bar}}{{/foo}}{{/bar}}'),
+ array('{{#foo}}{{/bar}}{{/foo}}'),
+ );
+ }
+
+ /**
+ * Ensure that Mustache doesn't double-render sections (allowing mustache injection).
+ *
+ * @group sections
+ */
+ public function testMustacheInjection() {
+ $template = '{{#foo}}{{bar}}{{/foo}}';
+ $view = array(
+ 'foo' => true,
+ 'bar' => '{{win}}',
+ 'win' => 'FAIL',
+ );
+
+ $m = new Mustache($template, $view);
+ $this->assertEquals('{{win}}', $m->render());
+ }
+}
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/LICENSE b/modules/kostache/vendor/mustache/test/lib/yaml/LICENSE
new file mode 100644
index 0000000..3cef853
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2008-2009 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/README.markdown b/modules/kostache/vendor/mustache/test/lib/yaml/README.markdown
new file mode 100644
index 0000000..e4f80cf
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/README.markdown
@@ -0,0 +1,15 @@
+Symfony YAML: A PHP library that speaks YAML
+============================================
+
+Symfony YAML is a PHP library that parses YAML strings and converts them to
+PHP arrays. It can also converts PHP arrays to YAML strings. Its official
+website is at http://components.symfony-project.org/yaml/.
+
+The documentation is to be found in the `doc/` directory.
+
+Symfony YAML is licensed under the MIT license (see LICENSE file).
+
+The Symfony YAML library is developed and maintained by the
+[symfony](http://www.symfony-project.org/) project team. It has been extracted
+from symfony to be used as a standalone library. Symfony YAML is part of the
+[symfony components project](http://components.symfony-project.org/).
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/doc/00-Introduction.markdown b/modules/kostache/vendor/mustache/test/lib/yaml/doc/00-Introduction.markdown
new file mode 100644
index 0000000..e592758
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/doc/00-Introduction.markdown
@@ -0,0 +1,143 @@
+Introduction
+============
+
+This book is about *Symfony YAML*, a PHP library part of the Symfony
+Components project. Its official website is at
+http://components.symfony-project.org/yaml/.
+
+>**SIDEBAR**
+>About the Symfony Components
+>
+>[Symfony Components](http://components.symfony-project.org/) are
+>standalone PHP classes that can be easily used in any
+>PHP project. Most of the time, they have been developed as part of the
+>[Symfony framework](http://www.symfony-project.org/), and decoupled from the
+>main framework later on. You don't need to use the Symfony MVC framework to use
+>the components.
+
+What is it?
+-----------
+
+Symfony YAML is a PHP library that parses YAML strings and converts them to
+PHP arrays. It can also converts PHP arrays to YAML strings.
+
+[YAML](http://www.yaml.org/), YAML Ain't Markup Language, is a human friendly
+data serialization standard for all programming languages. YAML is a great
+format for your configuration files. YAML files are as expressive as XML files
+and as readable as INI files.
+
+### Easy to use
+
+There is only one archive to download, and you are ready to go. No
+configuration, No installation. Drop the files in a directory and start using
+it today in your projects.
+
+### Open-Source
+
+Released under the MIT license, you are free to do whatever you want, even in
+a commercial environment. You are also encouraged to contribute.
+
+
+### Used by popular Projects
+
+Symfony YAML was initially released as part of the symfony framework, one of
+the most popular PHP web framework. It is also embedded in other popular
+projects like PHPUnit or Doctrine.
+
+### Documented
+
+Symfony YAML is fully documented, with a dedicated online book, and of course
+a full API documentation.
+
+### Fast
+
+One of the goal of Symfony YAML is to find the right balance between speed and
+features. It supports just the needed feature to handle configuration files.
+
+### Unit tested
+
+The library is fully unit-tested. With more than 400 unit tests, the library
+is stable and is already used in large projects.
+
+### Real Parser
+
+It sports a real parser and is able to parse a large subset of the YAML
+specification, for all your configuration needs. It also means that the parser
+is pretty robust, easy to understand, and simple enough to extend.
+
+### Clear error messages
+
+Whenever you have a syntax problem with your YAML files, the library outputs a
+helpful message with the filename and the line number where the problem
+occurred. It eases the debugging a lot.
+
+### Dump support
+
+It is also able to dump PHP arrays to YAML with object support, and inline
+level configuration for pretty outputs.
+
+### Types Support
+
+It supports most of the YAML built-in types like dates, integers, octals,
+booleans, and much more...
+
+
+### Full merge key support
+
+Full support for references, aliases, and full merge key. Don't repeat
+yourself by referencing common configuration bits.
+
+### PHP Embedding
+
+YAML files are dynamic. By embedding PHP code inside a YAML file, you have
+even more power for your configuration files.
+
+Installation
+------------
+
+Symfony YAML can be installed by downloading the source code as a
+[tar](http://github.com/fabpot/yaml/tarball/master) archive or a
+[zip](http://github.com/fabpot/yaml/zipball/master) one.
+
+To stay up-to-date, you can also use the official Subversion
+[repository](http://svn.symfony-project.com/components/yaml/).
+
+If you are a Git user, there is an official
+[mirror](http://github.com/fabpot/yaml), which is updated every 10 minutes.
+
+If you prefer to install the component globally on your machine, you can use
+the symfony [PEAR](http://pear.symfony-project.com/) channel server.
+
+Support
+-------
+
+Support questions and enhancements can be discussed on the
+[mailing-list](http://groups.google.com/group/symfony-components).
+
+If you find a bug, you can create a ticket at the symfony
+[trac](http://trac.symfony-project.org/newticket) under the *YAML* component.
+
+License
+-------
+
+The Symfony YAML component is licensed under the *MIT license*:
+
+>Copyright (c) 2008-2009 Fabien Potencier
+>
+>Permission is hereby granted, free of charge, to any person obtaining a copy
+>of this software and associated documentation files (the "Software"), to deal
+>in the Software without restriction, including without limitation the rights
+>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+>copies of the Software, and to permit persons to whom the Software is furnished
+>to do so, subject to the following conditions:
+>
+>The above copyright notice and this permission notice shall be included in all
+>copies or substantial portions of the Software.
+>
+>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+>THE SOFTWARE.
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/doc/01-Usage.markdown b/modules/kostache/vendor/mustache/test/lib/yaml/doc/01-Usage.markdown
new file mode 100644
index 0000000..644cf11
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/doc/01-Usage.markdown
@@ -0,0 +1,110 @@
+Using Symfony YAML
+==================
+
+The Symfony YAML library is very simple and consists of two main classes: one
+to parse YAML strings (`sfYamlParser`), and the other to dump a PHP array to
+a YAML string (`sfYamlDumper`).
+
+On top of these two core classes, the main `sfYaml` class acts as a thin
+wrapper and simplifies common uses.
+
+Reading YAML Files
+------------------
+
+The `sfYamlParser::parse()` method parses a YAML string and converts it to a
+PHP array:
+
+ [php]
+ $yaml = new sfYamlParser();
+ $value = $yaml->parse(file_get_contents('/path/to/file.yaml'));
+
+If an error occurs during parsing, the parser throws an exception indicating
+the error type and the line in the original YAML string where the error
+occurred:
+
+ [php]
+ try
+ {
+ $value = $yaml->parse(file_get_contents('/path/to/file.yaml'));
+ }
+ catch (InvalidArgumentException $e)
+ {
+ // an error occurred during parsing
+ echo "Unable to parse the YAML string: ".$e->getMessage();
+ }
+
+>**TIP**
+>As the parser is reentrant, you can use the same parser object to load
+>different YAML strings.
+
+When loading a YAML file, it is sometimes better to use the `sfYaml::load()`
+wrapper method:
+
+ [php]
+ $loader = sfYaml::load('/path/to/file.yml');
+
+The `sfYaml::load()` static method takes a YAML string or a file containing
+YAML. Internally, it calls the `sfYamlParser::parse()` method, but with some
+added bonuses:
+
+ * It executes the YAML file as if it was a PHP file, so that you can embed
+ PHP commands in YAML files;
+
+ * When a file cannot be parsed, it automatically adds the file name to the
+ error message, simplifying debugging when your application is loading
+ several YAML files.
+
+Writing YAML Files
+------------------
+
+The `sfYamlDumper` dumps any PHP array to its YAML representation:
+
+ [php]
+ $array = array('foo' => 'bar', 'bar' => array('foo' => 'bar', 'bar' => 'baz'));
+
+ $dumper = new sfYamlDumper();
+ $yaml = $dumper->dump($array);
+ file_put_contents('/path/to/file.yaml', $yaml);
+
+>**NOTE**
+>Of course, the Symfony YAML dumper is not able to dump resources. Also,
+>even if the dumper is able to dump PHP objects, it is to be considered
+>an alpha feature.
+
+If you only need to dump one array, you can use the `sfYaml::dump()` static
+method shortcut:
+
+ [php]
+ $yaml = sfYaml::dump($array, $inline);
+
+The YAML format supports two kind of representation for arrays, the expanded
+one, and the inline one. By default, the dumper uses the inline
+representation:
+
+ [yml]
+ { foo: bar, bar: { foo: bar, bar: baz } }
+
+The second argument of the `dump()` method customizes the level at which the
+output switches from the expanded representation to the inline one:
+
+ [php]
+ echo $dumper->dump($array, 1);
+
+-
+
+ [yml]
+ foo: bar
+ bar: { foo: bar, bar: baz }
+
+-
+
+ [php]
+ echo $dumper->dump($array, 2);
+
+-
+
+ [yml]
+ foo: bar
+ bar:
+ foo: bar
+ bar: baz
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/doc/02-YAML.markdown b/modules/kostache/vendor/mustache/test/lib/yaml/doc/02-YAML.markdown
new file mode 100644
index 0000000..a64c19e
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/doc/02-YAML.markdown
@@ -0,0 +1,312 @@
+The YAML Format
+===============
+
+According to the official [YAML](http://yaml.org/) website, YAML is "a human
+friendly data serialization standard for all programming languages".
+
+Even if the YAML format can describe complex nested data structure, this
+chapter only describes the minimum set of features needed to use YAML as a
+configuration file format.
+
+YAML is a simple language that describes data. As PHP, it has a syntax for
+simple types like strings, booleans, floats, or integers. But unlike PHP, it
+makes a difference between arrays (sequences) and hashes (mappings).
+
+Scalars
+-------
+
+The syntax for scalars is similar to the PHP syntax.
+
+### Strings
+
+ [yml]
+ A string in YAML
+
+-
+
+ [yml]
+ 'A singled-quoted string in YAML'
+
+>**TIP**
+>In a single quoted string, a single quote `'` must be doubled:
+>
+> [yml]
+> 'A single quote '' in a single-quoted string'
+
+ [yml]
+ "A double-quoted string in YAML\n"
+
+Quoted styles are useful when a string starts or ends with one or more
+relevant spaces.
+
+>**TIP**
+>The double-quoted style provides a way to express arbitrary strings, by
+>using `\` escape sequences. It is very useful when you need to embed a
+>`\n` or a unicode character in a string.
+
+When a string contains line breaks, you can use the literal style, indicated
+by the pipe (`|`), to indicate that the string will span several lines. In
+literals, newlines are preserved:
+
+ [yml]
+ |
+ \/ /| |\/| |
+ / / | | | |__
+
+Alternatively, strings can be written with the folded style, denoted by `>`,
+where each line break is replaced by a space:
+
+ [yml]
+ >
+ This is a very long sentence
+ that spans several lines in the YAML
+ but which will be rendered as a string
+ without carriage returns.
+
+>**NOTE**
+>Notice the two spaces before each line in the previous examples. They
+>won't appear in the resulting PHP strings.
+
+### Numbers
+
+ [yml]
+ # an integer
+ 12
+
+-
+
+ [yml]
+ # an octal
+ 014
+
+-
+
+ [yml]
+ # an hexadecimal
+ 0xC
+
+-
+
+ [yml]
+ # a float
+ 13.4
+
+-
+
+ [yml]
+ # an exponential number
+ 1.2e+34
+
+-
+
+ [yml]
+ # infinity
+ .inf
+
+### Nulls
+
+Nulls in YAML can be expressed with `null` or `~`.
+
+### Booleans
+
+Booleans in YAML are expressed with `true` and `false`.
+
+>**NOTE**
+>The symfony YAML parser also recognize `on`, `off`, `yes`, and `no` but
+>it is strongly discouraged to use them as it has been removed from the
+>1.2 YAML specifications.
+
+### Dates
+
+YAML uses the ISO-8601 standard to express dates:
+
+ [yml]
+ 2001-12-14t21:59:43.10-05:00
+
+-
+
+ [yml]
+ # simple date
+ 2002-12-14
+
+Collections
+-----------
+
+A YAML file is rarely used to describe a simple scalar. Most of the time, it
+describes a collection. A collection can be a sequence or a mapping of
+elements. Both sequences and mappings are converted to PHP arrays.
+
+Sequences use a dash followed by a space (`- `):
+
+ [yml]
+ - PHP
+ - Perl
+ - Python
+
+The previous YAML file is equivalent to the following PHP code:
+
+ [php]
+ array('PHP', 'Perl', 'Python');
+
+Mappings use a colon followed by a space (`: `) to mark each key/value pair:
+
+ [yml]
+ PHP: 5.2
+ MySQL: 5.1
+ Apache: 2.2.20
+
+which is equivalent to this PHP code:
+
+ [php]
+ array('PHP' => 5.2, 'MySQL' => 5.1, 'Apache' => '2.2.20');
+
+>**NOTE**
+>In a mapping, a key can be any valid scalar.
+
+The number of spaces between the colon and the value does not matter:
+
+ [yml]
+ PHP: 5.2
+ MySQL: 5.1
+ Apache: 2.2.20
+
+YAML uses indentation with one or more spaces to describe nested collections:
+
+ [yml]
+ "symfony 1.0":
+ PHP: 5.0
+ Propel: 1.2
+ "symfony 1.2":
+ PHP: 5.2
+ Propel: 1.3
+
+The following YAML is equivalent to the following PHP code:
+
+ [php]
+ array(
+ 'symfony 1.0' => array(
+ 'PHP' => 5.0,
+ 'Propel' => 1.2,
+ ),
+ 'symfony 1.2' => array(
+ 'PHP' => 5.2,
+ 'Propel' => 1.3,
+ ),
+ );
+
+There is one important thing you need to remember when using indentation in a
+YAML file: *Indentation must be done with one or more spaces, but never with
+tabulations*.
+
+You can nest sequences and mappings as you like:
+
+ [yml]
+ 'Chapter 1':
+ - Introduction
+ - Event Types
+ 'Chapter 2':
+ - Introduction
+ - Helpers
+
+YAML can also use flow styles for collections, using explicit indicators
+rather than indentation to denote scope.
+
+A sequence can be written as a comma separated list within square brackets
+(`[]`):
+
+ [yml]
+ [PHP, Perl, Python]
+
+A mapping can be written as a comma separated list of key/values within curly
+braces (`{}`):
+
+ [yml]
+ { PHP: 5.2, MySQL: 5.1, Apache: 2.2.20 }
+
+You can mix and match styles to achieve a better readability:
+
+ [yml]
+ 'Chapter 1': [Introduction, Event Types]
+ 'Chapter 2': [Introduction, Helpers]
+
+-
+
+ [yml]
+ "symfony 1.0": { PHP: 5.0, Propel: 1.2 }
+ "symfony 1.2": { PHP: 5.2, Propel: 1.3 }
+
+Comments
+--------
+
+Comments can be added in YAML by prefixing them with a hash mark (`#`):
+
+ [yml]
+ # Comment on a line
+ "symfony 1.0": { PHP: 5.0, Propel: 1.2 } # Comment at the end of a line
+ "symfony 1.2": { PHP: 5.2, Propel: 1.3 }
+
+>**NOTE**
+>Comments are simply ignored by the YAML parser and do not need to be
+>indented according to the current level of nesting in a collection.
+
+Dynamic YAML files
+------------------
+
+In symfony, a YAML file can contain PHP code that is evaluated just before the
+parsing occurs:
+
+ [php]
+ 1.0:
+ version: <?php echo file_get_contents('1.0/VERSION')."\n" ?>
+ 1.1:
+ version: "<?php echo file_get_contents('1.1/VERSION') ?>"
+
+Be careful to not mess up with the indentation. Keep in mind the following
+simple tips when adding PHP code to a YAML file:
+
+ * The `<?php ?>` statements must always start the line or be embedded in a
+ value.
+
+ * If a `<?php ?>` statement ends a line, you need to explicitly output a new
+ line ("\n").
+
+<div class="pagebreak"></div>
+
+A Full Length Example
+---------------------
+
+The following example illustrates most YAML notations explained in this
+document:
+
+ [yml]
+ "symfony 1.0":
+ end_of_maintainance: 2010-01-01
+ is_stable: true
+ release_manager: "Grégoire Hubert"
+ description: >
+ This stable version is the right choice for projects
+ that need to be maintained for a long period of time.
+ latest_beta: ~
+ latest_minor: 1.0.20
+ supported_orms: [Propel]
+ archives: { source: [zip, tgz], sandbox: [zip, tgz] }
+
+ "symfony 1.2":
+ end_of_maintainance: 2008-11-01
+ is_stable: true
+ release_manager: 'Fabian Lange'
+ description: >
+ This stable version is the right choice
+ if you start a new project today.
+ latest_beta: null
+ latest_minor: 1.2.5
+ supported_orms:
+ - Propel
+ - Doctrine
+ archives:
+ source:
+ - zip
+ - tgz
+ sandbox:
+ - zip
+ - tgz
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/doc/A-License.markdown b/modules/kostache/vendor/mustache/test/lib/yaml/doc/A-License.markdown
new file mode 100644
index 0000000..49cdd7c
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/doc/A-License.markdown
@@ -0,0 +1,108 @@
+Appendix A - License
+====================
+
+Attribution-Share Alike 3.0 Unported License
+--------------------------------------------
+
+THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+
+BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
+
+1. Definitions
+
+ a. **"Adaptation"** means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
+
+ b. **"Collection"** means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.
+
+ c. **"Creative Commons Compatible License"** means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.
+
+ d. **"Distribute"** means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
+
+ e. **"License Elements"** means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.
+
+ f. **"Licensor"** means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
+
+ g. **"Original Author"** means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
+
+ h. **"Work"** means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
+
+ i. **"You"** means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
+
+ j. **"Publicly Perform"** means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
+
+ k. **"Reproduce"** means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
+
+2. Fair Dealing Rights
+
+ Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
+
+3. License Grant
+
+ Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
+
+ a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
+
+ b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
+
+ c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
+
+ d. to Distribute and Publicly Perform Adaptations.
+
+ e. For the avoidance of doubt:
+
+ i. **Non-waivable Compulsory License Schemes**. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
+
+ ii. **Waivable Compulsory License Schemes**. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
+
+ iii. **Voluntary License Schemes**. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
+
+ The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
+
+4. Restrictions
+
+ The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
+
+ a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested.
+
+ b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.
+
+ c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
+
+ d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
+
+5. Representations, Warranties and Disclaimer
+
+ UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+
+6. Limitation on Liability
+
+ EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. Termination
+
+ a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
+
+ b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
+
+8. Miscellaneous
+
+ a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
+
+ b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
+
+ c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+ d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
+
+ e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
+
+ f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
+
+>**SIDEBAR**
+>Creative Commons Notice
+>
+>Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
+>
+>Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License.
+>
+>Creative Commons may be contacted at http://creativecommons.org/.
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYaml.php b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYaml.php
new file mode 100644
index 0000000..1d89ccc
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYaml.php
@@ -0,0 +1,135 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * sfYaml offers convenience methods to load and dump YAML.
+ *
+ * @package symfony
+ * @subpackage yaml
+ * @author Fabien Potencier <[email protected]>
+ * @version SVN: $Id: sfYaml.class.php 8988 2008-05-15 20:24:26Z fabien $
+ */
+class sfYaml
+{
+ static protected
+ $spec = '1.2';
+
+ /**
+ * Sets the YAML specification version to use.
+ *
+ * @param string $version The YAML specification version
+ */
+ static public function setSpecVersion($version)
+ {
+ if (!in_array($version, array('1.1', '1.2')))
+ {
+ throw new InvalidArgumentException(sprintf('Version %s of the YAML specifications is not supported', $version));
+ }
+
+ self::$spec = $version;
+ }
+
+ /**
+ * Gets the YAML specification version to use.
+ *
+ * @return string The YAML specification version
+ */
+ static public function getSpecVersion()
+ {
+ return self::$spec;
+ }
+
+ /**
+ * Loads YAML into a PHP array.
+ *
+ * The load method, when supplied with a YAML stream (string or file),
+ * will do its best to convert YAML in a file into a PHP array.
+ *
+ * Usage:
+ * <code>
+ * $array = sfYaml::load('config.yml');
+ * print_r($array);
+ * </code>
+ *
+ * @param string $input Path of YAML file or string containing YAML
+ *
+ * @return array The YAML converted to a PHP array
+ *
+ * @throws InvalidArgumentException If the YAML is not valid
+ */
+ public static function load($input)
+ {
+ $file = '';
+
+ // if input is a file, process it
+ if (strpos($input, "\n") === false && is_file($input))
+ {
+ $file = $input;
+
+ ob_start();
+ $retval = include($input);
+ $content = ob_get_clean();
+
+ // if an array is returned by the config file assume it's in plain php form else in YAML
+ $input = is_array($retval) ? $retval : $content;
+ }
+
+ // if an array is returned by the config file assume it's in plain php form else in YAML
+ if (is_array($input))
+ {
+ return $input;
+ }
+
+ require_once dirname(__FILE__).'/sfYamlParser.php';
+
+ $yaml = new sfYamlParser();
+
+ try
+ {
+ $ret = $yaml->parse($input);
+ }
+ catch (Exception $e)
+ {
+ throw new InvalidArgumentException(sprintf('Unable to parse %s: %s', $file ? sprintf('file "%s"', $file) : 'string', $e->getMessage()));
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Dumps a PHP array to a YAML string.
+ *
+ * The dump method, when supplied with an array, will do its best
+ * to convert the array into friendly YAML.
+ *
+ * @param array $array PHP array
+ * @param integer $inline The level where you switch to inline YAML
+ *
+ * @return string A YAML string representing the original PHP array
+ */
+ public static function dump($array, $inline = 2)
+ {
+ require_once dirname(__FILE__).'/sfYamlDumper.php';
+
+ $yaml = new sfYamlDumper();
+
+ return $yaml->dump($array, $inline);
+ }
+}
+
+/**
+ * Wraps echo to automatically provide a newline.
+ *
+ * @param string $string The string to echo with new line
+ */
+function echoln($string)
+{
+ echo $string."\n";
+}
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlDumper.php b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlDumper.php
new file mode 100644
index 0000000..0ada2b3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlDumper.php
@@ -0,0 +1,60 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+require_once(dirname(__FILE__).'/sfYamlInline.php');
+
+/**
+ * sfYamlDumper dumps PHP variables to YAML strings.
+ *
+ * @package symfony
+ * @subpackage yaml
+ * @author Fabien Potencier <[email protected]>
+ * @version SVN: $Id: sfYamlDumper.class.php 10575 2008-08-01 13:08:42Z nicolas $
+ */
+class sfYamlDumper
+{
+ /**
+ * Dumps a PHP value to YAML.
+ *
+ * @param mixed $input The PHP value
+ * @param integer $inline The level where you switch to inline YAML
+ * @param integer $indent The level o indentation indentation (used internally)
+ *
+ * @return string The YAML representation of the PHP value
+ */
+ public function dump($input, $inline = 0, $indent = 0)
+ {
+ $output = '';
+ $prefix = $indent ? str_repeat(' ', $indent) : '';
+
+ if ($inline <= 0 || !is_array($input) || empty($input))
+ {
+ $output .= $prefix.sfYamlInline::dump($input);
+ }
+ else
+ {
+ $isAHash = array_keys($input) !== range(0, count($input) - 1);
+
+ foreach ($input as $key => $value)
+ {
+ $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value);
+
+ $output .= sprintf('%s%s%s%s',
+ $prefix,
+ $isAHash ? sfYamlInline::dump($key).':' : '-',
+ $willBeInlined ? ' ' : "\n",
+ $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + 2)
+ ).($willBeInlined ? "\n" : '');
+ }
+ }
+
+ return $output;
+ }
+}
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlInline.php b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlInline.php
new file mode 100644
index 0000000..a88cbb3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlInline.php
@@ -0,0 +1,442 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+require_once dirname(__FILE__).'/sfYaml.php';
+
+/**
+ * sfYamlInline implements a YAML parser/dumper for the YAML inline syntax.
+ *
+ * @package symfony
+ * @subpackage yaml
+ * @author Fabien Potencier <[email protected]>
+ * @version SVN: $Id: sfYamlInline.class.php 16177 2009-03-11 08:32:48Z fabien $
+ */
+class sfYamlInline
+{
+ const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')';
+
+ /**
+ * Convert a YAML string to a PHP array.
+ *
+ * @param string $value A YAML string
+ *
+ * @return array A PHP array representing the YAML string
+ */
+ static public function load($value)
+ {
+ $value = trim($value);
+
+ if (0 == strlen($value))
+ {
+ return '';
+ }
+
+ if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2)
+ {
+ $mbEncoding = mb_internal_encoding();
+ mb_internal_encoding('ASCII');
+ }
+
+ switch ($value[0])
+ {
+ case '[':
+ $result = self::parseSequence($value);
+ break;
+ case '{':
+ $result = self::parseMapping($value);
+ break;
+ default:
+ $result = self::parseScalar($value);
+ }
+
+ if (isset($mbEncoding))
+ {
+ mb_internal_encoding($mbEncoding);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Dumps a given PHP variable to a YAML string.
+ *
+ * @param mixed $value The PHP variable to convert
+ *
+ * @return string The YAML string representing the PHP array
+ */
+ static public function dump($value)
+ {
+ if ('1.1' === sfYaml::getSpecVersion())
+ {
+ $trueValues = array('true', 'on', '+', 'yes', 'y');
+ $falseValues = array('false', 'off', '-', 'no', 'n');
+ }
+ else
+ {
+ $trueValues = array('true');
+ $falseValues = array('false');
+ }
+
+ switch (true)
+ {
+ case is_resource($value):
+ throw new InvalidArgumentException('Unable to dump PHP resources in a YAML file.');
+ case is_object($value):
+ return '!!php/object:'.serialize($value);
+ case is_array($value):
+ return self::dumpArray($value);
+ case null === $value:
+ return 'null';
+ case true === $value:
+ return 'true';
+ case false === $value:
+ return 'false';
+ case ctype_digit($value):
+ return is_string($value) ? "'$value'" : (int) $value;
+ case is_numeric($value):
+ return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value);
+ case false !== strpos($value, "\n") || false !== strpos($value, "\r"):
+ return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value));
+ case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value):
+ return sprintf("'%s'", str_replace('\'', '\'\'', $value));
+ case '' == $value:
+ return "''";
+ case preg_match(self::getTimestampRegex(), $value):
+ return "'$value'";
+ case in_array(strtolower($value), $trueValues):
+ return "'$value'";
+ case in_array(strtolower($value), $falseValues):
+ return "'$value'";
+ case in_array(strtolower($value), array('null', '~')):
+ return "'$value'";
+ default:
+ return $value;
+ }
+ }
+
+ /**
+ * Dumps a PHP array to a YAML string.
+ *
+ * @param array $value The PHP array to dump
+ *
+ * @return string The YAML string representing the PHP array
+ */
+ static protected function dumpArray($value)
+ {
+ // array
+ $keys = array_keys($value);
+ if (
+ (1 == count($keys) && '0' == $keys[0])
+ ||
+ (count($keys) > 1 && array_reduce($keys, create_function('$v,$w', 'return (integer) $v + $w;'), 0) == count($keys) * (count($keys) - 1) / 2))
+ {
+ $output = array();
+ foreach ($value as $val)
+ {
+ $output[] = self::dump($val);
+ }
+
+ return sprintf('[%s]', implode(', ', $output));
+ }
+
+ // mapping
+ $output = array();
+ foreach ($value as $key => $val)
+ {
+ $output[] = sprintf('%s: %s', self::dump($key), self::dump($val));
+ }
+
+ return sprintf('{ %s }', implode(', ', $output));
+ }
+
+ /**
+ * Parses a scalar to a YAML string.
+ *
+ * @param scalar $scalar
+ * @param string $delimiters
+ * @param array $stringDelimiter
+ * @param integer $i
+ * @param boolean $evaluate
+ *
+ * @return string A YAML string
+ */
+ static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true)
+ {
+ if (in_array($scalar[$i], $stringDelimiters))
+ {
+ // quoted scalar
+ $output = self::parseQuotedScalar($scalar, $i);
+ }
+ else
+ {
+ // "normal" string
+ if (!$delimiters)
+ {
+ $output = substr($scalar, $i);
+ $i += strlen($output);
+
+ // remove comments
+ if (false !== $strpos = strpos($output, ' #'))
+ {
+ $output = rtrim(substr($output, 0, $strpos));
+ }
+ }
+ else if (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match))
+ {
+ $output = $match[1];
+ $i += strlen($output);
+ }
+ else
+ {
+ throw new InvalidArgumentException(sprintf('Malformed inline YAML string (%s).', $scalar));
+ }
+
+ $output = $evaluate ? self::evaluateScalar($output) : $output;
+ }
+
+ return $output;
+ }
+
+ /**
+ * Parses a quoted scalar to YAML.
+ *
+ * @param string $scalar
+ * @param integer $i
+ *
+ * @return string A YAML string
+ */
+ static protected function parseQuotedScalar($scalar, &$i)
+ {
+ if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match))
+ {
+ throw new InvalidArgumentException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i)));
+ }
+
+ $output = substr($match[0], 1, strlen($match[0]) - 2);
+
+ if ('"' == $scalar[$i])
+ {
+ // evaluate the string
+ $output = str_replace(array('\\"', '\\n', '\\r'), array('"', "\n", "\r"), $output);
+ }
+ else
+ {
+ // unescape '
+ $output = str_replace('\'\'', '\'', $output);
+ }
+
+ $i += strlen($match[0]);
+
+ return $output;
+ }
+
+ /**
+ * Parses a sequence to a YAML string.
+ *
+ * @param string $sequence
+ * @param integer $i
+ *
+ * @return string A YAML string
+ */
+ static protected function parseSequence($sequence, &$i = 0)
+ {
+ $output = array();
+ $len = strlen($sequence);
+ $i += 1;
+
+ // [foo, bar, ...]
+ while ($i < $len)
+ {
+ switch ($sequence[$i])
+ {
+ case '[':
+ // nested sequence
+ $output[] = self::parseSequence($sequence, $i);
+ break;
+ case '{':
+ // nested mapping
+ $output[] = self::parseMapping($sequence, $i);
+ break;
+ case ']':
+ return $output;
+ case ',':
+ case ' ':
+ break;
+ default:
+ $isQuoted = in_array($sequence[$i], array('"', "'"));
+ $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i);
+
+ if (!$isQuoted && false !== strpos($value, ': '))
+ {
+ // embedded mapping?
+ try
+ {
+ $value = self::parseMapping('{'.$value.'}');
+ }
+ catch (InvalidArgumentException $e)
+ {
+ // no, it's not
+ }
+ }
+
+ $output[] = $value;
+
+ --$i;
+ }
+
+ ++$i;
+ }
+
+ throw new InvalidArgumentException(sprintf('Malformed inline YAML string %s', $sequence));
+ }
+
+ /**
+ * Parses a mapping to a YAML string.
+ *
+ * @param string $mapping
+ * @param integer $i
+ *
+ * @return string A YAML string
+ */
+ static protected function parseMapping($mapping, &$i = 0)
+ {
+ $output = array();
+ $len = strlen($mapping);
+ $i += 1;
+
+ // {foo: bar, bar:foo, ...}
+ while ($i < $len)
+ {
+ switch ($mapping[$i])
+ {
+ case ' ':
+ case ',':
+ ++$i;
+ continue 2;
+ case '}':
+ return $output;
+ }
+
+ // key
+ $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false);
+
+ // value
+ $done = false;
+ while ($i < $len)
+ {
+ switch ($mapping[$i])
+ {
+ case '[':
+ // nested sequence
+ $output[$key] = self::parseSequence($mapping, $i);
+ $done = true;
+ break;
+ case '{':
+ // nested mapping
+ $output[$key] = self::parseMapping($mapping, $i);
+ $done = true;
+ break;
+ case ':':
+ case ' ':
+ break;
+ default:
+ $output[$key] = self::parseScalar($mapping, array(',', '}'), array('"', "'"), $i);
+ $done = true;
+ --$i;
+ }
+
+ ++$i;
+
+ if ($done)
+ {
+ continue 2;
+ }
+ }
+ }
+
+ throw new InvalidArgumentException(sprintf('Malformed inline YAML string %s', $mapping));
+ }
+
+ /**
+ * Evaluates scalars and replaces magic values.
+ *
+ * @param string $scalar
+ *
+ * @return string A YAML string
+ */
+ static protected function evaluateScalar($scalar)
+ {
+ $scalar = trim($scalar);
+
+ if ('1.1' === sfYaml::getSpecVersion())
+ {
+ $trueValues = array('true', 'on', '+', 'yes', 'y');
+ $falseValues = array('false', 'off', '-', 'no', 'n');
+ }
+ else
+ {
+ $trueValues = array('true');
+ $falseValues = array('false');
+ }
+
+ switch (true)
+ {
+ case 'null' == strtolower($scalar):
+ case '' == $scalar:
+ case '~' == $scalar:
+ return null;
+ case 0 === strpos($scalar, '!str'):
+ return (string) substr($scalar, 5);
+ case 0 === strpos($scalar, '! '):
+ return intval(self::parseScalar(substr($scalar, 2)));
+ case 0 === strpos($scalar, '!!php/object:'):
+ return unserialize(substr($scalar, 13));
+ case ctype_digit($scalar):
+ $raw = $scalar;
+ $cast = intval($scalar);
+ return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw);
+ case in_array(strtolower($scalar), $trueValues):
+ return true;
+ case in_array(strtolower($scalar), $falseValues):
+ return false;
+ case is_numeric($scalar):
+ return '0x' == $scalar[0].$scalar[1] ? hexdec($scalar) : floatval($scalar);
+ case 0 == strcasecmp($scalar, '.inf'):
+ case 0 == strcasecmp($scalar, '.NaN'):
+ return -log(0);
+ case 0 == strcasecmp($scalar, '-.inf'):
+ return log(0);
+ case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar):
+ return floatval(str_replace(',', '', $scalar));
+ case preg_match(self::getTimestampRegex(), $scalar):
+ return strtotime($scalar);
+ default:
+ return (string) $scalar;
+ }
+ }
+
+ static protected function getTimestampRegex()
+ {
+ return <<<EOF
+ ~^
+ (?P<year>[0-9][0-9][0-9][0-9])
+ -(?P<month>[0-9][0-9]?)
+ -(?P<day>[0-9][0-9]?)
+ (?:(?:[Tt]|[ \t]+)
+ (?P<hour>[0-9][0-9]?)
+ :(?P<minute>[0-9][0-9])
+ :(?P<second>[0-9][0-9])
+ (?:\.(?P<fraction>[0-9]*))?
+ (?:[ \t]*(?P<tz>Z|(?P<tz_sign>[-+])(?P<tz_hour>[0-9][0-9]?)
+ (?::(?P<tz_minute>[0-9][0-9]))?))?)?
+ $~x
+EOF;
+ }
+}
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlParser.php b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlParser.php
new file mode 100644
index 0000000..91da2dc
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/lib/sfYamlParser.php
@@ -0,0 +1,622 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+require_once(dirname(__FILE__).'/sfYamlInline.php');
+
+if (!defined('PREG_BAD_UTF8_OFFSET_ERROR'))
+{
+ define('PREG_BAD_UTF8_OFFSET_ERROR', 5);
+}
+
+/**
+ * sfYamlParser parses YAML strings to convert them to PHP arrays.
+ *
+ * @package symfony
+ * @subpackage yaml
+ * @author Fabien Potencier <[email protected]>
+ * @version SVN: $Id: sfYamlParser.class.php 10832 2008-08-13 07:46:08Z fabien $
+ */
+class sfYamlParser
+{
+ protected
+ $offset = 0,
+ $lines = array(),
+ $currentLineNb = -1,
+ $currentLine = '',
+ $refs = array();
+
+ /**
+ * Constructor
+ *
+ * @param integer $offset The offset of YAML document (used for line numbers in error messages)
+ */
+ public function __construct($offset = 0)
+ {
+ $this->offset = $offset;
+ }
+
+ /**
+ * Parses a YAML string to a PHP value.
+ *
+ * @param string $value A YAML string
+ *
+ * @return mixed A PHP value
+ *
+ * @throws InvalidArgumentException If the YAML is not valid
+ */
+ public function parse($value)
+ {
+ $this->currentLineNb = -1;
+ $this->currentLine = '';
+ $this->lines = explode("\n", $this->cleanup($value));
+
+ if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2)
+ {
+ $mbEncoding = mb_internal_encoding();
+ mb_internal_encoding('UTF-8');
+ }
+
+ $data = array();
+ while ($this->moveToNextLine())
+ {
+ if ($this->isCurrentLineEmpty())
+ {
+ continue;
+ }
+
+ // tab?
+ if (preg_match('#^\t+#', $this->currentLine))
+ {
+ throw new InvalidArgumentException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+
+ $isRef = $isInPlace = $isProcessed = false;
+ if (preg_match('#^\-((?P<leadspaces>\s+)(?P<value>.+?))?\s*$#u', $this->currentLine, $values))
+ {
+ if (isset($values['value']) && preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches))
+ {
+ $isRef = $matches['ref'];
+ $values['value'] = $matches['value'];
+ }
+
+ // array
+ if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#'))
+ {
+ $c = $this->getRealCurrentLineNb() + 1;
+ $parser = new sfYamlParser($c);
+ $parser->refs =& $this->refs;
+ $data[] = $parser->parse($this->getNextEmbedBlock());
+ }
+ else
+ {
+ if (isset($values['leadspaces'])
+ && ' ' == $values['leadspaces']
+ && preg_match('#^(?P<key>'.sfYamlInline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $values['value'], $matches))
+ {
+ // this is a compact notation element, add to next block and parse
+ $c = $this->getRealCurrentLineNb();
+ $parser = new sfYamlParser($c);
+ $parser->refs =& $this->refs;
+
+ $block = $values['value'];
+ if (!$this->isNextLineIndented())
+ {
+ $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + 2);
+ }
+
+ $data[] = $parser->parse($block);
+ }
+ else
+ {
+ $data[] = $this->parseValue($values['value']);
+ }
+ }
+ }
+ else if (preg_match('#^(?P<key>'.sfYamlInline::REGEX_QUOTED_STRING.'|[^ \'"].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $this->currentLine, $values))
+ {
+ $key = sfYamlInline::parseScalar($values['key']);
+
+ if ('<<' === $key)
+ {
+ if (isset($values['value']) && '*' === substr($values['value'], 0, 1))
+ {
+ $isInPlace = substr($values['value'], 1);
+ if (!array_key_exists($isInPlace, $this->refs))
+ {
+ throw new InvalidArgumentException(sprintf('Reference "%s" does not exist at line %s (%s).', $isInPlace, $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+ }
+ else
+ {
+ if (isset($values['value']) && $values['value'] !== '')
+ {
+ $value = $values['value'];
+ }
+ else
+ {
+ $value = $this->getNextEmbedBlock();
+ }
+ $c = $this->getRealCurrentLineNb() + 1;
+ $parser = new sfYamlParser($c);
+ $parser->refs =& $this->refs;
+ $parsed = $parser->parse($value);
+
+ $merged = array();
+ if (!is_array($parsed))
+ {
+ throw new InvalidArgumentException(sprintf("YAML merge keys used with a scalar value instead of an array at line %s (%s)", $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+ else if (isset($parsed[0]))
+ {
+ // Numeric array, merge individual elements
+ foreach (array_reverse($parsed) as $parsedItem)
+ {
+ if (!is_array($parsedItem))
+ {
+ throw new InvalidArgumentException(sprintf("Merge items must be arrays at line %s (%s).", $this->getRealCurrentLineNb() + 1, $parsedItem));
+ }
+ $merged = array_merge($parsedItem, $merged);
+ }
+ }
+ else
+ {
+ // Associative array, merge
+ $merged = array_merge($merge, $parsed);
+ }
+
+ $isProcessed = $merged;
+ }
+ }
+ else if (isset($values['value']) && preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches))
+ {
+ $isRef = $matches['ref'];
+ $values['value'] = $matches['value'];
+ }
+
+ if ($isProcessed)
+ {
+ // Merge keys
+ $data = $isProcessed;
+ }
+ // hash
+ else if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#'))
+ {
+ // if next line is less indented or equal, then it means that the current value is null
+ if ($this->isNextLineIndented())
+ {
+ $data[$key] = null;
+ }
+ else
+ {
+ $c = $this->getRealCurrentLineNb() + 1;
+ $parser = new sfYamlParser($c);
+ $parser->refs =& $this->refs;
+ $data[$key] = $parser->parse($this->getNextEmbedBlock());
+ }
+ }
+ else
+ {
+ if ($isInPlace)
+ {
+ $data = $this->refs[$isInPlace];
+ }
+ else
+ {
+ $data[$key] = $this->parseValue($values['value']);
+ }
+ }
+ }
+ else
+ {
+ // 1-liner followed by newline
+ if (2 == count($this->lines) && empty($this->lines[1]))
+ {
+ $value = sfYamlInline::load($this->lines[0]);
+ if (is_array($value))
+ {
+ $first = reset($value);
+ if ('*' === substr($first, 0, 1))
+ {
+ $data = array();
+ foreach ($value as $alias)
+ {
+ $data[] = $this->refs[substr($alias, 1)];
+ }
+ $value = $data;
+ }
+ }
+
+ if (isset($mbEncoding))
+ {
+ mb_internal_encoding($mbEncoding);
+ }
+
+ return $value;
+ }
+
+ switch (preg_last_error())
+ {
+ case PREG_INTERNAL_ERROR:
+ $error = 'Internal PCRE error on line';
+ break;
+ case PREG_BACKTRACK_LIMIT_ERROR:
+ $error = 'pcre.backtrack_limit reached on line';
+ break;
+ case PREG_RECURSION_LIMIT_ERROR:
+ $error = 'pcre.recursion_limit reached on line';
+ break;
+ case PREG_BAD_UTF8_ERROR:
+ $error = 'Malformed UTF-8 data on line';
+ break;
+ case PREG_BAD_UTF8_OFFSET_ERROR:
+ $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point on line';
+ break;
+ default:
+ $error = 'Unable to parse line';
+ }
+
+ throw new InvalidArgumentException(sprintf('%s %d (%s).', $error, $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+
+ if ($isRef)
+ {
+ $this->refs[$isRef] = end($data);
+ }
+ }
+
+ if (isset($mbEncoding))
+ {
+ mb_internal_encoding($mbEncoding);
+ }
+
+ return empty($data) ? null : $data;
+ }
+
+ /**
+ * Returns the current line number (takes the offset into account).
+ *
+ * @return integer The current line number
+ */
+ protected function getRealCurrentLineNb()
+ {
+ return $this->currentLineNb + $this->offset;
+ }
+
+ /**
+ * Returns the current line indentation.
+ *
+ * @return integer The current line indentation
+ */
+ protected function getCurrentLineIndentation()
+ {
+ return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' '));
+ }
+
+ /**
+ * Returns the next embed block of YAML.
+ *
+ * @param integer $indentation The indent level at which the block is to be read, or null for default
+ *
+ * @return string A YAML string
+ */
+ protected function getNextEmbedBlock($indentation = null)
+ {
+ $this->moveToNextLine();
+
+ if (null === $indentation)
+ {
+ $newIndent = $this->getCurrentLineIndentation();
+
+ if (!$this->isCurrentLineEmpty() && 0 == $newIndent)
+ {
+ throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+ }
+ else
+ {
+ $newIndent = $indentation;
+ }
+
+ $data = array(substr($this->currentLine, $newIndent));
+
+ while ($this->moveToNextLine())
+ {
+ if ($this->isCurrentLineEmpty())
+ {
+ if ($this->isCurrentLineBlank())
+ {
+ $data[] = substr($this->currentLine, $newIndent);
+ }
+
+ continue;
+ }
+
+ $indent = $this->getCurrentLineIndentation();
+
+ if (preg_match('#^(?P<text> *)$#', $this->currentLine, $match))
+ {
+ // empty line
+ $data[] = $match['text'];
+ }
+ else if ($indent >= $newIndent)
+ {
+ $data[] = substr($this->currentLine, $newIndent);
+ }
+ else if (0 == $indent)
+ {
+ $this->moveToPreviousLine();
+
+ break;
+ }
+ else
+ {
+ throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine));
+ }
+ }
+
+ return implode("\n", $data);
+ }
+
+ /**
+ * Moves the parser to the next line.
+ */
+ protected function moveToNextLine()
+ {
+ if ($this->currentLineNb >= count($this->lines) - 1)
+ {
+ return false;
+ }
+
+ $this->currentLine = $this->lines[++$this->currentLineNb];
+
+ return true;
+ }
+
+ /**
+ * Moves the parser to the previous line.
+ */
+ protected function moveToPreviousLine()
+ {
+ $this->currentLine = $this->lines[--$this->currentLineNb];
+ }
+
+ /**
+ * Parses a YAML value.
+ *
+ * @param string $value A YAML value
+ *
+ * @return mixed A PHP value
+ */
+ protected function parseValue($value)
+ {
+ if ('*' === substr($value, 0, 1))
+ {
+ if (false !== $pos = strpos($value, '#'))
+ {
+ $value = substr($value, 1, $pos - 2);
+ }
+ else
+ {
+ $value = substr($value, 1);
+ }
+
+ if (!array_key_exists($value, $this->refs))
+ {
+ throw new InvalidArgumentException(sprintf('Reference "%s" does not exist (%s).', $value, $this->currentLine));
+ }
+ return $this->refs[$value];
+ }
+
+ if (preg_match('/^(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?$/', $value, $matches))
+ {
+ $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
+
+ return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers)));
+ }
+ else
+ {
+ return sfYamlInline::load($value);
+ }
+ }
+
+ /**
+ * Parses a folded scalar.
+ *
+ * @param string $separator The separator that was used to begin this folded scalar (| or >)
+ * @param string $indicator The indicator that was used to begin this folded scalar (+ or -)
+ * @param integer $indentation The indentation that was used to begin this folded scalar
+ *
+ * @return string The text value
+ */
+ protected function parseFoldedScalar($separator, $indicator = '', $indentation = 0)
+ {
+ $separator = '|' == $separator ? "\n" : ' ';
+ $text = '';
+
+ $notEOF = $this->moveToNextLine();
+
+ while ($notEOF && $this->isCurrentLineBlank())
+ {
+ $text .= "\n";
+
+ $notEOF = $this->moveToNextLine();
+ }
+
+ if (!$notEOF)
+ {
+ return '';
+ }
+
+ if (!preg_match('#^(?P<indent>'.($indentation ? str_repeat(' ', $indentation) : ' +').')(?P<text>.*)$#u', $this->currentLine, $matches))
+ {
+ $this->moveToPreviousLine();
+
+ return '';
+ }
+
+ $textIndent = $matches['indent'];
+ $previousIndent = 0;
+
+ $text .= $matches['text'].$separator;
+ while ($this->currentLineNb + 1 < count($this->lines))
+ {
+ $this->moveToNextLine();
+
+ if (preg_match('#^(?P<indent> {'.strlen($textIndent).',})(?P<text>.+)$#u', $this->currentLine, $matches))
+ {
+ if (' ' == $separator && $previousIndent != $matches['indent'])
+ {
+ $text = substr($text, 0, -1)."\n";
+ }
+ $previousIndent = $matches['indent'];
+
+ $text .= str_repeat(' ', $diff = strlen($matches['indent']) - strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator);
+ }
+ else if (preg_match('#^(?P<text> *)$#', $this->currentLine, $matches))
+ {
+ $text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '', $matches['text'])."\n";
+ }
+ else
+ {
+ $this->moveToPreviousLine();
+
+ break;
+ }
+ }
+
+ if (' ' == $separator)
+ {
+ // replace last separator by a newline
+ $text = preg_replace('/ (\n*)$/', "\n$1", $text);
+ }
+
+ switch ($indicator)
+ {
+ case '':
+ $text = preg_replace('#\n+$#s', "\n", $text);
+ break;
+ case '+':
+ break;
+ case '-':
+ $text = preg_replace('#\n+$#s', '', $text);
+ break;
+ }
+
+ return $text;
+ }
+
+ /**
+ * Returns true if the next line is indented.
+ *
+ * @return Boolean Returns true if the next line is indented, false otherwise
+ */
+ protected function isNextLineIndented()
+ {
+ $currentIndentation = $this->getCurrentLineIndentation();
+ $notEOF = $this->moveToNextLine();
+
+ while ($notEOF && $this->isCurrentLineEmpty())
+ {
+ $notEOF = $this->moveToNextLine();
+ }
+
+ if (false === $notEOF)
+ {
+ return false;
+ }
+
+ $ret = false;
+ if ($this->getCurrentLineIndentation() <= $currentIndentation)
+ {
+ $ret = true;
+ }
+
+ $this->moveToPreviousLine();
+
+ return $ret;
+ }
+
+ /**
+ * Returns true if the current line is blank or if it is a comment line.
+ *
+ * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise
+ */
+ protected function isCurrentLineEmpty()
+ {
+ return $this->isCurrentLineBlank() || $this->isCurrentLineComment();
+ }
+
+ /**
+ * Returns true if the current line is blank.
+ *
+ * @return Boolean Returns true if the current line is blank, false otherwise
+ */
+ protected function isCurrentLineBlank()
+ {
+ return '' == trim($this->currentLine, ' ');
+ }
+
+ /**
+ * Returns true if the current line is a comment line.
+ *
+ * @return Boolean Returns true if the current line is a comment line, false otherwise
+ */
+ protected function isCurrentLineComment()
+ {
+ //checking explicitly the first char of the trim is faster than loops or strpos
+ $ltrimmedLine = ltrim($this->currentLine, ' ');
+ return $ltrimmedLine[0] === '#';
+ }
+
+ /**
+ * Cleanups a YAML string to be parsed.
+ *
+ * @param string $value The input YAML string
+ *
+ * @return string A cleaned up YAML string
+ */
+ protected function cleanup($value)
+ {
+ $value = str_replace(array("\r\n", "\r"), "\n", $value);
+
+ if (!preg_match("#\n$#", $value))
+ {
+ $value .= "\n";
+ }
+
+ // strip YAML header
+ $count = 0;
+ $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#su', '', $value, -1, $count);
+ $this->offset += $count;
+
+ // remove leading comments
+ $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count);
+ if ($count == 1)
+ {
+ // items have been removed, update the offset
+ $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
+ $value = $trimmedValue;
+ }
+
+ // remove start of the document marker (---)
+ $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count);
+ if ($count == 1)
+ {
+ // items have been removed, update the offset
+ $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n");
+ $value = $trimmedValue;
+
+ // remove end of the document marker (...)
+ $value = preg_replace('#\.\.\.\s*$#s', '', $value);
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/kostache/vendor/mustache/test/lib/yaml/package.xml b/modules/kostache/vendor/mustache/test/lib/yaml/package.xml
new file mode 100644
index 0000000..1869ae9
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/lib/yaml/package.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<package packagerversion="1.4.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+ <name>YAML</name>
+ <channel>pear.symfony-project.com</channel>
+ <summary>The Symfony YAML Component.</summary>
+ <description>The Symfony YAML Component.</description>
+ <lead>
+ <name>Fabien Potencier</name>
+ <user>fabpot</user>
+ <email>[email protected]</email>
+ <active>yes</active>
+ </lead>
+ <date>2009-12-01</date>
+ <version>
+ <release>1.0.2</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.symfony-project.com/license">MIT license</license>
+ <notes>-</notes>
+ <contents>
+ <dir name="/">
+ <file name="README.markdown" role="doc" />
+ <file name="LICENSE" role="doc" />
+
+ <dir name="lib">
+ <file install-as="SymfonyComponents/YAML/sfYaml.php" name="sfYaml.php" role="php" />
+ <file install-as="SymfonyComponents/YAML/sfYamlDumper.php" name="sfYamlDumper.php" role="php" />
+ <file install-as="SymfonyComponents/YAML/sfYamlInline.php" name="sfYamlInline.php" role="php" />
+ <file install-as="SymfonyComponents/YAML/sfYamlParser.php" name="sfYamlParser.php" role="php" />
+ </dir>
+ </dir>
+ </contents>
+
+ <dependencies>
+ <required>
+ <php>
+ <min>5.2.4</min>
+ </php>
+ <pearinstaller>
+ <min>1.4.1</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+
+ <phprelease>
+ </phprelease>
+
+ <changelog>
+ <release>
+ <version>
+ <release>1.0.2</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.symfony-project.com/license">MIT license</license>
+ <date>2009-12-01</date>
+ <license>MIT</license>
+ <notes>
+ * fabien: fixed \ usage in quoted string
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0.1</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.symfony-project.com/license">MIT license</license>
+ <date>2009-12-01</date>
+ <license>MIT</license>
+ <notes>
+ * fabien: fixed a possible loop in parsing a non-valid quoted string
+ </notes>
+ </release>
+ <release>
+ <version>
+ <release>1.0.0</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.symfony-project.com/license">MIT license</license>
+ <date>2009-11-30</date>
+ <license>MIT</license>
+ <notes>
+ * fabien: first stable release as a Symfony Component
+ </notes>
+ </release>
+ </changelog>
+</package>
diff --git a/modules/kostache/vendor/mustache/test/phpunit.xml b/modules/kostache/vendor/mustache/test/phpunit.xml
new file mode 100644
index 0000000..891fa8e
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/phpunit.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit colors="true">
+ <testsuite name="Mustache">
+ <directory>./</directory>
+ </testsuite>
+ <blacklist>
+ <directory suffix=".php">../examples</directory>
+ <directory suffix=".php">./</directory>
+ </blacklist>
+</phpunit>
\ No newline at end of file
diff --git a/modules/kostache/vendor/mustache/test/spec/README.md b/modules/kostache/vendor/mustache/test/spec/README.md
new file mode 100644
index 0000000..69c3338
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/README.md
@@ -0,0 +1,9 @@
+This repository acts as an attempt at specifying both standard- and edge-case
+behavior for libraries parsing Mustache (or a superset thereof). Early
+development will focus on describing idealized output, with later work being
+done to normalize expectations. *It is not expected that any implementation
+support any draft prior to v1.0.0.*
+
+As implementers work to build their own parsers, testing scripts may be
+contributed to the 'scripts' directory, and code snippets (e.g. for lambdas)
+may be provided as well (location TBD).
diff --git a/modules/kostache/vendor/mustache/test/spec/TESTING.md b/modules/kostache/vendor/mustache/test/spec/TESTING.md
new file mode 100644
index 0000000..cb06e74
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/TESTING.md
@@ -0,0 +1,42 @@
+Testing your Mustache implementation against this specification should be
+relatively simple. If you have a readily available testing framework on your
+platform, your task may be even simpler.
+
+In general, the process for each `.yml` file is as follows:
+
+1. Use a YAML parser to load the file.
+
+2. For each test in the 'tests' array:
+
+ 1. Ensure that each element of the 'partials' hash (if it exists) is
+ stored in a place where the interpreter will look for it.
+
+ 2. If your implementation supports lambdas, ensure that each member of 'data'
+ tagged with '!code' is properly processed into a language-specific
+ lambda reference.
+
+ * e.g. Given this YAML data hash:
+
+ `{ x: !code { ruby: 'proc { "x" }', perl: 'sub { "x" }' } }`
+
+ a Ruby-based Mustache implementation would process it such that it
+ was equivalent to this Ruby hash:
+
+ `{ 'x' => proc { "x" } }`
+
+ * If your implementation language does not currently have lambda
+ examples in the spec, feel free to implement them and send a pull
+ request.
+ * If your implementation does not support lambdas, feel free to skip
+ over the `lambdas.yml` file.
+
+ 3. Render the template (stored in the 'template' key) with the given 'data'
+ hash.
+
+ 4. Compare the results of your rendering against the 'expected' value; any
+ differences should be reported, along with any useful debugging
+ information.
+
+ * Of note, the 'desc' key contains a rough one-line description of the
+ behavior being tested -- this is most useful in conjunction with the
+ file name and test 'name'.
diff --git a/modules/kostache/vendor/mustache/test/spec/scripts/mustache-gem.rb b/modules/kostache/vendor/mustache/test/spec/scripts/mustache-gem.rb
new file mode 100755
index 0000000..e4fcc24
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/scripts/mustache-gem.rb
@@ -0,0 +1,59 @@
+#!/usr/bin/env ruby
+
+require 'rubygems'
+require 'mustache'
+require 'tmpdir'
+require 'yaml'
+require 'test/unit'
+
+YAML::add_builtin_type('code') { |_, val| eval(val['ruby']) }
+
+class MustacheSpec < Test::Unit::TestCase
+ def setup
+ @partials = File.join(File.dirname(__FILE__), '..', 'partials')
+ Dir.mkdir(@partials)
+ Mustache.template_path = @partials
+ end
+
+ def teardown
+ Dir[File.join(@partials, '*')].each { |file| File.delete(file) }
+ Dir.rmdir(@partials)
+ end
+
+ def setup_partials(test)
+ (test['partials'] || {}).each do |name, content|
+ File.open(File.join(@partials, "#{name}.mustache"), 'w') do |f|
+ f.print(content)
+ end
+ end
+ end
+
+ def assert_mustache_spec(test)
+ actual = Mustache.render(test['template'], test['data'])
+
+ assert_equal test['expected'], actual, "" <<
+ "#{ test['desc'] }\n" <<
+ "Data: #{ test['data'].inspect }\n" <<
+ "Template: #{ test['template'].inspect }\n" <<
+ "Partials: #{ (test['partials'] || {}).inspect }\n"
+ end
+
+ def test_noop; assert(true); end
+end
+
+Dir[File.join(File.dirname(__FILE__), '..', 'specs', '*.yml')].each do |file|
+ spec = YAML.load_file(file)
+
+ Class.new(MustacheSpec) do
+ define_method :name do
+ File.basename(file).sub(/^./, &:upcase)
+ end
+
+ spec['tests'].each do |test|
+ define_method :"test - #{test['name']}" do
+ setup_partials(test)
+ assert_mustache_spec(test)
+ end
+ end
+ end
+end
diff --git a/modules/kostache/vendor/mustache/test/spec/scripts/template-mustache.pl b/modules/kostache/vendor/mustache/test/spec/scripts/template-mustache.pl
new file mode 100755
index 0000000..c86b48b
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/scripts/template-mustache.pl
@@ -0,0 +1,108 @@
+#!/usr/bin/env perl
+
+use Test::Mini;
+
+use strict;
+use warnings;
+use Test::Mini::Assertions;
+
+use Data::Dumper;
+$Data::Dumper::Terse = 1;
+$Data::Dumper::Useqq = 1;
+$Data::Dumper::Quotekeys = 0;
+$Data::Dumper::Indent = 0;
+$Data::Dumper::Sortkeys = 1;
+$Data::Dumper::Deparse = 1;
+
+use File::Basename qw/ basename dirname /;
+use File::Spec::Functions qw/ catdir catfile /;
+use Template::Mustache;
+use YAML::XS ();
+
+{
+ # YAML::XS will automatically bless lambdas as a new instance of this.
+ package code;
+ use overload '&{}' => sub { eval shift->{perl} }
+}
+
+{
+ package MustacheSpec;
+ use base 'Test::Mini::TestCase';
+
+ use File::Path qw/ rmtree /;
+ use File::Basename qw/ dirname /;
+ use File::Spec::Functions qw/ catdir catfile /;
+
+ sub setup {
+ my ($self) = @_;
+ $self->{partials} = catdir(dirname(__FILE__), '..', 'partials');
+ mkdir($self->{partials});
+ Template::Mustache->CONFIG(template_path => $self->{partials});
+ };
+
+ sub setup_partials {
+ my ($self, $test) = @_;
+ for my $name (keys %{$test->{partials} || {}}) {
+ my $filename = catfile($self->{partials}, "$name.mustache");
+ open *FH, '>', $filename;
+ print FH $test->{partials}->{$name};
+ close FH;
+ }
+ }
+
+ sub setup_data {
+ my ($self, $test) = @_;
+ return unless $test->{data};
+ for my $key (keys %{$test->{data}}) {
+ my $value = $test->{data}->{$key};
+ next unless ref $value;
+
+ if (ref $value eq 'code') {
+ $test->{data}->{$key} = \&$value;
+ } elsif (ref $value eq 'HASH') {
+ $self->setup_data({ data => $value });
+ }
+ }
+ }
+
+ sub teardown {
+ my ($self) = @_;
+ rmtree($self->{partials});
+ }
+}
+
+sub assert_mustache_spec {
+ my ($test) = @_;
+
+ my $expected = $test->{expected};
+ my $tmpl = $test->{template};
+ my $data = $test->{data};
+
+ my $actual = Template::Mustache->render($tmpl, $data);
+
+ assert_equal($actual, $expected,
+ "$test->{desc}\n".
+ "Data: @{[ Dumper $test->{data} ]}\n".
+ "Template: @{[ Dumper $test->{template} ]}\n".
+ "Partials: @{[ Dumper ($test->{partials} || {}) ]}\n"
+ );
+}
+
+for my $file (glob catfile(dirname(__FILE__), '..', 'specs', '*.yml')) {
+ my $spec = YAML::XS::LoadFile($file);
+ my $pkg = ucfirst(basename($file));
+
+ no strict 'refs';
+ @{"$pkg\::ISA"} = 'MustacheSpec';
+
+ for my $test (@{$spec->{tests}}) {
+ (my $name = $test->{name}) =~ s/'/"/g;
+
+ *{"$pkg\::test - @{[$name]}"} = sub {
+ my ($self) = @_;
+ $self->setup_partials($test);
+ $self->setup_data($test);
+ assert_mustache_spec($test);
+ };
+ }
+}
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/comments.yml b/modules/kostache/vendor/mustache/test/spec/specs/comments.yml
new file mode 100644
index 0000000..38ab927
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/comments.yml
@@ -0,0 +1,56 @@
+tests:
+ - name: Inline
+ desc: Comment blocks should be removed from the template.
+ data: { }
+ template: '12345{{! Comment Block! }}67890'
+ expected: '1234567890'
+
+ - name: Multiline
+ desc: Multiline comments should be permitted.
+ data: { }
+ template: |
+ 12345{{!
+ This is a
+ multi-line comment...
+ }}67890
+ expected: |
+ 1234567890
+
+ - name: Standalone
+ desc: Standalone comment lines should be entirely removed.
+ data: { }
+ template: |
+ 123
+ {{! Comment Block! }}
+ 4567
+ {{! Indented Comment Block! }}
+ 890
+ expected: |
+ 123
+ 4567
+ 890
+
+ - name: Multiline Standalone
+ desc: All lines of a standalone multiline comment should be removed.
+ data: { }
+ template: |
+ Hello
+ {{!
+ Something's going on here...
+ }}
+ Goodbye
+ expected: |
+ Hello
+ Goodbye
+
+ - name: Indented Inline
+ desc: Inline comments should not strip whitespace
+ data: { }
+ template: " 12 {{! 34 }}\n"
+ expected: " 12 \n"
+
+ - name: Surrounding Whitespace
+ desc: Comment removal should preserve surrounding whitespace.
+ data: { }
+ template: '12345 {{! Comment Block! }} 67890'
+ expected: '12345 67890'
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/delimiters.yml b/modules/kostache/vendor/mustache/test/spec/specs/delimiters.yml
new file mode 100644
index 0000000..71bdddd
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/delimiters.yml
@@ -0,0 +1,80 @@
+tests:
+ - name: Single Equals
+ desc: A single equals sign should be sufficient to change delimiters.
+ data: { text: 'Hey!' }
+ template: '{{=<% %>}}(<%text%>)'
+ expected: '(Hey!)'
+
+ - name: Mirrored Equals
+ desc: Surrounding equals signs should be permitted.
+ data: { text: 'Hey!' }
+ template: '{{=<% %>=}}(<%text%>)'
+ expected: '(Hey!)'
+
+ # Whitespace Sensitivity
+
+ - name: Single Equals - Surrounding Whitespace
+ desc: Surrounding whitespace should be left untouched.
+ data: { }
+ template: '| {{=@ @}} |'
+ expected: '| |'
+
+ - name: Mirrored Equals - Surrounding Whitespace
+ desc: Surrounding whitespace should be left untouched.
+ data: { }
+ template: '| {{=@ @=}} |'
+ expected: '| |'
+
+ - name: Single Equals (Inline) - Outlying Whitespace
+ desc: Whitespace should be left untouched.
+ data: { }
+ template: " | {{=@ @}}\n"
+ expected: " | \n"
+
+ - name: Mirrored Equals (Inline) - Outlying Whitespace
+ desc: Whitespace should be left untouched.
+ data: { }
+ template: " | {{=@ @=}}\n"
+ expected: " | \n"
+
+ - name: Single Equals (Standalone)
+ desc: Standalone lines should be removed from the template.
+ data: { }
+ template: |
+ Begin.
+ {{=@ @}}
+ Middle.
+ @={{ }}@
+ End.
+ expected: |
+ Begin.
+ Middle.
+ End.
+
+ - name: Mirrored Equals (Standalone)
+ desc: Standalone lines should be removed from the template.
+ data: { }
+ template: |
+ Begin.
+ {{=@ @=}}
+ Middle.
+ @={{ }}=@
+ End.
+ expected: |
+ Begin.
+ Middle.
+ End.
+
+ # Whitespace Insensitivity
+
+ - name: Single Equals With Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { }
+ template: '|{{= @ @ }}|'
+ expected: '||'
+
+ - name: Mirrored Equals With Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { }
+ template: '|{{= @ @ =}}|'
+ expected: '||'
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/interpolation.yml b/modules/kostache/vendor/mustache/test/spec/specs/interpolation.yml
new file mode 100644
index 0000000..d1fc6b9
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/interpolation.yml
@@ -0,0 +1,98 @@
+tests:
+ - name: No Interpolation
+ desc: Mustache-free templates should render as-is.
+ data: { }
+ template: |
+ Hello from {Mustache}!
+ expected: |
+ Hello from {Mustache}!
+
+ - name: Basic Interpolation
+ desc: Unadorned tags should interpolate content into the template.
+ data: { subject: "world" }
+ template: |
+ Hello, {{subject}}!
+ expected: |
+ Hello, world!
+
+ - name: HTML Escaping
+ desc: Basic interpolation should be HTML escaped.
+ data: { forbidden: '& " < >' }
+ template: |
+ These characters should be HTML escaped: {{forbidden}}
+ expected: |
+ These characters should be HTML escaped: & " < >
+
+ - name: Triple Mustache
+ desc: Triple mustaches should interpolate without HTML escaping.
+ data: { forbidden: '& " < >' }
+ template: |
+ These characters should not be HTML escaped: {{{forbidden}}}
+ expected: |
+ These characters should not be HTML escaped: & " < >
+
+ - name: Ampersand
+ desc: Ampersand should interpolate without HTML escaping.
+ data: { forbidden: '& " < >' }
+ template: |
+ These characters should not be HTML escaped: {{&forbidden}}
+ expected: |
+ These characters should not be HTML escaped: & " < >
+
+ # Whitespace Sensitivity
+
+ - name: Interpolation - Surrounding Whitespace
+ desc: Interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: '| {{string}} |'
+ expected: '| --- |'
+
+ - name: Triple Mustache - Surrounding Whitespace
+ desc: Interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: '| {{{string}}} |'
+ expected: '| --- |'
+
+ - name: Ampersand - Surrounding Whitespace
+ desc: Interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: '| {{&string}} |'
+ expected: '| --- |'
+
+ - name: Interpolation - Standalone
+ desc: Standalone interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: " {{string}}\n"
+ expected: " ---\n"
+
+ - name: Triple Mustache - Standalone
+ desc: Standalone interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: " {{{string}}}\n"
+ expected: " ---\n"
+
+ - name: Ampersand - Standalone
+ desc: Standalone interpolation should not alter surrounding whitespace.
+ data: { string: '---' }
+ template: " {{&string}}\n"
+ expected: " ---\n"
+
+ # Whitespace Insensitivity
+
+ - name: Interpolation With Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { string: "---" }
+ template: '|{{ string }}|'
+ expected: '|---|'
+
+ - name: Triple Mustache With Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { string: "---" }
+ template: '|{{{ string }}}|'
+ expected: '|---|'
+
+ - name: Ampersand With Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { string: "---" }
+ template: '|{{& string }}|'
+ expected: '|---|'
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/inverted.yml b/modules/kostache/vendor/mustache/test/spec/specs/inverted.yml
new file mode 100644
index 0000000..ed43175
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/inverted.yml
@@ -0,0 +1,82 @@
+tests:
+ - name: Falsey
+ desc: Falsey sections should have their contents rendered.
+ data: { boolean: false }
+ template: '{{^boolean}}This should be rendered.{{/boolean}}'
+ expected: 'This should be rendered.'
+
+ - name: Truthy
+ desc: Truthy sections should have their contents omitted.
+ data: { boolean: true }
+ template: '{{^boolean}}This should not be rendered.{{/boolean}}'
+ expected: ''
+
+ - name: Context
+ desc: Objects and hashes should behave like truthy values.
+ data: { context: { name: 'Joe' } }
+ template: '{{^context}}Hi {{name}}.{{/context}}'
+ expected: ''
+
+ - name: List
+ desc: Lists should behave like truthy values.
+ data: { list: [ { n: 1 }, { n: 2 }, { n: 3 } ] }
+ template: '{{^list}}{{n}}{{/list}}'
+ expected: ''
+
+ - name: Empty List
+ desc: Empty lists should behave like falsey values.
+ data: { list: [ ] }
+ template: '{{^list}}Yay lists!{{/list}}'
+ expected: 'Yay lists!'
+
+ - name: Doubled
+ desc: Multiple inverted sections per template should be permitted.
+ data: { t: false, two: 'second' }
+ template: |
+ {{^t}}
+ * first
+ {{/t}}
+ * {{two}}
+ {{^t}}
+ * third
+ {{/t}}
+ expected: |
+ * first
+ * second
+ * third
+
+ # Whitespace Sensitivity
+
+ - name: Surrounding Whitespace
+ desc: Inverted sections should not alter surrounding whitespace.
+ data: { boolean: false }
+ template: " | {{^boolean}}\t|\t{{/boolean}} | \n"
+ expected: " | \t|\t | \n"
+
+ - name: Standalone Lines
+ desc: Standalone lines should be removed from the template.
+ data: { boolean: false }
+ template: |
+ | This
+ {{^boolean}}
+ | Is
+ {{/boolean}}
+ |
+ {{^boolean}}
+ | A
+ {{/boolean}}
+ | Line
+ expected: |
+ | This
+ | Is
+ |
+ | A
+ | Line
+
+ # Whitespace Insensitivity
+
+ - name: Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { boolean: false }
+ template: '|{{^ boolean }}={{/ boolean }}|'
+ expected: '|=|'
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/lambdas.yml b/modules/kostache/vendor/mustache/test/spec/specs/lambdas.yml
new file mode 100644
index 0000000..d61f456
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/lambdas.yml
@@ -0,0 +1,67 @@
+tests:
+ - name: Interpolation
+ desc: A lambda's return value should be interpolated.
+ data:
+ lambda: !code
+ ruby: 'proc { "world" }'
+ perl: 'sub { "world" }'
+ template: "Hello, {{lambda}}!"
+ expected: "Hello, world!"
+
+ - name: Interpolation - Expansion
+ desc: A lambda's return value should be parsed.
+ data:
+ planet: "world"
+ lambda: !code
+ ruby: 'proc { "{{planet}}" }'
+ perl: 'sub { "{{planet}}" }'
+ template: "Hello, {{lambda}}!"
+ expected: "Hello, world!"
+
+ - name: Interpolation - Multiple Calls
+ desc: Interpolated lambdas should only be called once.
+ data:
+ lambda: !code
+ ruby: 'proc { $calls ||= 0; $calls += 1 }'
+ perl: 'sub { no strict; $calls += 1 }'
+ template: '{{lambda}} == {{{lambda}}} == {{lambda}}'
+ expected: '1 == 1 == 1'
+
+ - name: Escaping
+ desc: Lambda results should be appropriately escaped.
+ data:
+ lambda: !code
+ ruby: 'proc { ">" }'
+ perl: 'sub { ">" }'
+ template: "<{{lambda}}{{{lambda}}}"
+ expected: "<>>"
+
+ - name: Section
+ desc: Lambdas used for sections should receive the raw section string.
+ data:
+ x: 'Error!'
+ lambda: !code
+ ruby: 'proc { |text| text == "{{x}}" ? "yes" : "no" }'
+ perl: 'sub { $_[0] eq "{{x}}" ? "yes" : "no" }'
+ template: "<{{#lambda}}{{x}}{{/lambda}}>"
+ expected: "<yes>"
+
+ - name: Section - Expansion
+ desc: Lambdas used for sections should have their results parsed.
+ data:
+ planet: "Earth"
+ lambda: !code
+ ruby: 'proc { |text| "#{text}{{planet}}#{text}" }'
+ perl: 'sub { $_[0] . "{{planet}}" . $_[0] }'
+ template: "<{{#lambda}}-{{/lambda}}>"
+ expected: "<-Earth->"
+
+ - name: Inverted Section
+ desc: Lambdas used for inverted sections should be considered truthy.
+ data:
+ static: 'static'
+ lambda: !code
+ ruby: 'proc { |text| text }'
+ perl: 'sub { shift }'
+ template: "<{{^lambda}}{{static}}{{/lambda}}>"
+ expected: "<>"
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/partials.yml b/modules/kostache/vendor/mustache/test/spec/specs/partials.yml
new file mode 100644
index 0000000..ad7f4eb
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/partials.yml
@@ -0,0 +1,122 @@
+tests:
+ - name: '>'
+ desc: The greater-than operator should expand to the named partial.
+ data: { }
+ template: '"{{>text}}"'
+ partials: { text: 'from partial' }
+ expected: '"from partial"'
+
+ - name: '<'
+ desc: The less-than operator should expand to the named partial.
+ data: { }
+ template: '"{{<text}}"'
+ partials: { text: 'from partial' }
+ expected: '"from partial"'
+
+ - name: '> - Context'
+ desc: The greater-than operator should operate within the current context.
+ data: { text: 'content' }
+ template: '"{{>partial}}"'
+ partials: { partial: '*{{text}}*' }
+ expected: '"*content*"'
+
+ - name: '< - Context'
+ desc: The less-than operator should operate within the current context.
+ data: { text: 'content' }
+ template: '"{{<partial}}"'
+ partials: { partial: '*{{text}}*' }
+ expected: '"*content*"'
+
+ - name: '> - Recursion'
+ desc: The greater-than operator should properly recurse.
+ data: { content: X, nodes: [ { content: Y, nodes: [] } ] }
+ template: '{{>node}}'
+ partials: { node: '{{content}}<{{#nodes}}{{>node}}{{/nodes}}>' }
+ expected: 'X<Y<>>'
+
+ - name: '< - Recursion'
+ desc: The greater-than operator should properly recurse.
+ data: { content: X, nodes: [ { content: Y, nodes: [] } ] }
+ template: '{{<node}}'
+ partials: { node: '{{content}}<{{#nodes}}{{<node}}{{/nodes}}>' }
+ expected: 'X<Y<>>'
+
+ # Whitespace Sensitivity
+
+ - name: '> - Surrounding Whitespace'
+ desc: The greater-than operator should not alter surrounding whitespace.
+ data: { }
+ template: '| {{>partial}} |'
+ partials: { partial: "\t|\t" }
+ expected: "| \t|\t |"
+
+ - name: '< - Surrounding Whitespace'
+ desc: The less-than operator should not alter surrounding whitespace.
+ data: { }
+ template: '| {{<partial}} |'
+ partials: { partial: "\t|\t" }
+ expected: "| \t|\t |"
+
+ - name: '> - Inline Indentation'
+ desc: Whitespace should be left untouched.
+ data: { data: '|' }
+ template: " {{data}} {{> partial}}\n"
+ partials: { partial: ">\n>" }
+ expected: " | >\n>\n"
+
+ - name: '< - Inline Indentation'
+ desc: Whitespace should be left untouched.
+ data: { data: '|' }
+ template: " {{data}} {{< partial}}\n"
+ partials: { partial: "<\n<" }
+ expected: " | <\n<\n"
+
+ - name: '> - Standalone Indentation'
+ desc: Indentation should be prepended to each line of the partial.
+ data: { }
+ template: |
+ \
+ {{>partial}}
+ /
+ partials:
+ partial: |
+ |
+ |
+ expected: |
+ \
+ |
+ |
+ /
+
+ - name: '< - Standalone Indentation'
+ desc: Indentation should be prepended to each line of the partial.
+ data: { }
+ template: |
+ \
+ {{<partial}}
+ /
+ partials:
+ partial: |
+ |
+ |
+ expected: |
+ \
+ |
+ |
+ /
+
+ # Whitespace Insensitivity
+
+ - name: '> - Padding Whitespace'
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { boolean: true }
+ template: "|{{> partial }}|"
+ partials: { partial: "=" }
+ expected: '|=|'
+
+ - name: '< - Padding Whitespace'
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { boolean: true }
+ template: "|{{< partial }}|"
+ partials: { partial: "=" }
+ expected: '|=|'
diff --git a/modules/kostache/vendor/mustache/test/spec/specs/sections.yml b/modules/kostache/vendor/mustache/test/spec/specs/sections.yml
new file mode 100644
index 0000000..f4445c3
--- /dev/null
+++ b/modules/kostache/vendor/mustache/test/spec/specs/sections.yml
@@ -0,0 +1,82 @@
+tests:
+ - name: Truthy
+ desc: Truthy sections should have their contents rendered.
+ data: { boolean: true }
+ template: '{{#boolean}}This should be rendered.{{/boolean}}'
+ expected: 'This should be rendered.'
+
+ - name: Falsey
+ desc: Falsey sections should have their contents omitted.
+ data: { boolean: false }
+ template: '{{#boolean}}This should not be rendered.{{/boolean}}'
+ expected: ''
+
+ - name: Context
+ desc: Objects and hashes should be pushed onto the context stack.
+ data: { context: { name: 'Joe' } }
+ template: '{{#context}}Hi {{name}}.{{/context}}'
+ expected: 'Hi Joe.'
+
+ - name: List
+ desc: Lists should be iterated; list items should visit the context stack.
+ data: { list: [ { n: 1 }, { n: 2 }, { n: 3 } ] }
+ template: '{{#list}}{{n}}{{/list}}'
+ expected: '123'
+
+ - name: Empty List
+ desc: Empty lists should behave like falsey values.
+ data: { list: [ ] }
+ template: '{{#list}}Yay lists!{{/list}}'
+ expected: ''
+
+ - name: Doubled
+ desc: Multiple sections per template should be permitted.
+ data: { t: true, two: 'second' }
+ template: |
+ {{#t}}
+ * first
+ {{/t}}
+ * {{two}}
+ {{#t}}
+ * third
+ {{/t}}
+ expected: |
+ * first
+ * second
+ * third
+
+ # Whitespace Sensitivity
+
+ - name: Surrounding Whitespace
+ desc: Sections should not alter surrounding whitespace.
+ data: { boolean: true }
+ template: " | {{#boolean}}\t|\t{{/boolean}} | \n"
+ expected: " | \t|\t | \n"
+
+ - name: Standalone Lines
+ desc: Standalone lines should be removed from the template.
+ data: { boolean: true }
+ template: |
+ | This
+ {{#boolean}}
+ | Is
+ {{/boolean}}
+ |
+ {{#boolean}}
+ | A
+ {{/boolean}}
+ | Line
+ expected: |
+ | This
+ | Is
+ |
+ | A
+ | Line
+
+ # Whitespace Insensitivity
+
+ - name: Padding
+ desc: Superfluous in-tag whitespace should be ignored.
+ data: { boolean: true }
+ template: '|{{# boolean }}={{/ boolean }}|'
+ expected: '|=|'
|
kohana/kohanaframework.org | 0ef48ff3b6ee387625a0bc625767c7e151a8b54e | remove submodule for kostache | diff --git a/.gitmodules b/.gitmodules
index 4aa9f4e..e6550c4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,30 +1,27 @@
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
[submodule "modules/userguide"]
path = modules/userguide
url = git://github.com/kohana/userguide.git
[submodule "modules/cache"]
path = modules/cache
url = git://github.com/kohana/cache.git
[submodule "modules/oauth"]
path = modules/oauth
url = git://github.com/kohana/oauth.git
-[submodule "modules/kostache"]
- path = modules/kostache
- url = https://github.com/zombor/KOstache.git
[submodule "modules/gallery/vendor/slides"]
path = modules/gallery/vendor/slides
url = git://github.com/nathansearles/Slides.git
[submodule "guides/3.0"]
path = guides/3.0
url = https://github.com/kohana/kohana.git
[submodule "guides/3.1"]
path = guides/3.1
url = https://github.com/kohana/kohana.git
[submodule "guides/3.2"]
path = guides/3.2
url = https://github.com/kohana/kohana.git
[submodule "guides/3.3"]
path = guides/3.3
url = https://github.com/kohana/kohana.git
diff --git a/modules/kostache b/modules/kostache
deleted file mode 160000
index ba9536a..0000000
--- a/modules/kostache
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ba9536a4a49991a8aaa8ded83557db2638df9127
|
kohana/kohanaframework.org | 7109b3ad757e22612471a94befe440a9c860d2cc | Bump submodules for guides to new https versions | diff --git a/guides/3.0 b/guides/3.0
index dd1101a..9d8bab2 160000
--- a/guides/3.0
+++ b/guides/3.0
@@ -1 +1 @@
-Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
+Subproject commit 9d8bab2f6a9d56b91231ce97c043b46c716f849b
diff --git a/guides/3.1 b/guides/3.1
index fb652b8..72e95f9 160000
--- a/guides/3.1
+++ b/guides/3.1
@@ -1 +1 @@
-Subproject commit fb652b8e5c97e604c889abbe90797f98a19d8090
+Subproject commit 72e95f9dbc793940bd5e79cf81c0f3ce49244aa2
diff --git a/guides/3.2 b/guides/3.2
index 05220ea..b7ebab6 160000
--- a/guides/3.2
+++ b/guides/3.2
@@ -1 +1 @@
-Subproject commit 05220eaca92d0a8b47b6aeee7f72609085034aaf
+Subproject commit b7ebab6cd0a7f884d0a60cb5789563c1af373363
diff --git a/guides/3.3 b/guides/3.3
index 8804486..27a9a50 160000
--- a/guides/3.3
+++ b/guides/3.3
@@ -1 +1 @@
-Subproject commit 88044860bd4f47eab824e17269b7e44731d01777
+Subproject commit 27a9a50e339f0168c76bd3b8cd77ed03a7cf734c
|
kohana/kohanaframework.org | ee6da6d60bc6878b0072eef8aa6ad4cac86f2c91 | change 3.3 docs to https submodule | diff --git a/.gitmodules b/.gitmodules
index 8048fc1..4aa9f4e 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,30 +1,30 @@
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
[submodule "modules/userguide"]
path = modules/userguide
url = git://github.com/kohana/userguide.git
[submodule "modules/cache"]
path = modules/cache
url = git://github.com/kohana/cache.git
[submodule "modules/oauth"]
path = modules/oauth
url = git://github.com/kohana/oauth.git
[submodule "modules/kostache"]
path = modules/kostache
url = https://github.com/zombor/KOstache.git
[submodule "modules/gallery/vendor/slides"]
path = modules/gallery/vendor/slides
url = git://github.com/nathansearles/Slides.git
[submodule "guides/3.0"]
path = guides/3.0
url = https://github.com/kohana/kohana.git
[submodule "guides/3.1"]
path = guides/3.1
url = https://github.com/kohana/kohana.git
[submodule "guides/3.2"]
path = guides/3.2
url = https://github.com/kohana/kohana.git
[submodule "guides/3.3"]
path = guides/3.3
- url = [email protected]:kohana/kohana.git
+ url = https://github.com/kohana/kohana.git
|
kohana/kohanaframework.org | 153a741ae05447b6f1a3a79bbd3b16f645100150 | Revert "Remove the auth module from guides, should fix it" | diff --git a/guides/3.0 b/guides/3.0
index 2479141..dd1101a 160000
--- a/guides/3.0
+++ b/guides/3.0
@@ -1 +1 @@
-Subproject commit 247914152d87c24684634491b52e70df4b2c5420
+Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
diff --git a/guides/3.1 b/guides/3.1
index 985b30a..fb652b8 160000
--- a/guides/3.1
+++ b/guides/3.1
@@ -1 +1 @@
-Subproject commit 985b30a2ec85261c5cf766c41fb47e01a8e84858
+Subproject commit fb652b8e5c97e604c889abbe90797f98a19d8090
diff --git a/guides/3.2 b/guides/3.2
index acf2229..05220ea 160000
--- a/guides/3.2
+++ b/guides/3.2
@@ -1 +1 @@
-Subproject commit acf22294bf0fd59bcf87ab045433d6cef1c16244
+Subproject commit 05220eaca92d0a8b47b6aeee7f72609085034aaf
diff --git a/guides/3.3 b/guides/3.3
index be2a3ae..8804486 160000
--- a/guides/3.3
+++ b/guides/3.3
@@ -1 +1 @@
-Subproject commit be2a3ae41a1377ff8a26cc2ceb88f3826d889e6d
+Subproject commit 88044860bd4f47eab824e17269b7e44731d01777
|
kohana/kohanaframework.org | 1e05d5a17ebf1da91882fc4de1c8c5aeaabe4e67 | Revert "Try dropping the 3.0 guide to fix deploy" | diff --git a/guides/3.0 b/guides/3.0
new file mode 160000
index 0000000..dd1101a
--- /dev/null
+++ b/guides/3.0
@@ -0,0 +1 @@
+Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
|
kohana/kohanaframework.org | 84090dbcd99ed00a6701f016066083fa02c4555a | Remove the auth module from guides, should fix it | diff --git a/guides/3.0 b/guides/3.0
index dd1101a..2479141 160000
--- a/guides/3.0
+++ b/guides/3.0
@@ -1 +1 @@
-Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
+Subproject commit 247914152d87c24684634491b52e70df4b2c5420
diff --git a/guides/3.1 b/guides/3.1
index fb652b8..985b30a 160000
--- a/guides/3.1
+++ b/guides/3.1
@@ -1 +1 @@
-Subproject commit fb652b8e5c97e604c889abbe90797f98a19d8090
+Subproject commit 985b30a2ec85261c5cf766c41fb47e01a8e84858
diff --git a/guides/3.2 b/guides/3.2
index 05220ea..acf2229 160000
--- a/guides/3.2
+++ b/guides/3.2
@@ -1 +1 @@
-Subproject commit 05220eaca92d0a8b47b6aeee7f72609085034aaf
+Subproject commit acf22294bf0fd59bcf87ab045433d6cef1c16244
diff --git a/guides/3.3 b/guides/3.3
index 8804486..be2a3ae 160000
--- a/guides/3.3
+++ b/guides/3.3
@@ -1 +1 @@
-Subproject commit 88044860bd4f47eab824e17269b7e44731d01777
+Subproject commit be2a3ae41a1377ff8a26cc2ceb88f3826d889e6d
|
kohana/kohanaframework.org | 1ab29961e29c16646fcdf8579c48642d79e2c1c5 | Revert "Try dropping the 3.0 guide to fix deploy" | diff --git a/guides/3.0 b/guides/3.0
new file mode 160000
index 0000000..dd1101a
--- /dev/null
+++ b/guides/3.0
@@ -0,0 +1 @@
+Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
|
kohana/kohanaframework.org | 8f63fbb0a32fde4283ba2d77592469753ce08ed4 | Remove Google Checkout links from donation page. | diff --git a/application/templates/donate/index.mustache b/application/templates/donate/index.mustache
index 3a95c73..220426b 100644
--- a/application/templates/donate/index.mustache
+++ b/application/templates/donate/index.mustache
@@ -1,57 +1,29 @@
<section class="textHeavy">
<h1>Make a Donation</h1>
<p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <a href="http://sfconservancy.org/">Software Freedom Conservancy</a>, your donations are fully tax-deductible to the extent permitted by law.</p>
- <p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
-
- <h2 class="top">Using Google Checkout</h2>
- <script type="text/javascript">
- function validateAmount(amount){
- if(amount.value.match(/^[0-9]+(\.([0-9]+))?$/)){
- return true;
- }else{
- alert('You must enter a valid donation.');
- amount.focus();
- return false;
- }
- }
- </script>
- <form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
- <input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
- <input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
- <input name="item_quantity_1" type="hidden" value="1"/>
- <input name="item_currency_1" type="hidden" value="USD"/>
- <input name="item_is_modifiable_1" type="hidden" value="true"/>
- <input name="item_min_price_1" type="hidden" value="5.0"/>
- <input name="item_max_price_1" type="hidden" value="25000.0"/>
- <input name="_charset_" type="hidden" value="utf-8"/>
-
- $ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/><br/><br/>
- <input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
- </form>
-
<h2 class="top">Using PayPal</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
<!--<div class="span-8 last">
<h2>Account Status</h2>
<dl class="account">
<dt>Latest Expenses</dt>
<dd>$9.25 on 2010-04-27 for domain names</dd>
<dd>$27.75 on 2010-02-06 for domain names</dd>
<dd>$22.00 on 2009-10-26 for domain names</dd>
<dd>$490.00 on 2009-11-18 for website hosting</dd>
<dt>Current Balance</dt>
<dd class="good">$1,908.07</dd>
<dd><small>Upcoming expenses will be paid in full.</small></dd>
</dl>
</div>-->
</section>
|
kohana/kohanaframework.org | b66779438946a0719dec6f8724f195fb6a46549e | Spanish Lang File | diff --git a/application/i18n/es.php b/application/i18n/es.php
new file mode 100644
index 0000000..3f9f7e6
--- /dev/null
+++ b/application/i18n/es.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Spanish Lang File
+ */
+return array(
+'Basic Usage' => 'Uso Básico',
+'Getting Started' => 'Para empezar',
+);
|
kohana/kohanaframework.org | 1d9cd60baad775056f551ea9e1815fe1381ebd1e | Fix version typo on download page | diff --git a/application/templates/download/index.mustache b/application/templates/download/index.mustache
index f0f99b8..e0162b2 100644
--- a/application/templates/download/index.mustache
+++ b/application/templates/download/index.mustache
@@ -1,32 +1,32 @@
<section class="textHeavy">
<h1>Download</h1>
<p>Kohana has two different versions to choose from. All versions are supported for one year from the release date.</p>
<div id="stable" class="border">
<div class="download"><a class="cta" href="{{latest_download}}"><span>Download</span> <br />{{latest_version}}</a></div>
<h3>{{latest_version}} <small>"{{latest_codename}}"</small> <i>{{latest_status}}</i></h3>
- <p>Current stable release of the 3.2.x series, this is the recommended version for all new projects. Support will last until {{latest_support_until}}.</p>
+ <p>Current stable release of the 3.3.x series, this is the recommended version for all new projects. Support will last until {{latest_support_until}}.</p>
<ul>
<li class="lcta changes"><a href="{{latest_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{latest_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{latest_issues}}">Issues</a></li>
</ul>
</div>
</section>
<div class="lightBkg inset textHeavy">
<h2>Supported version</h2>
<h3>{{support_version}} <small>"{{support_codename}}"</small> <i>{{support_status}}</i></h3>
<p>Officially supported maintenance version. Support will last until {{support_until}}.</p>
<ul>
<li class="lcta dl"><a href="{{support_download}}">Download</a></li>
<li class="lcta changes"><a href="{{support_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{support_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{support_issues}}">Issues</a></li>
</ul>
</div>
<div class="lightBkg inset textHeavy">
<h2>Looking for an older version?</h2>
<p>You can find unsupported versions of Kohana in the <a href="http://dev.kohanaframework.org/projects/kohana3/files">3.x archives</a> or <a href="http://dev.kohanaframework.org/projects/kohana2/files">2.x archives</a>.</p>
-</div>
\ No newline at end of file
+</div>
|
kohana/kohanaframework.org | bc8798dd0922d77cbb948145d222cf2858bb9189 | point 3.3 docs | diff --git a/application/templates/documentation/index.mustache b/application/templates/documentation/index.mustache
index d68bd37..8aecce8 100644
--- a/application/templates/documentation/index.mustache
+++ b/application/templates/documentation/index.mustache
@@ -1,51 +1,57 @@
<section class="textHeavy">
<h1>Documentation</h1>
<p id="book">
Documentation is provided for both v2.x and v3.x, in separate places.
Each major release of Kohana v3.x has independent documentation.
</p>
<h2 id="version3docs">Version 3</h2>
<ul>
<li class="lcta documentation current">
- <a href="{{base_url}}3.2/guide/">
- Kohana v3.2 Documentation
+ <a href="{{base_url}}3.3/guide/">
+ Kohana v3.3 Documentation
</a>
<small>
current release
</small>
</li>
+ <li class="lcta documentation">
+ <a href="{{base_url}}3.2/guide/">
+ Kohana v3.2 Documentation
+ </a>
+ </li>
+
<li class="lcta documentation">
<a href="{{base_url}}3.1/guide/">
Kohana v3.1 Documentation
</a>
</li>
<li class="lcta documentation">
<a href="{{base_url}}3.0/guide/">
Kohana v3.0 Documentation
</a>
</li>
</ul>
<p>
Documentation is also included in the userguide module in all releases.
Once the <code>userguide module</code> is enabled in the bootstrap, it
is accessible from your site with <code>/index.php/guide</code> (or
just <code>/guide</code> if you are rewriting your urls).
</p>
<p>
Kohana v3.x is self-documenting when the <code>userguide module</code>
is enabled. If you follow the documentation conventions when developing
your application, your documentation will grow with your application.
</p>
<h2>Version 2</h2>
<p>
For documentation of v2.x, please use the
<a href="http://docs.kohanaphp.com/">Kohana Documentation Wiki</a>.
</p>
<h2>I still need help!</h2>
<p>
The <a href="{{home_url}}#community">Kohana user community</a> may be
able to help you find the answer you are looking for.
</p>
</section>
|
kohana/kohanaframework.org | 1d75d046fbaf5da2512a9c494d19ac0d6c9bf36d | Add cache and log dirs to writable | diff --git a/Boxfile b/Boxfile
index ab1b239..53ea4dd 100644
--- a/Boxfile
+++ b/Boxfile
@@ -1,15 +1,17 @@
---
web1:
document_root: /public/
name: www-kohanaframework
shared_writable_dirs:
- application/cache
- application/logs
- guides/3.0/application/cache
- guides/3.0/application/logs
- guides/3.1/application/cache
- guides/3.1/application/logs
- guides/3.2/application/cache
- guides/3.2/application/logs
+ - guides/3.3/application/cache
+ - guides/3.3/application/logs
php_extensions:
- - curl
\ No newline at end of file
+ - curl
|
kohana/kohanaframework.org | ce54c7acc52ef4d71d7d9befbae8f30f394e3ed9 | fix index file for 3.3 docs | diff --git a/guides/3.3-bootstrap.php b/guides/3.3-bootstrap.php
index efeec4f..680dc4d 100644
--- a/guides/3.3-bootstrap.php
+++ b/guides/3.3-bootstrap.php
@@ -1,136 +1,137 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/Kohana/Core'.EXT;
if (is_file(APPPATH.'classes/Kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/Kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/Kohana'.EXT;
}
/**
* Set the default time zone.
*
* @link http://kohanaframework.org/guide/using.configuration
* @link http://www.php.net/manual/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @link http://kohanaframework.org/guide/using.configuration
* @link http://www.php.net/manual/function.setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @link http://kohanaframework.org/guide/using.autoloading
* @link http://www.php.net/manual/function.spl-autoload-register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Optionally, you can enable a compatibility auto-loader for use with
* older modules that have not been updated for PSR-0.
*
* It is recommended to not enable this unless absolutely necessary.
*/
//spl_autoload_register(array('Kohana', 'auto_load_lowercase'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @link http://www.php.net/manual/function.spl-autoload-call
* @link http://www.php.net/manual/var.configuration#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - integer cache_life lifetime, in seconds, of items cached 60
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
* - boolean expose set the X-Powered-By header FALSE
*/
Kohana::init(array(
'base_url' => '/3.3/',
+ 'index_file' => '',
));
/**
* Setup the cookie salt.
* Since this is just for the userguide and cookies are not used for anything really,
* Its "okay" to set this to something this crap!
*/
Cookie::$salt = '12345';
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Caching with multiple backends
'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
'image' => MODPATH.'image', // Image manipulation
'minion' => MODPATH.'minion', // CLI Tasks
'orm' => MODPATH.'orm', // Object Relationship Mapping
'unittest' => MODPATH.'unittest', // Unit testing
'userguide' => MODPATH.'userguide', // User guide and API documentation
));
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
|
kohana/kohanaframework.org | f467fd3852888e9c7d28c1e497e6c8a8b81508ee | fix 3.3 index to point to 3.3 submodule for docs | diff --git a/public/3.3-index.php b/public/3.3-index.php
index c58d93e..7e3fee9 100644
--- a/public/3.3-index.php
+++ b/public/3.3-index.php
@@ -1,111 +1,105 @@
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
-$application = '../guides/3.2/application';
+$application = '../guides/3.3/application';
/**
* The directory in which your modules are located.
*
* @see http://kohanaframework.org/guide/about.install#modules
*/
-$modules = '../guides/3.2/modules';
+$modules = '../guides/3.3/modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://kohanaframework.org/guide/about.install#system
*/
-$system = '../guides/3.2/system';
+$system = '../guides/3.3/system';
/**
* The default extension of resource files. If you change this, all resources
* must be renamed to use the new extension.
*
* @see http://kohanaframework.org/guide/about.install#ext
*/
define('EXT', '.php');
/**
* Set the PHP error reporting level. If you set this in php.ini, you remove this.
* @see http://php.net/error_reporting
*
* When developing your application, it is highly recommended to enable notices
* and strict warnings. Enable them by using: E_ALL | E_STRICT
*
* In a production environment, it is safe to ignore notices and strict warnings.
* Disable them by using: E_ALL ^ E_NOTICE
*
* When using a legacy application with PHP >= 5.3, it is recommended to disable
* deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
*/
error_reporting(E_ALL | E_STRICT);
/**
* End of standard configuration! Changing any of the code below should only be
* attempted by those with a working knowledge of Kohana internals.
*
* @see http://kohanaframework.org/guide/using.configuration
*/
// Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// Make the application relative to the docroot, for symlink'd index.php
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
// Make the modules relative to the docroot, for symlink'd index.php
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
// Make the system relative to the docroot, for symlink'd index.php
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $modules, $system);
-if (file_exists('install'.EXT))
-{
- // Load the installation check
- return include 'install'.EXT;
-}
-
/**
* Define the start time of the application, used for profiling.
*/
if ( ! defined('KOHANA_START_TIME'))
{
define('KOHANA_START_TIME', microtime(TRUE));
}
/**
* Define the memory usage at the start of the application, used for profiling.
*/
if ( ! defined('KOHANA_START_MEMORY'))
{
define('KOHANA_START_MEMORY', memory_get_usage());
}
// Bootstrap the application
-require '../guides/3.2-bootstrap'.EXT;
+require '../guides/3.3-bootstrap'.EXT;
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
-echo Request::factory()
+echo Request::factory(TRUE, array(), FALSE)
->execute()
- ->send_headers()
+ ->send_headers(TRUE)
->body();
|
kohana/kohanaframework.org | 945428eaefc688ed17bb9e8342dd47b5032bc6c2 | Add 3.3 release, add 3.3 documentation | diff --git a/.gitmodules b/.gitmodules
index 1d1129a..8048fc1 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,27 +1,30 @@
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
[submodule "modules/userguide"]
path = modules/userguide
url = git://github.com/kohana/userguide.git
[submodule "modules/cache"]
path = modules/cache
url = git://github.com/kohana/cache.git
[submodule "modules/oauth"]
path = modules/oauth
url = git://github.com/kohana/oauth.git
[submodule "modules/kostache"]
path = modules/kostache
url = https://github.com/zombor/KOstache.git
[submodule "modules/gallery/vendor/slides"]
path = modules/gallery/vendor/slides
url = git://github.com/nathansearles/Slides.git
[submodule "guides/3.0"]
path = guides/3.0
url = https://github.com/kohana/kohana.git
[submodule "guides/3.1"]
path = guides/3.1
url = https://github.com/kohana/kohana.git
[submodule "guides/3.2"]
path = guides/3.2
url = https://github.com/kohana/kohana.git
+[submodule "guides/3.3"]
+ path = guides/3.3
+ url = [email protected]:kohana/kohana.git
diff --git a/application/bootstrap.php b/application/bootstrap.php
index 3051e3c..1422642 100644
--- a/application/bootstrap.php
+++ b/application/bootstrap.php
@@ -1,196 +1,196 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
//'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Custom caching
//'codebench' => MODPATH.'codebench', // Benchmarking tool
//'database' => MODPATH.'database', // Database access
//'image' => MODPATH.'image', // Image manipulation
//'oauth' => MODPATH.'oauth', // OAuth authentication
//'orm' => MODPATH.'orm', // Object Relationship Mapping
//'pagination' => MODPATH.'pagination', // Paging of results
//'userguide' => MODPATH.'userguide', // User guide and API documentation
'kostache' => MODPATH.'kostache', // Kostache templating
));
/*
* We want to show the world we're running on... Kohana of course!
*/
Kohana::$expose = TRUE;
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('error', 'error')
->defaults(array(
'controller' => 'home',
'action' => 'error'
));
Route::set('download', 'download')
->defaults(array(
'controller' => 'download',
'action' => 'index'
));
Route::set('documentation', 'documentation')
->defaults(array(
'controller' => 'documentation',
'action' => 'index'
));
Route::set('development', 'development')
->defaults(array(
'controller' => 'development',
'action' => 'index'
));
Route::set('team', 'team')
->defaults(array(
'controller' => 'team',
'action' => 'index'
));
Route::set('license', 'license')
->defaults(array(
'controller' => 'license',
'action' => 'index'
));
Route::set('donate', 'donate')
->defaults(array(
'controller' => 'donate',
'action' => 'index'
));
Route::set('home', '(index)')
->defaults(array(
'controller' => 'home',
'action' => 'index'
));
// // Handles: feed/$type.rss and feed/$type.atom
// Route::set('feed', 'feed/<name>', array('name' => '.+'))
// ->defaults(array(
// 'controller' => 'feed',
// 'action' => 'load',
// ));
//
// // Handles: download/$file
// Route::set('file', 'download/<file>', array('file' => '.+'))
// ->defaults(array(
// 'controller' => 'file',
// 'action' => 'get',
// ));
//
// // Handles: donate
// Route::set('donate', 'donate(/<action>)')
// ->defaults(array(
// 'controller' => 'donate',
// 'action' => 'index',
// ));
//
// // Handles: $lang/$page and $page
// Route::set('page', '((<lang>/)<page>)', array('lang' => '[a-z]{2}', 'page' => '.+'))
// ->defaults(array(
// 'controller' => 'page',
// 'action' => 'load',
-// ));
\ No newline at end of file
+// ));
diff --git a/application/config/files.php b/application/config/files.php
index caacaae..195b49c 100644
--- a/application/config/files.php
+++ b/application/config/files.php
@@ -1,24 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'kohana-latest' => array(
+ 'version' => 'v3.3.0',
+ 'codename' => 'badius',
+ 'status' => 'stable',
+ 'download' => 'https://github.com/downloads/kohana/kohana/kohana-3.3.0.zip',
+ 'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=55',
+ 'documentation' => 'http://kohanaframework.org/3.3/guide/',
+ 'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=63',
+ 'support_until' => 'November, 2013'
+ ),
+ 'support' => array(
'version' => 'v3.2.2',
'codename' => 'hypoleucos',
'status' => 'stable',
'download' => 'https://github.com/downloads/kohana/kohana/kohana-3.2.2.zip',
'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=61',
'documentation' => 'http://kohanaframework.org/3.2/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=62',
- 'support_until' => 'March, 2012'
- ),
- 'support' => array(
- 'version' => 'v3.1.5',
- 'codename' => 'fasciinucha',
- 'status' => 'stable',
- 'download' => 'http://dev.kohanaframework.org/attachments/download/1671/kohana-3.1.4.zip',
- 'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=53',
- 'documentation' => 'http://kohanaframework.org/3.1/guide/',
- 'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=53',
- 'support_until' => 'August, 2012'
+ 'support_until' => 'May, 2013'
),
);
diff --git a/guides/3.3 b/guides/3.3
new file mode 160000
index 0000000..8804486
--- /dev/null
+++ b/guides/3.3
@@ -0,0 +1 @@
+Subproject commit 88044860bd4f47eab824e17269b7e44731d01777
diff --git a/guides/3.3-bootstrap.php b/guides/3.3-bootstrap.php
new file mode 100644
index 0000000..efeec4f
--- /dev/null
+++ b/guides/3.3-bootstrap.php
@@ -0,0 +1,136 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+// -- Environment setup --------------------------------------------------------
+
+// Load the core Kohana class
+require SYSPATH.'classes/Kohana/Core'.EXT;
+
+if (is_file(APPPATH.'classes/Kohana'.EXT))
+{
+ // Application extends the core
+ require APPPATH.'classes/Kohana'.EXT;
+}
+else
+{
+ // Load empty core extension
+ require SYSPATH.'classes/Kohana'.EXT;
+}
+
+/**
+ * Set the default time zone.
+ *
+ * @link http://kohanaframework.org/guide/using.configuration
+ * @link http://www.php.net/manual/timezones
+ */
+date_default_timezone_set('America/Chicago');
+
+/**
+ * Set the default locale.
+ *
+ * @link http://kohanaframework.org/guide/using.configuration
+ * @link http://www.php.net/manual/function.setlocale
+ */
+setlocale(LC_ALL, 'en_US.utf-8');
+
+/**
+ * Enable the Kohana auto-loader.
+ *
+ * @link http://kohanaframework.org/guide/using.autoloading
+ * @link http://www.php.net/manual/function.spl-autoload-register
+ */
+spl_autoload_register(array('Kohana', 'auto_load'));
+
+/**
+ * Optionally, you can enable a compatibility auto-loader for use with
+ * older modules that have not been updated for PSR-0.
+ *
+ * It is recommended to not enable this unless absolutely necessary.
+ */
+//spl_autoload_register(array('Kohana', 'auto_load_lowercase'));
+
+/**
+ * Enable the Kohana auto-loader for unserialization.
+ *
+ * @link http://www.php.net/manual/function.spl-autoload-call
+ * @link http://www.php.net/manual/var.configuration#unserialize-callback-func
+ */
+ini_set('unserialize_callback_func', 'spl_autoload_call');
+
+// -- Configuration and initialization -----------------------------------------
+
+/**
+ * Set the default language
+ */
+I18n::lang('en-us');
+
+/**
+ * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
+ *
+ * Note: If you supply an invalid environment name, a PHP warning will be thrown
+ * saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
+ */
+if (isset($_SERVER['KOHANA_ENV']))
+{
+ Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
+}
+
+/**
+ * Initialize Kohana, setting the default options.
+ *
+ * The following options are available:
+ *
+ * - string base_url path, and optionally domain, of your application NULL
+ * - string index_file name of your index file, usually "index.php" index.php
+ * - string charset internal character set used for input and output utf-8
+ * - string cache_dir set the internal cache directory APPPATH/cache
+ * - integer cache_life lifetime, in seconds, of items cached 60
+ * - boolean errors enable or disable error handling TRUE
+ * - boolean profile enable or disable internal profiling TRUE
+ * - boolean caching enable or disable internal caching FALSE
+ * - boolean expose set the X-Powered-By header FALSE
+ */
+Kohana::init(array(
+ 'base_url' => '/3.3/',
+));
+
+/**
+ * Setup the cookie salt.
+ * Since this is just for the userguide and cookies are not used for anything really,
+ * Its "okay" to set this to something this crap!
+ */
+Cookie::$salt = '12345';
+
+/**
+ * Attach the file write to logging. Multiple writers are supported.
+ */
+Kohana::$log->attach(new Log_File(APPPATH.'logs'));
+
+/**
+ * Attach a file reader to config. Multiple readers are supported.
+ */
+Kohana::$config->attach(new Config_File);
+
+/**
+ * Enable modules. Modules are referenced by a relative or absolute path.
+ */
+Kohana::modules(array(
+ 'auth' => MODPATH.'auth', // Basic authentication
+ 'cache' => MODPATH.'cache', // Caching with multiple backends
+ 'codebench' => MODPATH.'codebench', // Benchmarking tool
+ 'database' => MODPATH.'database', // Database access
+ 'image' => MODPATH.'image', // Image manipulation
+ 'minion' => MODPATH.'minion', // CLI Tasks
+ 'orm' => MODPATH.'orm', // Object Relationship Mapping
+ 'unittest' => MODPATH.'unittest', // Unit testing
+ 'userguide' => MODPATH.'userguide', // User guide and API documentation
+ ));
+
+/**
+ * Set the routes. Each route must have a minimum of a name, a URI and a set of
+ * defaults for the URI.
+ */
+Route::set('default', '(<controller>(/<action>(/<id>)))')
+ ->defaults(array(
+ 'controller' => 'welcome',
+ 'action' => 'index',
+ ));
diff --git a/guides/3.3-index.php b/guides/3.3-index.php
new file mode 100644
index 0000000..230ad6b
--- /dev/null
+++ b/guides/3.3-index.php
@@ -0,0 +1,105 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '3.3/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '3.3/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '3.3/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '3.3-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory(TRUE, array(), FALSE)
+ ->execute()
+ ->send_headers(TRUE)
+ ->body();
diff --git a/public/3.3-index.php b/public/3.3-index.php
new file mode 100644
index 0000000..c58d93e
--- /dev/null
+++ b/public/3.3-index.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '../guides/3.2/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '../guides/3.2/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '../guides/3.2/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '../guides/3.2-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory()
+ ->execute()
+ ->send_headers()
+ ->body();
|
kohana/kohanaframework.org | b2fa60de73401fbb57395b904683d7d2e0a00a90 | add cookie salt to 3.1 guides bootstrap | diff --git a/guides/3.1-bootstrap.php b/guides/3.1-bootstrap.php
index eb863b3..c5a9104 100644
--- a/guides/3.1-bootstrap.php
+++ b/guides/3.1-bootstrap.php
@@ -1,119 +1,126 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/3.1/',
'index_file' => '',
));
+/**
+ * Setup the cookie salt.
+ * Since this is just for the userguide and cookies are not used for anything really,
+ * Its "okay" to set this to something this crap!
+ */
+Cookie::$salt = '12345';
+
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Caching with multiple backends
'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
'image' => MODPATH.'image', // Image manipulation
'orm' => MODPATH.'orm', // Object Relationship Mapping
// 'unittest' => MODPATH.'unittest', // Unit testing
'userguide' => MODPATH.'userguide', // User guide and API documentation
));
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
|
kohana/kohanaframework.org | 6186e347420a93fa3b745adc9ec4c41f9ff70ea7 | New oDesk logo | diff --git a/public/assets/img/icon/odesk.png b/public/assets/img/icon/odesk.png
index c653266..04e517c 100644
Binary files a/public/assets/img/icon/odesk.png and b/public/assets/img/icon/odesk.png differ
|
kohana/kohanaframework.org | c0338c10ea504304892d6278b4ad2dd32384558b | Added ?v= to style link, better caching support | diff --git a/application/templates/layout.mustache b/application/templates/layout.mustache
index 886d90e..49ef58e 100644
--- a/application/templates/layout.mustache
+++ b/application/templates/layout.mustache
@@ -1,85 +1,85 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
-<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
+<link rel="stylesheet" href="{{base_url}}assets/css/style.css?v=1.1">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="notices">
{{>notices}}
</div>
<div class="container">
{{>content}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
<div id="pagodabox">
<a href="http://www.pagodabox.com">Powered by Pagoda Box, PHP as a Service</a>
</div>
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
<script src="{{base_url}}assets/js/lib/slides.js"></script>
<script src="{{base_url}}assets/js/global.js"></script>
<script src="{{base_url}}assets/js/gallery.js"></script>
<!--[if lt IE 7 ]>
<script src="{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
|
kohana/kohanaframework.org | 45c4fed19f627a64d8887308d7201aa1e6b1bb2e | Added [email protected] email to team page | diff --git a/application/classes/view/team/index.php b/application/classes/view/team/index.php
index e714577..34aad2c 100644
--- a/application/classes/view/team/index.php
+++ b/application/classes/view/team/index.php
@@ -1,17 +1,28 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Team_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
+
+ /**
+ * Email link for [email protected]
+ *
+ * @return string
+ */
+ public function team_at_kohanaframework()
+ {
+ return HTML::mailto('[email protected]');
+ }
+
}
\ No newline at end of file
diff --git a/application/templates/team/index.mustache b/application/templates/team/index.mustache
index 63e96dc..5fa75f2 100644
--- a/application/templates/team/index.mustache
+++ b/application/templates/team/index.mustache
@@ -1,61 +1,62 @@
<section class="textHeavy">
<h1>Team</h1>
<p>
Kohana is <a href="http://en.wikipedia.org/wiki/Open_source_software">
open source software</a> and a member of the
<a href="http://sfconservancy.org/">Software Freedom Conservancy</a>,
- developed by a team of volunteers.
+ developed by a team of volunteers. Need to get in touch? You can email
+ us at {{&team_at_kohanaframework}}.
</p>
<div class="cols">
<div>
<dl>
<dt>Benevolent dictator for life</dt>
<dd>Woody Gilk <small>aka</small> shadowhand</dd>
</dl>
<dl>
<dt>Product manager</dt>
<dd>Jeremy Bush <small>aka</small> zombor</dd>
</dl>
<dl>
<dt>Core Development Team</dt>
<dd>Chris Bandy <small>aka</small> banditron</dd>
<dd>Matt Button <small>aka</small> BRMatt</dd>
<dd>Geert De Deckere <small>aka</small> GeertDD</dd>
<dd>Isaiah DeRose-Wilson <small>aka</small> isaiahdw</dd>
<dd>Sam de Freyssinet <small>aka</small> samsoir</dd>
<dd>John Heathco <small>aka</small> jheathco</dd>
<dd>Kiall Mac Innes <small>aka</small> Kiall</dd>
<dd>Ben Rogers <small>aka</small> Nodren</dd>
<dd>Parnell Springmeyer <small>aka</small> ixmatus</dd>
</dl>
<dl>
<dt>Website Design</dt>
<dd>Inayaili de León <small>aka</small> Yaili</dd>
</dl>
</div>
<div>
<dl>
<dt>Contributors</dt>
<dd>Oscar Bajner <small>aka</small> OscarB</dd>
<dd>Paul Banks <small>aka</small> banks</dd>
<dd>Mathew Davies <small>aka</small> Colonel-Rosa</dd>
<dd>Brotkin Ivan <small>aka</small> biakaveron</dd>
<dd>Ryan Mayberry <small>aka</small> kerkness</dd>
<dd>Bharat Mediratta <small>aka</small> bharat</dd>
<dd>and many others…</dd>
</dl>
<dl>
<dt>Past team members</dt>
<dd>Jim Auldridge <small>aka</small> JAAulde</dd>
<dd>Armen Baghumian <small>aka</small> armen</dd>
<dd>Greg MacLellan <small>aka</small> groogs</dd>
<dd>Dave Stewart <small>aka</small> davestewart</dd>
<dd>Maarten van Vliet <small>aka</small> dlib</dd>
<dd>Rocky Wilkins <small>aka</small> PugFish</dd>
<dd>Todd Wilson <small>aka</small> Tido</dd>
<dd>Ted Wood <small>aka</small> coolfactor</dd>
<dd>Fred Wu <small>aka</small> caglan</dd>
</dl>
</div>
</div>
</section>
\ No newline at end of file
|
kohana/kohanaframework.org | 8b8351a78fad8b2e189092b5ec11e9c743e011eb | Replaced Facebook with oDesk in social | diff --git a/application/templates/home/social.mustache b/application/templates/home/social.mustache
index 8326ea0..5d726c1 100644
--- a/application/templates/home/social.mustache
+++ b/application/templates/home/social.mustache
@@ -1,62 +1,62 @@
<div id="social" class="lightBkg">
<section id="community">
<h2>Community</h2>
<ul>
<li>
<a href="http://forum.kohanaframework.org" id="forum" class="icon">
<h3>Forum</h3>
Official announcements, community support, and feedback.
</a>
</li>
<li>
<a href="irc://irc.freenode.net/kohana" id="irc" class="icon">
<h3>IRC</h3>
Chat with fellow Kohana users at #kohana on freenode.
</a>
</li>
<li>
<a href="http://github.com/kohana" id="github" class="icon">
<h3>Github</h3>
The easiest way to contribute to v3.x is to fork us on GitHub.
</a>
</li>
<li>
- <a href="http://www.facebook.com/group.php?gid=140164501435" id="facebook" class="icon">
- <h3>Facebook</h3>
- Join the Facebook group and find other users.
+ <a href="https://www.odesk.com/groups/kohana" id="odesk" class="icon">
+ <h3>oDesk</h3>
+ Find and hire Kohana developers on oDesk.
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/kohana" id="stackoverflow" class="icon">
<h3>Stack Overflow</h3>
Share your knowledge by answering user questions about Kohana.
</a>
</li>
<li>
<a href="http://www.ohloh.net/p/ko3" id="ohloh" class="icon">
<h3>Ohloh</h3>
View project information and give Kudos for Kohana.
</a>
</li>
<!-- Coming soon
<li class="tweet">
<h3>Twitter</h3>
<q>#Kohana v3.0.8 has just been released! Download <a href="#">http://cl.ly/2VGe</a> Discuss <a href="#">http://cl.ly/2Upi</a> Issues <a href="#">http://cl.ly/2UpH</a></q>
<time datetime="2010-09-22T21:01+00:00" pubdate><a href="#">9:01 PM Sep 22nd</a></time>
<p class="twitter"><a href="#">Follow <span>@KohanaPHP</span> <span>on Twitter!</span></a></p>
</li> -->
</ul>
</section> <!-- END section#community -->
<section id="giving" class="box">
<h2>Giving back</h2>
<img src="{{base_url}}assets/img/giving.png" width="48" height="48" />
<p>If you use Kohana, we ask that you donate to ensure future development is possible.</p>
<h3>Where will my money go?</h3>
<p>Your donations are used to cover the cost of maintaining this website and related resources, and services required to provide these resources.</p>
<p>As part of the Software Freedom Conservancy, your donations are fully tax-deductible to the extent permitted by law.</p>
<p><a href="{{donate_url}}">Click here to donate</a></p>
</section> <!-- END section#giving -->
</div>
diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 1cd666b..696fa1e 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,512 +1,512 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who { height: 220px; width:280px; float:left; }
#gallery { height:254px; width:660px; float:right; position:relative; overflow: hidden; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
#banner h2.error { width: auto; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who div#whoGallery { margin:0; overflow:hidden; width: 280px; height: 100px }
#who img { vertical-align:middle; padding-bottom:40px; }
#who p { margin-top: 20px }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
#gallery { padding: 0px; margin: 0px; }
#gallery h2 { display: block; overflow: hidden; height: 0; width: 0; padding: 0; margin: 0 }
#gallery div.information { position: absolute; display: block; background: rgba(20,40,20,0.6); width: 635px; top: 255px; height: 50px; padding-left: 25px; padding-top: 25px; padding-bottom: 0px; }
#gallery .information h3 { padding: 0; margin: 0; font-size: 25px; float: left }
#gallery .information a { color: rgb(210, 220, 190); float: left; margin: 10px; font:italic 14px Georgia, "Times New Roman", Times, serif; font-weight: 100; }
#gallery .information a:hover { text-decoration: none;}
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
-#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
+#community li a#odesk { background-image: url('../img/icon/odesk.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/famfamfam/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/famfamfam/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/famfamfam/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
div#error { padding-left: 5em; }
div#error img#not-found { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#not-found-server { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
/*
* Notices
*/
div.notice {
padding: 5px 5px;
padding-left: 25px;
margin: 5px 0px;
/* Rounded Corners and Shadow */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
/* Shadow */
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
div.notice-error {
background: #ff0000 url(../img/icon/famfamfam/exclamation.png) no-repeat 5px center;
}
div.notice-warning {
background: #ffff00 url(../img/icon/famfamfam/error.png) no-repeat 5px center;
}
div.notice-information {
background: #0000ff url(../img/icon/famfamfam/information.png) no-repeat 5px center;
}
div.notice-success {
background: #00ff00 url(../img/icon/famfamfam/accept.png) no-repeat 5px center;
}
/*
* END Notices
*/
/*
* Pagodabox
*/
div#pagodabox {
height: 100px;
}
div#pagodabox a {
display: block;
overflow: hidden;
background: url(../img/pagodaFloat.png) no-repeat;
width: 104px;
height: 0px;
padding-top: 54px;
margin-top: 25px;
float: right;
}
/*
* END Pagodabox
*/
\ No newline at end of file
diff --git a/public/assets/img/icon/facebook.png b/public/assets/img/icon/facebook.png
deleted file mode 100644
index 5696ee3..0000000
Binary files a/public/assets/img/icon/facebook.png and /dev/null differ
diff --git a/public/assets/img/icon/odesk.png b/public/assets/img/icon/odesk.png
new file mode 100644
index 0000000..c653266
Binary files /dev/null and b/public/assets/img/icon/odesk.png differ
|
kohana/kohanaframework.org | 5df74241ef2c21efe40f0c58ded93508f1b8cb55 | add curl for 3.0 docs | diff --git a/Boxfile b/Boxfile
index e99100d..ab1b239 100644
--- a/Boxfile
+++ b/Boxfile
@@ -1,13 +1,15 @@
---
web1:
document_root: /public/
name: www-kohanaframework
shared_writable_dirs:
- application/cache
- application/logs
- guides/3.0/application/cache
- guides/3.0/application/logs
- guides/3.1/application/cache
- guides/3.1/application/logs
- guides/3.2/application/cache
- guides/3.2/application/logs
+ php_extensions:
+ - curl
\ No newline at end of file
|
kohana/kohanaframework.org | 421f16f5b3b4aca08c1670bed47b5a9e8b9fcc7d | Don't hardcode the documentation links to kohanaframework.org | diff --git a/application/templates/documentation/index.mustache b/application/templates/documentation/index.mustache
index 28721aa..d68bd37 100644
--- a/application/templates/documentation/index.mustache
+++ b/application/templates/documentation/index.mustache
@@ -1,51 +1,51 @@
<section class="textHeavy">
<h1>Documentation</h1>
<p id="book">
Documentation is provided for both v2.x and v3.x, in separate places.
Each major release of Kohana v3.x has independent documentation.
</p>
<h2 id="version3docs">Version 3</h2>
<ul>
<li class="lcta documentation current">
- <a href="http://kohanaframework.org/3.2/guide/">
+ <a href="{{base_url}}3.2/guide/">
Kohana v3.2 Documentation
</a>
<small>
current release
</small>
</li>
<li class="lcta documentation">
- <a href="http://kohanaframework.org/3.1/guide/">
+ <a href="{{base_url}}3.1/guide/">
Kohana v3.1 Documentation
</a>
</li>
<li class="lcta documentation">
- <a href="http://kohanaframework.org/3.0/guide/">
+ <a href="{{base_url}}3.0/guide/">
Kohana v3.0 Documentation
</a>
</li>
</ul>
<p>
Documentation is also included in the userguide module in all releases.
Once the <code>userguide module</code> is enabled in the bootstrap, it
is accessible from your site with <code>/index.php/guide</code> (or
just <code>/guide</code> if you are rewriting your urls).
</p>
<p>
Kohana v3.x is self-documenting when the <code>userguide module</code>
is enabled. If you follow the documentation conventions when developing
your application, your documentation will grow with your application.
</p>
<h2>Version 2</h2>
<p>
For documentation of v2.x, please use the
<a href="http://docs.kohanaphp.com/">Kohana Documentation Wiki</a>.
</p>
<h2>I still need help!</h2>
<p>
The <a href="{{home_url}}#community">Kohana user community</a> may be
able to help you find the answer you are looking for.
</p>
-</section>
\ No newline at end of file
+</section>
|
kohana/kohanaframework.org | 9291c7fa7e2572171fe852e6fc41eee6ee146a6e | Add a cookie salt | diff --git a/guides/3.2-bootstrap.php b/guides/3.2-bootstrap.php
index 03cf8c0..e8ce80d 100644
--- a/guides/3.2-bootstrap.php
+++ b/guides/3.2-bootstrap.php
@@ -1,119 +1,126 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/3.2/',
'index_file' => '',
));
+/**
+ * Setup the cookie salt.
+ * Since this is just for the userguide and cookies are not used for anything really,
+ * Its "okay" to set this to something this crap!
+ */
+Cookie::$salt = '12345';
+
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Caching with multiple backends
'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
'image' => MODPATH.'image', // Image manipulation
'orm' => MODPATH.'orm', // Object Relationship Mapping
'unittest' => MODPATH.'unittest', // Unit testing
'userguide' => MODPATH.'userguide', // User guide and API documentation
));
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
|
kohana/kohanaframework.org | cf346bb2256710f45fe877ed42dcb3f0e9f14629 | Removing notices calls, shouldnt be in here yet | diff --git a/application/classes/kostache.php b/application/classes/kostache.php
index 853810c..384b87f 100644
--- a/application/classes/kostache.php
+++ b/application/classes/kostache.php
@@ -1,179 +1,168 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Kostache extends Kohana_Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
/**
* Returns donate page url
*
* @return string
*/
public function donate_url()
{
return Route::url('donate');
}
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
/**
* Returns current kohana version
*
* @return string
*/
public function kohana_version()
{
return Kohana::VERSION;
}
/**
* Returns current kohana codename
*
* @return string
*/
public function kohana_codename()
{
return Kohana::CODENAME;
}
-
- /**
- * Returns notices
- *
- * @return string
- */
- public function notices()
- {
- return Notice::as_array();
- }
}
diff --git a/application/classes/view/development/index.php b/application/classes/view/development/index.php
index ff59983..a7ac4a9 100644
--- a/application/classes/view/development/index.php
+++ b/application/classes/view/development/index.php
@@ -1,34 +1,33 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Development_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_development = TRUE;
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
}
\ No newline at end of file
diff --git a/application/classes/view/documentation/index.php b/application/classes/view/documentation/index.php
index 7bd235c..27242e4 100644
--- a/application/classes/view/documentation/index.php
+++ b/application/classes/view/documentation/index.php
@@ -1,34 +1,33 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Documentation_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_documentation = TRUE;
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
}
\ No newline at end of file
diff --git a/application/classes/view/donate/index.php b/application/classes/view/donate/index.php
index 896675f..c9e4514 100644
--- a/application/classes/view/donate/index.php
+++ b/application/classes/view/donate/index.php
@@ -1,18 +1,17 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Donate_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
}
\ No newline at end of file
diff --git a/application/classes/view/download/index.php b/application/classes/view/download/index.php
index a7a702d..2723b3d 100644
--- a/application/classes/view/download/index.php
+++ b/application/classes/view/download/index.php
@@ -1,104 +1,103 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Download_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_download = TRUE;
public function latest_version()
{
return $this->download['kohana-latest']['version'];
}
public function latest_codename()
{
return $this->download['kohana-latest']['codename'];
}
public function latest_status()
{
return $this->download['kohana-latest']['status'];
}
public function latest_download()
{
return $this->download['kohana-latest']['download'];
}
public function latest_changelog()
{
return $this->download['kohana-latest']['changelog'];
}
public function latest_documentation()
{
return $this->download['kohana-latest']['documentation'];
}
public function latest_issues()
{
return $this->download['kohana-latest']['issues'];
}
public function latest_support_until()
{
return $this->download['kohana-latest']['support_until'];
}
public function support_version()
{
return $this->download['support']['version'];
}
public function support_codename()
{
return $this->download['support']['codename'];
}
public function support_status()
{
return $this->download['support']['status'];
}
public function support_download()
{
return $this->download['support']['download'];
}
public function support_changelog()
{
return $this->download['support']['changelog'];
}
public function support_documentation()
{
return $this->download['support']['documentation'];
}
public function support_issues()
{
return $this->download['support']['issues'];
}
public function support_until()
{
return $this->download['support']['support_until'];
}
}
\ No newline at end of file
diff --git a/application/classes/view/error.php b/application/classes/view/error.php
index 2b3ab6e..288712e 100644
--- a/application/classes/view/error.php
+++ b/application/classes/view/error.php
@@ -1,23 +1,22 @@
<?php defined('SYSPATH') or die('No direct script access.');
abstract class View_Error extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
'banner' => 'partials/error/banner',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
public $message;
public $type;
}
\ No newline at end of file
diff --git a/application/classes/view/home/index.php b/application/classes/view/home/index.php
index 4e84c21..81e2421 100644
--- a/application/classes/view/home/index.php
+++ b/application/classes/view/home/index.php
@@ -1,38 +1,37 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Home_Index extends Kostache_Layout
{
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
'banner' => 'partials/home/banner',
'features' => 'home/features',
'gallery' => 'home/gallery',
'social' => 'home/social',
'whouses' => 'home/whouses',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_home = TRUE;
public function download_version()
{
return $this->download['version'].' ('.$this->download['status'].')';
}
public function download_link()
{
return $this->download['download'];
}
}
\ No newline at end of file
diff --git a/application/classes/view/license/index.php b/application/classes/view/license/index.php
index d418a6a..63ac565 100644
--- a/application/classes/view/license/index.php
+++ b/application/classes/view/license/index.php
@@ -1,18 +1,17 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_License_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
}
\ No newline at end of file
diff --git a/application/classes/view/team/index.php b/application/classes/view/team/index.php
index 3f86007..e714577 100644
--- a/application/classes/view/team/index.php
+++ b/application/classes/view/team/index.php
@@ -1,18 +1,17 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Team_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
}
\ No newline at end of file
|
kohana/kohanaframework.org | 6487d8b7212e29c5363942d0567b775ca687a322 | Add kohanaphp.com -> kohanaframework.org redirect | diff --git a/public/.htaccess b/public/.htaccess
index ffdc676..ff0ef42 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,62 +1,66 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
+# Redirect from old domain to new
+RewriteCond %{HTTP_HOST} ^(?:www\.)?kohanaphp.com$ [NC]
+RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
+
# Remove www. from the URL
RewriteCond %{HTTP_HOST} ^www.kohanaframework.org$ [NC]
RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
# Redirect old guide pages to new URLs
RewriteRule ^guide/about.kohana$ /3.0/guide/kohana [R=301,L]
RewriteRule ^guide/about.conventions$ /3.0/guide/kohana/conventions [R=301,L]
RewriteRule ^guide/about.mvc$ /3.0/guide/kohana/mvc [R=301,L]
RewriteRule ^guide/about.filesystem$ /3.0/guide/kohana/files [R=301,L]
RewriteRule ^guide/about.flow$ /3.0/guide/kohana/flow [R=301,L]
RewriteRule ^guide/about.install$ /3.0/guide/kohana/install [R=301,L]
RewriteRule ^guide/about.upgrading$ /3.0/guide/kohana/upgrading [R=301,L]
RewriteRule ^guide/using.configuration$ /3.0/guide/kohana/bootstrap [R=301,L]
RewriteRule ^guide/using.autoloading$ /3.0/guide/kohana/autoloading [R=301,L]
RewriteRule ^guide/using.views$ /3.0/guide/kohana/mvc/views [R=301,L]
RewriteRule ^guide/using.sessions$ /3.0/guide/kohana/sessions [R=301,L]
RewriteRule ^guide/using.messages$ /3.0/guide/kohana/messages [R=301,L]
RewriteRule ^guide/debugging.code$ /3.0/guide/kohana/debugging [R=301,L]
RewriteRule ^guide/debugging.errors$ /3.0/guide/kohana/errors [R=301,L]
RewriteRule ^guide/debugging.profiling$ /3.0/guide/kohana/profiling [R=301,L]
RewriteRule ^guide/security.xss$ /3.0/guide/kohana/security/xss [R=301,L]
RewriteRule ^guide/security.validation$ /3.0/guide/kohana/security/validation [R=301,L]
RewriteRule ^guide/security.database$ /3.0/guide/kohana/security/database [R=301,L]
RewriteRule ^guide/tutorials.helloworld$ /3.0/guide/kohana/tutorials/hello-world [R=301,L]
RewriteRule ^guide/tutorials.urls$ /3.0/guide/kohana/routing [R=301,L]
RewriteRule ^guide/tutorials.removeindex$ /3.0/guide/kohana/tutorials/clean-urls [R=301,L]
RewriteRule ^guide/tutorials.databases$ /3.0/guide/database [R=301,L]
RewriteRule ^guide/tutorials.orm$ /3.0/guide/orm [R=301,L]
RewriteRule ^guide/tutorials.git$ /3.0/guide/kohana/tutorials/git [R=301,L]
RewriteRule ^guide/cache.about$ /3.0/guide/cache [R=301,L]
RewriteRule ^guide/cache.config$ /3.0/guide/cache/config [R=301,L]
RewriteRule ^guide/cache.usage$ /3.0/guide/cache/usage [R=301,L]
# Redirect from /guide/ to /3.0/guide/
RewriteRule ^guide.* /3.0/guide/$1 [R=301,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite for the guides
RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [QSA,L]
|
kohana/kohanaframework.org | 80506e6df44a7ab8119bd81ea4aaec9a87b0ee09 | Disable the unittest module for the guides, fixes the API browser. | diff --git a/guides/3.0-bootstrap.php b/guides/3.0-bootstrap.php
index 3bac0f3..0236321 100644
--- a/guides/3.0-bootstrap.php
+++ b/guides/3.0-bootstrap.php
@@ -1,111 +1,111 @@
<?php defined('SYSPATH') or die('No direct script access.');
//-- Environment setup --------------------------------------------------------
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
//-- Configuration and initialization -----------------------------------------
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = $_SERVER['KOHANA_ENV'];
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/3.0/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Kohana_Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Caching with multiple backends
'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
'image' => MODPATH.'image', // Image manipulation
'orm' => MODPATH.'orm', // Object Relationship Mapping
'oauth' => MODPATH.'oauth', // OAuth authentication
'pagination' => MODPATH.'pagination', // Paging of results
- 'unittest' => MODPATH.'unittest', // Unit testing
+// 'unittest' => MODPATH.'unittest', // Unit testing
'userguide' => MODPATH.'userguide', // User guide and API documentation
));
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
if ( ! defined('SUPPRESS_REQUEST'))
{
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
echo Request::instance()
->execute()
->send_headers()
->response;
}
diff --git a/guides/3.1-bootstrap.php b/guides/3.1-bootstrap.php
index 24f94bf..eb863b3 100644
--- a/guides/3.1-bootstrap.php
+++ b/guides/3.1-bootstrap.php
@@ -1,119 +1,119 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/3.1/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Caching with multiple backends
'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
'image' => MODPATH.'image', // Image manipulation
'orm' => MODPATH.'orm', // Object Relationship Mapping
- 'unittest' => MODPATH.'unittest', // Unit testing
+// 'unittest' => MODPATH.'unittest', // Unit testing
'userguide' => MODPATH.'userguide', // User guide and API documentation
));
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
'action' => 'index',
));
|
kohana/kohanaframework.org | df018840615df157f580994aaa60c218c73b8432 | "Fixing" the 3.0 user guide | diff --git a/guides/3.0 b/guides/3.0
index d3ce4fd..dd1101a 160000
--- a/guides/3.0
+++ b/guides/3.0
@@ -1 +1 @@
-Subproject commit d3ce4fd5455b54f121082786415b5665df6dddd9
+Subproject commit dd1101ac9098a7261095dd0bca608bd00e27edf1
|
kohana/kohanaframework.org | 202b38ae47e9709366860f3e1ebed57eabaca7f9 | Add the remaining old userguide redirects. | diff --git a/public/.htaccess b/public/.htaccess
index 30d28f0..ffdc676 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,33 +1,62 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Remove www. from the URL
RewriteCond %{HTTP_HOST} ^www.kohanaframework.org$ [NC]
RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
+# Redirect old guide pages to new URLs
+RewriteRule ^guide/about.kohana$ /3.0/guide/kohana [R=301,L]
+RewriteRule ^guide/about.conventions$ /3.0/guide/kohana/conventions [R=301,L]
+RewriteRule ^guide/about.mvc$ /3.0/guide/kohana/mvc [R=301,L]
+RewriteRule ^guide/about.filesystem$ /3.0/guide/kohana/files [R=301,L]
+RewriteRule ^guide/about.flow$ /3.0/guide/kohana/flow [R=301,L]
+RewriteRule ^guide/about.install$ /3.0/guide/kohana/install [R=301,L]
+RewriteRule ^guide/about.upgrading$ /3.0/guide/kohana/upgrading [R=301,L]
+RewriteRule ^guide/using.configuration$ /3.0/guide/kohana/bootstrap [R=301,L]
+RewriteRule ^guide/using.autoloading$ /3.0/guide/kohana/autoloading [R=301,L]
+RewriteRule ^guide/using.views$ /3.0/guide/kohana/mvc/views [R=301,L]
+RewriteRule ^guide/using.sessions$ /3.0/guide/kohana/sessions [R=301,L]
+RewriteRule ^guide/using.messages$ /3.0/guide/kohana/messages [R=301,L]
+RewriteRule ^guide/debugging.code$ /3.0/guide/kohana/debugging [R=301,L]
+RewriteRule ^guide/debugging.errors$ /3.0/guide/kohana/errors [R=301,L]
+RewriteRule ^guide/debugging.profiling$ /3.0/guide/kohana/profiling [R=301,L]
+RewriteRule ^guide/security.xss$ /3.0/guide/kohana/security/xss [R=301,L]
+RewriteRule ^guide/security.validation$ /3.0/guide/kohana/security/validation [R=301,L]
+RewriteRule ^guide/security.database$ /3.0/guide/kohana/security/database [R=301,L]
+RewriteRule ^guide/tutorials.helloworld$ /3.0/guide/kohana/tutorials/hello-world [R=301,L]
+RewriteRule ^guide/tutorials.urls$ /3.0/guide/kohana/routing [R=301,L]
+RewriteRule ^guide/tutorials.removeindex$ /3.0/guide/kohana/tutorials/clean-urls [R=301,L]
+RewriteRule ^guide/tutorials.databases$ /3.0/guide/database [R=301,L]
+RewriteRule ^guide/tutorials.orm$ /3.0/guide/orm [R=301,L]
+RewriteRule ^guide/tutorials.git$ /3.0/guide/kohana/tutorials/git [R=301,L]
+RewriteRule ^guide/cache.about$ /3.0/guide/cache [R=301,L]
+RewriteRule ^guide/cache.config$ /3.0/guide/cache/config [R=301,L]
+RewriteRule ^guide/cache.usage$ /3.0/guide/cache/usage [R=301,L]
+
# Redirect from /guide/ to /3.0/guide/
RewriteRule ^guide.* /3.0/guide/$1 [R=301,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite for the guides
RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [QSA,L]
|
kohana/kohanaframework.org | d8efbea1a58007a3f5ef698610eb6598ca3892e3 | Fixup /guide -> /3.0/guide redirect | diff --git a/public/.htaccess b/public/.htaccess
index 4fc1d6e..30d28f0 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,33 +1,33 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Remove www. from the URL
RewriteCond %{HTTP_HOST} ^www.kohanaframework.org$ [NC]
RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
+# Redirect from /guide/ to /3.0/guide/
+RewriteRule ^guide.* /3.0/guide/$1 [R=301,L]
+
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
-# Rewrite /guide/ to /3.0/guide/
-RewriteRule ^guide.* /3.0/guide/$1 [PT]
-
# Rewrite for the guides
RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [QSA,L]
|
kohana/kohanaframework.org | b7e3b9b0a7daf6147ff5ff7e202ad1c207024c02 | Rewrite /guide/ to /3.0/guide/ | diff --git a/public/.htaccess b/public/.htaccess
index 77bb696..4fc1d6e 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,30 +1,33 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Remove www. from the URL
RewriteCond %{HTTP_HOST} ^www.kohanaframework.org$ [NC]
RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
+# Rewrite /guide/ to /3.0/guide/
+RewriteRule ^guide.* /3.0/guide/$1 [PT]
+
# Rewrite for the guides
RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [QSA,L]
|
kohana/kohanaframework.org | 8a198e6181f391db1adda5a1292178d2f4c8bd25 | Add redirect for www.kohanaframework.org -> kohanaframework.org | diff --git a/public/.htaccess b/public/.htaccess
index 7be8d83..77bb696 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,26 +1,30 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
+# Remove www. from the URL
+RewriteCond %{HTTP_HOST} ^www.kohanaframework.org$ [NC]
+RewriteRule ^(.*)$ http://kohanaframework.org/$1 [R=301,L]
+
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite for the guides
RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [QSA,L]
|
kohana/kohanaframework.org | 5b7477e4861f838e6a26de3eea01235bc5780b7e | PagodaBox Userguide Changes | diff --git a/.gitmodules b/.gitmodules
index 1d2c590..1d1129a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,18 +1,27 @@
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
[submodule "modules/userguide"]
path = modules/userguide
url = git://github.com/kohana/userguide.git
[submodule "modules/cache"]
path = modules/cache
url = git://github.com/kohana/cache.git
[submodule "modules/oauth"]
path = modules/oauth
url = git://github.com/kohana/oauth.git
[submodule "modules/kostache"]
path = modules/kostache
url = https://github.com/zombor/KOstache.git
[submodule "modules/gallery/vendor/slides"]
path = modules/gallery/vendor/slides
url = git://github.com/nathansearles/Slides.git
+[submodule "guides/3.0"]
+ path = guides/3.0
+ url = https://github.com/kohana/kohana.git
+[submodule "guides/3.1"]
+ path = guides/3.1
+ url = https://github.com/kohana/kohana.git
+[submodule "guides/3.2"]
+ path = guides/3.2
+ url = https://github.com/kohana/kohana.git
diff --git a/Boxfile b/Boxfile
index 7e31ae0..e99100d 100644
--- a/Boxfile
+++ b/Boxfile
@@ -1,7 +1,13 @@
---
web1:
document_root: /public/
name: www-kohanaframework
shared_writable_dirs:
- application/cache
- application/logs
+ - guides/3.0/application/cache
+ - guides/3.0/application/logs
+ - guides/3.1/application/cache
+ - guides/3.1/application/logs
+ - guides/3.2/application/cache
+ - guides/3.2/application/logs
diff --git a/guides/3.0 b/guides/3.0
new file mode 160000
index 0000000..d3ce4fd
--- /dev/null
+++ b/guides/3.0
@@ -0,0 +1 @@
+Subproject commit d3ce4fd5455b54f121082786415b5665df6dddd9
diff --git a/guides/3.0-bootstrap.php b/guides/3.0-bootstrap.php
new file mode 100644
index 0000000..3bac0f3
--- /dev/null
+++ b/guides/3.0-bootstrap.php
@@ -0,0 +1,111 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+//-- Environment setup --------------------------------------------------------
+
+/**
+ * Set the default time zone.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/timezones
+ */
+date_default_timezone_set('America/Chicago');
+
+/**
+ * Set the default locale.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/setlocale
+ */
+setlocale(LC_ALL, 'en_US.utf-8');
+
+/**
+ * Enable the Kohana auto-loader.
+ *
+ * @see http://kohanaframework.org/guide/using.autoloading
+ * @see http://php.net/spl_autoload_register
+ */
+spl_autoload_register(array('Kohana', 'auto_load'));
+
+/**
+ * Enable the Kohana auto-loader for unserialization.
+ *
+ * @see http://php.net/spl_autoload_call
+ * @see http://php.net/manual/var.configuration.php#unserialize-callback-func
+ */
+ini_set('unserialize_callback_func', 'spl_autoload_call');
+
+//-- Configuration and initialization -----------------------------------------
+
+/**
+ * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
+ */
+if (isset($_SERVER['KOHANA_ENV']))
+{
+ Kohana::$environment = $_SERVER['KOHANA_ENV'];
+}
+
+/**
+ * Initialize Kohana, setting the default options.
+ *
+ * The following options are available:
+ *
+ * - string base_url path, and optionally domain, of your application NULL
+ * - string index_file name of your index file, usually "index.php" index.php
+ * - string charset internal character set used for input and output utf-8
+ * - string cache_dir set the internal cache directory APPPATH/cache
+ * - boolean errors enable or disable error handling TRUE
+ * - boolean profile enable or disable internal profiling TRUE
+ * - boolean caching enable or disable internal caching FALSE
+ */
+Kohana::init(array(
+ 'base_url' => '/3.0/',
+ 'index_file' => '',
+));
+
+/**
+ * Attach the file write to logging. Multiple writers are supported.
+ */
+Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs'));
+
+/**
+ * Attach a file reader to config. Multiple readers are supported.
+ */
+Kohana::$config->attach(new Kohana_Config_File);
+
+/**
+ * Enable modules. Modules are referenced by a relative or absolute path.
+ */
+Kohana::modules(array(
+ 'auth' => MODPATH.'auth', // Basic authentication
+ 'cache' => MODPATH.'cache', // Caching with multiple backends
+ 'codebench' => MODPATH.'codebench', // Benchmarking tool
+ 'database' => MODPATH.'database', // Database access
+ 'image' => MODPATH.'image', // Image manipulation
+ 'orm' => MODPATH.'orm', // Object Relationship Mapping
+ 'oauth' => MODPATH.'oauth', // OAuth authentication
+ 'pagination' => MODPATH.'pagination', // Paging of results
+ 'unittest' => MODPATH.'unittest', // Unit testing
+ 'userguide' => MODPATH.'userguide', // User guide and API documentation
+ ));
+
+/**
+ * Set the routes. Each route must have a minimum of a name, a URI and a set of
+ * defaults for the URI.
+ */
+Route::set('default', '(<controller>(/<action>(/<id>)))')
+ ->defaults(array(
+ 'controller' => 'welcome',
+ 'action' => 'index',
+ ));
+
+if ( ! defined('SUPPRESS_REQUEST'))
+{
+ /**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+ echo Request::instance()
+ ->execute()
+ ->send_headers()
+ ->response;
+}
diff --git a/guides/3.0-index.php b/guides/3.0-index.php
new file mode 100644
index 0000000..0e7628f
--- /dev/null
+++ b/guides/3.0-index.php
@@ -0,0 +1,109 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '3.0/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '3.0/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '3.0/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+{
+ $application = DOCROOT.$application;
+}
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+{
+ $modules = DOCROOT.$modules;
+}
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+{
+ $system = DOCROOT.$system;
+}
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+// Load the base, low-level functions
+require SYSPATH.'base'.EXT;
+
+// Load the core Kohana class
+require SYSPATH.'classes/kohana/core'.EXT;
+
+if (is_file(APPPATH.'classes/kohana'.EXT))
+{
+ // Application extends the core
+ require APPPATH.'classes/kohana'.EXT;
+}
+else
+{
+ // Load empty core extension
+ require SYSPATH.'classes/kohana'.EXT;
+}
+
+// Bootstrap the application
+require '3.0-bootstrap'.EXT;
\ No newline at end of file
diff --git a/guides/3.1 b/guides/3.1
new file mode 160000
index 0000000..96e070a
--- /dev/null
+++ b/guides/3.1
@@ -0,0 +1 @@
+Subproject commit 96e070a991548a1c107bd1ed66b8fe154abc216a
diff --git a/guides/3.1-bootstrap.php b/guides/3.1-bootstrap.php
new file mode 100644
index 0000000..24f94bf
--- /dev/null
+++ b/guides/3.1-bootstrap.php
@@ -0,0 +1,119 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+// -- Environment setup --------------------------------------------------------
+
+// Load the core Kohana class
+require SYSPATH.'classes/kohana/core'.EXT;
+
+if (is_file(APPPATH.'classes/kohana'.EXT))
+{
+ // Application extends the core
+ require APPPATH.'classes/kohana'.EXT;
+}
+else
+{
+ // Load empty core extension
+ require SYSPATH.'classes/kohana'.EXT;
+}
+
+/**
+ * Set the default time zone.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/timezones
+ */
+date_default_timezone_set('America/Chicago');
+
+/**
+ * Set the default locale.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/setlocale
+ */
+setlocale(LC_ALL, 'en_US.utf-8');
+
+/**
+ * Enable the Kohana auto-loader.
+ *
+ * @see http://kohanaframework.org/guide/using.autoloading
+ * @see http://php.net/spl_autoload_register
+ */
+spl_autoload_register(array('Kohana', 'auto_load'));
+
+/**
+ * Enable the Kohana auto-loader for unserialization.
+ *
+ * @see http://php.net/spl_autoload_call
+ * @see http://php.net/manual/var.configuration.php#unserialize-callback-func
+ */
+ini_set('unserialize_callback_func', 'spl_autoload_call');
+
+// -- Configuration and initialization -----------------------------------------
+
+/**
+ * Set the default language
+ */
+I18n::lang('en-us');
+
+/**
+ * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
+ *
+ * Note: If you supply an invalid environment name, a PHP warning will be thrown
+ * saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
+ */
+if (isset($_SERVER['KOHANA_ENV']))
+{
+ Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
+}
+
+/**
+ * Initialize Kohana, setting the default options.
+ *
+ * The following options are available:
+ *
+ * - string base_url path, and optionally domain, of your application NULL
+ * - string index_file name of your index file, usually "index.php" index.php
+ * - string charset internal character set used for input and output utf-8
+ * - string cache_dir set the internal cache directory APPPATH/cache
+ * - boolean errors enable or disable error handling TRUE
+ * - boolean profile enable or disable internal profiling TRUE
+ * - boolean caching enable or disable internal caching FALSE
+ */
+Kohana::init(array(
+ 'base_url' => '/3.1/',
+ 'index_file' => '',
+));
+
+/**
+ * Attach the file write to logging. Multiple writers are supported.
+ */
+Kohana::$log->attach(new Log_File(APPPATH.'logs'));
+
+/**
+ * Attach a file reader to config. Multiple readers are supported.
+ */
+Kohana::$config->attach(new Config_File);
+
+/**
+ * Enable modules. Modules are referenced by a relative or absolute path.
+ */
+Kohana::modules(array(
+ 'auth' => MODPATH.'auth', // Basic authentication
+ 'cache' => MODPATH.'cache', // Caching with multiple backends
+ 'codebench' => MODPATH.'codebench', // Benchmarking tool
+ 'database' => MODPATH.'database', // Database access
+ 'image' => MODPATH.'image', // Image manipulation
+ 'orm' => MODPATH.'orm', // Object Relationship Mapping
+ 'unittest' => MODPATH.'unittest', // Unit testing
+ 'userguide' => MODPATH.'userguide', // User guide and API documentation
+ ));
+
+/**
+ * Set the routes. Each route must have a minimum of a name, a URI and a set of
+ * defaults for the URI.
+ */
+Route::set('default', '(<controller>(/<action>(/<id>)))')
+ ->defaults(array(
+ 'controller' => 'welcome',
+ 'action' => 'index',
+ ));
diff --git a/guides/3.1-index.php b/guides/3.1-index.php
new file mode 100644
index 0000000..2f4b71b
--- /dev/null
+++ b/guides/3.1-index.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '3.1/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '3.1/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '3.1/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '3.1-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory()
+ ->execute()
+ ->send_headers()
+ ->body();
diff --git a/guides/3.2 b/guides/3.2
new file mode 160000
index 0000000..8175431
--- /dev/null
+++ b/guides/3.2
@@ -0,0 +1 @@
+Subproject commit 817543166163308f236c7ba16e61e778b3796b31
diff --git a/guides/3.2-bootstrap.php b/guides/3.2-bootstrap.php
new file mode 100644
index 0000000..03cf8c0
--- /dev/null
+++ b/guides/3.2-bootstrap.php
@@ -0,0 +1,119 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+// -- Environment setup --------------------------------------------------------
+
+// Load the core Kohana class
+require SYSPATH.'classes/kohana/core'.EXT;
+
+if (is_file(APPPATH.'classes/kohana'.EXT))
+{
+ // Application extends the core
+ require APPPATH.'classes/kohana'.EXT;
+}
+else
+{
+ // Load empty core extension
+ require SYSPATH.'classes/kohana'.EXT;
+}
+
+/**
+ * Set the default time zone.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/timezones
+ */
+date_default_timezone_set('America/Chicago');
+
+/**
+ * Set the default locale.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ * @see http://php.net/setlocale
+ */
+setlocale(LC_ALL, 'en_US.utf-8');
+
+/**
+ * Enable the Kohana auto-loader.
+ *
+ * @see http://kohanaframework.org/guide/using.autoloading
+ * @see http://php.net/spl_autoload_register
+ */
+spl_autoload_register(array('Kohana', 'auto_load'));
+
+/**
+ * Enable the Kohana auto-loader for unserialization.
+ *
+ * @see http://php.net/spl_autoload_call
+ * @see http://php.net/manual/var.configuration.php#unserialize-callback-func
+ */
+ini_set('unserialize_callback_func', 'spl_autoload_call');
+
+// -- Configuration and initialization -----------------------------------------
+
+/**
+ * Set the default language
+ */
+I18n::lang('en-us');
+
+/**
+ * Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
+ *
+ * Note: If you supply an invalid environment name, a PHP warning will be thrown
+ * saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
+ */
+if (isset($_SERVER['KOHANA_ENV']))
+{
+ Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
+}
+
+/**
+ * Initialize Kohana, setting the default options.
+ *
+ * The following options are available:
+ *
+ * - string base_url path, and optionally domain, of your application NULL
+ * - string index_file name of your index file, usually "index.php" index.php
+ * - string charset internal character set used for input and output utf-8
+ * - string cache_dir set the internal cache directory APPPATH/cache
+ * - boolean errors enable or disable error handling TRUE
+ * - boolean profile enable or disable internal profiling TRUE
+ * - boolean caching enable or disable internal caching FALSE
+ */
+Kohana::init(array(
+ 'base_url' => '/3.2/',
+ 'index_file' => '',
+));
+
+/**
+ * Attach the file write to logging. Multiple writers are supported.
+ */
+Kohana::$log->attach(new Log_File(APPPATH.'logs'));
+
+/**
+ * Attach a file reader to config. Multiple readers are supported.
+ */
+Kohana::$config->attach(new Config_File);
+
+/**
+ * Enable modules. Modules are referenced by a relative or absolute path.
+ */
+Kohana::modules(array(
+ 'auth' => MODPATH.'auth', // Basic authentication
+ 'cache' => MODPATH.'cache', // Caching with multiple backends
+ 'codebench' => MODPATH.'codebench', // Benchmarking tool
+ 'database' => MODPATH.'database', // Database access
+ 'image' => MODPATH.'image', // Image manipulation
+ 'orm' => MODPATH.'orm', // Object Relationship Mapping
+ 'unittest' => MODPATH.'unittest', // Unit testing
+ 'userguide' => MODPATH.'userguide', // User guide and API documentation
+ ));
+
+/**
+ * Set the routes. Each route must have a minimum of a name, a URI and a set of
+ * defaults for the URI.
+ */
+Route::set('default', '(<controller>(/<action>(/<id>)))')
+ ->defaults(array(
+ 'controller' => 'welcome',
+ 'action' => 'index',
+ ));
diff --git a/guides/3.2-index.php b/guides/3.2-index.php
new file mode 100644
index 0000000..23d3c46
--- /dev/null
+++ b/guides/3.2-index.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '3.2/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '3.2/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '3.2/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '3.2-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory()
+ ->execute()
+ ->send_headers()
+ ->body();
diff --git a/public/.htaccess b/public/.htaccess
index 3eee869..7be8d83 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,18 +1,26 @@
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
+# Rewrite for the guides
+RewriteRule ^([\d\.]+)/(guide.*) $1-index.php/$2 [QSA,L]
+
+# Allow any files or directories that exist to be displayed directly
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_URI} !^([\d\.]+)/(guide.*)
+
# Rewrite all other URLs to index.php/URL
-RewriteRule .* index.php/$0 [PT]
+RewriteRule .* index.php/$0 [QSA,L]
diff --git a/public/3.0-index.php b/public/3.0-index.php
new file mode 100644
index 0000000..0ae0887
--- /dev/null
+++ b/public/3.0-index.php
@@ -0,0 +1,109 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '../guides/3.0/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '../guides/3.0/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '../guides/3.0/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+{
+ $application = DOCROOT.$application;
+}
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+{
+ $modules = DOCROOT.$modules;
+}
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+{
+ $system = DOCROOT.$system;
+}
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+// Load the base, low-level functions
+require SYSPATH.'base'.EXT;
+
+// Load the core Kohana class
+require SYSPATH.'classes/kohana/core'.EXT;
+
+if (is_file(APPPATH.'classes/kohana'.EXT))
+{
+ // Application extends the core
+ require APPPATH.'classes/kohana'.EXT;
+}
+else
+{
+ // Load empty core extension
+ require SYSPATH.'classes/kohana'.EXT;
+}
+
+// Bootstrap the application
+require '../guides/3.0-bootstrap'.EXT;
diff --git a/public/3.1-index.php b/public/3.1-index.php
new file mode 100644
index 0000000..1dceb1d
--- /dev/null
+++ b/public/3.1-index.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '../guides/3.1/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '../guides/3.1/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '../guides/3.1/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '../guides/3.1-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory()
+ ->execute()
+ ->send_headers()
+ ->body();
diff --git a/public/3.2-index.php b/public/3.2-index.php
new file mode 100644
index 0000000..c58d93e
--- /dev/null
+++ b/public/3.2-index.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * The directory in which your application specific resources are located.
+ * The application directory must contain the bootstrap.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#application
+ */
+$application = '../guides/3.2/application';
+
+/**
+ * The directory in which your modules are located.
+ *
+ * @see http://kohanaframework.org/guide/about.install#modules
+ */
+$modules = '../guides/3.2/modules';
+
+/**
+ * The directory in which the Kohana resources are located. The system
+ * directory must contain the classes/kohana.php file.
+ *
+ * @see http://kohanaframework.org/guide/about.install#system
+ */
+$system = '../guides/3.2/system';
+
+/**
+ * The default extension of resource files. If you change this, all resources
+ * must be renamed to use the new extension.
+ *
+ * @see http://kohanaframework.org/guide/about.install#ext
+ */
+define('EXT', '.php');
+
+/**
+ * Set the PHP error reporting level. If you set this in php.ini, you remove this.
+ * @see http://php.net/error_reporting
+ *
+ * When developing your application, it is highly recommended to enable notices
+ * and strict warnings. Enable them by using: E_ALL | E_STRICT
+ *
+ * In a production environment, it is safe to ignore notices and strict warnings.
+ * Disable them by using: E_ALL ^ E_NOTICE
+ *
+ * When using a legacy application with PHP >= 5.3, it is recommended to disable
+ * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
+ */
+error_reporting(E_ALL | E_STRICT);
+
+/**
+ * End of standard configuration! Changing any of the code below should only be
+ * attempted by those with a working knowledge of Kohana internals.
+ *
+ * @see http://kohanaframework.org/guide/using.configuration
+ */
+
+// Set the full path to the docroot
+define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
+
+// Make the application relative to the docroot, for symlink'd index.php
+if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
+ $application = DOCROOT.$application;
+
+// Make the modules relative to the docroot, for symlink'd index.php
+if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
+ $modules = DOCROOT.$modules;
+
+// Make the system relative to the docroot, for symlink'd index.php
+if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
+ $system = DOCROOT.$system;
+
+// Define the absolute paths for configured directories
+define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
+define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
+define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
+
+// Clean up the configuration vars
+unset($application, $modules, $system);
+
+if (file_exists('install'.EXT))
+{
+ // Load the installation check
+ return include 'install'.EXT;
+}
+
+/**
+ * Define the start time of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_TIME'))
+{
+ define('KOHANA_START_TIME', microtime(TRUE));
+}
+
+/**
+ * Define the memory usage at the start of the application, used for profiling.
+ */
+if ( ! defined('KOHANA_START_MEMORY'))
+{
+ define('KOHANA_START_MEMORY', memory_get_usage());
+}
+
+// Bootstrap the application
+require '../guides/3.2-bootstrap'.EXT;
+
+/**
+ * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
+ * If no source is specified, the URI will be automatically detected.
+ */
+echo Request::factory()
+ ->execute()
+ ->send_headers()
+ ->body();
diff --git a/public/assets/img/pagodaFloat.png b/public/assets/img/pagodaFloat.png
index 3654db1..9135a45 100644
Binary files a/public/assets/img/pagodaFloat.png and b/public/assets/img/pagodaFloat.png differ
diff --git a/public/index.php b/public/index.php
index 9891361..22fed03 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,93 +1,107 @@
<?php
+/**
+ * Detect and "route" to guide applications...
+ */
+if (preg_match('/^\/([\d\.]+)\/guide/', $_SERVER['REQUEST_URI'], $matches))
+{
+ $version = $matches[1];
+
+ if (is_file('../guides/'.$version.'-index.php'))
+ {
+ return include '../guides/'.$version.'-index.php';
+ }
+}
+
+unset($matches);
/**
* The directory in which your application specific resources are located.
* The application directory must contain the config/kohana.php file.
*
* @see http://docs.kohanaphp.com/install#application
*/
$application = '../application';
/**
* The directory in which your modules are located.
*
* @see http://docs.kohanaphp.com/install#modules
*/
$modules = '../modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://docs.kohanaphp.com/install#system
*/
$system = '../system';
/**
* The default extension of resource files. If you change this, all resources
* must be renamed to use the new extension.
*
* @see http://docs.kohanaphp.com/install#ext
*/
define('EXT', '.php');
/**
* Set the PHP error reporting level. If you set this in php.ini, you remove this.
* @see http://php.net/error_reporting
*
* When developing your application, it is highly recommended to enable notices
* and strict warnings. Enable them by using: E_ALL | E_STRICT
*
* In a production environment, it is safe to ignore notices and strict warnings.
* Disable them by using: E_ALL ^ E_NOTICE
*/
error_reporting(E_ALL | E_STRICT);
/**
* End of standard configuration! Changing any of the code below should only be
* attempted by those with a working knowledge of Kohana internals.
*
* @see http://docs.kohanaphp.com/bootstrap
*/
// Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// Make the application relative to the docroot
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
// Make the modules relative to the docroot
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
// Make the system relative to the docroot
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
// Clean up the configuration vars
unset($application, $modules, $system);
// Define the start time of the application
define('KOHANA_START_TIME', microtime(TRUE));
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;
/**
* Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
* If no source is specified, the URI will be automatically detected.
*/
$cache = (extension_loaded('apc')) ? HTTP_Cache::factory('apc') : NULL;
echo Request::factory(TRUE, $cache)
->execute()
->send_headers()
- ->body();
\ No newline at end of file
+ ->body();
|
kohana/kohanaframework.org | 06541d676b86b859b5af4592de0160dc04e5802e | Add PBox Boxfile | diff --git a/Boxfile b/Boxfile
new file mode 100644
index 0000000..7e31ae0
--- /dev/null
+++ b/Boxfile
@@ -0,0 +1,7 @@
+---
+web1:
+ document_root: /public/
+ name: www-kohanaframework
+ shared_writable_dirs:
+ - application/cache
+ - application/logs
|
kohana/kohanaframework.org | 456b0a9274db469b7c1844689fdb0cf34b1f6a5f | Fixes #4348, uses the base URL to ensure the images load regardless of client location | diff --git a/application/templates/home/gallery.mustache b/application/templates/home/gallery.mustache
index 8072ae2..125cc89 100644
--- a/application/templates/home/gallery.mustache
+++ b/application/templates/home/gallery.mustache
@@ -1,40 +1,40 @@
<section id="gallery" class="medBkg inset">
<h2>Gallery</h2>
<div class="sliderContent" id="galleryContainer">
<div>
<div class="information">
<h3>Sittercity</h3>
<a href="http://www.sittercity.com">www.sittercity.com</a>
</div>
- <img src="/assets/img/gallery/sittercity.jpg" alt="sittercity" />
+ <img src="{{base_url}}assets/img/gallery/sittercity.jpg" alt="sittercity" />
</div>
<div>
<div class="information">
<h3>Couch Surfing</h3>
<a href="http://www.couchsurfing.org">www.couchsurfing.org</a>
</div>
- <img src="/assets/img/gallery/couchsurfing.jpg" alt="Couch Surfing web site" />
+ <img src="{{base_url}}assets/img/gallery/couchsurfing.jpg" alt="Couch Surfing web site" />
</div>
<div>
<div class="information">
<h3>We Pay</h3>
<a href="http://www.wepay.com">www.wepay.com</a>
</div>
- <img src="/assets/img/gallery/wepay.jpg" alt="We Pay website" />
+ <img src="{{base_url}}assets/img/gallery/wepay.jpg" alt="We Pay website" />
</div>
<div>
<div class="information">
<h3>Mukuru</h3>
<a href="http://www.mukuru.com">www.mukuru.com</a>
</div>
- <img src="/assets/img/gallery/mukuru.jpg" alt="Mukuru website" />
+ <img src="{{base_url}}assets/img/gallery/mukuru.jpg" alt="Mukuru website" />
</div>
<div>
<div class="information">
<h3>National Geographic Kids</h3>
<a href="http://kids-myshot.nationalgeographic.com/">http://kids-myshot.nationalgeographic.com/</a>
</div>
- <img src="/assets/img/gallery/nationalgeographic.jpg" alt="National Geographic Kids My-Shot website" />
+ <img src="{{base_url}}assets/img/gallery/nationalgeographic.jpg" alt="National Geographic Kids My-Shot website" />
</div>
</div>
</section> <!-- END section#gallery -->
\ No newline at end of file
|
kohana/kohanaframework.org | c2b2365d6acfab460e3c41b385289fe62d9d62bb | Fixes #4138, implemented the dynamic gallery JS using SlideJS | diff --git a/.gitmodules b/.gitmodules
index 7af0449..1d2c590 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,15 +1,18 @@
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
[submodule "modules/userguide"]
path = modules/userguide
url = git://github.com/kohana/userguide.git
[submodule "modules/cache"]
path = modules/cache
url = git://github.com/kohana/cache.git
[submodule "modules/oauth"]
path = modules/oauth
url = git://github.com/kohana/oauth.git
[submodule "modules/kostache"]
path = modules/kostache
url = https://github.com/zombor/KOstache.git
+[submodule "modules/gallery/vendor/slides"]
+ path = modules/gallery/vendor/slides
+ url = git://github.com/nathansearles/Slides.git
diff --git a/application/templates/home/gallery.mustache b/application/templates/home/gallery.mustache
index 7b78e46..8072ae2 100644
--- a/application/templates/home/gallery.mustache
+++ b/application/templates/home/gallery.mustache
@@ -1,15 +1,40 @@
<section id="gallery" class="medBkg inset">
<h2>Gallery</h2>
-<!--<ul class="sliderNav">
- <li class="active"><a href="#">1</a></li>
- <li><a href="#">2</a></li>
- <li><a href="#">3</a></li>
- </ul>-->
- <div class="sliderContent">
- <ul>
- <li><a href="http://kids-myshot.nationalgeographic.com/"><img src="{{base_url}}assets/img/gallery/thumb/national-geographic-kids.jpg" width="200" height="169" alt="Your shots: National Geographic Kids" /></a></li>
- <li><a href="http://www.sittercity.com/"><img src="{{base_url}}assets/img/gallery/thumb/sittercity.jpg" width="200" height="169" alt="Sittercity" /></a></li>
- <li><a href="http://mukuru.com/"><img src="{{base_url}}assets/img/gallery/thumb/mukuru.jpg" width="200" height="169" alt="Mukuru.com" /></a></li>
- </ul>
+ <div class="sliderContent" id="galleryContainer">
+ <div>
+ <div class="information">
+ <h3>Sittercity</h3>
+ <a href="http://www.sittercity.com">www.sittercity.com</a>
+ </div>
+ <img src="/assets/img/gallery/sittercity.jpg" alt="sittercity" />
+ </div>
+ <div>
+ <div class="information">
+ <h3>Couch Surfing</h3>
+ <a href="http://www.couchsurfing.org">www.couchsurfing.org</a>
+ </div>
+ <img src="/assets/img/gallery/couchsurfing.jpg" alt="Couch Surfing web site" />
+ </div>
+ <div>
+ <div class="information">
+ <h3>We Pay</h3>
+ <a href="http://www.wepay.com">www.wepay.com</a>
+ </div>
+ <img src="/assets/img/gallery/wepay.jpg" alt="We Pay website" />
+ </div>
+ <div>
+ <div class="information">
+ <h3>Mukuru</h3>
+ <a href="http://www.mukuru.com">www.mukuru.com</a>
+ </div>
+ <img src="/assets/img/gallery/mukuru.jpg" alt="Mukuru website" />
+ </div>
+ <div>
+ <div class="information">
+ <h3>National Geographic Kids</h3>
+ <a href="http://kids-myshot.nationalgeographic.com/">http://kids-myshot.nationalgeographic.com/</a>
+ </div>
+ <img src="/assets/img/gallery/nationalgeographic.jpg" alt="National Geographic Kids My-Shot website" />
+ </div>
</div>
</section> <!-- END section#gallery -->
\ No newline at end of file
diff --git a/application/templates/home/whouses.mustache b/application/templates/home/whouses.mustache
index 62645d2..29d712b 100644
--- a/application/templates/home/whouses.mustache
+++ b/application/templates/home/whouses.mustache
@@ -1,10 +1,11 @@
<section id="who" class="darkBkg inset">
<h2>Who uses Kohana?</h2>
- <ul>
- <li><img src="{{base_url}}assets/img/whoSittercity.png" width="110" height="33" alt="Sittercity" /></li>
- <li><img src="{{base_url}}assets/img/whoKohort.png" width="110" height="28" alt="Kohort" /></li>
- <li><img src="{{base_url}}assets/img/whoNationalGeographic.png" width="110" height="33" alt="National Geographic" /></li>
- <li><img src="{{base_url}}assets/img/whoMukuru.png" width="110" height="23" alt="Mukuru.com" /></li>
- </ul>
+ <div id="whoGallery">
+ <img src="{{base_url}}assets/img/gallery/logos/sittercity.png" width="280" height="100" alt="Sittercity" />
+ <img src="{{base_url}}assets/img/gallery/logos/couchsurfing.png" width="280" height="100" alt="Couch Surfing" />
+ <img src="{{base_url}}assets/img/gallery/logos/wepay.png" width="280" height="100" alt="We Pay" />
+ <img src="{{base_url}}assets/img/gallery/logos/mukuru.png" width="280" height="100" alt="Mukuru" />
+ <img src="{{base_url}}assets/img/gallery/logos/nationalgeographic.png" width="280" height="100" alt="National Geographic" />
+ </div>
<p>These are some of the people already using Kohana. <a href="http://forum.kohanaframework.org">See more on the Forums.</a></p>
</section> <!-- END section#who -->
\ No newline at end of file
diff --git a/application/templates/layout.mustache b/application/templates/layout.mustache
index f8c554a..886d90e 100644
--- a/application/templates/layout.mustache
+++ b/application/templates/layout.mustache
@@ -1,79 +1,85 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="notices">
{{>notices}}
</div>
<div class="container">
{{>content}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
+ <div id="pagodabox">
+ <a href="http://www.pagodabox.com">Powered by Pagoda Box, PHP as a Service</a>
+ </div>
+
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
+<script src="{{base_url}}assets/js/lib/slides.js"></script>
<script src="{{base_url}}assets/js/global.js"></script>
+<script src="{{base_url}}assets/js/gallery.js"></script>
<!--[if lt IE 7 ]>
<script src="{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
diff --git a/application/templates/partials/footer.mustache b/application/templates/partials/footer.mustache
index 37c8c75..fc8a357 100644
--- a/application/templates/partials/footer.mustache
+++ b/application/templates/partials/footer.mustache
@@ -1,6 +1,6 @@
<p>
Copyright © 2007–{{year}}. The awesome
<a href="{{team_url}}">Kohana Team</a>. Kohana is
<a href="{{license_url}}">licensed</a> under the BSD License.
<small>Powered by Kohana v{{kohana_version}} "{{kohana_codename}}"</small>
-</p>
+</p>
\ No newline at end of file
diff --git a/modules/gallery/classes/controller/gallery.php b/modules/gallery/classes/controller/gallery.php
new file mode 100644
index 0000000..4bd693a
--- /dev/null
+++ b/modules/gallery/classes/controller/gallery.php
@@ -0,0 +1,130 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Controller_Gallery extends Controller {
+
+ /**
+ * @var array
+ */
+ protected $_accept_format = 'application/json';
+
+ /**
+ * @var array
+ */
+ protected $_acceptable = array(
+ 'text/html',
+ 'application/json'
+ );
+
+ /**
+ * @var array
+ */
+ protected $_data = array();
+
+ /**
+ * @var integer
+ */
+ protected $_limit = NULL;
+
+ /**
+ * @var integer
+ */
+ protected $_offset = NULL;
+
+ /**
+ * Ensures the request is valid
+ *
+ * @return void
+ */
+ public function before()
+ {
+ if ($this->request->method() !== HTTP_Request::GET)
+ {
+ throw new HTTP_Exception_405;
+ }
+
+ $this->_accept_format =
+ $this->request
+ ->headers()
+ ->preferred_accept($this->_acceptable);
+
+ }
+
+ /**
+ * Returns the gallery images.
+ *
+ * @return void
+ */
+ public function action_index()
+ {
+ $this->_limit = $this->request->query('limit', NULL);
+ $this->_offset = $this->request->query('offset', NULL);
+
+ $this->_data = new Model_Gallery;
+ }
+
+ /**
+ * Renders the output in the correct format
+ *
+ * @return void
+ */
+ public function after()
+ {
+ $data = $this->_data->get_exhibits($limit, $offset);
+
+ if ($this->_accept_format === 'application/json')
+ {
+ $total = $this->_data->count();
+
+ $this->response->body(
+ $this->_create_json_response(
+ 'exhibit',
+ $data,
+ $this->_limit,
+ $this->_offset,
+ $total
+ )
+ )
+ }
+ else
+ {
+ $view =
+ }
+
+ $this->response->headers('content-type', $this->_accept_format);
+ }
+
+ /**
+ * Takes the entity and data and returns a json response
+ *
+ * @param string $entity Entity to encode
+ * @param array $data Data to encode with entity
+ * @param integer $limit Limit applied to result
+ * @param integer $offset Offset applied to result
+ * @param integer $total Total number of results of limit/offset omitted
+ * @return string
+ */
+ protected function _create_json_response(
+ $entity,
+ array $data,
+ $limit = NULL,
+ $offset = NULL,
+ $total = NULL
+ )
+ {
+ if ($total === NULL)
+ {
+ $total = count($data);
+ }
+
+ $json = new stdClass;
+ $json->entity = $entity;
+ $json->total = $total;
+ $json->offset = $offset;
+ $json->limit = $limit;
+ $json->results = count($data);
+ $json->payload = $data;
+
+ return json_encode($json, JSON_NUMERIC_CHECK);
+ }
+
+} // Controller_Gallery
\ No newline at end of file
diff --git a/modules/gallery/classes/model/gallery.php b/modules/gallery/classes/model/gallery.php
new file mode 100644
index 0000000..98a3e00
--- /dev/null
+++ b/modules/gallery/classes/model/gallery.php
@@ -0,0 +1,94 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+/**
+ * The Kohana_HTTP_Header class provides an Object-Orientated interface
+ * to HTTP headers. This can parse header arrays returned from the
+ * PHP functions `apache_request_headers()` or the `http_parse_headers()`
+ * function available within the PECL HTTP library.
+ *
+ * @package Kohana Website
+ * @category Gallery
+ * @author Kohana Team
+ * @copyright (c) 2008-2011 Kohana Team
+ * @license http://kohanaframework.org/license
+ */
+class Model_Gallery implements Countable {
+
+ /**
+ * @var array exhibits for the gallery
+ */
+ protected $_gallery_exhibits = array();
+
+ /**
+ * Constructor to allow injection of data
+ *
+ * @param array $exhibits Exhibits to set to the model
+ */
+ public function __construct(array $exhibits = NULL)
+ {
+ if ($exhibits !== NULL)
+ {
+ $this->set_exhibits($exhibits)
+ }
+ else
+ {
+ $this->set_exhibits(Kohana::$config->load('gallery'));
+ }
+ }
+
+ /**
+ * Implements the Countable interface
+ *
+ * @return integer
+ */
+ public function count()
+ {
+ return count($this->get_exhibits());
+ }
+
+ /**
+ * Set exhibits to this model.
+ *
+ * @param array $exhibits Exhibits to set
+ * @param string $replace Replace all exhibits with the array
+ * @return void
+ */
+ public function set_exhibits(array $exhibits, $replace = FALSE)
+ {
+ if ($replace === TRUE)
+ {
+ $this->_gallery_exhibits = $exhibits;
+ }
+ else
+ {
+ $this->_gallery_exhibits =
+ Arr::merge($this->get_exhibits(), $exhibits);
+ }
+ }
+
+ /**
+ * Returns the exhibits, either all or limited and offsetted.
+ *
+ * @return array
+ */
+ public function get_exhibits($limit = NULL, $offset = NULL)
+ {
+ if ($limit === NULL AND $offset === NULL)
+ {
+ return $this->_gallery_exhibits;
+ }
+
+ $result = $this->_gallery_exhibits;
+
+ if ($offset !== NULL)
+ {
+ $result = array_slice($result, (int) $offset, $limit, TRUE);
+ }
+ elseif ($limit !== NULL)
+ {
+ $result = array_slice($result, 0, (int) $limit, TRUE);
+ }
+
+ return $result;
+ }
+
+} // End Model_Gallery
\ No newline at end of file
diff --git a/modules/gallery/config/gallery.php b/modules/gallery/config/gallery.php
new file mode 100644
index 0000000..fdd763c
--- /dev/null
+++ b/modules/gallery/config/gallery.php
@@ -0,0 +1,20 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+return array(
+ array(
+ 'title' => 'Your shots: National Geographic Kids',
+ 'url' => 'http://kids-myshot.nationalgeographic.com',
+ 'src' => 'national-geographic-kids.jpg'
+ ),
+ array(
+ 'title' => 'Sittercity',
+ 'url' => 'http://www.sittercity.com',
+ 'src' => 'sittercity.jpg'
+ ),
+ array(
+ 'title' => 'Mukuru.com',
+ 'url' => 'http://mukuru.com',
+ 'src' => 'mukuru.jpg'
+ ),
+ // And many more to come
+)
\ No newline at end of file
diff --git a/modules/gallery/vendor/slides b/modules/gallery/vendor/slides
new file mode 160000
index 0000000..f90289a
--- /dev/null
+++ b/modules/gallery/vendor/slides
@@ -0,0 +1 @@
+Subproject commit f90289a98c7d63654ce3edd0ca6dc62d3130e50e
diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index d7bd16f..1cd666b 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,485 +1,512 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
-#who, #gallery { height:220px; }
-#who { width:280px; float:left; }
-#gallery { width:620px; float:right; position:relative; }
+#who { height: 220px; width:280px; float:left; }
+#gallery { height:254px; width:660px; float:right; position:relative; overflow: hidden; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
#banner h2.error { width: auto; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
-#who ul { margin:0; overflow:hidden; }
-#who li { list-style:none; display:inline; margin:0 9px; }
-#who img { vertical-align:middle; margin-bottom:17px; }
+#who div#whoGallery { margin:0; overflow:hidden; width: 280px; height: 100px }
+#who img { vertical-align:middle; padding-bottom:40px; }
+#who p { margin-top: 20px }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
+#gallery { padding: 0px; margin: 0px; }
+#gallery h2 { display: block; overflow: hidden; height: 0; width: 0; padding: 0; margin: 0 }
+#gallery div.information { position: absolute; display: block; background: rgba(20,40,20,0.6); width: 635px; top: 255px; height: 50px; padding-left: 25px; padding-top: 25px; padding-bottom: 0px; }
+#gallery .information h3 { padding: 0; margin: 0; font-size: 25px; float: left }
+#gallery .information a { color: rgb(210, 220, 190); float: left; margin: 10px; font:italic 14px Georgia, "Times New Roman", Times, serif; font-weight: 100; }
+#gallery .information a:hover { text-decoration: none;}
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/famfamfam/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/famfamfam/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/famfamfam/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
div#error { padding-left: 5em; }
div#error img#not-found { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#not-found-server { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
/*
* Notices
*/
div.notice {
padding: 5px 5px;
padding-left: 25px;
margin: 5px 0px;
/* Rounded Corners and Shadow */
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
/* Shadow */
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
div.notice-error {
background: #ff0000 url(../img/icon/famfamfam/exclamation.png) no-repeat 5px center;
}
div.notice-warning {
background: #ffff00 url(../img/icon/famfamfam/error.png) no-repeat 5px center;
}
div.notice-information {
background: #0000ff url(../img/icon/famfamfam/information.png) no-repeat 5px center;
}
div.notice-success {
background: #00ff00 url(../img/icon/famfamfam/accept.png) no-repeat 5px center;
}
/*
* END Notices
+ */
+
+/*
+ * Pagodabox
+ */
+div#pagodabox {
+ height: 100px;
+}
+
+div#pagodabox a {
+ display: block;
+ overflow: hidden;
+ background: url(../img/pagodaFloat.png) no-repeat;
+ width: 104px;
+ height: 0px;
+ padding-top: 54px;
+ margin-top: 25px;
+ float: right;
+}
+
+/*
+ * END Pagodabox
*/
\ No newline at end of file
diff --git a/public/assets/img/gallery/couchsurfing.jpg b/public/assets/img/gallery/couchsurfing.jpg
new file mode 100644
index 0000000..357da7f
Binary files /dev/null and b/public/assets/img/gallery/couchsurfing.jpg differ
diff --git a/public/assets/img/gallery/logos/couchsurfing.png b/public/assets/img/gallery/logos/couchsurfing.png
new file mode 100644
index 0000000..e240d21
Binary files /dev/null and b/public/assets/img/gallery/logos/couchsurfing.png differ
diff --git a/public/assets/img/gallery/logos/mukuru.png b/public/assets/img/gallery/logos/mukuru.png
new file mode 100644
index 0000000..961d1c1
Binary files /dev/null and b/public/assets/img/gallery/logos/mukuru.png differ
diff --git a/public/assets/img/gallery/logos/nationalgeographic.png b/public/assets/img/gallery/logos/nationalgeographic.png
new file mode 100644
index 0000000..2cfa225
Binary files /dev/null and b/public/assets/img/gallery/logos/nationalgeographic.png differ
diff --git a/public/assets/img/gallery/logos/sittercity.png b/public/assets/img/gallery/logos/sittercity.png
new file mode 100644
index 0000000..9d1ff25
Binary files /dev/null and b/public/assets/img/gallery/logos/sittercity.png differ
diff --git a/public/assets/img/gallery/logos/wepay.png b/public/assets/img/gallery/logos/wepay.png
new file mode 100644
index 0000000..1382d9d
Binary files /dev/null and b/public/assets/img/gallery/logos/wepay.png differ
diff --git a/public/assets/img/gallery/mukuru.jpg b/public/assets/img/gallery/mukuru.jpg
new file mode 100644
index 0000000..0a4e240
Binary files /dev/null and b/public/assets/img/gallery/mukuru.jpg differ
diff --git a/public/assets/img/gallery/nationalgeographic.jpg b/public/assets/img/gallery/nationalgeographic.jpg
new file mode 100644
index 0000000..691d114
Binary files /dev/null and b/public/assets/img/gallery/nationalgeographic.jpg differ
diff --git a/public/assets/img/gallery/sittercity.jpg b/public/assets/img/gallery/sittercity.jpg
new file mode 100644
index 0000000..c604b94
Binary files /dev/null and b/public/assets/img/gallery/sittercity.jpg differ
diff --git a/public/assets/img/gallery/wepay.jpg b/public/assets/img/gallery/wepay.jpg
new file mode 100644
index 0000000..b4cbe98
Binary files /dev/null and b/public/assets/img/gallery/wepay.jpg differ
diff --git a/public/assets/img/pagodaFloat.png b/public/assets/img/pagodaFloat.png
new file mode 100644
index 0000000..3654db1
Binary files /dev/null and b/public/assets/img/pagodaFloat.png differ
diff --git a/public/assets/js/gallery.js b/public/assets/js/gallery.js
new file mode 100644
index 0000000..409c73b
--- /dev/null
+++ b/public/assets/js/gallery.js
@@ -0,0 +1,50 @@
+// Document javascript
+
+$(document).ready(function() {
+
+ $("#galleryContainer").mouseenter(function(event) {
+
+ var text = $(event.target).parent().closest();
+
+ $(text).animate({
+ top: "180px"
+ }, 300);;
+
+ $("#gallery div.information").animate({
+ top: "180px"
+ }, 300);
+ });
+
+ $("#galleryContainer").mouseleave(function() {
+ $("#gallery div.information").animate({
+ top: "255px"
+ }, 300);
+ });
+
+ $("#galleryContainer").slides({
+ playInterval: 10000,
+ effect: 'slide',
+ navigation: false,
+ pagination: false,
+ slide: {
+ browserWindow: false,
+ interval: 600
+ },
+ container: "sliderContent"
+ });
+
+ $("#whoGallery").slides({
+ playInterval: 10000,
+ effect: 'slide',
+ navigation: false,
+ pagination: false,
+ slide: {
+ browserWindow: false,
+ interval: 600
+ }
+ });
+
+ $("#galleryContainer").slides("play");
+ $("#whoGallery").slides("play");
+
+});
\ No newline at end of file
diff --git a/public/assets/js/lib/slides.js b/public/assets/js/lib/slides.js
new file mode 120000
index 0000000..755693b
--- /dev/null
+++ b/public/assets/js/lib/slides.js
@@ -0,0 +1 @@
+../../../../modules/gallery/vendor/slides/source/slides.js
\ No newline at end of file
|
kohana/kohanaframework.org | dd68344c38c24f517cff1352169f8315ff2eb83a | Corrected Boilerplate | diff --git a/README.md b/README.md
index 2b56ba6..0d1c01d 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,15 @@
# Intro
View the website online at http://kohanaframework.org/
# Deployment
The "develop" branch of this repository will be automatically deployed to http://staging.kohanaframework.org/
The "master" branch of this repository will be automatically deployed to http://www.kohanaframework.org/
# 3rd Party Credits
* [FamFamFam Silk v1.3 icon set](www.famfamfam.com/lab/icons/silk/)
-* [HTML5 Boilerplace](http://html5boilerplate.com/)
+* [HTML5 Boilerplate](http://html5boilerplate.com/)
Let us know if we missed anything :)
|
kohana/kohanaframework.org | 68b2c597b580b4eac65f7ff6da1a5adc13f999a7 | Really fix the SFC link on the donations page.. | diff --git a/application/templates/donate/index.mustache b/application/templates/donate/index.mustache
index e833dbb..3a95c73 100644
--- a/application/templates/donate/index.mustache
+++ b/application/templates/donate/index.mustache
@@ -1,57 +1,57 @@
<section class="textHeavy">
<h1>Make a Donation</h1>
- <p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <a href="http://conservancy.softwarefreedom.org/">Software Freedom Conservancy</a>, your donations are fully tax-deductible to the extent permitted by law.</p>
+ <p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <a href="http://sfconservancy.org/">Software Freedom Conservancy</a>, your donations are fully tax-deductible to the extent permitted by law.</p>
<p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
<h2 class="top">Using Google Checkout</h2>
<script type="text/javascript">
function validateAmount(amount){
if(amount.value.match(/^[0-9]+(\.([0-9]+))?$/)){
return true;
}else{
alert('You must enter a valid donation.');
amount.focus();
return false;
}
}
</script>
<form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
<input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
<input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="item_is_modifiable_1" type="hidden" value="true"/>
<input name="item_min_price_1" type="hidden" value="5.0"/>
<input name="item_max_price_1" type="hidden" value="25000.0"/>
<input name="_charset_" type="hidden" value="utf-8"/>
$ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/><br/><br/>
<input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
</form>
<h2 class="top">Using PayPal</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
<!--<div class="span-8 last">
<h2>Account Status</h2>
<dl class="account">
<dt>Latest Expenses</dt>
<dd>$9.25 on 2010-04-27 for domain names</dd>
<dd>$27.75 on 2010-02-06 for domain names</dd>
<dd>$22.00 on 2009-10-26 for domain names</dd>
<dd>$490.00 on 2009-11-18 for website hosting</dd>
<dt>Current Balance</dt>
<dd class="good">$1,908.07</dd>
<dd><small>Upcoming expenses will be paid in full.</small></dd>
</dl>
</div>-->
</section>
|
kohana/kohanaframework.org | 089689318dfd787c8e03a736460b67237979114d | Fix SFC link on donations page. | diff --git a/application/templates/donate/index.mustache b/application/templates/donate/index.mustache
index 7257284..e833dbb 100644
--- a/application/templates/donate/index.mustache
+++ b/application/templates/donate/index.mustache
@@ -1,57 +1,57 @@
<section class="textHeavy">
<h1>Make a Donation</h1>
- <p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <?php echo HTML::anchor('http://conservancy.softwarefreedom.org/', 'Software Freedom Conservancy') ?>, your donations are fully tax-deductible to the extent permitted by law.</p>
+ <p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <a href="http://conservancy.softwarefreedom.org/">Software Freedom Conservancy</a>, your donations are fully tax-deductible to the extent permitted by law.</p>
<p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
<h2 class="top">Using Google Checkout</h2>
<script type="text/javascript">
function validateAmount(amount){
if(amount.value.match(/^[0-9]+(\.([0-9]+))?$/)){
return true;
}else{
alert('You must enter a valid donation.');
amount.focus();
return false;
}
}
</script>
<form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
<input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
<input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
<input name="item_quantity_1" type="hidden" value="1"/>
<input name="item_currency_1" type="hidden" value="USD"/>
<input name="item_is_modifiable_1" type="hidden" value="true"/>
<input name="item_min_price_1" type="hidden" value="5.0"/>
<input name="item_max_price_1" type="hidden" value="25000.0"/>
<input name="_charset_" type="hidden" value="utf-8"/>
$ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/><br/><br/>
<input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
</form>
<h2 class="top">Using PayPal</h2>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
<!--<div class="span-8 last">
<h2>Account Status</h2>
<dl class="account">
<dt>Latest Expenses</dt>
<dd>$9.25 on 2010-04-27 for domain names</dd>
<dd>$27.75 on 2010-02-06 for domain names</dd>
<dd>$22.00 on 2009-10-26 for domain names</dd>
<dd>$490.00 on 2009-11-18 for website hosting</dd>
<dt>Current Balance</dt>
<dd class="good">$1,908.07</dd>
<dd><small>Upcoming expenses will be paid in full.</small></dd>
</dl>
</div>-->
</section>
|
kohana/kohanaframework.org | 45271f730eddf8a5baa9bd620ddfb4fe2eb82298 | Add donate link to front page | diff --git a/application/classes/kostache.php b/application/classes/kostache.php
index 4406429..853810c 100644
--- a/application/classes/kostache.php
+++ b/application/classes/kostache.php
@@ -1,169 +1,179 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Kostache extends Kohana_Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
+ /**
+ * Returns donate page url
+ *
+ * @return string
+ */
+ public function donate_url()
+ {
+ return Route::url('donate');
+ }
+
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
/**
* Returns current kohana version
*
* @return string
*/
public function kohana_version()
{
return Kohana::VERSION;
}
/**
* Returns current kohana codename
*
* @return string
*/
public function kohana_codename()
{
return Kohana::CODENAME;
}
/**
* Returns notices
*
* @return string
*/
public function notices()
{
return Notice::as_array();
}
-}
\ No newline at end of file
+}
diff --git a/application/templates/home/social.mustache b/application/templates/home/social.mustache
index fd55d6f..8326ea0 100644
--- a/application/templates/home/social.mustache
+++ b/application/templates/home/social.mustache
@@ -1,61 +1,62 @@
<div id="social" class="lightBkg">
<section id="community">
<h2>Community</h2>
<ul>
<li>
<a href="http://forum.kohanaframework.org" id="forum" class="icon">
<h3>Forum</h3>
Official announcements, community support, and feedback.
</a>
</li>
<li>
<a href="irc://irc.freenode.net/kohana" id="irc" class="icon">
<h3>IRC</h3>
Chat with fellow Kohana users at #kohana on freenode.
</a>
</li>
<li>
<a href="http://github.com/kohana" id="github" class="icon">
<h3>Github</h3>
The easiest way to contribute to v3.x is to fork us on GitHub.
</a>
</li>
<li>
<a href="http://www.facebook.com/group.php?gid=140164501435" id="facebook" class="icon">
<h3>Facebook</h3>
Join the Facebook group and find other users.
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/kohana" id="stackoverflow" class="icon">
<h3>Stack Overflow</h3>
Share your knowledge by answering user questions about Kohana.
</a>
</li>
<li>
<a href="http://www.ohloh.net/p/ko3" id="ohloh" class="icon">
<h3>Ohloh</h3>
View project information and give Kudos for Kohana.
</a>
</li>
<!-- Coming soon
<li class="tweet">
<h3>Twitter</h3>
<q>#Kohana v3.0.8 has just been released! Download <a href="#">http://cl.ly/2VGe</a> Discuss <a href="#">http://cl.ly/2Upi</a> Issues <a href="#">http://cl.ly/2UpH</a></q>
<time datetime="2010-09-22T21:01+00:00" pubdate><a href="#">9:01 PM Sep 22nd</a></time>
<p class="twitter"><a href="#">Follow <span>@KohanaPHP</span> <span>on Twitter!</span></a></p>
</li> -->
</ul>
</section> <!-- END section#community -->
<section id="giving" class="box">
<h2>Giving back</h2>
<img src="{{base_url}}assets/img/giving.png" width="48" height="48" />
<p>If you use Kohana, we ask that you donate to ensure future development is possible.</p>
<h3>Where will my money go?</h3>
<p>Your donations are used to cover the cost of maintaining this website and related resources, and services required to provide these resources.</p>
<p>As part of the Software Freedom Conservancy, your donations are fully tax-deductible to the extent permitted by law.</p>
+ <p><a href="{{donate_url}}">Click here to donate</a></p>
</section> <!-- END section#giving -->
-</div>
\ No newline at end of file
+</div>
|
kohana/kohanaframework.org | ae5bedf99ae56560a975c3f9f22364e04326cff4 | Cleanup donations page | diff --git a/.gitignore b/.gitignore
index 2167602..9f7c666 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
Icon?
.DS_Store
.svn
/nbproject/private
+*~
+*.bak
diff --git a/application/templates/donate/index.mustache b/application/templates/donate/index.mustache
index bdf4dc2..7257284 100644
--- a/application/templates/donate/index.mustache
+++ b/application/templates/donate/index.mustache
@@ -1,69 +1,57 @@
<section class="textHeavy">
-
+ <h1>Make a Donation</h1>
<p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <?php echo HTML::anchor('http://conservancy.softwarefreedom.org/', 'Software Freedom Conservancy') ?>, your donations are fully tax-deductible to the extent permitted by law.</p>
- <div class="span-12 suffix-2">
- <h2>Make a Donation</h2>
- <p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
- <div class="span-8">
- <h6 class="top">Using Google Checkout</h6>
- <script type="text/javascript">
- function validateAmount(amount){
- if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
- return true;
- }else{
- alert('You must enter a valid donation.');
- amount.focus();
- return false;
- }
- }
- </script>
- <form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
- <input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
- <input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
- <input name="item_quantity_1" type="hidden" value="1"/>
- <input name="item_currency_1" type="hidden" value="USD"/>
- <input name="item_is_modifiable_1" type="hidden" value="true"/>
- <input name="item_min_price_1" type="hidden" value="5.0"/>
- <input name="item_max_price_1" type="hidden" value="25000.0"/>
- <input name="_charset_" type="hidden" value="utf-8"/>
+ <p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
+
+ <h2 class="top">Using Google Checkout</h2>
+ <script type="text/javascript">
+ function validateAmount(amount){
+ if(amount.value.match(/^[0-9]+(\.([0-9]+))?$/)){
+ return true;
+ }else{
+ alert('You must enter a valid donation.');
+ amount.focus();
+ return false;
+ }
+ }
+ </script>
+ <form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
+ <input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
+ <input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
+ <input name="item_quantity_1" type="hidden" value="1"/>
+ <input name="item_currency_1" type="hidden" value="USD"/>
+ <input name="item_is_modifiable_1" type="hidden" value="true"/>
+ <input name="item_min_price_1" type="hidden" value="5.0"/>
+ <input name="item_max_price_1" type="hidden" value="25000.0"/>
+ <input name="_charset_" type="hidden" value="utf-8"/>
+
+ $ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/><br/><br/>
+ <input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
+ </form>
- <table cellspacing="0">
- <tr>
- <td align="right" nowrap="nowrap" width="1%">$ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/>
- </td>
- <td align="left" width="1%">
- <input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <div class="span-4 last">
- <h6 class="top">Using PayPal</h6>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <input type="hidden" name="cmd" value="_s-xclick">
- <input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
- </form>
- </div>
+ <h2 class="top">Using PayPal</h2>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ <input type="hidden" name="cmd" value="_s-xclick">
+ <input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
+ </form>
- <p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
- </div>
+ <p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
<!--<div class="span-8 last">
<h2>Account Status</h2>
<dl class="account">
<dt>Latest Expenses</dt>
<dd>$9.25 on 2010-04-27 for domain names</dd>
<dd>$27.75 on 2010-02-06 for domain names</dd>
<dd>$22.00 on 2009-10-26 for domain names</dd>
<dd>$490.00 on 2009-11-18 for website hosting</dd>
<dt>Current Balance</dt>
<dd class="good">$1,908.07</dd>
<dd><small>Upcoming expenses will be paid in full.</small></dd>
</dl>
</div>-->
-</section>
\ No newline at end of file
+</section>
|
kohana/kohanaframework.org | 43be1b774601d9bcabef5e76815927dadb6cc4e9 | add skeleton files for donation page | diff --git a/application/bootstrap.php b/application/bootstrap.php
index 738ef32..3051e3c 100644
--- a/application/bootstrap.php
+++ b/application/bootstrap.php
@@ -1,190 +1,196 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
//'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Custom caching
//'codebench' => MODPATH.'codebench', // Benchmarking tool
//'database' => MODPATH.'database', // Database access
//'image' => MODPATH.'image', // Image manipulation
//'oauth' => MODPATH.'oauth', // OAuth authentication
//'orm' => MODPATH.'orm', // Object Relationship Mapping
//'pagination' => MODPATH.'pagination', // Paging of results
//'userguide' => MODPATH.'userguide', // User guide and API documentation
'kostache' => MODPATH.'kostache', // Kostache templating
));
/*
* We want to show the world we're running on... Kohana of course!
*/
Kohana::$expose = TRUE;
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('error', 'error')
->defaults(array(
'controller' => 'home',
'action' => 'error'
));
Route::set('download', 'download')
->defaults(array(
'controller' => 'download',
'action' => 'index'
));
Route::set('documentation', 'documentation')
->defaults(array(
'controller' => 'documentation',
'action' => 'index'
));
Route::set('development', 'development')
->defaults(array(
'controller' => 'development',
'action' => 'index'
));
Route::set('team', 'team')
->defaults(array(
'controller' => 'team',
'action' => 'index'
));
Route::set('license', 'license')
->defaults(array(
'controller' => 'license',
'action' => 'index'
));
+ Route::set('donate', 'donate')
+ ->defaults(array(
+ 'controller' => 'donate',
+ 'action' => 'index'
+ ));
+
Route::set('home', '(index)')
->defaults(array(
'controller' => 'home',
'action' => 'index'
));
// // Handles: feed/$type.rss and feed/$type.atom
// Route::set('feed', 'feed/<name>', array('name' => '.+'))
// ->defaults(array(
// 'controller' => 'feed',
// 'action' => 'load',
// ));
//
// // Handles: download/$file
// Route::set('file', 'download/<file>', array('file' => '.+'))
// ->defaults(array(
// 'controller' => 'file',
// 'action' => 'get',
// ));
//
// // Handles: donate
// Route::set('donate', 'donate(/<action>)')
// ->defaults(array(
// 'controller' => 'donate',
// 'action' => 'index',
// ));
//
// // Handles: $lang/$page and $page
// Route::set('page', '((<lang>/)<page>)', array('lang' => '[a-z]{2}', 'page' => '.+'))
// ->defaults(array(
// 'controller' => 'page',
// 'action' => 'load',
// ));
\ No newline at end of file
diff --git a/application/classes/controller/donate.php b/application/classes/controller/donate.php
new file mode 100644
index 0000000..33489b5
--- /dev/null
+++ b/application/classes/controller/donate.php
@@ -0,0 +1,14 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Controller_Donate extends Controller {
+
+ public function action_index()
+ {
+ $view = new View_Donate_Index;
+ $view->set('title', 'Make a donation')
+ ->set('description', 'Make a donation to the Kohana Foundation');
+
+ $this->response->body($view);
+ }
+
+}
\ No newline at end of file
diff --git a/application/classes/view/donate/index.php b/application/classes/view/donate/index.php
new file mode 100644
index 0000000..896675f
--- /dev/null
+++ b/application/classes/view/donate/index.php
@@ -0,0 +1,18 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class View_Donate_Index extends Kostache_Layout {
+
+ /**
+ * @var array partials for the page
+ */
+ protected $_partials = array(
+ 'header' => 'partials/header',
+ 'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
+ );
+
+ /**
+ * @var boolean show the banner space on template
+ */
+ public $banner_exists = FALSE;
+}
\ No newline at end of file
diff --git a/application/templates/donate/index.mustache b/application/templates/donate/index.mustache
new file mode 100644
index 0000000..bdf4dc2
--- /dev/null
+++ b/application/templates/donate/index.mustache
@@ -0,0 +1,69 @@
+<section class="textHeavy">
+
+ <p class="intro">Your donations are used to cover the cost of providing the Kohana website and related resources. Your donations are not used for any personal gain. As part of the <?php echo HTML::anchor('http://conservancy.softwarefreedom.org/', 'Software Freedom Conservancy') ?>, your donations are fully tax-deductible to the extent permitted by law.</p>
+
+ <div class="span-12 suffix-2">
+ <h2>Make a Donation</h2>
+ <p>If possible, please use Google Checkout, as there are no fees for non-profit organizations, so more of your donation will be put to use.</p>
+ <div class="span-8">
+ <h6 class="top">Using Google Checkout</h6>
+ <script type="text/javascript">
+ function validateAmount(amount){
+ if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/)){
+ return true;
+ }else{
+ alert('You must enter a valid donation.');
+ amount.focus();
+ return false;
+ }
+ }
+ </script>
+ <form action="https://checkout.google.com/cws/v2/Donations/622836985124940/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm" onSubmit="return validateAmount(this.item_price_1)" target="_top">
+ <input name="item_name_1" type="hidden" value="Kohana donation via Software Freedom Conservancy, Inc."/>
+ <input name="item_description_1" type="hidden" value="Donation to the Kohana project via its non-profit home, Software Freedom Conservancy, Inc. 10% of the donation will go to general operations of the Conservancy; 90% will be earmarked specifically for Kohana. This is in accordance with the wishes of the Kohana project leadership."/>
+ <input name="item_quantity_1" type="hidden" value="1"/>
+ <input name="item_currency_1" type="hidden" value="USD"/>
+ <input name="item_is_modifiable_1" type="hidden" value="true"/>
+ <input name="item_min_price_1" type="hidden" value="5.0"/>
+ <input name="item_max_price_1" type="hidden" value="25000.0"/>
+ <input name="_charset_" type="hidden" value="utf-8"/>
+
+ <table cellspacing="0">
+ <tr>
+ <td align="right" nowrap="nowrap" width="1%">$ <input id="item_price_1" name="item_price_1" onfocus="this.style.color='black'; this.value='';" size="11" style="color:grey;" type="text" value="Enter Amount"/>
+ </td>
+ <td align="left" width="1%">
+ <input alt="Donate" src="https://checkout.google.com/buttons/donateNow.gif?merchant_id=622836985124940&w=115&h=50&style=trans&variant=text&loc=en_US" type="image"/>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ <div class="span-4 last">
+ <h6 class="top">Using PayPal</h6>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ <input type="hidden" name="cmd" value="_s-xclick">
+ <input type="hidden" name="hosted_button_id" value="TYCF8EKGYLL56">
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
+ </form>
+ </div>
+
+ <p class="clear"><small>Your secure donation will be made to the <abbr title="Software Freedom Conservancy">SFC</abbr>. Ten percent (10%) of your donation will given to the <abbr title="Software Freedom Conservancy">SFC</abbr> to help cover administration costs and the remaining funds will be allocated to Kohana.</small></p>
+ </div>
+ <!--<div class="span-8 last">
+ <h2>Account Status</h2>
+ <dl class="account">
+ <dt>Latest Expenses</dt>
+ <dd>$9.25 on 2010-04-27 for domain names</dd>
+ <dd>$27.75 on 2010-02-06 for domain names</dd>
+ <dd>$22.00 on 2009-10-26 for domain names</dd>
+ <dd>$490.00 on 2009-11-18 for website hosting</dd>
+
+ <dt>Current Balance</dt>
+ <dd class="good">$1,908.07</dd>
+ <dd><small>Upcoming expenses will be paid in full.</small></dd>
+ </dl>
+ </div>-->
+
+</section>
\ No newline at end of file
|
kohana/kohanaframework.org | 77189469a46334f95707f884f2031e1095650dea | Fixes #4219, Kohana 3.1.4 codename corrected | diff --git a/application/config/files.php b/application/config/files.php
index 051fec3..5472ae1 100644
--- a/application/config/files.php
+++ b/application/config/files.php
@@ -1,24 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'kohana-latest' => array(
'version' => 'v3.2.0',
'codename' => 'kolibri',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1670/kohana-3.2.0.zip',
'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=50',
'documentation' => 'http://kohanaframework.org/3.2/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=54',
'support_until' => 'July, 2012'
),
'support' => array(
'version' => 'v3.1.4',
- 'codename' => 'vespertinus',
+ 'codename' => 'fasciinucha',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1671/kohana-3.1.4.zip',
'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=45',
'documentation' => 'http://kohanaframework.org/3.1/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=53',
'support_until' => 'February, 2012'
),
);
|
kohana/kohanaframework.org | c11e361d8f32d58d1ce32ec3be5d4376502e10ce | Fixed DD Belated PNG script tag syntax.. | diff --git a/application/templates/layout.mustache b/application/templates/layout.mustache
index b890a90..f8c554a 100644
--- a/application/templates/layout.mustache
+++ b/application/templates/layout.mustache
@@ -1,79 +1,79 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="notices">
{{>notices}}
</div>
<div class="container">
{{>content}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
<script src="{{base_url}}assets/js/global.js"></script>
<!--[if lt IE 7 ]>
-<script src{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
+<script src="{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
-</html>
\ No newline at end of file
+</html>
|
kohana/kohanaframework.org | 9c88fcddeae71d85e4840cd9102592375e0ec292 | Switching layout style to kostache_layout. yay less files | diff --git a/application/classes/controller/development.php b/application/classes/controller/development.php
index f602023..d6c6cd1 100644
--- a/application/classes/controller/development.php
+++ b/application/classes/controller/development.php
@@ -1,14 +1,14 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Development extends Controller {
public function action_index()
{
- $view = new View_Development;
+ $view = new View_Development_Index;
$view->set('title', 'Kohana Development')
->set('description', 'All the information you will ever need about
developing the Kohana Framework');
$this->response->body($view);
}
}
\ No newline at end of file
diff --git a/application/classes/controller/documentation.php b/application/classes/controller/documentation.php
index 79c866f..ea8f4b4 100644
--- a/application/classes/controller/documentation.php
+++ b/application/classes/controller/documentation.php
@@ -1,15 +1,15 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Documentation extends Controller {
public function action_index()
{
- $view = new View_Documentation;
+ $view = new View_Documentation_Index;
$view->set('title', 'Kohana Documentation')
->set('description', 'Get the current supported versions of the
Kohana documentation');
$this->response->body($view);
}
}
\ No newline at end of file
diff --git a/application/classes/controller/download.php b/application/classes/controller/download.php
index 70dc04f..f0fc748 100644
--- a/application/classes/controller/download.php
+++ b/application/classes/controller/download.php
@@ -1,16 +1,15 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Download extends Controller {
public function action_index()
{
$download = Kohana::$config->load('files');
- $view = new View_Download;
+ $view = new View_Download_Index;
$view->set('download', $download)
->set('title', 'Download Kohana');
$this->response->body($view);
}
-
}
\ No newline at end of file
diff --git a/application/classes/controller/home.php b/application/classes/controller/home.php
index b78f915..2872106 100644
--- a/application/classes/controller/home.php
+++ b/application/classes/controller/home.php
@@ -1,22 +1,22 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Home extends Controller {
public function action_index()
{
- $view = new View_Home;
+ $view = new View_Home_Index;
$view->set('download', Kohana::$config->load('files')->{'kohana-latest'});
$this->response->body($view);
}
/**
* Demo action to generate a 500 error
*
* @return null
*/
public function action_error()
{
throw new Kohana_Exception('This is an intentional exception');
}
}
\ No newline at end of file
diff --git a/application/classes/controller/license.php b/application/classes/controller/license.php
index 9b17a1c..1910eb9 100644
--- a/application/classes/controller/license.php
+++ b/application/classes/controller/license.php
@@ -1,14 +1,14 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_License extends Controller {
public function action_index()
{
- $view = new View_License;
+ $view = new View_License_Index;
$view->set('title', 'Kohana License Agreement')
->set('description', 'The Kohana License');
$this->response->body($view);
}
}
\ No newline at end of file
diff --git a/application/classes/controller/team.php b/application/classes/controller/team.php
index fc672c9..4b720be 100644
--- a/application/classes/controller/team.php
+++ b/application/classes/controller/team.php
@@ -1,15 +1,15 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Team extends Controller {
public function action_index()
{
- $view = new View_Team;
+ $view = new View_Team_Index;
$view->set('title', 'The awesome Kohana Team')
->set('description', 'The awesome Kohana Team who devote countless'.
' hours to developing this framework');
$this->response->body($view);
}
}
\ No newline at end of file
diff --git a/application/classes/kohana/exception.php b/application/classes/kohana/exception.php
index ff3ee60..36b40ca 100644
--- a/application/classes/kohana/exception.php
+++ b/application/classes/kohana/exception.php
@@ -1,37 +1,37 @@
<?php
class Kohana_Exception extends Kohana_Kohana_Exception
{
/**
* Inline exception handler, displays the error message, source of the
* exception, and the stack trace of the error.
*
* @uses Kohana_Exception::text
* @param object exception object
* @return boolean
*/
public static function handler(Exception $e)
{
$response = new Response;
- $view = new View_Error;
- $view->message = $e->getMessage();
switch (get_class($e))
{
case 'HTTP_Exception_404':
+ $view = new View_Error_404;
+ $view->message = $e->getMessage();
$response->status(404);
$view->title = 'File Not Found';
- $view->type = 404;
break;
default:
+ $view = new View_Error_500;
+ $view->message = $e->getMessage();
$response->status(500);
$view->title = 'NOMNOMNOMN';
- $view->type = 500;
break;
}
echo $response->body($view)->send_headers()->body();
}
}
diff --git a/application/classes/view/base.php b/application/classes/kostache.php
similarity index 94%
rename from application/classes/view/base.php
rename to application/classes/kostache.php
index 9e16020..4406429 100644
--- a/application/classes/view/base.php
+++ b/application/classes/kostache.php
@@ -1,174 +1,169 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Base extends Kostache {
+class Kostache extends Kohana_Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
- /**
- * @var string overloading the template to lock to base
- */
- protected $_template = 'base';
-
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
/**
* Returns current kohana version
*
* @return string
*/
public function kohana_version()
{
return Kohana::VERSION;
}
/**
* Returns current kohana codename
*
* @return string
*/
public function kohana_codename()
{
return Kohana::CODENAME;
}
/**
* Returns notices
*
* @return string
*/
public function notices()
{
return Notice::as_array();
}
}
\ No newline at end of file
diff --git a/application/classes/view/development/body.php b/application/classes/view/development/body.php
deleted file mode 100644
index 328ccf5..0000000
--- a/application/classes/view/development/body.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Development_Body extends Kostache {
-
- /**
- * Returns team page url
- *
- * @return string
- */
- public function team_url()
- {
- return Route::url('team');
- }
-
-}
\ No newline at end of file
diff --git a/application/classes/view/development.php b/application/classes/view/development/index.php
similarity index 72%
rename from application/classes/view/development.php
rename to application/classes/view/development/index.php
index 590c8fd..ff59983 100644
--- a/application/classes/view/development.php
+++ b/application/classes/view/development/index.php
@@ -1,30 +1,34 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Development extends View_Base {
+class View_Development_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_development = TRUE;
-
- public function body()
+ /**
+ * Returns team page url
+ *
+ * @return string
+ */
+ public function team_url()
{
- return new View_Development_Body;
+ return Route::url('team');
}
}
\ No newline at end of file
diff --git a/application/classes/view/documentation/body.php b/application/classes/view/documentation/body.php
deleted file mode 100644
index 08eae59..0000000
--- a/application/classes/view/documentation/body.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Documentation_Body extends Kostache {
-
- /**
- * Returns home page url
- *
- * @return string
- */
- public function home_url()
- {
- return Route::url('home');
- }
-
-}
\ No newline at end of file
diff --git a/application/classes/view/documentation.php b/application/classes/view/documentation/index.php
similarity index 72%
rename from application/classes/view/documentation.php
rename to application/classes/view/documentation/index.php
index c4ed6be..7bd235c 100644
--- a/application/classes/view/documentation.php
+++ b/application/classes/view/documentation/index.php
@@ -1,30 +1,34 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Documentation extends View_Base {
+class View_Documentation_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_documentation = TRUE;
-
- public function body()
+ /**
+ * Returns home page url
+ *
+ * @return string
+ */
+ public function home_url()
{
- return new View_Documentation_Body;
+ return Route::url('home');
}
}
\ No newline at end of file
diff --git a/application/classes/view/download.php b/application/classes/view/download.php
deleted file mode 100644
index c08636c..0000000
--- a/application/classes/view/download.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Download extends View_Base {
-
- /**
- * @var array partials for the page
- */
- protected $_partials = array(
- 'header' => 'partials/header',
- 'footer' => 'partials/footer',
- 'notices' => 'partials/notices',
- );
-
- /**
- * @var boolean show the banner space on template
- */
- public $banner_exists = FALSE;
-
- /**
- * @var boolean triggers the menu bar highlight
- */
- public $menu_download = TRUE;
-
-
- public function body()
- {
- $body = new View_Download_Body;
-
- $body->set('download', $this->download);
-
- return $body;
- }
-
-}
\ No newline at end of file
diff --git a/application/classes/view/download/body.php b/application/classes/view/download/index.php
similarity index 78%
rename from application/classes/view/download/body.php
rename to application/classes/view/download/index.php
index f072c08..a7a702d 100644
--- a/application/classes/view/download/body.php
+++ b/application/classes/view/download/index.php
@@ -1,85 +1,104 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Download_Body extends Kostache {
-
+class View_Download_Index extends Kostache_Layout {
+
+ /**
+ * @var array partials for the page
+ */
+ protected $_partials = array(
+ 'header' => 'partials/header',
+ 'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
+ );
+
+ /**
+ * @var boolean show the banner space on template
+ */
+ public $banner_exists = FALSE;
+
+ /**
+ * @var boolean triggers the menu bar highlight
+ */
+ public $menu_download = TRUE;
public function latest_version()
{
return $this->download['kohana-latest']['version'];
}
public function latest_codename()
{
return $this->download['kohana-latest']['codename'];
}
public function latest_status()
{
return $this->download['kohana-latest']['status'];
}
public function latest_download()
{
return $this->download['kohana-latest']['download'];
}
public function latest_changelog()
{
return $this->download['kohana-latest']['changelog'];
}
public function latest_documentation()
{
return $this->download['kohana-latest']['documentation'];
}
public function latest_issues()
{
return $this->download['kohana-latest']['issues'];
}
public function latest_support_until()
{
return $this->download['kohana-latest']['support_until'];
}
public function support_version()
{
return $this->download['support']['version'];
}
public function support_codename()
{
return $this->download['support']['codename'];
}
public function support_status()
{
return $this->download['support']['status'];
}
public function support_download()
{
return $this->download['support']['download'];
}
public function support_changelog()
{
return $this->download['support']['changelog'];
}
public function support_documentation()
{
return $this->download['support']['documentation'];
}
public function support_issues()
{
return $this->download['support']['issues'];
}
public function support_until()
{
return $this->download['support']['support_until'];
}
+
}
\ No newline at end of file
diff --git a/application/classes/view/error.php b/application/classes/view/error.php
index 342f314..2b3ab6e 100644
--- a/application/classes/view/error.php
+++ b/application/classes/view/error.php
@@ -1,28 +1,23 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Error extends View_Base {
+abstract class View_Error extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
'banner' => 'partials/error/banner',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
public $message;
- public function body()
- {
- $class = 'View_Error_'.((int)$this->type);
- return new $class;
- }
-
+ public $type;
}
\ No newline at end of file
diff --git a/application/classes/view/error/404.php b/application/classes/view/error/404.php
index 1b81baf..6362835 100644
--- a/application/classes/view/error/404.php
+++ b/application/classes/view/error/404.php
@@ -1,6 +1,6 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Error_404 extends Kostache
+class View_Error_404 extends View_Error
{
-
+ public $type = '404';
}
\ No newline at end of file
diff --git a/application/classes/view/error/500.php b/application/classes/view/error/500.php
index 1d3a3fc..5e17f2c 100644
--- a/application/classes/view/error/500.php
+++ b/application/classes/view/error/500.php
@@ -1,6 +1,6 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Error_500 extends Kostache
+class View_Error_500 extends View_Error
{
-
+ public $type = '500';
}
\ No newline at end of file
diff --git a/application/classes/view/home/body.php b/application/classes/view/home/body.php
deleted file mode 100644
index 6bde9f5..0000000
--- a/application/classes/view/home/body.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Home_Body extends Kostache {
-
- public function features()
- {
- return new View_Home_Features;
- }
-
- public function whouses()
- {
- return new View_Home_Whouses;
- }
-
- public function gallery()
- {
- return new View_Home_Gallery;
- }
-
- public function social()
- {
- return new View_Home_Social;
- }
-
-}
\ No newline at end of file
diff --git a/application/classes/view/home/features.php b/application/classes/view/home/features.php
deleted file mode 100644
index fef1c42..0000000
--- a/application/classes/view/home/features.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Home_Features extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/home/gallery.php b/application/classes/view/home/gallery.php
deleted file mode 100644
index b271202..0000000
--- a/application/classes/view/home/gallery.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Home_Gallery extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/home.php b/application/classes/view/home/index.php
similarity index 79%
rename from application/classes/view/home.php
rename to application/classes/view/home/index.php
index 604e1b4..4e84c21 100644
--- a/application/classes/view/home.php
+++ b/application/classes/view/home/index.php
@@ -1,40 +1,38 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Home extends View_Base {
-
+class View_Home_Index extends Kostache_Layout
+{
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
'banner' => 'partials/home/banner',
+ 'features' => 'home/features',
+ 'gallery' => 'home/gallery',
+ 'social' => 'home/social',
+ 'whouses' => 'home/whouses',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_home = TRUE;
public function download_version()
{
return $this->download['version'].' ('.$this->download['status'].')';
}
public function download_link()
{
return $this->download['download'];
}
-
- public function body()
- {
- return new View_Home_Body;
- }
-
}
\ No newline at end of file
diff --git a/application/classes/view/home/social.php b/application/classes/view/home/social.php
deleted file mode 100644
index 8e3fb86..0000000
--- a/application/classes/view/home/social.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Home_Social extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/home/whouses.php b/application/classes/view/home/whouses.php
deleted file mode 100644
index 906d7de..0000000
--- a/application/classes/view/home/whouses.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Home_Whouses extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/license/body.php b/application/classes/view/license/body.php
deleted file mode 100644
index e222536..0000000
--- a/application/classes/view/license/body.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_License_Body extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/team.php b/application/classes/view/license/index.php
similarity index 78%
rename from application/classes/view/team.php
rename to application/classes/view/license/index.php
index 6e19f38..d418a6a 100644
--- a/application/classes/view/team.php
+++ b/application/classes/view/license/index.php
@@ -1,24 +1,18 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Team extends View_Base {
+class View_License_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
-
- public function body()
- {
- return new View_Team_Body;
- }
-
}
\ No newline at end of file
diff --git a/application/classes/view/team/body.php b/application/classes/view/team/body.php
deleted file mode 100644
index 0f66fb1..0000000
--- a/application/classes/view/team/body.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-
-class View_Team_Body extends Kostache {}
\ No newline at end of file
diff --git a/application/classes/view/license.php b/application/classes/view/team/index.php
similarity index 69%
rename from application/classes/view/license.php
rename to application/classes/view/team/index.php
index c12c922..3f86007 100644
--- a/application/classes/view/license.php
+++ b/application/classes/view/team/index.php
@@ -1,27 +1,18 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_License extends View_Base {
+class View_Team_Index extends Kostache_Layout {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
-
- public function body()
- {
- $body = new View_License_Body;
- $body->set('year', $this->year());
-
- return $body;
- }
-
}
\ No newline at end of file
diff --git a/application/templates/development/body.mustache b/application/templates/development/index.mustache
similarity index 100%
rename from application/templates/development/body.mustache
rename to application/templates/development/index.mustache
diff --git a/application/templates/documentation/body.mustache b/application/templates/documentation/index.mustache
similarity index 100%
rename from application/templates/documentation/body.mustache
rename to application/templates/documentation/index.mustache
diff --git a/application/templates/download/body.mustache b/application/templates/download/index.mustache
similarity index 100%
rename from application/templates/download/body.mustache
rename to application/templates/download/index.mustache
diff --git a/application/templates/home/body.mustache b/application/templates/home/body.mustache
deleted file mode 100644
index d99ee52..0000000
--- a/application/templates/home/body.mustache
+++ /dev/null
@@ -1,7 +0,0 @@
-{{{features}}}
-
-{{{whouses}}}
-
-{{{gallery}}}
-
-{{{social}}}
\ No newline at end of file
diff --git a/application/templates/home/index.mustache b/application/templates/home/index.mustache
new file mode 100644
index 0000000..e4d55b3
--- /dev/null
+++ b/application/templates/home/index.mustache
@@ -0,0 +1,4 @@
+{{>features}}
+{{>whouses}}
+{{>gallery}}
+{{>social}}
\ No newline at end of file
diff --git a/application/templates/base.mustache b/application/templates/layout.mustache
similarity index 99%
rename from application/templates/base.mustache
rename to application/templates/layout.mustache
index 2477038..b890a90 100644
--- a/application/templates/base.mustache
+++ b/application/templates/layout.mustache
@@ -1,79 +1,79 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="notices">
{{>notices}}
</div>
<div class="container">
- {{{body}}}
+ {{>content}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
<script src="{{base_url}}assets/js/global.js"></script>
<!--[if lt IE 7 ]>
<script src{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
\ No newline at end of file
diff --git a/application/templates/license/body.mustache b/application/templates/license/index.mustache
similarity index 100%
rename from application/templates/license/body.mustache
rename to application/templates/license/index.mustache
diff --git a/application/templates/team/body.mustache b/application/templates/team/index.mustache
similarity index 100%
rename from application/templates/team/body.mustache
rename to application/templates/team/index.mustache
|
kohana/kohanaframework.org | 46c676276ca1987b3b68e8822616f6c4de5a47dd | Add HTML5 Boilerplate + FFF Icon set credits | diff --git a/README.md b/README.md
index 23403a4..2b56ba6 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,15 @@
# Intro
View the website online at http://kohanaframework.org/
# Deployment
The "develop" branch of this repository will be automatically deployed to http://staging.kohanaframework.org/
The "master" branch of this repository will be automatically deployed to http://www.kohanaframework.org/
+
+# 3rd Party Credits
+
+* [FamFamFam Silk v1.3 icon set](www.famfamfam.com/lab/icons/silk/)
+* [HTML5 Boilerplace](http://html5boilerplate.com/)
+
+Let us know if we missed anything :)
|
kohana/kohanaframework.org | 0590c42878fedf300f0e4c7fd71a8069a1c936c6 | Add notices support to the template. For use by SSO. | diff --git a/application/bootstrap.php b/application/bootstrap.php
index b1ccb42..738ef32 100644
--- a/application/bootstrap.php
+++ b/application/bootstrap.php
@@ -1,191 +1,190 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
//'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Custom caching
//'codebench' => MODPATH.'codebench', // Benchmarking tool
//'database' => MODPATH.'database', // Database access
//'image' => MODPATH.'image', // Image manipulation
//'oauth' => MODPATH.'oauth', // OAuth authentication
//'orm' => MODPATH.'orm', // Object Relationship Mapping
//'pagination' => MODPATH.'pagination', // Paging of results
//'userguide' => MODPATH.'userguide', // User guide and API documentation
'kostache' => MODPATH.'kostache', // Kostache templating
));
/*
* We want to show the world we're running on... Kohana of course!
*/
Kohana::$expose = TRUE;
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
-
Route::set('error', 'error')
->defaults(array(
'controller' => 'home',
'action' => 'error'
));
Route::set('download', 'download')
->defaults(array(
'controller' => 'download',
'action' => 'index'
));
Route::set('documentation', 'documentation')
->defaults(array(
'controller' => 'documentation',
'action' => 'index'
));
Route::set('development', 'development')
->defaults(array(
'controller' => 'development',
'action' => 'index'
));
Route::set('team', 'team')
->defaults(array(
'controller' => 'team',
'action' => 'index'
));
Route::set('license', 'license')
->defaults(array(
'controller' => 'license',
'action' => 'index'
));
Route::set('home', '(index)')
->defaults(array(
'controller' => 'home',
'action' => 'index'
));
// // Handles: feed/$type.rss and feed/$type.atom
// Route::set('feed', 'feed/<name>', array('name' => '.+'))
// ->defaults(array(
// 'controller' => 'feed',
// 'action' => 'load',
// ));
//
// // Handles: download/$file
// Route::set('file', 'download/<file>', array('file' => '.+'))
// ->defaults(array(
// 'controller' => 'file',
// 'action' => 'get',
// ));
//
// // Handles: donate
// Route::set('donate', 'donate(/<action>)')
// ->defaults(array(
// 'controller' => 'donate',
// 'action' => 'index',
// ));
//
// // Handles: $lang/$page and $page
// Route::set('page', '((<lang>/)<page>)', array('lang' => '[a-z]{2}', 'page' => '.+'))
// ->defaults(array(
// 'controller' => 'page',
// 'action' => 'load',
// ));
\ No newline at end of file
diff --git a/application/classes/notice.php b/application/classes/notice.php
new file mode 100644
index 0000000..6ea1c9b
--- /dev/null
+++ b/application/classes/notice.php
@@ -0,0 +1,44 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Notice {
+
+ // Notice types
+ const ERROR = 'error';
+ const WARNING = 'warning';
+ const INFO = 'information';
+ const SUCCESS = 'success';
+
+ /**
+ * Add a new notice
+ *
+ * @param string Type
+ * @param string Message
+ * @param array Translation values
+ * @return void
+ */
+ public static function add($type, $message = NULL, array $values = NULL)
+ {
+ $session = Session::instance();
+
+ $notices = $session->get('notices', array());
+
+ $notices[] = array(
+ 'type' => $type,
+ 'message' => __($message, $values),
+ );
+
+ $session->set('notices', $notices);
+ }
+
+ /**
+ * Returns the current notices.
+ *
+ * @return array
+ */
+ public static function as_array()
+ {
+ $session = Session::instance();
+
+ return $session->get_once('notices', array());
+ }
+}
\ No newline at end of file
diff --git a/application/classes/view/base.php b/application/classes/view/base.php
index e6cec8e..9e16020 100644
--- a/application/classes/view/base.php
+++ b/application/classes/view/base.php
@@ -1,163 +1,174 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Base extends Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var string overloading the template to lock to base
*/
protected $_template = 'base';
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
/**
* Returns current kohana version
*
* @return string
*/
public function kohana_version()
{
return Kohana::VERSION;
}
/**
* Returns current kohana codename
*
* @return string
*/
public function kohana_codename()
{
return Kohana::CODENAME;
}
+
+ /**
+ * Returns notices
+ *
+ * @return string
+ */
+ public function notices()
+ {
+ return Notice::as_array();
+ }
}
\ No newline at end of file
diff --git a/application/classes/view/development.php b/application/classes/view/development.php
index a0ce858..590c8fd 100644
--- a/application/classes/view/development.php
+++ b/application/classes/view/development.php
@@ -1,29 +1,30 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Development extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_development = TRUE;
public function body()
{
return new View_Development_Body;
}
}
\ No newline at end of file
diff --git a/application/classes/view/documentation.php b/application/classes/view/documentation.php
index 0fe7216..c4ed6be 100644
--- a/application/classes/view/documentation.php
+++ b/application/classes/view/documentation.php
@@ -1,29 +1,30 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Documentation extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_documentation = TRUE;
public function body()
{
return new View_Documentation_Body;
}
}
\ No newline at end of file
diff --git a/application/classes/view/download.php b/application/classes/view/download.php
index 237ffaf..c08636c 100644
--- a/application/classes/view/download.php
+++ b/application/classes/view/download.php
@@ -1,33 +1,34 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Download extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_download = TRUE;
public function body()
{
$body = new View_Download_Body;
$body->set('download', $this->download);
return $body;
}
}
\ No newline at end of file
diff --git a/application/classes/view/error.php b/application/classes/view/error.php
index 6e17d3e..342f314 100644
--- a/application/classes/view/error.php
+++ b/application/classes/view/error.php
@@ -1,27 +1,28 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Error extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
'banner' => 'partials/error/banner',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
public $message;
public function body()
{
$class = 'View_Error_'.((int)$this->type);
return new $class;
}
}
\ No newline at end of file
diff --git a/application/classes/view/home.php b/application/classes/view/home.php
index 0b7a50a..604e1b4 100644
--- a/application/classes/view/home.php
+++ b/application/classes/view/home.php
@@ -1,39 +1,40 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Home extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
'banner' => 'partials/home/banner',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = TRUE;
/**
* @var boolean triggers the menu bar highlight
*/
public $menu_home = TRUE;
public function download_version()
{
return $this->download['version'].' ('.$this->download['status'].')';
}
public function download_link()
{
return $this->download['download'];
}
public function body()
{
return new View_Home_Body;
}
}
\ No newline at end of file
diff --git a/application/classes/view/license.php b/application/classes/view/license.php
index c2e2539..c12c922 100644
--- a/application/classes/view/license.php
+++ b/application/classes/view/license.php
@@ -1,26 +1,27 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_License extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
public function body()
{
$body = new View_License_Body;
$body->set('year', $this->year());
return $body;
}
}
\ No newline at end of file
diff --git a/application/classes/view/team.php b/application/classes/view/team.php
index 933d5d2..6e19f38 100644
--- a/application/classes/view/team.php
+++ b/application/classes/view/team.php
@@ -1,23 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Team extends View_Base {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
+ 'notices' => 'partials/notices',
);
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
public function body()
{
return new View_Team_Body;
}
}
\ No newline at end of file
diff --git a/application/templates/base.mustache b/application/templates/base.mustache
index 8c03cd2..2477038 100644
--- a/application/templates/base.mustache
+++ b/application/templates/base.mustache
@@ -1,75 +1,79 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="{{base_url}}favicon.ico">
<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="{{base_url}}assets/js/lib/modernizr-2.0.6.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
+ <div class="notices">
+ {{>notices}}
+ </div>
+
<div class="container">
{{{body}}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/lib/jquery-1.6.2.js"%3E%3C/script%3E'))</script>
<script src="{{base_url}}assets/js/global.js"></script>
<!--[if lt IE 7 ]>
<script src{{base_url}}assets/js/lib/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
\ No newline at end of file
diff --git a/application/templates/partials/notices.mustache b/application/templates/partials/notices.mustache
new file mode 100644
index 0000000..7925912
--- /dev/null
+++ b/application/templates/partials/notices.mustache
@@ -0,0 +1,5 @@
+{{#notices}}
+ <div class="notice notice-{{type}}">
+ <p>{{message}}</p>
+ </div>
+{{/notices}}
\ No newline at end of file
diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 546a11b..d7bd16f 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,447 +1,485 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who, #gallery { height:220px; }
#who { width:280px; float:left; }
#gallery { width:620px; float:right; position:relative; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
#banner h2.error { width: auto; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who ul { margin:0; overflow:hidden; }
#who li { list-style:none; display:inline; margin:0 9px; }
#who img { vertical-align:middle; margin-bottom:17px; }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/famfamfam/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/famfamfam/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/famfamfam/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/famfamfam/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
div#error { padding-left: 5em; }
div#error img#not-found { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
div#error img#not-found-server { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
-div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
\ No newline at end of file
+div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
+
+/*
+ * Notices
+ */
+div.notice {
+ padding: 5px 5px;
+ padding-left: 25px;
+ margin: 5px 0px;
+
+ /* Rounded Corners and Shadow */
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+
+ /* Shadow */
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ box-shadow: 0 1px 2px rgba(0,0,0,.2);
+}
+
+div.notice-error {
+ background: #ff0000 url(../img/icon/famfamfam/exclamation.png) no-repeat 5px center;
+}
+
+div.notice-warning {
+ background: #ffff00 url(../img/icon/famfamfam/error.png) no-repeat 5px center;
+}
+
+div.notice-information {
+ background: #0000ff url(../img/icon/famfamfam/information.png) no-repeat 5px center;
+}
+
+div.notice-success {
+ background: #00ff00 url(../img/icon/famfamfam/accept.png) no-repeat 5px center;
+}
+/*
+ * END Notices
+ */
\ No newline at end of file
|
kohana/kohanaframework.org | 62ed92f0010974b92698208dd0d3f8980eda5b97 | Fixes misspelling of "fellow" (follow) in IRC callout. | diff --git a/application/templates/home/social.mustache b/application/templates/home/social.mustache
index 14607e5..fd55d6f 100644
--- a/application/templates/home/social.mustache
+++ b/application/templates/home/social.mustache
@@ -1,61 +1,61 @@
<div id="social" class="lightBkg">
<section id="community">
<h2>Community</h2>
<ul>
<li>
<a href="http://forum.kohanaframework.org" id="forum" class="icon">
<h3>Forum</h3>
Official announcements, community support, and feedback.
</a>
</li>
<li>
<a href="irc://irc.freenode.net/kohana" id="irc" class="icon">
<h3>IRC</h3>
- Chat with follow Kohana users at #kohana on freenode.
+ Chat with fellow Kohana users at #kohana on freenode.
</a>
</li>
<li>
<a href="http://github.com/kohana" id="github" class="icon">
<h3>Github</h3>
The easiest way to contribute to v3.x is to fork us on GitHub.
</a>
</li>
<li>
<a href="http://www.facebook.com/group.php?gid=140164501435" id="facebook" class="icon">
<h3>Facebook</h3>
Join the Facebook group and find other users.
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/kohana" id="stackoverflow" class="icon">
<h3>Stack Overflow</h3>
Share your knowledge by answering user questions about Kohana.
</a>
</li>
<li>
<a href="http://www.ohloh.net/p/ko3" id="ohloh" class="icon">
<h3>Ohloh</h3>
View project information and give Kudos for Kohana.
</a>
</li>
<!-- Coming soon
<li class="tweet">
<h3>Twitter</h3>
<q>#Kohana v3.0.8 has just been released! Download <a href="#">http://cl.ly/2VGe</a> Discuss <a href="#">http://cl.ly/2Upi</a> Issues <a href="#">http://cl.ly/2UpH</a></q>
<time datetime="2010-09-22T21:01+00:00" pubdate><a href="#">9:01 PM Sep 22nd</a></time>
<p class="twitter"><a href="#">Follow <span>@KohanaPHP</span> <span>on Twitter!</span></a></p>
</li> -->
</ul>
</section> <!-- END section#community -->
<section id="giving" class="box">
<h2>Giving back</h2>
<img src="{{base_url}}assets/img/giving.png" width="48" height="48" />
<p>If you use Kohana, we ask that you donate to ensure future development is possible.</p>
<h3>Where will my money go?</h3>
<p>Your donations are used to cover the cost of maintaining this website and related resources, and services required to provide these resources.</p>
<p>As part of the Software Freedom Conservancy, your donations are fully tax-deductible to the extent permitted by law.</p>
</section> <!-- END section#giving -->
</div>
\ No newline at end of file
|
kohana/kohanaframework.org | a0abf7fd0bc0d33a63443deb7df27213483e0019 | adding develop and master behat tests | diff --git a/test/behat.yml b/test/behat.yml
index fc47a18..ab66a5b 100644
--- a/test/behat.yml
+++ b/test/behat.yml
@@ -1,19 +1,24 @@
default:
context:
parameters:
base_url: http://staging.kohanaframework.org/
production:
context:
parameters:
base_url: http://kohanaframework.org/
-test:
+test-develop:
context:
parameters:
- base_url: http://test.kohanaframework.org/
+ base_url: http://kohana-website-develop.ci.kohanaframework.org/
+
+test-master:
+ context:
+ parameters:
+ base_url: http://kohana-website-master.ci.kohanaframework.org/
local:
context:
parameters:
base_url: http://kohanaphpcom/
\ No newline at end of file
|
kohana/kohanaframework.org | 40f1d3471448825f649bfe6ebbc0d3df93e6b27b | adding test target to behat and build.xml | diff --git a/build.xml b/build.xml
index 911ac77..8d798ec 100644
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
<project name="KohanaWebsite" default="behat" basedir=".">
<target name="behat">
<exec dir="${basedir}/test" executable="behat" failonerror="true">
- <arg line="-f junit --out ${basedir}/test/logs --profile default" />
+ <arg line="-f junit --out ${basedir}/test/logs --profile test" />
</exec>
</target>
</project>
\ No newline at end of file
diff --git a/test/behat.yml b/test/behat.yml
index 03b769f..fc47a18 100644
--- a/test/behat.yml
+++ b/test/behat.yml
@@ -1,14 +1,19 @@
default:
context:
parameters:
base_url: http://staging.kohanaframework.org/
production:
context:
parameters:
base_url: http://kohanaframework.org/
+test:
+ context:
+ parameters:
+ base_url: http://test.kohanaframework.org/
+
local:
context:
parameters:
base_url: http://kohanaphpcom/
\ No newline at end of file
|
kohana/kohanaframework.org | 33273018ed38a29e426bd1bfd28ecb75e52f7b9a | adding ant buildfile | diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..911ac77
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,7 @@
+<project name="KohanaWebsite" default="behat" basedir=".">
+ <target name="behat">
+ <exec dir="${basedir}/test" executable="behat" failonerror="true">
+ <arg line="-f junit --out ${basedir}/test/logs --profile default" />
+ </exec>
+ </target>
+</project>
\ No newline at end of file
|
kohana/kohanaframework.org | 54bdb17ccd243314dd6f2a3b4030a48d1678284f | Adding some simple behat tests | diff --git a/test/behat.yml b/test/behat.yml
new file mode 100644
index 0000000..03b769f
--- /dev/null
+++ b/test/behat.yml
@@ -0,0 +1,14 @@
+default:
+ context:
+ parameters:
+ base_url: http://staging.kohanaframework.org/
+
+production:
+ context:
+ parameters:
+ base_url: http://kohanaframework.org/
+
+local:
+ context:
+ parameters:
+ base_url: http://kohanaphpcom/
\ No newline at end of file
diff --git a/test/features/bootstrap/FeatureContext.php b/test/features/bootstrap/FeatureContext.php
new file mode 100644
index 0000000..2d1ef2e
--- /dev/null
+++ b/test/features/bootstrap/FeatureContext.php
@@ -0,0 +1,46 @@
+<?php
+
+use Behat\Behat\Context\ClosuredContextInterface,
+ Behat\Behat\Context\TranslatedContextInterface,
+ Behat\Behat\Context\BehatContext,
+ Behat\Behat\Exception\PendingException;
+use Behat\Gherkin\Node\PyStringNode,
+ Behat\Gherkin\Node\TableNode;
+
+//
+// Require 3rd-party libraries here:
+//
+// require_once 'PHPUnit/Autoload.php';
+// require_once 'PHPUnit/Framework/Assert/Functions.php';
+//
+require_once 'mink/autoload.php';
+
+/**
+ * Features context.
+ */
+class FeatureContext extends Behat\Mink\Behat\Context\MinkContext
+{
+ /**
+ * Initializes context.
+ * Every scenario gets it's own context object.
+ *
+ * @param array $parameters context parameters (set them up through behat.yml)
+ */
+ public function __construct(array $parameters)
+ {
+ parent::__construct($parameters);
+
+ // Initialize your context here
+ }
+//
+// Place your definition and hook methods here:
+//
+// /**
+// * @Given /^I have done something with "([^"]*)"$/
+// */
+// public function iHaveDoneSomethingWith($argument)
+// {
+// doSomethingWith($argument);
+// }
+//
+}
diff --git a/test/features/website.feature b/test/features/website.feature
new file mode 100644
index 0000000..1793c24
--- /dev/null
+++ b/test/features/website.feature
@@ -0,0 +1,41 @@
+@website
+Feature: The Website Works
+ In order to use the website, all the links need to work and the proper
+ information should be provided.
+
+ Scenario: Home Page
+ Given I go to "/"
+ Then I should see "Download"
+ And I should see "Giving back"
+ And I should see "Forum"
+
+ Scenario: Download
+ Given I go to "/"
+ When I follow "Download"
+ Then the response status code should be 200
+ And I should see "Current stable release of the 3.2.x series"
+ When I follow "Download v3.2.0"
+ Then the response status code should be 200
+
+ Scenario: Docs
+ Given I go to "/"
+ When I follow "Documentation"
+ Then the response status code should be 200
+ And I should see "Kohana v3.2 Documentation"
+ And I should see "For documentation of v2.x"
+
+ Scenario: Development
+ Given I go to "/"
+ When I follow "Development"
+ Then the response status code should be 200
+ And I should see "All official development is by the"
+
+ Scenario: Error 404
+ Given I go to "/downloadd"
+ Then the response status code should be 404
+ And I should see "[404]: Unable to find a route to match the URI: downloadd"
+
+ Scenario: Error 500
+ Given I go to "/error"
+ Then the response status code should be 500
+ And I should see "[500]: This is an intentional exception"
\ No newline at end of file
|
kohana/kohanaframework.org | 4d31dc9af766952887dc38d167269e86a14145a6 | Re-adding logo for forums/redmine. This should probably get moved to assets/img eventually. | diff --git a/public/media/img/kohana.png b/public/media/img/kohana.png
new file mode 100644
index 0000000..f0583ef
Binary files /dev/null and b/public/media/img/kohana.png differ
|
kohana/kohanaframework.org | c0e1c87cd387c7ae7f48b978f27dc1ed7e77be39 | Add nice error pages | diff --git a/application/bootstrap.php b/application/bootstrap.php
index a8fce49..b1ccb42 100644
--- a/application/bootstrap.php
+++ b/application/bootstrap.php
@@ -1,185 +1,191 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
'index_file' => '',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
//'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Custom caching
//'codebench' => MODPATH.'codebench', // Benchmarking tool
//'database' => MODPATH.'database', // Database access
//'image' => MODPATH.'image', // Image manipulation
//'oauth' => MODPATH.'oauth', // OAuth authentication
//'orm' => MODPATH.'orm', // Object Relationship Mapping
//'pagination' => MODPATH.'pagination', // Paging of results
//'userguide' => MODPATH.'userguide', // User guide and API documentation
'kostache' => MODPATH.'kostache', // Kostache templating
));
/*
* We want to show the world we're running on... Kohana of course!
*/
Kohana::$expose = TRUE;
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
+Route::set('error', 'error')
+ ->defaults(array(
+ 'controller' => 'home',
+ 'action' => 'error'
+ ));
+
Route::set('download', 'download')
->defaults(array(
'controller' => 'download',
'action' => 'index'
));
Route::set('documentation', 'documentation')
->defaults(array(
'controller' => 'documentation',
'action' => 'index'
));
Route::set('development', 'development')
->defaults(array(
'controller' => 'development',
'action' => 'index'
));
Route::set('team', 'team')
->defaults(array(
'controller' => 'team',
'action' => 'index'
));
Route::set('license', 'license')
->defaults(array(
'controller' => 'license',
'action' => 'index'
));
Route::set('home', '(index)')
->defaults(array(
'controller' => 'home',
'action' => 'index'
));
// // Handles: feed/$type.rss and feed/$type.atom
// Route::set('feed', 'feed/<name>', array('name' => '.+'))
// ->defaults(array(
// 'controller' => 'feed',
// 'action' => 'load',
// ));
//
// // Handles: download/$file
// Route::set('file', 'download/<file>', array('file' => '.+'))
// ->defaults(array(
// 'controller' => 'file',
// 'action' => 'get',
// ));
//
// // Handles: donate
// Route::set('donate', 'donate(/<action>)')
// ->defaults(array(
// 'controller' => 'donate',
// 'action' => 'index',
// ));
//
// // Handles: $lang/$page and $page
// Route::set('page', '((<lang>/)<page>)', array('lang' => '[a-z]{2}', 'page' => '.+'))
// ->defaults(array(
// 'controller' => 'page',
// 'action' => 'load',
// ));
\ No newline at end of file
diff --git a/application/classes/controller/home.php b/application/classes/controller/home.php
index 653fd82..b78f915 100644
--- a/application/classes/controller/home.php
+++ b/application/classes/controller/home.php
@@ -1,12 +1,22 @@
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Home extends Controller {
public function action_index()
{
$view = new View_Home;
$view->set('download', Kohana::$config->load('files')->{'kohana-latest'});
$this->response->body($view);
}
+ /**
+ * Demo action to generate a 500 error
+ *
+ * @return null
+ */
+ public function action_error()
+ {
+ throw new Kohana_Exception('This is an intentional exception');
+ }
+
}
\ No newline at end of file
diff --git a/application/classes/kohana/exception.php b/application/classes/kohana/exception.php
new file mode 100644
index 0000000..ff3ee60
--- /dev/null
+++ b/application/classes/kohana/exception.php
@@ -0,0 +1,37 @@
+<?php
+
+class Kohana_Exception extends Kohana_Kohana_Exception
+{
+ /**
+ * Inline exception handler, displays the error message, source of the
+ * exception, and the stack trace of the error.
+ *
+ * @uses Kohana_Exception::text
+ * @param object exception object
+ * @return boolean
+ */
+ public static function handler(Exception $e)
+ {
+ $response = new Response;
+ $view = new View_Error;
+ $view->message = $e->getMessage();
+
+ switch (get_class($e))
+ {
+ case 'HTTP_Exception_404':
+ $response->status(404);
+ $view->title = 'File Not Found';
+ $view->type = 404;
+
+ break;
+ default:
+ $response->status(500);
+ $view->title = 'NOMNOMNOMN';
+ $view->type = 500;
+
+ break;
+ }
+
+ echo $response->body($view)->send_headers()->body();
+ }
+}
diff --git a/application/classes/view/error.php b/application/classes/view/error.php
new file mode 100644
index 0000000..6e17d3e
--- /dev/null
+++ b/application/classes/view/error.php
@@ -0,0 +1,27 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class View_Error extends View_Base {
+
+ /**
+ * @var array partials for the page
+ */
+ protected $_partials = array(
+ 'header' => 'partials/header',
+ 'footer' => 'partials/footer',
+ 'banner' => 'partials/error/banner',
+ );
+
+ /**
+ * @var boolean show the banner space on template
+ */
+ public $banner_exists = TRUE;
+
+ public $message;
+
+ public function body()
+ {
+ $class = 'View_Error_'.((int)$this->type);
+ return new $class;
+ }
+
+}
\ No newline at end of file
diff --git a/application/classes/view/error/404.php b/application/classes/view/error/404.php
new file mode 100644
index 0000000..1b81baf
--- /dev/null
+++ b/application/classes/view/error/404.php
@@ -0,0 +1,6 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class View_Error_404 extends Kostache
+{
+
+}
\ No newline at end of file
diff --git a/application/classes/view/error/500.php b/application/classes/view/error/500.php
new file mode 100644
index 0000000..1d3a3fc
--- /dev/null
+++ b/application/classes/view/error/500.php
@@ -0,0 +1,6 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class View_Error_500 extends Kostache
+{
+
+}
\ No newline at end of file
diff --git a/application/templates/error/404.mustache b/application/templates/error/404.mustache
new file mode 100644
index 0000000..e56d123
--- /dev/null
+++ b/application/templates/error/404.mustache
@@ -0,0 +1,4 @@
+<div id="error">
+ <img src="/assets/img/server.png" alt="404 Not Found!" id="not-found-server" />
+ <img src="/assets/img/404.png" alt="404 Not Found!" id="not-found" />
+</div>
\ No newline at end of file
diff --git a/application/templates/error/500.mustache b/application/templates/error/500.mustache
new file mode 100644
index 0000000..eacdf34
--- /dev/null
+++ b/application/templates/error/500.mustache
@@ -0,0 +1,3 @@
+<div id="error">
+ <img src="/assets/img/500.png" alt="OMG!" id="error-fivehundred" />
+</div>
\ No newline at end of file
diff --git a/application/templates/partials/error/banner.mustache b/application/templates/partials/error/banner.mustache
new file mode 100644
index 0000000..08035ce
--- /dev/null
+++ b/application/templates/partials/error/banner.mustache
@@ -0,0 +1 @@
+<h2 class="error">[{{type}}]: {{message}}</h2>
\ No newline at end of file
diff --git a/media/css/website.css b/media/css/website.css
index a0fbf99..01f62e5 100644
--- a/media/css/website.css
+++ b/media/css/website.css
@@ -1,100 +1,100 @@
html { background: #00262f; font-size: 70%; }
body { margin: 0; }
ol ol, ol ul, ul ul, ul ol { margin-bottom: 0; }
a img { border: 0; }
h1 small,
h2 small,
h3 small,
h4 small { font-weight: normal; font-size: 0.7em; }
h5 small,
h6 small { font-weight: normal; font-size: 0.8em; }
dl dd { margin-left: 0; }
.caps { text-transform: uppercase; font-size: 0.8em; font-weight: normal; }
.status { text-transform: lowercase; font-variant: small-caps; font-weight: bold; color: #911; }
.container .colborder { border-color: #d3d8bc; }
#header,
#content,
#footer { float: left; clear: both; width: 100%; }
#header { padding: 58px 0 2em; background: #77c244 url(../img/header.png) center top repeat-x; }
#logo { display: block; float: left; }
#menu { float: right; margin-top: 12px; background: #113c32; -moz-border-radius: 5px; -webkit-border-radius: 5px; }
#menu ul { float: left; margin: 0; padding: 0 0.5em 0 0; }
#menu li { display: block; float: left; margin: 0; padding: 0; }
#menu li.first { padding-left: 0.5em; }
#menu li a { display: block; height: 32px; line-height: 32px; padding: 0 0.8em; border-right: solid 1px #0f362d; border-left: solid 1px #144539; letter-spacing: 0.05em; text-decoration: none; text-transform: uppercase; color: #efefef; font-size: 90%; }
#menu li.first a { border-left: 0; }
#menu li.last a { border-right: 0; }
#menu li a:hover { background: #164e41; border-left-color: #195a4b; color: #fff; text-shadow: #fff 0 0 1px; }
#content { background: #f1f8db url(../img/content.png) center top repeat-x; }
#content .wrapper { min-height: 390px; padding: 1em 0; background: transparent url(../img/wrapper.png) center top no-repeat; }
#content dl.inactive-team { font-size: 0.9em; }
#content p.intro { padding: 1em 20px; padding-left: 20px; margin: 0 -20px; font-size: 1.2em; }
#content a { color: #004352; }
#content a:hover { color: #00758f; }
#content a:active { text-decoration: none; }
#home { }
#home ul { margin-left: 0; padding-left: 1em; }
#home .download .link a { display: block; line-height: 60px; padding-left: 64px; font-size: 1.2em; background: transparent url(../img/download.png) 8px center no-repeat; }
#home .download .link a:hover { background-color: #fff; }
#donate { }
#donate label { font-weight: normal; }
#donate .warn,
#donate .okay,
#donate .good { font-size: 1.1em; padding-left: 20px; background: transparent none left center no-repeat; }
#donate .warn { background-image: url(../icon/exclamation.png); }
#donate .okay { background-image: url(../icon/error.png); }
#donate .good { background-image: url(../icon/accept.png); }
#donate table { border: none; margin: 0; width: 90%; }
#donate table td { border: none; padding: 0.2em; vertical-align: middle; }
#download { }
#download p.release { padding: 1em 20px; padding-left: 20px; margin: 0 -20px; font-size: 1.1em; }
#download .package { margin-bottom: 1em; }
#download .package .details { padding: 1em; background: #ccc; border-radius: 0.4em; }
#download .package ul { display: block; list-style: none; margin: 1em 0; padding: 0; }
#download .package li { display: inline-block !important; display: inline; margin: 0 1em 0 0; padding: 0; }
#download .package .links a { padding: 0.2em; padding-left: 20px; background: transparent none 0 center no-repeat; }
#download .package .links a.download { background-image: url(../icon/package_go.png); }
#download .package .links a.changelog { background-image: url(../icon/report.png); }
#download .package .links a.documentation { background-image: url(../icon/book_link.png); }
#download .package .links a.issues { background-image: url(../icon/bug.png); }
#download .package .links a.repository { background-image: url(../icon/wrench.png); }
#documentation {}
#documentation h2 img { vertical-align: middle; }
#documentation h2 a,
#documentation h3 a {
color: #000;
text-decoration: none;
}
#documentation #feature { }
#documentation #feature ul { margin-left: 80px;; }
#documentation #feature img { margin-right: 10px; }
#documentation #feature p { }
#community dl { margin-top: 20px; }
#community dl h3 { margin: 10px 0 10px; font-size: 16px; }
#community dl h3 a { color: #000; text-decoration: none; }
#community dt,
#community dd { display: block; float: left; }
#community dt { width: 75px; height: 90px; margin: 0 5px 0 0; }
#community dt.last { margin-left: 290px; }
#community dd { width: 180px; height: 130px; margin-right: 30px; line-height: 1.3em; }
#footer { padding: 1em 0; background: #00262f; color: #eee; text-shadow: #00262f 0.1em 0.1em 1px; font-size: 0.9em; }
#footer a { color: #809397; }
#footer p { clear: both; }
#footer .copyright { color: #405c63; }
#footer .copyright a { color: #405c63; text-decoration: underline; }
#footer .copyright a.logo { display: block; width: 100px; height: 24px; background: transparent url(../img/kohana_dark.png) 0 0 no-repeat; text-indent: -3000em; }
#footer .feed h6 a { margin-left: -14px; padding-left: 14px; letter-spacing: 0.11em; background: transparent url(../img/feed.png) left center no-repeat; text-decoration: none; color: #fff; }
#footer .feed ol { margin: 0; padding: 0; list-style: none; }
- #footer .feed li { margin: 0; padding: 0; }
+ #footer .feed li { margin: 0; padding: 0; }
\ No newline at end of file
diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 2e6d673..00111aa 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,441 +1,447 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who, #gallery { height:220px; }
#who { width:280px; float:left; }
#gallery { width:620px; float:right; position:relative; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
+#banner h2.error { width: auto; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who ul { margin:0; overflow:hidden; }
#who li { list-style:none; display:inline; margin:0 9px; }
#who img { vertical-align:middle; margin-bottom:17px; }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
-}
\ No newline at end of file
+}
+
+div#error { padding-left: 5em; }
+div#error img#not-found { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
+div#error img#not-found-server { display: inline-block; margin-left: auto; margin-right: auto; width: 400px;}
+div#error img#error-fivehundred { display: inline-block; margin-left: auto; margin-right: auto; width: 850px;}
\ No newline at end of file
diff --git a/public/assets/img/404.png b/public/assets/img/404.png
new file mode 100644
index 0000000..c443723
Binary files /dev/null and b/public/assets/img/404.png differ
diff --git a/public/assets/img/500.png b/public/assets/img/500.png
new file mode 100644
index 0000000..bc36736
Binary files /dev/null and b/public/assets/img/500.png differ
diff --git a/public/assets/img/server.png b/public/assets/img/server.png
new file mode 100644
index 0000000..6aa70a1
Binary files /dev/null and b/public/assets/img/server.png differ
|
kohana/kohanaframework.org | 13fefa4bb7c5c9119efb9e5e230eb5f859a46530 | Fixing a "typo" .. (Basically .. I'm testing automated deployment) | diff --git a/.gitignore b/.gitignore
index a71902e..2167602 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
Icon?
.DS_Store
.svn
-nbproject
+/nbproject/private
diff --git a/application/templates/download/body.mustache b/application/templates/download/body.mustache
index be07f38..f0f99b8 100644
--- a/application/templates/download/body.mustache
+++ b/application/templates/download/body.mustache
@@ -1,32 +1,32 @@
<section class="textHeavy">
<h1>Download</h1>
<p>Kohana has two different versions to choose from. All versions are supported for one year from the release date.</p>
<div id="stable" class="border">
<div class="download"><a class="cta" href="{{latest_download}}"><span>Download</span> <br />{{latest_version}}</a></div>
<h3>{{latest_version}} <small>"{{latest_codename}}"</small> <i>{{latest_status}}</i></h3>
<p>Current stable release of the 3.2.x series, this is the recommended version for all new projects. Support will last until {{latest_support_until}}.</p>
<ul>
<li class="lcta changes"><a href="{{latest_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{latest_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{latest_issues}}">Issues</a></li>
</ul>
</div>
</section>
<div class="lightBkg inset textHeavy">
<h2>Supported version</h2>
<h3>{{support_version}} <small>"{{support_codename}}"</small> <i>{{support_status}}</i></h3>
<p>Officially supported maintenance version. Support will last until {{support_until}}.</p>
<ul>
<li class="lcta dl"><a href="{{support_download}}">Download</a></li>
<li class="lcta changes"><a href="{{support_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{support_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{support_issues}}">Issues</a></li>
</ul>
</div>
<div class="lightBkg inset textHeavy">
<h2>Looking for an older version?</h2>
- <p>You can find unsupported versions of Kohana in the <a href="http://dev.kohanaframework.org/projects/kohana3/files">3.x archives</a> or <a href="http://dev.kohanaframework.org/projects/kohana2/files">2.x archives</a></p>
+ <p>You can find unsupported versions of Kohana in the <a href="http://dev.kohanaframework.org/projects/kohana3/files">3.x archives</a> or <a href="http://dev.kohanaframework.org/projects/kohana2/files">2.x archives</a>.</p>
</div>
\ No newline at end of file
diff --git a/nbproject/project.properties b/nbproject/project.properties
new file mode 100644
index 0000000..94429c9
--- /dev/null
+++ b/nbproject/project.properties
@@ -0,0 +1,7 @@
+include.path=${php.global.include.path}
+php.version=PHP_53
+source.encoding=UTF-8
+src.dir=.
+tags.asp=false
+tags.short=true
+web.root=.
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644
index 0000000..72e70a4
--- /dev/null
+++ b/nbproject/project.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.php.project</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/php-project/1">
+ <name>kohanaphp.com</name>
+ </data>
+ </configuration>
+</project>
|
kohana/kohanaframework.org | 8c3299a5f7e548e62d1171ebae6d24ad7e20b194 | Add "Powered by kohana vX.X.X" to the footer. | diff --git a/application/classes/view/base.php b/application/classes/view/base.php
index 847d595..e6cec8e 100644
--- a/application/classes/view/base.php
+++ b/application/classes/view/base.php
@@ -1,143 +1,163 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Base extends Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
);
/**
* @var string overloading the template to lock to base
*/
protected $_template = 'base';
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
/**
* Returns home page url
*
* @return string
*/
public function home_url()
{
return Route::url('home');
}
/**
* Returns download page url
*
* @return string
*/
public function download_url()
{
return Route::url('download');
}
/**
* Returns documentation page url
*
* @return string
*/
public function documentation_url()
{
return Route::url('documentation');
}
/**
* Returns development page url
*
* @return string
*/
public function development_url()
{
return Route::url('development');
}
/**
* Returns team page url
*
* @return string
*/
public function team_url()
{
return Route::url('team');
}
/**
* Returns license page url
*
* @return string
*/
public function license_url()
{
return Route::url('license');
}
+
+ /**
+ * Returns current kohana version
+ *
+ * @return string
+ */
+ public function kohana_version()
+ {
+ return Kohana::VERSION;
+ }
+
+ /**
+ * Returns current kohana codename
+ *
+ * @return string
+ */
+ public function kohana_codename()
+ {
+ return Kohana::CODENAME;
+ }
}
\ No newline at end of file
diff --git a/application/templates/partials/footer.mustache b/application/templates/partials/footer.mustache
index 570cfdf..37c8c75 100644
--- a/application/templates/partials/footer.mustache
+++ b/application/templates/partials/footer.mustache
@@ -1,5 +1,6 @@
<p>
Copyright © 2007–{{year}}. The awesome
<a href="{{team_url}}">Kohana Team</a>. Kohana is
<a href="{{license_url}}">licensed</a> under the BSD License.
+ <small>Powered by Kohana v{{kohana_version}} "{{kohana_codename}}"</small>
</p>
|
kohana/kohanaframework.org | 69ced514cee3720a89d6767ae3b4de26122f2f7f | Correct server name in capfile | diff --git a/capfile b/capfile
index fd99e2c..032106a 100644
--- a/capfile
+++ b/capfile
@@ -1,70 +1,70 @@
load 'deploy'
# Basic settings
set :application, "kohana-website"
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_dir, "/tmp/#{application}/"
set :user, "kohana"
set :runner, "kohana"
set :use_sudo, false
# Stages
task :production do
role :app, "vm01.kohanaframework.org"
role :db, "vm01.kohanaframework.org", {:primary=>true}
role :web, "vm01.kohanaframework.org"
set :deploy_to, "/home/kohana/sites/www.kohanaframework.org/"
end
task :staging do
- role :app, "vm02.kohanaframework.org"
- role :db, "vm02.kohanaframework.org", {:primary=>true}
- role :web, "vm02.kohanaframework.org"
+ role :app, "vm01.kohanaframework.org"
+ role :db, "vm01.kohanaframework.org", {:primary=>true}
+ role :web, "vm01.kohanaframework.org"
set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
end
# Workaround a cap bug..
Dir.mkdir("/tmp/#{application}/") unless File.directory?("/tmp/#{application}/")
# Hooks
before "deploy:setup", "kohana:before_setup"
after "deploy:finalize_update", "kohana:finalize_update"
# Kohana specific deployment ..
namespace :kohana do
task :before_setup, :except => { :no_release => true } do
shared_children.push("upload")
end
task :finalize_update, :except => { :no_release => true } do
run "rm -rf #{latest_release}/application/logs"
run "ln -s #{shared_path}/log #{latest_release}/application/logs"
run "rm -rf #{latest_release}/upload"
run "ln -s #{shared_path}/upload #{latest_release}/upload"
end
end
# Override some defaults..
namespace :deploy do
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
end
task :restart, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :start, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :stop, :roles => :app, :except => { :no_release => true } do
# do nothing
end
end
|
kohana/kohanaframework.org | b374114b48b27d569ee029d16de71c8f36e825f1 | Multiple stage support in the capfile | diff --git a/capfile b/capfile
index 9b679d2..fd99e2c 100644
--- a/capfile
+++ b/capfile
@@ -1,58 +1,70 @@
load 'deploy'
# Basic settings
set :application, "kohana-website"
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_dir, "/tmp/#{application}/"
set :user, "kohana"
set :runner, "kohana"
set :use_sudo, false
-set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
-# Servers
-role :app, "vm02.kohanaframework.org"
-role :db, "vm02.kohanaframework.org", {:primary=>true}
-role :web, "vm02.kohanaframework.org"
+# Stages
+task :production do
+ role :app, "vm01.kohanaframework.org"
+ role :db, "vm01.kohanaframework.org", {:primary=>true}
+ role :web, "vm01.kohanaframework.org"
-Dir.mkdir("/tmp/#{application}/")
+ set :deploy_to, "/home/kohana/sites/www.kohanaframework.org/"
+end
+
+task :staging do
+ role :app, "vm02.kohanaframework.org"
+ role :db, "vm02.kohanaframework.org", {:primary=>true}
+ role :web, "vm02.kohanaframework.org"
+
+ set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
+end
+
+# Workaround a cap bug..
+Dir.mkdir("/tmp/#{application}/") unless File.directory?("/tmp/#{application}/")
# Hooks
before "deploy:setup", "kohana:before_setup"
after "deploy:finalize_update", "kohana:finalize_update"
# Kohana specific deployment ..
namespace :kohana do
task :before_setup, :except => { :no_release => true } do
shared_children.push("upload")
end
task :finalize_update, :except => { :no_release => true } do
run "rm -rf #{latest_release}/application/logs"
run "ln -s #{shared_path}/log #{latest_release}/application/logs"
run "rm -rf #{latest_release}/upload"
run "ln -s #{shared_path}/upload #{latest_release}/upload"
end
end
# Override some defaults..
namespace :deploy do
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
end
task :restart, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :start, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :stop, :roles => :app, :except => { :no_release => true } do
# do nothing
end
end
|
kohana/kohanaframework.org | e42f35d16d67e0734784aec8c5d6b82c8e140660 | An "It just about works" capfile.. | diff --git a/capfile b/capfile
index e0ca50e..9b679d2 100644
--- a/capfile
+++ b/capfile
@@ -1,57 +1,58 @@
load 'deploy'
# Basic settings
set :application, "kohana-website"
set :repository, "."
set :scm, :none
set :deploy_via, :copy
set :copy_dir, "/tmp/#{application}/"
set :user, "kohana"
set :runner, "kohana"
set :use_sudo, false
set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
# Servers
role :app, "vm02.kohanaframework.org"
role :db, "vm02.kohanaframework.org", {:primary=>true}
role :web, "vm02.kohanaframework.org"
+Dir.mkdir("/tmp/#{application}/")
+
# Hooks
before "deploy:setup", "kohana:before_setup"
after "deploy:finalize_update", "kohana:finalize_update"
# Kohana specific deployment ..
namespace :kohana do
task :before_setup, :except => { :no_release => true } do
- shared_children.push("logs")
shared_children.push("upload")
end
task :finalize_update, :except => { :no_release => true } do
run "rm -rf #{latest_release}/application/logs"
- run "ln -s #{shared_path}/logs #{latest_release}/application/logs"
+ run "ln -s #{shared_path}/log #{latest_release}/application/logs"
run "rm -rf #{latest_release}/upload"
run "ln -s #{shared_path}/upload #{latest_release}/upload"
end
end
# Override some defaults..
namespace :deploy do
task :finalize_update, :except => { :no_release => true } do
run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
end
task :restart, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :start, :roles => :app, :except => { :no_release => true } do
# do nothing
end
task :stop, :roles => :app, :except => { :no_release => true } do
# do nothing
end
-end
\ No newline at end of file
+end
|
kohana/kohanaframework.org | fbe68d565061364d01f838f7a3ee9bcd3e24ac57 | Add initial capfile.. | diff --git a/capfile b/capfile
new file mode 100644
index 0000000..e0ca50e
--- /dev/null
+++ b/capfile
@@ -0,0 +1,57 @@
+load 'deploy'
+
+# Basic settings
+set :application, "kohana-website"
+set :repository, "."
+set :scm, :none
+set :deploy_via, :copy
+set :copy_dir, "/tmp/#{application}/"
+set :user, "kohana"
+set :runner, "kohana"
+set :use_sudo, false
+set :deploy_to, "/home/kohana/sites/staging.kohanaframework.org/"
+
+# Servers
+role :app, "vm02.kohanaframework.org"
+role :db, "vm02.kohanaframework.org", {:primary=>true}
+role :web, "vm02.kohanaframework.org"
+
+# Hooks
+before "deploy:setup", "kohana:before_setup"
+after "deploy:finalize_update", "kohana:finalize_update"
+
+# Kohana specific deployment ..
+namespace :kohana do
+ task :before_setup, :except => { :no_release => true } do
+ shared_children.push("logs")
+ shared_children.push("upload")
+ end
+
+ task :finalize_update, :except => { :no_release => true } do
+ run "rm -rf #{latest_release}/application/logs"
+ run "ln -s #{shared_path}/logs #{latest_release}/application/logs"
+
+ run "rm -rf #{latest_release}/upload"
+ run "ln -s #{shared_path}/upload #{latest_release}/upload"
+ end
+end
+
+
+# Override some defaults..
+namespace :deploy do
+ task :finalize_update, :except => { :no_release => true } do
+ run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
+ end
+
+ task :restart, :roles => :app, :except => { :no_release => true } do
+ # do nothing
+ end
+
+ task :start, :roles => :app, :except => { :no_release => true } do
+ # do nothing
+ end
+
+ task :stop, :roles => :app, :except => { :no_release => true } do
+ # do nothing
+ end
+end
\ No newline at end of file
|
kohana/kohanaframework.org | fbf7e6ae8860e76a53516c9bcfc7ae629e2f9723 | Fix typo on documentation page. | diff --git a/application/templates/documentation/body.mustache b/application/templates/documentation/body.mustache
index 3f88ab4..28721aa 100644
--- a/application/templates/documentation/body.mustache
+++ b/application/templates/documentation/body.mustache
@@ -1,51 +1,51 @@
<section class="textHeavy">
<h1>Documentation</h1>
<p id="book">
Documentation is provided for both v2.x and v3.x, in separate places.
Each major release of Kohana v3.x has independent documentation.
</p>
<h2 id="version3docs">Version 3</h2>
<ul>
<li class="lcta documentation current">
<a href="http://kohanaframework.org/3.2/guide/">
Kohana v3.2 Documentation
</a>
<small>
current release
</small>
</li>
<li class="lcta documentation">
<a href="http://kohanaframework.org/3.1/guide/">
Kohana v3.1 Documentation
</a>
</li>
<li class="lcta documentation">
<a href="http://kohanaframework.org/3.0/guide/">
Kohana v3.0 Documentation
</a>
</li>
</ul>
<p>
Documentation is also included in the userguide module in all releases.
Once the <code>userguide module</code> is enabled in the bootstrap, it
is accessible from your site with <code>/index.php/guide</code> (or
just <code>/guide</code> if you are rewriting your urls).
</p>
<p>
Kohana v3.x is self-documenting when the <code>userguide module</code>
is enabled. If you follow the documentation conventions when developing
your application, your documentation will grow with your application.
</p>
<h2>Version 2</h2>
<p>
- For documenation of v2.x, please use the
+ For documentation of v2.x, please use the
<a href="http://docs.kohanaphp.com/">Kohana Documentation Wiki</a>.
</p>
<h2>I still need help!</h2>
<p>
The <a href="{{home_url}}#community">Kohana user community</a> may be
able to help you find the answer you are looking for.
</p>
</section>
\ No newline at end of file
|
kohana/kohanaframework.org | f62314a240fb663325a67f4617becafa2c07f732 | Added reverse routes for all internal urls so they correctly reflect the route they point to. | diff --git a/application/classes/view/base.php b/application/classes/view/base.php
index 723dcc2..847d595 100644
--- a/application/classes/view/base.php
+++ b/application/classes/view/base.php
@@ -1,83 +1,143 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Base extends Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
);
/**
* @var string overloading the template to lock to base
*/
protected $_template = 'base';
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
}
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
/**
* Returns URL::base() in order to link to assets properly
*
* @return string
*/
public function base_url()
{
return URL::base();
}
+
+ /**
+ * Returns home page url
+ *
+ * @return string
+ */
+ public function home_url()
+ {
+ return Route::url('home');
+ }
+
+ /**
+ * Returns download page url
+ *
+ * @return string
+ */
+ public function download_url()
+ {
+ return Route::url('download');
+ }
+
+ /**
+ * Returns documentation page url
+ *
+ * @return string
+ */
+ public function documentation_url()
+ {
+ return Route::url('documentation');
+ }
+
+ /**
+ * Returns development page url
+ *
+ * @return string
+ */
+ public function development_url()
+ {
+ return Route::url('development');
+ }
+
+ /**
+ * Returns team page url
+ *
+ * @return string
+ */
+ public function team_url()
+ {
+ return Route::url('team');
+ }
+
+ /**
+ * Returns license page url
+ *
+ * @return string
+ */
+ public function license_url()
+ {
+ return Route::url('license');
+ }
}
\ No newline at end of file
diff --git a/application/classes/view/development/body.php b/application/classes/view/development/body.php
index bcb3d5b..328ccf5 100644
--- a/application/classes/view/development/body.php
+++ b/application/classes/view/development/body.php
@@ -1,3 +1,15 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Development_Body extends Kostache {}
\ No newline at end of file
+class View_Development_Body extends Kostache {
+
+ /**
+ * Returns team page url
+ *
+ * @return string
+ */
+ public function team_url()
+ {
+ return Route::url('team');
+ }
+
+}
\ No newline at end of file
diff --git a/application/classes/view/documentation/body.php b/application/classes/view/documentation/body.php
index fe0784b..08eae59 100644
--- a/application/classes/view/documentation/body.php
+++ b/application/classes/view/documentation/body.php
@@ -1,3 +1,15 @@
<?php defined('SYSPATH') or die('No direct script access.');
-class View_Documentation_Body extends Kostache {}
\ No newline at end of file
+class View_Documentation_Body extends Kostache {
+
+ /**
+ * Returns home page url
+ *
+ * @return string
+ */
+ public function home_url()
+ {
+ return Route::url('home');
+ }
+
+}
\ No newline at end of file
diff --git a/application/templates/development/body.mustache b/application/templates/development/body.mustache
index 1fa746b..d76d58a 100644
--- a/application/templates/development/body.mustache
+++ b/application/templates/development/body.mustache
@@ -1,39 +1,39 @@
<section class="textHeavy">
<h1>Development</h1>
<p>
<b>
All official development is by the
- <a href="team.html">Kohana Team</a> and tracked on our
+ <a href="{{team_url}}">Kohana Team</a> and tracked on our
<a href="http://dev.kohanaframework.org/">developer site</a>.
</b>
</p>
<p>
If you want to report a bug or make a features request, use the
following links:
</p>
<ul>
<li class="lcta issues">
<a href="http://dev.kohanaframework.org/projects/kohana3/issues">
v3.x issues
</a>
</li>
<li class="lcta issues">
<a href="http://dev.kohanaframework.org/projects/kohana2/issues">
v2.x issues
</a>
</li>
</ul>
<p>
If you want to get involved in core development, please submit patches
for existing issues. Developers are added to
- <a href="team.html">the team</a> by <strong>invitation only</strong>.
+ <a href="{{team_url}}">the team</a> by <strong>invitation only</strong>.
</p>
<h2>Extending Kohana</h2>
<p id="github">
Kohana has a vibrant development community that provide modules to
extend and enhance the core framework. If you have a great module that
you wish to share with the community, why not put it on
<a href="http://github.com">Github</a>?
</p>
</section>
\ No newline at end of file
diff --git a/application/templates/documentation/body.mustache b/application/templates/documentation/body.mustache
index 51a161f..3f88ab4 100644
--- a/application/templates/documentation/body.mustache
+++ b/application/templates/documentation/body.mustache
@@ -1,51 +1,51 @@
<section class="textHeavy">
<h1>Documentation</h1>
<p id="book">
- Documentation is provided for both v2.x and v3.x, in separate places.
+ Documentation is provided for both v2.x and v3.x, in separate places.
Each major release of Kohana v3.x has independent documentation.
</p>
<h2 id="version3docs">Version 3</h2>
<ul>
<li class="lcta documentation current">
<a href="http://kohanaframework.org/3.2/guide/">
Kohana v3.2 Documentation
</a>
<small>
current release
</small>
</li>
<li class="lcta documentation">
<a href="http://kohanaframework.org/3.1/guide/">
Kohana v3.1 Documentation
</a>
</li>
<li class="lcta documentation">
<a href="http://kohanaframework.org/3.0/guide/">
Kohana v3.0 Documentation
</a>
</li>
</ul>
<p>
- Documentation is also included in the userguide module in all releases.
+ Documentation is also included in the userguide module in all releases.
Once the <code>userguide module</code> is enabled in the bootstrap, it
- is accessible from your site with <code>/index.php/guide</code> (or
+ is accessible from your site with <code>/index.php/guide</code> (or
just <code>/guide</code> if you are rewriting your urls).
</p>
<p>
- Kohana v3.x is self-documenting when the <code>userguide module</code>
+ Kohana v3.x is self-documenting when the <code>userguide module</code>
is enabled. If you follow the documentation conventions when developing
your application, your documentation will grow with your application.
</p>
<h2>Version 2</h2>
<p>
- For documenation of v2.x, please use the
+ For documenation of v2.x, please use the
<a href="http://docs.kohanaphp.com/">Kohana Documentation Wiki</a>.
</p>
<h2>I still need help!</h2>
<p>
- The <a href="index.html#community">Kohana user community</a> may be
+ The <a href="{{home_url}}#community">Kohana user community</a> may be
able to help you find the answer you are looking for.
</p>
</section>
\ No newline at end of file
diff --git a/application/templates/partials/footer.mustache b/application/templates/partials/footer.mustache
index 1f57ab5..570cfdf 100644
--- a/application/templates/partials/footer.mustache
+++ b/application/templates/partials/footer.mustache
@@ -1,5 +1,5 @@
<p>
- Copyright © 2007–{{year}}. The awesome
- <a href="team.html">Kohana Team</a>. Kohana is
- <a href="license.html">licensed</a> under the BSD License.
+ Copyright © 2007–{{year}}. The awesome
+ <a href="{{team_url}}">Kohana Team</a>. Kohana is
+ <a href="{{license_url}}">licensed</a> under the BSD License.
</p>
diff --git a/application/templates/partials/header.mustache b/application/templates/partials/header.mustache
index 088b3c1..3564208 100644
--- a/application/templates/partials/header.mustache
+++ b/application/templates/partials/header.mustache
@@ -1,9 +1,9 @@
-<h1><a href="index.html">Kohana</a></h1>
+<h1><a href="{{home_url}}">Kohana</a></h1>
<nav>
<ul>
- <li{{#menu_home}} class="active"{{/menu_home}}><a href="index.html">Home</a></li>
- <li{{#menu_download}} class="active"{{/menu_download}}><a href="download.html">Download</a></li>
- <li{{#menu_documentation}} class="active"{{/menu_documentation}}><a href="documentation.html">Documentation</a></li>
- <li{{#menu_development}} class="active"{{/menu_development}}><a href="development.html">Development</a></li>
+ <li{{#menu_home}} class="active"{{/menu_home}}><a href="{{home_url}}">Home</a></li>
+ <li{{#menu_download}} class="active"{{/menu_download}}><a href="{{download_url}}">Download</a></li>
+ <li{{#menu_documentation}} class="active"{{/menu_documentation}}><a href="{{documentation_url}}">Documentation</a></li>
+ <li{{#menu_development}} class="active"{{/menu_development}}><a href="{{development_url}}">Development</a></li>
</ul>
</nav>
\ No newline at end of file
diff --git a/application/templates/partials/home/banner.mustache b/application/templates/partials/home/banner.mustache
index 2ead698..732e050 100644
--- a/application/templates/partials/home/banner.mustache
+++ b/application/templates/partials/home/banner.mustache
@@ -1,5 +1,5 @@
<h2>An elegant HMVC PHP5 framework that provides a rich set of components for building web applications.</h2>
<div class="download">
<a class="cta" href="{{download_link}}"><span>Download</span> <br />{{download_version}}</a>
- <a href="download.html">Or download other releases</a>
+ <a href="{{download_url}}">Or download other releases</a>
</div>
\ No newline at end of file
|
kohana/kohanaframework.org | f1b81fb4bd57746b82fd459d37acc30c876eec20 | Added note about where to find unsupported versions of Kohana. | diff --git a/application/templates/download/body.mustache b/application/templates/download/body.mustache
index 5ea4941..be07f38 100644
--- a/application/templates/download/body.mustache
+++ b/application/templates/download/body.mustache
@@ -1,27 +1,32 @@
<section class="textHeavy">
<h1>Download</h1>
<p>Kohana has two different versions to choose from. All versions are supported for one year from the release date.</p>
<div id="stable" class="border">
<div class="download"><a class="cta" href="{{latest_download}}"><span>Download</span> <br />{{latest_version}}</a></div>
<h3>{{latest_version}} <small>"{{latest_codename}}"</small> <i>{{latest_status}}</i></h3>
-
+
<p>Current stable release of the 3.2.x series, this is the recommended version for all new projects. Support will last until {{latest_support_until}}.</p>
<ul>
<li class="lcta changes"><a href="{{latest_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{latest_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{latest_issues}}">Issues</a></li>
</ul>
</div>
</section>
<div class="lightBkg inset textHeavy">
<h2>Supported version</h2>
<h3>{{support_version}} <small>"{{support_codename}}"</small> <i>{{support_status}}</i></h3>
<p>Officially supported maintenance version. Support will last until {{support_until}}.</p>
<ul>
<li class="lcta dl"><a href="{{support_download}}">Download</a></li>
<li class="lcta changes"><a href="{{support_changelog}}">Changes</a></li>
<li class="lcta documentation"><a href="{{support_documentation}}">Documentation</a></li>
<li class="lcta issues"><a href="{{support_issues}}">Issues</a></li>
</ul>
</div>
+
+<div class="lightBkg inset textHeavy">
+ <h2>Looking for an older version?</h2>
+ <p>You can find unsupported versions of Kohana in the <a href="http://dev.kohanaframework.org/projects/kohana3/files">3.x archives</a> or <a href="http://dev.kohanaframework.org/projects/kohana2/files">2.x archives</a></p>
+</div>
\ No newline at end of file
|
kohana/kohanaframework.org | 7a18781954c487da8355ee477d03b81ee93b355e | Remove .html from links to make them compatible with the old urls. | diff --git a/application/bootstrap.php b/application/bootstrap.php
index 8e7488e..f240172 100644
--- a/application/bootstrap.php
+++ b/application/bootstrap.php
@@ -1,184 +1,184 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
// Load the core Kohana class
require SYSPATH.'classes/kohana/core'.EXT;
if (is_file(APPPATH.'classes/kohana'.EXT))
{
// Application extends the core
require APPPATH.'classes/kohana'.EXT;
}
else
{
// Load empty core extension
require SYSPATH.'classes/kohana'.EXT;
}
/**
* Set the default time zone.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
/**
* Set the default locale.
*
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/setlocale
*/
setlocale(LC_ALL, 'en_US.utf-8');
/**
* Enable the Kohana auto-loader.
*
* @see http://kohanaframework.org/guide/using.autoloading
* @see http://php.net/spl_autoload_register
*/
spl_autoload_register(array('Kohana', 'auto_load'));
/**
* Enable the Kohana auto-loader for unserialization.
*
* @see http://php.net/spl_autoload_call
* @see http://php.net/manual/var.configuration.php#unserialize-callback-func
*/
ini_set('unserialize_callback_func', 'spl_autoload_call');
// -- Configuration and initialization -----------------------------------------
/**
* Set the default language
*/
I18n::lang('en-us');
/**
* Set Kohana::$environment if a 'KOHANA_ENV' environment variable has been supplied.
*
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}
/**
* Initialize Kohana, setting the default options.
*
* The following options are available:
*
* - string base_url path, and optionally domain, of your application NULL
* - string index_file name of your index file, usually "index.php" index.php
* - string charset internal character set used for input and output utf-8
* - string cache_dir set the internal cache directory APPPATH/cache
* - boolean errors enable or disable error handling TRUE
* - boolean profile enable or disable internal profiling TRUE
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
));
/**
* Attach the file write to logging. Multiple writers are supported.
*/
Kohana::$log->attach(new Log_File(APPPATH.'logs'));
/**
* Attach a file reader to config. Multiple readers are supported.
*/
Kohana::$config->attach(new Config_File);
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
//'auth' => MODPATH.'auth', // Basic authentication
'cache' => MODPATH.'cache', // Custom caching
//'codebench' => MODPATH.'codebench', // Benchmarking tool
//'database' => MODPATH.'database', // Database access
//'image' => MODPATH.'image', // Image manipulation
//'oauth' => MODPATH.'oauth', // OAuth authentication
//'orm' => MODPATH.'orm', // Object Relationship Mapping
//'pagination' => MODPATH.'pagination', // Paging of results
//'userguide' => MODPATH.'userguide', // User guide and API documentation
'kostache' => MODPATH.'kostache', // Kostache templating
));
/*
* We want to show the world we're running on... Kohana of course!
*/
Kohana::$expose = TRUE;
/**
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
-Route::set('download', 'download.html')
+Route::set('download', 'download')
->defaults(array(
'controller' => 'download',
'action' => 'index'
));
-Route::set('documentation', 'documentation.html')
+Route::set('documentation', 'documentation')
->defaults(array(
'controller' => 'documentation',
'action' => 'index'
));
-Route::set('development', 'development.html')
+Route::set('development', 'development')
->defaults(array(
'controller' => 'development',
'action' => 'index'
));
-Route::set('team', 'team.html')
+Route::set('team', 'team')
->defaults(array(
'controller' => 'team',
'action' => 'index'
));
-Route::set('license', 'license.html')
+Route::set('license', 'license')
->defaults(array(
'controller' => 'license',
'action' => 'index'
));
-Route::set('home', '(index.html)')
+Route::set('home', '(index)')
->defaults(array(
'controller' => 'home',
'action' => 'index'
));
// // Handles: feed/$type.rss and feed/$type.atom
// Route::set('feed', 'feed/<name>', array('name' => '.+'))
// ->defaults(array(
// 'controller' => 'feed',
// 'action' => 'load',
// ));
-//
+//
// // Handles: download/$file
// Route::set('file', 'download/<file>', array('file' => '.+'))
// ->defaults(array(
// 'controller' => 'file',
// 'action' => 'get',
// ));
-//
+//
// // Handles: donate
// Route::set('donate', 'donate(/<action>)')
// ->defaults(array(
// 'controller' => 'donate',
// 'action' => 'index',
// ));
-//
+//
// // Handles: $lang/$page and $page
// Route::set('page', '((<lang>/)<page>)', array('lang' => '[a-z]{2}', 'page' => '.+'))
// ->defaults(array(
// 'controller' => 'page',
// 'action' => 'load',
// ));
\ No newline at end of file
|
kohana/kohanaframework.org | 3703fdad0ec6f8dbc0dac6b06e7ce58cf956e120 | fixing links relating to the 3.2.0 release | diff --git a/application/config/files.php b/application/config/files.php
index 4d52819..b0ca1b8 100644
--- a/application/config/files.php
+++ b/application/config/files.php
@@ -1,24 +1,24 @@
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'kohana-latest' => array(
'version' => 'v3.2.0',
'codename' => 'kolibri',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1656/kohana-3.2.0.zip',
- 'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=49',
+ 'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=50',
'documentation' => 'http://kohanaframework.org/3.2/guide/',
- 'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=48',
+ 'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=37',
'support_until' => 'July, 2012'
),
'support' => array(
'version' => 'v3.1.4',
'codename' => 'vespertinus',
'status' => 'stable',
'download' => 'http://dev.kohanaframework.org/attachments/download/1655/kohana-3.1.4.zip',
'changelog' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=45',
'documentation' => 'http://kohanaframework.org/3.1/guide/',
'issues' => 'http://dev.kohanaframework.org/projects/kohana3/issues?query_id=48',
'support_until' => 'February, 2012'
),
);
\ No newline at end of file
|
kohana/kohanaframework.org | 2dfb4c8debaab8348547242f107f99b004e33820 | replacing links to kohanaphp.com with kohanaframework.org (except old docs) | diff --git a/application/templates/development/body.mustache b/application/templates/development/body.mustache
index 687fb9b..1fa746b 100644
--- a/application/templates/development/body.mustache
+++ b/application/templates/development/body.mustache
@@ -1,39 +1,39 @@
<section class="textHeavy">
<h1>Development</h1>
<p>
<b>
- All official development is by the
- <a href="team.html">Kohana Team</a> and tracked on our
+ All official development is by the
+ <a href="team.html">Kohana Team</a> and tracked on our
<a href="http://dev.kohanaframework.org/">developer site</a>.
</b>
</p>
<p>
- If you want to report a bug or make a features request, use the
+ If you want to report a bug or make a features request, use the
following links:
</p>
<ul>
<li class="lcta issues">
- <a href="http://dev.kohanaphp.com/projects/kohana3/issues">
+ <a href="http://dev.kohanaframework.org/projects/kohana3/issues">
v3.x issues
</a>
</li>
<li class="lcta issues">
- <a href="http://dev.kohanaphp.com/projects/kohana2/issues">
+ <a href="http://dev.kohanaframework.org/projects/kohana2/issues">
v2.x issues
</a>
</li>
</ul>
<p>
- If you want to get involved in core development, please submit patches
- for existing issues. Developers are added to
+ If you want to get involved in core development, please submit patches
+ for existing issues. Developers are added to
<a href="team.html">the team</a> by <strong>invitation only</strong>.
</p>
<h2>Extending Kohana</h2>
<p id="github">
- Kohana has a vibrant development community that provide modules to
+ Kohana has a vibrant development community that provide modules to
extend and enhance the core framework. If you have a great module that
you wish to share with the community, why not put it on
<a href="http://github.com">Github</a>?
</p>
</section>
\ No newline at end of file
diff --git a/application/views/pages/community.php b/application/views/pages/community.php
index 0e1d246..b3ecaa4 100644
--- a/application/views/pages/community.php
+++ b/application/views/pages/community.php
@@ -1,52 +1,52 @@
<div id="community" class="span-22 prefix-1 suffix-1 last">
<h1>Connect and Share</h1>
<p class="intro">An open source project is nothing without a community.</p>
<dl>
- <dt><?php echo HTML::anchor('http://forum.kohanaphp.com/', HTML::image('media/img/community_icon/forum.png', array('alt' => 'Forum'))) ?></dt>
+ <dt><?php echo HTML::anchor('http://forum.kohanaframework.org/', HTML::image('media/img/community_icon/forum.png', array('alt' => 'Forum'))) ?></dt>
<dd>
- <h3><?php echo HTML::anchor('http://forum.kohanaphp.com/', 'Forum') ?></h3>
- Official announcements, community support, and feedback can be found on our <?php echo HTML::anchor('http://forum.kohanaphp.com/', 'community forum') ?>.
+ <h3><?php echo HTML::anchor('http://forum.kohanaframework.org/', 'Forum') ?></h3>
+ Official announcements, community support, and feedback can be found on our <?php echo HTML::anchor('http://forum.kohanaframework.org/', 'community forum') ?>.
</dd>
<dt><?php echo HTML::anchor('irc://irc.freenode.net/kohana', HTML::image('media/img/community_icon/irc.png', array('alt' => 'IRC'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('irc://irc.freenode.net/kohana', 'IRC') ?></h3>
Chat with follow Kohana users at <?php echo HTML::anchor('irc://irc.freenode.net/kohana', '#kohana on freenode') ?>.
</dd>
<dt><?php echo HTML::anchor('http://github.com/kohana', HTML::image('media/img/community_icon/github.png', array('alt' => 'GitHub'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('http://github.com/kohana', 'Github') ?></h3>
The easiest way to contribute to v3.x is to <?php echo HTML::anchor('http://github.com/kohana', 'fork us on GitHub') ?>.
</dd>
<dt><?php echo HTML::anchor('http://twitter.com/KohanaPHP', HTML::image('media/img/community_icon/twitter.png', array('alt' => 'Twitter'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('http://twitter.com/KohanaPHP', 'Twitter') ?></h3>
Read release announcements and random things about Kohana by <?php echo HTML::anchor('http://twitter.com/KohanaPHP', 'following us') ?>.
</dd>
<dt><?php echo HTML::anchor('http://www.facebook.com/group.php?gid=140164501435', HTML::image('media/img/community_icon/facebook.png', array('alt' => 'Facebook'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('http://www.facebook.com/group.php?gid=140164501435', 'Facebook') ?></h3>
Join the <?php echo HTML::anchor('http://www.facebook.com/group.php?gid=140164501435', 'Facebook group') ?> and find other users.
</dd>
<dt><?php echo HTML::anchor('http://stackoverflow.com/questions/tagged/kohana', HTML::image('media/img/community_icon/stackoverflow.png', array('alt' => 'Stack Overflow'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('http://stackoverflow.com/questions/tagged/kohana', 'Stack Overflow') ?></h3>
Share your knowledge by answering <?php echo HTML::anchor('http://stackoverflow.com/questions/tagged/kohana', 'user questions') ?> about Kohana.
</dd>
<dt class="last"><?php echo HTML::anchor('http://www.ohloh.net/p/ko3', HTML::image('media/img/community_icon/ohloh.png', array('alt' => 'Ohloh'))) ?></dt>
<dd>
<h3><?php echo HTML::anchor('http://www.ohloh.net/p/ko3', 'Ohloh') ?></h3>
View project information and give Kudos for <?php echo HTML::anchor('http://www.ohloh.net/p/ko3', 'v3.x') ?> and <?php echo HTML::anchor('http://www.ohloh.net/p/Kohana', 'v2.x') ?>.
</dd>
</dl>
</div>
\ No newline at end of file
diff --git a/application/views/pages/development.php b/application/views/pages/development.php
index 9952259..e01cd51 100644
--- a/application/views/pages/development.php
+++ b/application/views/pages/development.php
@@ -1,18 +1,18 @@
<div class="span-22 prefix-1 suffix-1 last">
<h1>How does Kohana work?</h1>
- <p class="intro">All official development is by the <?php echo HTML::anchor('team', 'Kohana Team') ?> and tracked on our <?php echo HTML::anchor('http://dev.kohanaphp.com/', 'developer site') ?>.</p>
+ <p class="intro">All official development is by the <?php echo HTML::anchor('team', 'Kohana Team') ?> and tracked on our <?php echo HTML::anchor('http://dev.kohanaframework.org/', 'developer site') ?>.</p>
<p>If you want to report a bug or make a features request, use the following links:</p>
<ul>
- <li><?php echo HTML::anchor('http://dev.kohanaphp.com/projects/kohana3/issues', 'v3.x issues') ?></li>
- <li><?php echo HTML::anchor('http://dev.kohanaphp.com/projects/kohana2/issues', 'v2.x issues') ?></li>
+ <li><?php echo HTML::anchor('http://dev.kohanaframework.org/projects/kohana3/issues', 'v3.x issues') ?></li>
+ <li><?php echo HTML::anchor('http://dev.kohanaframework.org/projects/kohana2/issues', 'v2.x issues') ?></li>
</ul>
<p>If you want to get involved in core development, please submit patches for existing issues. Developers are added to <?php echo HTML::anchor('team', 'the team') ?> by <strong>invitation only</strong>.</p>
<h2>Can you host my project?</h2>
- <p>Yes, we do offer hosting for addons and projects built using Kohana. Please post in the <?php echo HTML::anchor('http://forum.kohanaphp.com/comments.php?DiscussionID=2018', 'projects thread') ?> to have an admin create a project for you. Hosted projects get issue tracking, repository viewing, wiki, and news posting capabilities. If requested, we can also provide SVN repository hosting for your project. You may also use your own <?php echo HTML::anchor('http://git-scm.com/', 'Git') ?>, <?php echo HTML::anchor('http://mercurial.selenic.com/wiki/', 'Mercurial') ?>, or <?php echo HTML::anchor('http://bazaar-vcs.org/', 'Bazaar') ?> repository for your project.</p>
+ <p>Yes, we do offer hosting for addons and projects built using Kohana. Please post in the <?php echo HTML::anchor('http://forum.kohanaframework.org/comments.php?DiscussionID=2018', 'projects thread') ?> to have an admin create a project for you. Hosted projects get issue tracking, repository viewing, wiki, and news posting capabilities. If requested, we can also provide SVN repository hosting for your project. You may also use your own <?php echo HTML::anchor('http://git-scm.com/', 'Git') ?>, <?php echo HTML::anchor('http://mercurial.selenic.com/wiki/', 'Mercurial') ?>, or <?php echo HTML::anchor('http://bazaar-vcs.org/', 'Bazaar') ?> repository for your project.</p>
</div>
\ No newline at end of file
diff --git a/application/views/pages/download.php b/application/views/pages/download.php
index 7860fb7..bc5efc0 100644
--- a/application/views/pages/download.php
+++ b/application/views/pages/download.php
@@ -1,36 +1,36 @@
<div id="download" class="span-22 prefix-1 suffix-1 last">
<h1>Get yours today!</h1>
<p class="intro">Kohana has a couple different versions to choose from. All major versions are <a href="https://github.com/kohana/kohana/wiki/Kohana-Development-Procedures">supported</a> for one year from the release date.</p>
<!-- <p>Releases follow the format of <code>release.major.minor.bugfix</code>. Bugfix releases will never make any feature or API changes. Minor versions may introduce new features that do not change the API. Major versions may introduce new features that require changing the API. Upgrading between minor and bugfix versions will never break an application, except in the case of a serious security flaw being discovered. <small>To date, this has never happened.</small></p> -->
<div class="featured span-10 suffix-1 colborder">
<div class="package span-10">
<?php $version = Kohana::config('files.kohana-latest') ?>
<h2><?php echo $version['version'] ?> <small class="fancy">"<?php echo $version['codename'] ?>"</small> <small class="status">stable</small></h2>
<p class="description">Latest stable release of the 3.x series, this is the recommended version for all new projects. Support will last until February 2012.</p>
<ul class="links">
<li><?php echo HTML::anchor($version['download'], 'Download', array('class' => 'download')) ?></li>
<li><?php echo HTML::anchor($version['changelog'], 'Changes', array('class' => 'changelog')) ?></li>
<li><?php echo HTML::anchor($version['documentation'], 'Documentation', array('class' => 'documentation')) ?></li>
- <li><?php echo HTML::anchor('http://dev.kohanaphp.com/projects/kohana3/issues', 'Issues', array('class' => 'issues')) ?></li>
+ <li><?php echo HTML::anchor('http://dev.kohanaframework.org/projects/kohana3/issues', 'Issues', array('class' => 'issues')) ?></li>
</ul>
</div>
</div>
<div class="featured span-10 prefix-1 last">
<div class="package span-10">
<?php $version = Kohana::config('files.kohana-3.0.x') ?>
<h2><?php echo $version['version'] ?> <small class="fancy">"<?php echo $version['codename'] ?>"</small> <small class="status">stable</small></h2>
<p class="description">3.0.x maintenance branch. Support will last until July 2011.<br /><br /></p>
<ul class="links">
<li><?php echo HTML::anchor($version['download'], 'Download', array('class' => 'download')) ?></li>
<li><?php echo HTML::anchor($version['changelog'], 'Changes', array('class' => 'changelog')) ?></li>
<li><?php echo HTML::anchor($version['documentation'], 'Documentation', array('class' => 'documentation')) ?></li>
- <li><?php echo HTML::anchor('http://dev.kohanaphp.com/projects/kohana3/issues', 'Issues', array('class' => 'issues')) ?></li>
+ <li><?php echo HTML::anchor('http://dev.kohanaframework.org/projects/kohana3/issues', 'Issues', array('class' => 'issues')) ?></li>
</ul>
</div>
</div>
<p class="release">Looking for an older version? You can find unsupported versions of Kohana in the <a href="http://dev.kohanaframework.org/projects/kohana3/files">3.x archives</a> or <a href="http://dev.kohanaframework.org/projects/kohana2/files">2.x archives</a></p>
</div>
|
kohana/kohanaframework.org | 0d87e54aa126c5884fb501cece82bd10827d3dc9 | making the links to the assets a little more flexible by using the base url | diff --git a/application/classes/view/base.php b/application/classes/view/base.php
index 6aad6a1..723dcc2 100644
--- a/application/classes/view/base.php
+++ b/application/classes/view/base.php
@@ -1,73 +1,83 @@
<?php defined('SYSPATH') or die('No direct script access.');
class View_Base extends Kostache {
/**
* @var array partials for the page
*/
protected $_partials = array(
'header' => 'partials/header',
'footer' => 'partials/footer',
);
/**
* @var string overloading the template to lock to base
*/
protected $_template = 'base';
/**
* @var string title of the site
*/
public $title = 'Kohana: The Swift PHP Framework';
/**
* @var boolean show the banner space on template
*/
public $banner_exists = FALSE;
/**
* @var string description of the page
*/
public $description = 'Kohana homepage. Kohana is an HMVC PHP5 framework
that provides a rich set of components for building web applications.';
/**
* Return the charset for the page
*
* @return string
*/
public function charset()
{
return Kohana::$charset;
- }
+ }
/**
* Return the language for the page
*
* @return string
*/
public function language()
{
return I18n::$lang;
}
/**
* Return the full year (for copyright notice)
*
* @return string
*/
public function year()
{
return date('Y');
}
/**
* Turn on the google analytics in production
*
* @return boolean
*/
public function stats()
{
return Kohana::$environment === Kohana::PRODUCTION;
}
+
+ /**
+ * Returns URL::base() in order to link to assets properly
+ *
+ * @return string
+ */
+ public function base_url()
+ {
+ return URL::base();
+ }
}
\ No newline at end of file
diff --git a/application/templates/base.mustache b/application/templates/base.mustache
index 3e56fb5..e7c50b2 100644
--- a/application/templates/base.mustache
+++ b/application/templates/base.mustache
@@ -1,78 +1,78 @@
-<!doctype html>
-<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
+<!doctype html>
+<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="{{language}}" class="no-js"> <!--<![endif]-->
<head>
<meta charset="{{charset}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="author" content="Kohana Framework">
<meta name="viewport" content="width=device-width">
-<link rel="shortcut icon" href="/favicon.ico">
-<link rel="apple-touch-icon" href="/apple-touch-icon.png">
-<link rel="stylesheet" href="/assets/css/style.css">
+<link rel="shortcut icon" href="{{base_url}}favicon.ico">
+<link rel="apple-touch-icon" href="{{base_url}}apple-touch-icon.png">
+<link rel="stylesheet" href="{{base_url}}assets/css/style.css">
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
-<script src="/assets/js/libs/modernizr-1.6.min.js"></script>
+<script src="{{base_url}}assets/js/libs/modernizr-1.6.min.js"></script>
</head>
<body>
<div class="wrapper">
<header>
{{>header}}
</header>
{{#banner_exists}}
<section id="banner">
{{>banner}}
</section> <!-- END section#banner -->
{{/banner_exists}}
<div class="container">
{{{body}}}
<footer class="inset">
{{>footer}}
</footer>
</div> <!-- END div.container -->
-
+
</div> <!-- END div.wrapper -->
<!-- Javascript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script>
-
+
<!-- scripts concatenated and minified via ant build script-->
-<script src="/assets/js/plugins.js"></script>
-<script src="/assets/js/script.js"></script>
+<script src="{{base_url}}assets/js/plugins.js"></script>
+<script src="{{base_url}}assets/js/script.js"></script>
<!-- end concatenated and minified scripts-->
-
+
<!--[if lt IE 7 ]>
-<script src="/assets/js/libs/dd_belatedpng.js"></script>
+<script src{{base_url}}assets/js/libs/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
<![endif]-->
{{#stats}}
<!-- Google Analytics -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-16034102-1");
pageTracker._setDomainName(".kohanaframework.org");
pageTracker._trackPageview();
} catch(err) {}
</script>
{{/stats}}
</body>
</html>
\ No newline at end of file
diff --git a/application/templates/home/gallery.mustache b/application/templates/home/gallery.mustache
index cee5edc..7b78e46 100644
--- a/application/templates/home/gallery.mustache
+++ b/application/templates/home/gallery.mustache
@@ -1,15 +1,15 @@
<section id="gallery" class="medBkg inset">
<h2>Gallery</h2>
<!--<ul class="sliderNav">
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
</ul>-->
<div class="sliderContent">
<ul>
- <li><a href="http://kids-myshot.nationalgeographic.com/"><img src="/assets/img/gallery/thumb/national-geographic-kids.jpg" width="200" height="169" alt="Your shots: National Geographic Kids" /></a></li>
- <li><a href="http://www.sittercity.com/"><img src="/assets/img/gallery/thumb/sittercity.jpg" width="200" height="169" alt="Sittercity" /></a></li>
- <li><a href="http://mukuru.com/"><img src="/assets/img/gallery/thumb/mukuru.jpg" width="200" height="169" alt="Mukuru.com" /></a></li>
+ <li><a href="http://kids-myshot.nationalgeographic.com/"><img src="{{base_url}}assets/img/gallery/thumb/national-geographic-kids.jpg" width="200" height="169" alt="Your shots: National Geographic Kids" /></a></li>
+ <li><a href="http://www.sittercity.com/"><img src="{{base_url}}assets/img/gallery/thumb/sittercity.jpg" width="200" height="169" alt="Sittercity" /></a></li>
+ <li><a href="http://mukuru.com/"><img src="{{base_url}}assets/img/gallery/thumb/mukuru.jpg" width="200" height="169" alt="Mukuru.com" /></a></li>
</ul>
</div>
</section> <!-- END section#gallery -->
\ No newline at end of file
diff --git a/application/templates/home/social.mustache b/application/templates/home/social.mustache
index 0bc4bba..14607e5 100644
--- a/application/templates/home/social.mustache
+++ b/application/templates/home/social.mustache
@@ -1,61 +1,61 @@
<div id="social" class="lightBkg">
-
+
<section id="community">
<h2>Community</h2>
<ul>
<li>
<a href="http://forum.kohanaframework.org" id="forum" class="icon">
<h3>Forum</h3>
Official announcements, community support, and feedback.
</a>
</li>
<li>
<a href="irc://irc.freenode.net/kohana" id="irc" class="icon">
<h3>IRC</h3>
Chat with follow Kohana users at #kohana on freenode.
</a>
</li>
<li>
<a href="http://github.com/kohana" id="github" class="icon">
<h3>Github</h3>
The easiest way to contribute to v3.x is to fork us on GitHub.
</a>
</li>
<li>
<a href="http://www.facebook.com/group.php?gid=140164501435" id="facebook" class="icon">
<h3>Facebook</h3>
- Join the Facebook group and find other users.
+ Join the Facebook group and find other users.
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/kohana" id="stackoverflow" class="icon">
<h3>Stack Overflow</h3>
Share your knowledge by answering user questions about Kohana.
</a>
</li>
<li>
<a href="http://www.ohloh.net/p/ko3" id="ohloh" class="icon">
<h3>Ohloh</h3>
View project information and give Kudos for Kohana.
</a>
</li>
<!-- Coming soon
<li class="tweet">
<h3>Twitter</h3>
<q>#Kohana v3.0.8 has just been released! Download <a href="#">http://cl.ly/2VGe</a> Discuss <a href="#">http://cl.ly/2Upi</a> Issues <a href="#">http://cl.ly/2UpH</a></q>
<time datetime="2010-09-22T21:01+00:00" pubdate><a href="#">9:01 PM Sep 22nd</a></time>
<p class="twitter"><a href="#">Follow <span>@KohanaPHP</span> <span>on Twitter!</span></a></p>
</li> -->
</ul>
</section> <!-- END section#community -->
-
+
<section id="giving" class="box">
<h2>Giving back</h2>
- <img src="/assets/img/giving.png" width="48" height="48" />
+ <img src="{{base_url}}assets/img/giving.png" width="48" height="48" />
<p>If you use Kohana, we ask that you donate to ensure future development is possible.</p>
<h3>Where will my money go?</h3>
<p>Your donations are used to cover the cost of maintaining this website and related resources, and services required to provide these resources.</p>
<p>As part of the Software Freedom Conservancy, your donations are fully tax-deductible to the extent permitted by law.</p>
</section> <!-- END section#giving -->
</div>
\ No newline at end of file
diff --git a/application/templates/home/whouses.mustache b/application/templates/home/whouses.mustache
index e6d97a7..62645d2 100644
--- a/application/templates/home/whouses.mustache
+++ b/application/templates/home/whouses.mustache
@@ -1,10 +1,10 @@
<section id="who" class="darkBkg inset">
<h2>Who uses Kohana?</h2>
<ul>
- <li><img src="/assets/img/whoSittercity.png" width="110" height="33" alt="Sittercity" /></li>
- <li><img src="/assets/img/whoKohort.png" width="110" height="28" alt="Kohort" /></li>
- <li><img src="/assets/img/whoNationalGeographic.png" width="110" height="33" alt="National Geographic" /></li>
- <li><img src="/assets/img/whoMukuru.png" width="110" height="23" alt="Mukuru.com" /></li>
+ <li><img src="{{base_url}}assets/img/whoSittercity.png" width="110" height="33" alt="Sittercity" /></li>
+ <li><img src="{{base_url}}assets/img/whoKohort.png" width="110" height="28" alt="Kohort" /></li>
+ <li><img src="{{base_url}}assets/img/whoNationalGeographic.png" width="110" height="33" alt="National Geographic" /></li>
+ <li><img src="{{base_url}}assets/img/whoMukuru.png" width="110" height="23" alt="Mukuru.com" /></li>
</ul>
<p>These are some of the people already using Kohana. <a href="http://forum.kohanaframework.org">See more on the Forums.</a></p>
</section> <!-- END section#who -->
\ No newline at end of file
|
kohana/kohanaframework.org | b13233d979e396d46cccaa20374d074b3d61411d | Turned on full page caching if in Production | diff --git a/application/classes/controller.php b/application/classes/controller.php
new file mode 100644
index 0000000..5c219ab
--- /dev/null
+++ b/application/classes/controller.php
@@ -0,0 +1,17 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+
+class Controller extends Kohana_Controller
+{
+ /**
+ * Add caching to pages if in production
+ *
+ * @return void
+ */
+ public function after()
+ {
+ if (Kohana::$environment === Kohana::PRODUCTION)
+ {
+ $this->response->headers('cache-control', 'max-age=3600, public');
+ }
+ }
+}
\ No newline at end of file
|
kohana/kohanaframework.org | 5eacf01082e3601d89657defa695cd744f991aa4 | Final modification to the header background colour to bring it closure to the current theme | diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index a4010cd..2e6d673 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,441 +1,441 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
-body { background-color:#cdda9e; background-image:url(../img/headerBkg.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
+body { background-color:#cdda9e; background-image:url(../img/headerBkg-2.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who, #gallery { height:220px; }
#who { width:280px; float:left; }
#gallery { width:620px; float:right; position:relative; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who ul { margin:0; overflow:hidden; }
#who li { list-style:none; display:inline; margin:0 9px; }
#who img { vertical-align:middle; margin-bottom:17px; }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
\ No newline at end of file
diff --git a/public/assets/img/headerBkg-2.png b/public/assets/img/headerBkg-2.png
new file mode 100644
index 0000000..0d28378
Binary files /dev/null and b/public/assets/img/headerBkg-2.png differ
|
kohana/kohanaframework.org | a5ab4ce98af1f6d0ff9609f6036b3e7ee18de0d7 | Finished 2.0 release version. Currently without any enhancement, which will follow in the coming weeks | diff --git a/application/templates/development/body.mustache b/application/templates/development/body.mustache
index c0c5ad0..687fb9b 100644
--- a/application/templates/development/body.mustache
+++ b/application/templates/development/body.mustache
@@ -1,49 +1,39 @@
<section class="textHeavy">
<h1>Development</h1>
<p>
<b>
All official development is by the
<a href="team.html">Kohana Team</a> and tracked on our
<a href="http://dev.kohanaframework.org/">developer site</a>.
</b>
</p>
<p>
If you want to report a bug or make a features request, use the
following links:
</p>
<ul>
<li class="lcta issues">
<a href="http://dev.kohanaphp.com/projects/kohana3/issues">
v3.x issues
</a>
</li>
<li class="lcta issues">
<a href="http://dev.kohanaphp.com/projects/kohana2/issues">
v2.x issues
</a>
</li>
</ul>
<p>
If you want to get involved in core development, please submit patches
for existing issues. Developers are added to
<a href="team.html">the team</a> by <strong>invitation only</strong>.
</p>
- <h2>Can you host my project?</h2>
- <p>
- Yes, we do offer hosting for addons and projects built using Kohana.
- Please post in the <a href="http://forum.kohanaphp.com/comments.php?DiscussionID=2018">
- projects thread</a> to have an admin create a project for you. Hosted
- projects get issue tracking, repository viewing, wiki, and news posting
- capabilities. If requested, we can also provide SVN repository hosting
- for your project. You may also use your own
- <a href="http://git-scm.com/">Git</a>,
- <a href="http://mercurial.selenic.com/wiki/">Mercurial</a>, or
- <a href="http://bazaar-vcs.org/">Bazaar</a> repository for your
- project.
- </p>
+ <h2>Extending Kohana</h2>
<p id="github">
- We highly recommend hosting your open source project on
- <a href="http://github.com">Github</a> as a free alternative.
+ Kohana has a vibrant development community that provide modules to
+ extend and enhance the core framework. If you have a great module that
+ you wish to share with the community, why not put it on
+ <a href="http://github.com">Github</a>?
</p>
</section>
\ No newline at end of file
diff --git a/application/templates/home/gallery.mustache b/application/templates/home/gallery.mustache
index 98c9115..e98c2b7 100644
--- a/application/templates/home/gallery.mustache
+++ b/application/templates/home/gallery.mustache
@@ -1,15 +1,15 @@
<section id="gallery" class="medBkg inset">
<h2>Gallery</h2>
- <ul class="sliderNav">
+<!--<ul class="sliderNav">
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
- </ul>
+ </ul>-->
<div class="sliderContent">
<ul>
- <li><a href="http://mellowfranchise.com/"><img src="/assets/img/gallery1.jpg" width="200" height="169" alt="Mellow Mushroom website homepage" /></a></li>
- <li><a href="http://emberapp.com/"><img src="/assets/img/gallery2.jpg" width="200" height="261" alt="The Times - Election'10 website homepage" /></a></li>
- <li><a href="http://generalelection2010.timesonline.co.uk/#/Results"><img src="/assets/img/gallery3.jpg" width="200" height="168" alt="Ember website homepage" /></a></li>
+ <li><a href="http://kids-myshot.nationalgeographic.com/"><img src="/assets/img/gallery/thumb/national-geographic-kids.jpg" width="200" height="169" alt="Your shots: National Geographic Kids" /></a></li>
+ <li><a href="http://mukuru.com/"><img src="/assets/img/gallery/thumb/mukuru.jpg" width="200" height="169" alt="Mukuru.com" /></a></li>
+ <li><a href="http://www.ora-ito.com/"><img src="/assets/img/gallery/thumb/ori-ito.jpg" width="200" height="169" alt="Ori-Ito" /></a></li>
</ul>
</div>
</section> <!-- END section#gallery -->
\ No newline at end of file
diff --git a/application/templates/home/social.mustache b/application/templates/home/social.mustache
index 609105e..0bc4bba 100644
--- a/application/templates/home/social.mustache
+++ b/application/templates/home/social.mustache
@@ -1,60 +1,61 @@
<div id="social" class="lightBkg">
<section id="community">
<h2>Community</h2>
<ul>
<li>
<a href="http://forum.kohanaframework.org" id="forum" class="icon">
<h3>Forum</h3>
Official announcements, community support, and feedback.
</a>
</li>
<li>
<a href="irc://irc.freenode.net/kohana" id="irc" class="icon">
<h3>IRC</h3>
Chat with follow Kohana users at #kohana on freenode.
</a>
</li>
<li>
<a href="http://github.com/kohana" id="github" class="icon">
<h3>Github</h3>
The easiest way to contribute to v3.x is to fork us on GitHub.
</a>
</li>
<li>
<a href="http://www.facebook.com/group.php?gid=140164501435" id="facebook" class="icon">
<h3>Facebook</h3>
Join the Facebook group and find other users.
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/kohana" id="stackoverflow" class="icon">
<h3>Stack Overflow</h3>
Share your knowledge by answering user questions about Kohana.
</a>
</li>
<li>
<a href="http://www.ohloh.net/p/ko3" id="ohloh" class="icon">
<h3>Ohloh</h3>
View project information and give Kudos for Kohana.
</a>
</li>
+ <!-- Coming soon
<li class="tweet">
<h3>Twitter</h3>
<q>#Kohana v3.0.8 has just been released! Download <a href="#">http://cl.ly/2VGe</a> Discuss <a href="#">http://cl.ly/2Upi</a> Issues <a href="#">http://cl.ly/2UpH</a></q>
<time datetime="2010-09-22T21:01+00:00" pubdate><a href="#">9:01 PM Sep 22nd</a></time>
<p class="twitter"><a href="#">Follow <span>@KohanaPHP</span> <span>on Twitter!</span></a></p>
- </li>
+ </li> -->
</ul>
</section> <!-- END section#community -->
<section id="giving" class="box">
<h2>Giving back</h2>
<img src="/assets/img/giving.png" width="48" height="48" />
<p>If you use Kohana, we ask that you donate to ensure future development is possible.</p>
<h3>Where will my money go?</h3>
<p>Your donations are used to cover the cost of maintaining this website and related resources, and services required to provide these resources.</p>
<p>As part of the Software Freedom Conservancy, your donations are fully tax-deductible to the extent permitted by law.</p>
</section> <!-- END section#giving -->
</div>
\ No newline at end of file
diff --git a/public/assets/css/style.css b/public/assets/css/style.css
index 57da2bf..a4010cd 100755
--- a/public/assets/css/style.css
+++ b/public/assets/css/style.css
@@ -1,441 +1,441 @@
/*
NOTE: HTML5 Boilerplate defaults edited by Inayaili de León slightly.
HTML5 â° Boilerplate
style.css contains a reset, font normalization and some base styles.
Credit is left where credit is due. Much inspiration was taken from these projects:
yui.yahooapis.com/2.8.1/build/base/base.css
camendesign.com/design/
praegnanz.de/weblog/htmlcssjs-kickstart
*/
/*
RESET
html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
html5doctor.com/html-5-reset-stylesheet/
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; }
nav ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; } /* tables still need cellspacing="0" in the markup */
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
/* END RESET CSS */
/*
fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* Remove arial, helvetica from explicit font stack
* We normalize monospace styles ourselves
* Table font-size is reset in the HTML5 reset above so there is no need to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */
select, input, textarea, button { font:99% sans-serif; }
/*
Normalize monospace sizing:
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
*/
pre, code, kbd, samp { font-family: monospace, sans-serif; }
/*
Minimal base styles
*/
body, select, input, textarea { color:#254241; font:12px/1.5 "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
html { overflow-y: scroll; } /* Always force a scrollbar in non-IE */
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; } /* Remove margins for navigation lists */
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
white-space: pre; /* CSS2 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ }
textarea { overflow:auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
.ie6 legend, .ie7 legend { margin-left:-7px; } /* thnx ivannikolic! */
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; } /* Hand cursor on clickable input elements */
button, input, select, textarea { margin: 0; } /* Webkit browsers add a 2px margin outside the chrome of form elements */
/*
Colors for form validity
*/
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection { background: #8aaa1a; color:#fff; text-shadow: none; }
::selection { background:#8aaa1a; color:#fff; text-shadow: none; }
a:link { -webkit-tap-highlight-color:#8aaa1a; } /* j.mp/webkit-tap-highlight-color */
/*
(EDITED) Make buttons play nice in IE:
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
*/
button { width:auto; overflow:visible; padding:0 .25em; }
/*
Bicubic resizing for non-native sized IMG:
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
.ie7 img { -ms-interpolation-mode: bicubic; }
/*
The Magnificent CLEARFIX: Updated to prevent margin-collapsing on child elements << j.mp/bestclearfix
*/
.clearfix:before, .clearfix:after { content:"\0020"; display:block; height:0; visibility:hidden; }
.clearfix:after { clear:both; }
/*
Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page
*/
.clearfix { zoom:1; }
/*
Layout and boxes
*/
body { background-color:#cdda9e; background-image:url(../img/headerBkg.png); background-repeat:repeat-x; background-position:left top; padding:0 20px 20px 20px; }
/* .wrapper hold all of the content of the site, including header, nav, banner, etc. */
.wrapper { width:980px; margin:auto; }
/* .container holds the content are, excluding header, main nav, logo, banner */
.container { background:#fcf6ea url(../img/contentMainBkg.gif); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; margin-top:20px; }
footer { background:#81a20d url(../img/logoFooter.png) no-repeat 20px center; -moz-border-radius:0 0 5px 5px; -webkit-border-bottom-left-radius:5px; -webkit-border-bottom-right-radius:5px; border-radius:0 0 5px 5px; }
#banner,
.container>section,
.container>div,
footer { padding:17px 20px; }
.container>section:first-child { min-height:320px; }
/* Homepage boxes */
#who, #gallery { height:220px; }
#who { width:280px; float:left; }
#gallery { width:620px; float:right; position:relative; }
#social { clear:both; }
#community { width:700px; float:left; }
#giving { width:200px; float:right; }
/*
General links
*/
a:link, a:visited { color:#578b14; text-decoration:none; }
a:hover, a:active, a:focus { color:#b37921; text-decoration:underline; }
/*
Header and navigation
*/
header { overflow:hidden; }
header h1 { margin-top:23px; float:left; }
header h1 a { background:url(../img/logo-new.png) no-repeat; display:block; width:200px; padding-top:70px; margin-top: -15px; height:0px; overflow:hidden; }
nav { text-transform:uppercase; letter-spacing:1px; font-size:93%; float:right; overflow:hidden; margin-top:24px; position:relative; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; background:rgba(255,255,255,.2); padding:0 12px; }
nav li { float:left; }
nav a:link, nav a:visited { font-weight:bold; text-decoration:none; color:#fff; padding:8px 13px 6px; display:block; text-shadow:0 1px 1px rgba(0,0,0,.2); }
nav a:hover, nav a:active, nav a:focus { color:#fff; background:rgba(255,255,255,.1); }
nav .active a { color:#fff; background:rgba(255,255,255,.3); }
.sliderNav { overflow:hidden; position:absolute; right:20px; top:30px; }
.sliderNav li { float:left; margin-left:5px; list-style:none; }
.sliderNav a { width:10px; height:10px; display:block; background:url(../img/sliderNav.png) no-repeat; text-indent:-10000px; }
.sliderNav a:link,
.sliderNav a:visited { background-position:center bottom; }
.sliderNav .active a,
.sliderNav a:hover,
.sliderNav a:active,
.sliderNav a:focus { background-position:center top; }
/*
Typography: general
*/
.container h1 { font:italic 34px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; } /* Specificity added so it doesn't clash with the logo h1 */
h2 { font:italic 24px Georgia, "Times New Roman", Times, serif; padding-bottom:18px; }
p+h2,
ul+h2,
ol+h2,
.border+h2 { padding-top:14px; }
h3 { font:italic 18px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h3,
ul+h3,
ol+h3,
.border+h3 { padding-top:12px; }
h4 { font:italic 16px Georgia, "Times New Roman", Times, serif; padding-bottom:14px; }
p+h4,
ul+h4,
ol+h4,
.border+h4 { padding-top:12px; }
h5 { font:13px Georgia, "Times New Roman", Times, serif; text-transform:uppercase; letter-spacing:1px; padding-bottom:14px; }
p+h5,
ul+h5,
ol+h5,
.border+h5 { padding-top:12px; }
h6 { font-weight:bold; font-size:13px; padding-bottom:14px; }
p+h6,
ul+h6,
ol+h6,
.border+h6 { padding-top:12px; }
p { padding-bottom:12px; }
p:last-child { padding-bottom:0; }
ul+p,
ol+p,
.border+p { padding-top:12px; }
code, pre, kbd, samp, tt, var { font-family:"Lucida Console", Monaco, "Courier New", Courier, monospace; }
code, pre { color:#B37921; }
pre { padding:17px 20px; margin-bottom:18px; background:rgba(255,255,255,.4); line-height:1.7; }
dl { padding-top:12px; margin-bottom:12px; }
dt { font-weight:bold; text-transform:uppercase; letter-spacing:1px; padding-bottom:4px; }
dd { line-height:1.7; }
b { font-size:120%; }
small { font-size:80%; opacity:.8; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; }
i { font-size:70%; font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; font-weight:bold; text-transform:uppercase; font-style:normal; color:#B37921; }
.darkBkg,
.medBkg { color:#ffffff; }
/*
Typography: exceptions
*/
#community h2 { font:normal bold 18px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
.box h2 { font-size:18px; background:#e5e3d3; padding:9px 11px; -moz-border-radius:5px 5px 0 0; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; border-radius:5px 5px 0 0; margin:-15px -10px 0 -10px; margin-bottom:15px; }
.tweet q:before { content:open-quote; }
.tweet q:after { content:close-quote; }
.tweet q { quotes:"\201c" "\201d" "\2018" "\2019"; text-indent:-20px; }
.tweet time { clear:both; display:block; font:italic 12px Georgia, "Times New Roman", Times, serif; margin-top:5px; }
#giving h3 { text-transform:uppercase; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
/*
Banner
*/
#banner { overflow:hidden; padding-bottom:0; }
#banner h2 { font:bold 30px/34px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:0 1px 1px rgba(0,0,0,.2); color:#ffffff; width:560px; float:left; padding-top:12px; }
.download { width:240px; float:right; margin:30px 0 0 0; }
.download a { clear:both; display:block; color:#fff; }
.download a:last-child { text-align:center; }
#stable .download { margin-top:0; margin-left:20px; }
/*
Lists: Features (Homepage)
*/
#features ul { margin:0; overflow:hidden; }
#features li { list-style:none; padding-left:60px; min-height:48px; width:240px; margin:0 20px 38px 0; float:left; background-position:left 1px; background-repeat:no-repeat; }
#features li:nth-child(3n) { margin-right:0; }
#features li:nth-child(3n+1) { clear:left; }
#features li:nth-last-child(-n+3) { margin-bottom:0; } /* As long as the total features count is always a multiple of 3 */
#features li h3 { text-transform:uppercase; letter-spacing:1px; padding-bottom:6px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }
#features li p { padding:0; }
.feat1 { background-image:url(../img/features-1.png); }
.feat2 { background-image:url(../img/features-2.png); }
.feat3 { background-image:url(../img/features-3.png); }
.feat4 { background-image:url(../img/features-4.png); }
.feat5 { background-image:url(../img/features-5.png); }
.feat6 { background-image:url(../img/features-6.png); }
.feat7 { background-image:url(../img/features-7.png); }
.feat8 { background-image:url(../img/features-8.png); }
.feat9 { background-image:url(../img/features-9.png); }
/*
Lists: Who (Homepage)
*/
#who ul { margin:0; overflow:hidden; }
#who li { list-style:none; display:inline; margin:0 9px; }
#who img { vertical-align:middle; margin-bottom:17px; }
#who a:link, #who a:visited { color:#e7da49; }
/*
Lists: Gallery (Homepage)
*/
.sliderContent ul { margin:0; }
.sliderContent li { float:left; width:200px; height:168px; /* When tweaking the height to accommodate taller screengrabs, make sure to also edit the height of both #who and #gallery containers */ overflow:hidden; list-style:none; -moz-box-shadow:0 3px 2px rgba(0,0,0,.3); margin-right:10px; }
.sliderContent li:last-child { margin-right:0; }
/*
Lists: Community (Homepage)
*/
#community ul { margin:0; }
#community li { list-style:none; float:left; width:212px; padding:8px; border-bottom:1px solid #dfe9d2; border-right:1px solid #dfe9d2; border-left:1px solid #fbfaf4; border-top:1px solid #fbfaf4; }
#community li:nth-child(-n+3) { padding-top:0; border-top:0; }
#community li:nth-child(3n+1) { padding-left:0; border-left:0; }
#community li:nth-child(3n) { padding-right:0; border-right:0; }
#community li:nth-child(3n+2) { width:220px; }
-#community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; }
+/* #community li:last-child { width:437px; border-bottom:0; border-right:0; padding-right:240px; position:relative; } RETURN WHEN TWITTER INTEGRATED */
#community li h3 { text-transform:uppercase; letter-spacing:1px; font:bold normal 12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; padding-bottom:6px; }
#community li a.icon { padding-left: 70px; padding-right: 0px; min-height:100px; display:block; background-position: top left; background-repeat: no-repeat; }
#community li a#forum { background-image: url('../img/icon/forum.png'); }
#community li a#irc { background-image: url('../img/icon/irc.png'); }
#community li a#github { background-image: url('../img/icon/github.png'); }
#community li a#facebook { background-image: url('../img/icon/facebook.png'); }
#community li a#stackoverflow { background-image: url('../img/icon/stackoverflow.png'); }
#community li a#ohloh { background-image: url('../img/icon/ohloh.png'); }
#community li>a:link,
#community li>a:visited { color:#254241; display:block; }
#community a:hover,
#community a:active,
#community a:focus { color:#254241; text-decoration:none; }
#community a:link h3,
#community a:visited h3 { color:#578b14; }
#community a:hover h3,
#community a:active h3,
#community a:focus h3 { color:#578b14; text-decoration:underline; }
#community .tweet q a:link,
#community .tweet q a:visited { color:#254241; font-weight:bold; }
#community .tweet q a:hover,
#community .tweet q a:active,
#community .tweet q a:focus { color:#578B14; text-decoration:underline; }
.twitter { position:absolute; right:0; top:13px; line-height:1.2; }
.twitter a { background:url(../img/twitterBkg.png) no-repeat; width:156px; height:66px; display:block; padding:6px 0 0 64px; }
.twitter a:link, .twitter a:visited { color:#ffffff; }
.twitter a span { clear:both; display:block;}
.twitter a span:first-child { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); }
/*
Download
*/
li.lcta { list-style-type: none; list-style-position: outside; margin: 10px 0px; padding:0px; }
li.lcta.dl a { background:url(../img/icon/package_go.png) no-repeat left center; padding-left: 25px; }
li.lcta.changes a { background: url(../img/icon/wrench.png) no-repeat left center; padding-left: 25px; }
li.lcta.issues a { background: url(../img/icon/bug.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; }
li.lcta.documentation.current a { background: url(../img/icon/book_link.png) no-repeat left center; padding-left: 25px; font-size: 16px; }
/*
Documentation
*/
p#book { padding: 10px 0 10px 70px; background: url(../img/book.png) no-repeat center left; }
li.lcta.documentation.current small { font-size: 12px; }
/*
Development
*/
p#github {padding: 20px 0 20px 70px; background: url(../img/icon/github.png) no-repeat center left; }
/*
Media
*/
#giving img { float:right; margin-left:10px; margin-top:-27px; }
/*
Forms
*/
form { margin-bottom:18px; }
form ol { margin:0; }
form li { list-style:none; margin-bottom:12px; }
form label { clear:both; display:block; }
form input[type="text"],
form input[type="email"],
form textarea { font:12px "Lucida Sans Unicode", "Lucida Grande", sans-serif; border:1px solid #E5E3D3; padding:4px; }
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus { border:1px solid #254241; }
input[type="submit"] { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:4px 10px; background:#d6770c; background-image:-webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:-moz-linear-gradient(-90deg,#f5bf13,#d6770c); line-height:1.3; color:#ffffff; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2); font-size:120%; }
input[type="submit"]:hover { background-image:-webkit-gradient(linear, left top, left bottom, from(#d6770c), to(#f5bf13)); background-image:-moz-linear-gradient(-90deg,#d6770c,#f5bf13); }
/*
Footer
*/
footer { padding-left:146px; color:#ffffff; }
footer a:link, footer a:visited { color:#ffffff; border-bottom:1px solid #ffffff; }
footer a:hover, footer a:active, footer a:focus { text-decoration:none; color:#254241; border-bottom:1px solid #254241; }
/*
Reusable styles (non-semantic, mind you)
*/
/* Flexible columns. Use *.cols as a wrapper. The direct children divs of that *.cols will have their width distributed equally. */
.cols { display:-moz-box; display:-webkit-box; display:box; -moz-box-orient:horizontal; -webkit-box-orient:horizontal; box-orient:horizontal; width:100%; }
.cols>div { -moz-box-flex:1; -webkit-box-flex:1; box-flex:1; }
/* Floats. Eg, for images. */
.fRight { float:right; margin:0 0 20px 20px; }
.fLeft { float:left; margin:0 20px 20px 0; }
/* Boxes backgrounds and layout */
.darkBkg { background:#3c510d url(../img/darkBkg.gif); }
.medBkg { background:#809357 url(../img/medBkg.gif); }
.lightBkg { background:#f2f5e0 url(../img/lightBkg.gif); overflow:hidden; }
.container .textHeavy { padding-right:340px; } /* For boxes with text, so the lines aren't too long and hard to read. Needs the parent class for specificity. Sorry. */
.border { padding:17px 20px; border:1px solid #CCC; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; background:rgba(255,255,255,.3) } /* Will add a border+padding to the box and faint white background. Eg, latest stable download box on Download page. */
/* To simulate drop shadow from box above. Eg, footer. */
.inset { -moz-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); -webkit-box-shadow:inset 0 3px 3px rgba(0,0,0,.2); box-shadow:inset 0 3px 3px rgba(0,0,0,.2); }
/* Rounded corners, h2 with background, drop shadow. Eg, Giving box on homepage. */
.box { background:#fffdf4; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding:15px 10px; -moz-box-shadow:0 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 2px rgba(0,0,0,.2); }
/* Main, call to action button. Eg, Download button. */
.cta { border:1px solid #b37921; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; padding:16px 33px 16px 95px; background:#d6770c; background-image:url(../img/download.png); background-image:url(../img/download.png), -webkit-gradient(linear, left top, left bottom, from(#f5bf13), to(#d6770c)); background-image:url(../img/download.png), -moz-linear-gradient(-90deg,#f5bf13,#d6770c); background-repeat:no-repeat; background-position:36px center, center center; line-height:1.3; margin-bottom:3px; position:relative; }
.cta span { font-size:18px; font-weight:bold; text-shadow:0 1px 1px rgba(0,0,0,.2) }
.cta:link, .cta:visited { color:#ffffff; }
.cta:hover, .cta:focus { outline:none; }
.cta:active { top:1px; outline:none; }
/*
Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
*/
@media screen and (max-device-width: 480px) {
html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
}
/*
Print styles (inlined to avoid required HTTP connection) www.phpied.com/delay-loading-your-print-css/
*/
@media print {
* { background: transparent !important; color: #444 !important; text-shadow: none !important; }
a, a:visited { color: #444 !important; text-decoration: underline; }
a:after { content: " (" attr(href) ")"; }
abbr:after { content: " (" attr(title) ")"; }
.ir a:after { content: ""; } /* Don't show links for images */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
tr, img { page-break-inside: avoid; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3{ page-break-after: avoid; }
}
\ No newline at end of file
diff --git a/public/assets/img/gallery/thumb/mukuru.jpg b/public/assets/img/gallery/thumb/mukuru.jpg
new file mode 100644
index 0000000..9e1cc3d
Binary files /dev/null and b/public/assets/img/gallery/thumb/mukuru.jpg differ
diff --git a/public/assets/img/gallery/thumb/national-geographic-kids.jpg b/public/assets/img/gallery/thumb/national-geographic-kids.jpg
new file mode 100644
index 0000000..5e34e9b
Binary files /dev/null and b/public/assets/img/gallery/thumb/national-geographic-kids.jpg differ
diff --git a/public/assets/img/gallery/thumb/ori-ito.jpg b/public/assets/img/gallery/thumb/ori-ito.jpg
new file mode 100644
index 0000000..7402724
Binary files /dev/null and b/public/assets/img/gallery/thumb/ori-ito.jpg differ
|
pavlos/alter-ego-activerecord | 7a7933d7bb4b8f331617d307fbd6dc46ad58cb87 | changed direct attribute access to use read/write attribute methods | diff --git a/Rakefile b/Rakefile
index 15889db..ee4ab78 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,19 +1,19 @@
require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('alter-ego-activerecord', '0.1.1') do |p|
+Echoe.new('alter-ego-activerecord', '0.1.2') do |p|
p.description = "Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine"
p.author = "Paul Hieromnimon"
p.email = "[email protected]"
p.url = "http://github.com/pavlos/alter-ego-activerecord"
p.runtime_dependencies = ["activerecord >=2.3.5", "alter-ego >=1.0.1" ]
p.ignore_pattern = ["*.sqlite"]
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
diff --git a/alter-ego-activerecord.gemspec b/alter-ego-activerecord.gemspec
index 21a5da4..f7e00dc 100644
--- a/alter-ego-activerecord.gemspec
+++ b/alter-ego-activerecord.gemspec
@@ -1,37 +1,37 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{alter-ego-activerecord}
- s.version = "0.1.1"
+ s.version = "0.1.2"
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Paul Hieromnimon"]
- s.date = %q{2010-08-14}
+ s.date = %q{2010-09-30}
s.description = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
s.email = %q{[email protected]}
s.extra_rdoc_files = ["README.rdoc", "lib/alter_ego/active_record_adapter.rb"]
- s.files = ["Manifest", "README.rdoc", "Rakefile", "alter-ego-activerecord.gemspec", "init.rb", "lib/alter_ego/active_record_adapter.rb", "test/adapter_test.rb", "test/create_traffic_signals.rb", "test/helper.rb", "test/testdb.sqlite", "test/traffic_signal.rb"]
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "alter-ego-activerecord.gemspec", "init.rb", "lib/alter_ego/active_record_adapter.rb", "pkg/alter-ego-activerecord-0.1.2.gem", "pkg/alter-ego-activerecord-0.1.2.tar.gz", "pkg/alter-ego-activerecord-0.1.2/Manifest", "pkg/alter-ego-activerecord-0.1.2/README.rdoc", "pkg/alter-ego-activerecord-0.1.2/Rakefile", "pkg/alter-ego-activerecord-0.1.2/alter-ego-activerecord.gemspec", "pkg/alter-ego-activerecord-0.1.2/init.rb", "pkg/alter-ego-activerecord-0.1.2/lib/alter_ego/active_record_adapter.rb", "pkg/alter-ego-activerecord-0.1.2/test/adapter_test.rb", "pkg/alter-ego-activerecord-0.1.2/test/create_traffic_signals.rb", "pkg/alter-ego-activerecord-0.1.2/test/helper.rb", "pkg/alter-ego-activerecord-0.1.2/test/traffic_signal.rb", "test/adapter_test.rb", "test/create_traffic_signals.rb", "test/helper.rb", "test/testdb.sqlite", "test/traffic_signal.rb"]
s.homepage = %q{http://github.com/pavlos/alter-ego-activerecord}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Alter-ego-activerecord", "--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{alter-ego-activerecord}
s.rubygems_version = %q{1.3.7}
s.summary = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
s.test_files = ["test/adapter_test.rb"]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_runtime_dependency(%q<alter-ego>, [">= 1.0.1"])
else
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
end
else
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
end
end
diff --git a/lib/alter_ego/active_record_adapter.rb b/lib/alter_ego/active_record_adapter.rb
index 1ed63a5..93baae7 100644
--- a/lib/alter_ego/active_record_adapter.rb
+++ b/lib/alter_ego/active_record_adapter.rb
@@ -1,30 +1,30 @@
module AlterEgo
module ActiveRecordAdapter
def self.included klass
klass.after_initialize do |r|
r.state = r.state
end
end
# rails needs this method to be defined for the
# class method after_initialize to be able to take a block
# this is because of some performance optimization
def after_initialize; end
# Override methods from AlterEgo to store state
# in @attributes["state"] instead of @state
def state=(identifier)
# state needs to always be stored as a string - symbol serialization is strange
- @attributes["state"] = identifier.to_s unless identifier.nil?
+ write_attribute("state", identifier.to_s) unless identifier.nil?
end
def state
- result = ( @attributes["state"] || self.class.default_state)
+ result = ( read_attribute("state") || self.class.default_state)
result = result.to_sym unless result.nil?
assert(result.nil? || self.class.states.keys.include?(result))
result
end
end
end
|
pavlos/alter-ego-activerecord | 7e91150e715c87427efc3f0244380673201f95be | added init.rb | diff --git a/README.rdoc b/README.rdoc
index e5c529c..1306d8b 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,28 +1,31 @@
= AlterEgo-ActiveRecord
== Motivation
AlterEgo is my favorite Ruby state machine for the following reasons:
1. It's not dependent on ActiveRecord - it can be used on plain Ruby objects.
2. It most closely follows the GOF State Pattern because it allows for
polymorphic behavior based on state.
Out of the box, AlterEgo doesn't play nicely with ActiveRecord because it
stores state in <tt>@state</tt>, whereas subclasses of ActiveRecord::Base
persist their <tt>attributes</tt> hash.
This mixin overrides the AlterEgo's accessor methods for state to allow it
to be properly persisted to a database, as well as serialized/unserialized as
json, yml, and xml.
== Installation
+=== As a Ruby Gem
gem install alter-ego-activerecord
+=== OR as a Rails plugin
+ script/plugin install git://github.com/pavlos/alter-ego-active-record.git
== Usage
Make sure the table your class maps to has a <tt>state</tt> column.
class Example < ActiveRecord::Base
include AlterEgo # include this first
include AlterEgo::ActiveRecordAdapter
# Your code here
end
diff --git a/init.rb b/init.rb
new file mode 100644
index 0000000..cabf7e6
--- /dev/null
+++ b/init.rb
@@ -0,0 +1 @@
+require 'alter_ego/active_record_adapter'
|
pavlos/alter-ego-activerecord | 8c4431f817547d2aabd1e27262e1aced5c634f50 | silenced migrations | diff --git a/Manifest b/Manifest
index 9063bad..c9ecd52 100644
--- a/Manifest
+++ b/Manifest
@@ -1,8 +1,9 @@
Manifest
README.rdoc
Rakefile
+alter-ego-activerecord.gemspec
lib/alter_ego/active_record_adapter.rb
test/adapter_test.rb
test/create_traffic_signals.rb
test/helper.rb
test/traffic_signal.rb
diff --git a/alter-ego-activerecord.gemspec b/alter-ego-activerecord.gemspec
index a4d48e8..8533d8f 100644
--- a/alter-ego-activerecord.gemspec
+++ b/alter-ego-activerecord.gemspec
@@ -1,37 +1,37 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{alter-ego-activerecord}
s.version = "0.1.0"
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Paul Hieromnimon"]
s.date = %q{2010-08-12}
s.description = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
s.email = %q{[email protected]}
s.extra_rdoc_files = ["README.rdoc", "lib/alter_ego/active_record_adapter.rb"]
- s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/alter_ego/active_record_adapter.rb", "test/adapter_test.rb", "test/create_traffic_signals.rb", "test/helper.rb", "test/traffic_signal.rb", "alter-ego-activerecord.gemspec"]
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "alter-ego-activerecord.gemspec", "lib/alter_ego/active_record_adapter.rb", "test/adapter_test.rb", "test/create_traffic_signals.rb", "test/helper.rb", "test/traffic_signal.rb"]
s.homepage = %q{http://github.com/pavlos/alter-ego-active-record}
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Alter-ego-activerecord", "--main", "README.rdoc"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{alter-ego-activerecord}
s.rubygems_version = %q{1.3.7}
s.summary = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
s.test_files = ["test/adapter_test.rb"]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_runtime_dependency(%q<alter-ego>, [">= 1.0.1"])
else
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
end
else
s.add_dependency(%q<activerecord>, [">= 2.3.5"])
s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
end
end
diff --git a/test/create_traffic_signals.rb b/test/create_traffic_signals.rb
index 97c2421..b58111d 100644
--- a/test/create_traffic_signals.rb
+++ b/test/create_traffic_signals.rb
@@ -1,11 +1,19 @@
class CreateTrafficSignals < ActiveRecord::Migration
+
def self.up
create_table :traffic_signals do |t|
t.string :state
end
end
def self.down
drop_table :traffic_signals
end
+
+ # redirect output so running tests doesn't display a bunch of migration info
+ def self.puts *args
+ log = File.new "test/migrations.log", 'a+'
+ args.each {|a| log << a.to_s; log << "\n"}
+ log.close
+ end
end
|
pavlos/alter-ego-activerecord | 6a576e0152e3eace5dd79dc1fe2c796a5c86789a | more test cases | diff --git a/test/adapter_test.rb b/test/adapter_test.rb
index 7c172b8..1e51173 100644
--- a/test/adapter_test.rb
+++ b/test/adapter_test.rb
@@ -1,33 +1,77 @@
require 'helper'
class AdapterTest < Test::Unit::TestCase
-
+
def setup
CreateTrafficSignals.up
end
+
+ def test_state_stored_in_attributes
+ t = TrafficSignal.new
+ assert_not_nil t.attributes["state"]
+ t.state = :caution
+ assert_equal "caution", t.attributes["state"]
+ end
+
+ def test_state_stored_as_string
+ t = TrafficSignal.new
+ assert_equal String, t.attributes["state"].class
+ end
+
+ def test_state_returned_as_symbol
+ t = TrafficSignal.new
+ assert_equal Symbol, t.state.class
+ end
def test_state_is_persisted_and_restored
t = TrafficSignal.new
old_state = t.state
t.cycle!
new_state = t.state
#sanity check
assert_not_equal old_state, new_state
t.save!
t = t.reload
assert_equal t.state, new_state
end
def test_new_object_has_default_state
t=TrafficSignal.new
assert_equal t.state, TrafficSignal.default_state
assert_equal t.attributes["state"].to_sym, TrafficSignal.default_state
end
+
+ def test_yaml
+ require 'yaml'
+ t= TrafficSignal.new
+ t.cycle!
+ yaml = YAML::dump t
+ t2 = YAML::load yaml
+ assert_equal t.state, t2.state
+ end
+
+ def test_json
+ t = TrafficSignal.new
+ t.cycle!
+ json = t.to_json
+ t2 = TrafficSignal.new
+ t2.from_json json
+ assert_equal t.state, t2.state
+ end
+
+ def test_xml
+ t = TrafficSignal.new
+ t.cycle!
+ xml = t.to_xml
+ t2 = TrafficSignal.new
+ t2.from_xml xml
+ assert_equal t.state, t2.state
+ end
def teardown
CreateTrafficSignals.down
end
end
|
pavlos/alter-ego-activerecord | 92ef23f8aa3d372bd75b6bfe600c41db781e3f46 | adding tests, rakefile, readme, gemspec, manifest | diff --git a/Manifest b/Manifest
new file mode 100644
index 0000000..9063bad
--- /dev/null
+++ b/Manifest
@@ -0,0 +1,8 @@
+Manifest
+README.rdoc
+Rakefile
+lib/alter_ego/active_record_adapter.rb
+test/adapter_test.rb
+test/create_traffic_signals.rb
+test/helper.rb
+test/traffic_signal.rb
diff --git a/README.rdoc b/README.rdoc
index e69de29..e5c529c 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -0,0 +1,28 @@
+= AlterEgo-ActiveRecord
+
+== Motivation
+AlterEgo is my favorite Ruby state machine for the following reasons:
+ 1. It's not dependent on ActiveRecord - it can be used on plain Ruby objects.
+ 2. It most closely follows the GOF State Pattern because it allows for
+ polymorphic behavior based on state.
+
+Out of the box, AlterEgo doesn't play nicely with ActiveRecord because it
+stores state in <tt>@state</tt>, whereas subclasses of ActiveRecord::Base
+persist their <tt>attributes</tt> hash.
+
+This mixin overrides the AlterEgo's accessor methods for state to allow it
+to be properly persisted to a database, as well as serialized/unserialized as
+json, yml, and xml.
+
+== Installation
+ gem install alter-ego-activerecord
+
+== Usage
+ Make sure the table your class maps to has a <tt>state</tt> column.
+
+ class Example < ActiveRecord::Base
+ include AlterEgo # include this first
+ include AlterEgo::ActiveRecordAdapter
+
+ # Your code here
+ end
diff --git a/Rakefile b/Rakefile
index 9bb9a13..72b6710 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,9 +1,19 @@
require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('alter-ego-active-record', '0.1.0') do |p|
- p.description = "Adapter to allow ActiveRecord to persist state of objects using the AlterEgo state machine"
+Echoe.new('alter-ego-activerecord', '0.1.0') do |p|
+ p.description = "Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine"
p.author = "Paul Hieromnimon"
p.email = "[email protected]"
+ p.url = "http://github.com/pavlos/alter-ego-active-record"
+ p.runtime_dependencies = ["activerecord >=2.3.5", "alter-ego >=1.0.1" ]
+ p.ignore_pattern = ["*.sqlite"]
+end
+
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.verbose = true
end
diff --git a/alter-ego-activerecord.gemspec b/alter-ego-activerecord.gemspec
new file mode 100644
index 0000000..a4d48e8
--- /dev/null
+++ b/alter-ego-activerecord.gemspec
@@ -0,0 +1,37 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{alter-ego-activerecord}
+ s.version = "0.1.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Paul Hieromnimon"]
+ s.date = %q{2010-08-12}
+ s.description = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
+ s.email = %q{[email protected]}
+ s.extra_rdoc_files = ["README.rdoc", "lib/alter_ego/active_record_adapter.rb"]
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "lib/alter_ego/active_record_adapter.rb", "test/adapter_test.rb", "test/create_traffic_signals.rb", "test/helper.rb", "test/traffic_signal.rb", "alter-ego-activerecord.gemspec"]
+ s.homepage = %q{http://github.com/pavlos/alter-ego-active-record}
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Alter-ego-activerecord", "--main", "README.rdoc"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{alter-ego-activerecord}
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{Adapter to allow ActiveRecord to persist and restore state of objects using the AlterEgo state machine}
+ s.test_files = ["test/adapter_test.rb"]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<activerecord>, [">= 2.3.5"])
+ s.add_runtime_dependency(%q<alter-ego>, [">= 1.0.1"])
+ else
+ s.add_dependency(%q<activerecord>, [">= 2.3.5"])
+ s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
+ end
+ else
+ s.add_dependency(%q<activerecord>, [">= 2.3.5"])
+ s.add_dependency(%q<alter-ego>, [">= 1.0.1"])
+ end
+end
diff --git a/test/adapter_test.rb b/test/adapter_test.rb
new file mode 100644
index 0000000..7c172b8
--- /dev/null
+++ b/test/adapter_test.rb
@@ -0,0 +1,33 @@
+require 'helper'
+
+class AdapterTest < Test::Unit::TestCase
+
+ def setup
+ CreateTrafficSignals.up
+ end
+
+ def test_state_is_persisted_and_restored
+ t = TrafficSignal.new
+ old_state = t.state
+ t.cycle!
+ new_state = t.state
+
+ #sanity check
+ assert_not_equal old_state, new_state
+
+ t.save!
+ t = t.reload
+
+ assert_equal t.state, new_state
+ end
+
+ def test_new_object_has_default_state
+ t=TrafficSignal.new
+ assert_equal t.state, TrafficSignal.default_state
+ assert_equal t.attributes["state"].to_sym, TrafficSignal.default_state
+ end
+
+ def teardown
+ CreateTrafficSignals.down
+ end
+end
diff --git a/test/create_traffic_signals.rb b/test/create_traffic_signals.rb
new file mode 100644
index 0000000..97c2421
--- /dev/null
+++ b/test/create_traffic_signals.rb
@@ -0,0 +1,11 @@
+class CreateTrafficSignals < ActiveRecord::Migration
+ def self.up
+ create_table :traffic_signals do |t|
+ t.string :state
+ end
+ end
+
+ def self.down
+ drop_table :traffic_signals
+ end
+end
diff --git a/test/helper.rb b/test/helper.rb
new file mode 100644
index 0000000..362ca53
--- /dev/null
+++ b/test/helper.rb
@@ -0,0 +1,10 @@
+require 'test/unit'
+require 'rubygems'
+gem 'activerecord'
+require 'active_record'
+ActiveRecord::Base.establish_connection(:adapter=>'sqlite3', :database=>'test/testdb.sqlite')
+gem 'alter-ego'
+require 'alter_ego'
+require 'alter_ego/active_record_adapter'
+require 'create_traffic_signals'
+require 'traffic_signal'
diff --git a/test/traffic_signal.rb b/test/traffic_signal.rb
new file mode 100644
index 0000000..65547ff
--- /dev/null
+++ b/test/traffic_signal.rb
@@ -0,0 +1,27 @@
+class TrafficSignal < ActiveRecord::Base
+ include AlterEgo
+ include AlterEgo::ActiveRecordAdapter
+
+
+ state :proceed, :default=>true do
+ handle :color do
+ "green"
+ end
+ transition :to => :caution, :on => :cycle!
+ end
+
+ state :caution do
+ handle :color do
+ "yellow"
+ end
+ transition :to => :stop, :on => :cycle!
+ end
+
+ state :stop do
+ handle :color do
+ "red"
+ end
+ transition :to => :proceed, :on => :cycle!
+ end
+
+end
|
aemadrid/rubyhaze-persisted | 02b43ede3aa0c8529cd04f5d8abd38fbb16439cb | Regenerated gemspec for version 0.0.3 | diff --git a/rubyhaze-persisted.gemspec b/rubyhaze-persisted.gemspec
index 30cf14c..0da008c 100644
--- a/rubyhaze-persisted.gemspec
+++ b/rubyhaze-persisted.gemspec
@@ -1,65 +1,65 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{rubyhaze-persisted}
- s.version = "0.0.2"
+ s.version = "0.0.3"
s.platform = %q{jruby}
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Adrian Madrid"]
s.date = %q{2010-09-08}
s.description = %q{Have your in-mempry distributed JRuby objects and search them too.}
s.email = %q{[email protected]}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
s.files = [
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/rubyhaze-persisted.rb",
"lib/rubyhaze/persisted.rb",
"lib/rubyhaze/persisted/model.rb",
"lib/rubyhaze/persisted/shadow_class_generator.rb",
"test/helper.rb",
"test/test_model.rb",
"test/test_persisted.rb"
]
s.homepage = %q{http://github.com/aemadrid/rubyhaze-persisted}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
s.test_files = [
"test/test_model.rb",
"test/test_persisted.rb"
]
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
s.add_runtime_dependency(%q<rubyhaze>, ["~> 0.0.6"])
s.add_runtime_dependency(%q<bitescript>, ["= 0.0.6"])
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
s.add_runtime_dependency(%q<activemodel>, ["~> 3.0.0"])
else
s.add_dependency(%q<rubyhaze>, ["~> 0.0.6"])
s.add_dependency(%q<bitescript>, ["= 0.0.6"])
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
end
else
s.add_dependency(%q<rubyhaze>, ["~> 0.0.6"])
s.add_dependency(%q<bitescript>, ["= 0.0.6"])
s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
end
end
|
aemadrid/rubyhaze-persisted | ded0c260bab7a75a73e9dd27b22606ea8ba3f8ed | Version bump to 0.0.3 | diff --git a/VERSION b/VERSION
index 4e379d2..bcab45a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.2
+0.0.3
|
aemadrid/rubyhaze-persisted | a595d44fc27a0fc0452646330ee73d508446148e | Refactored a bit and added more tests for ActiveModel integration. | diff --git a/.gitignore b/.gitignore
index a2972e6..551a8fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,24 @@
## MAC OS
.DS_Store
## TEXTMATE
*.tmproj
tmtags
## EMACS
*~
\#*
.\#*
## VIM
*.swp
## PROJECT::GENERAL
coverage
rdoc
pkg
.rvmrc
.idea/*
+tmp
## PROJECT::SPECIFIC
diff --git a/README.rdoc b/README.rdoc
index 84f7277..aa12e3e 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,42 +1,42 @@
= rubyhaze-persisted
RubyHaze Persisted is a little gem that helps you persist and search your (j)ruby objects into Hazelcast distributed maps.
== Getting started
Let's get some distributed ruby objects going:
shell> rvm jruby
shell> gem install rubyhaze-persisted
shell> rubyhaze_console
require 'rubyhaze-persisted'
class Foo
include RubyHaze::Persisted
- field :name, :string
- field :age, :int
+ attribute :name, :string
+ attribute :age, :int
end
a = Foo.create :name => "Raffaello", :age => 32
b = Foo.create :name => "Leonardo", :age => 45
c = Foo.create :name => "Michelangelo", :age => 65
found = Foo.find "age < 60 AND name LIKE '%lo'"
found.first.name
>> "Raffaello"
== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
== Copyright
Copyright (c) 2010 Adrian Madrid. See LICENSE for details.
diff --git a/Rakefile b/Rakefile
index 6a494d0..b168ec0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,55 +1,58 @@
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rubyhaze-persisted"
gem.summary = %Q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
- gem.description = %Q{Have your distributed Ruby objects and search them too.}
- gem.email = "[email protected]"
+ gem.description = %Q{Have your in-mempry distributed JRuby objects and search them too.}
+ gem.email = "[email protected]"
gem.homepage = "http://github.com/aemadrid/rubyhaze-persisted"
gem.authors = ["Adrian Madrid"]
gem.files = FileList['bin/*', 'lib/**/*.rb', 'test/**/*.rb', '[A-Z]*'].to_a
gem.test_files = Dir["test/test*.rb"]
gem.platform = "jruby"
- gem.add_dependency "bitescript"
+ gem.add_dependency "rubyhaze", "~> 0.0.6"
+ gem.add_dependency "bitescript", "0.0.6"
+ gem.add_dependency "activesupport", "~> 3.0.0"
+ gem.add_dependency "activemodel", "~> 3.0.0"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "rubyhaze-persisted #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
diff --git a/lib/rubyhaze-persisted.rb b/lib/rubyhaze-persisted.rb
index e69de29..c30eda0 100644
--- a/lib/rubyhaze-persisted.rb
+++ b/lib/rubyhaze-persisted.rb
@@ -0,0 +1 @@
+require File.expand_path(File.dirname(__FILE__) + '/../lib/rubyhaze/persisted')
\ No newline at end of file
diff --git a/lib/rubyhaze/persisted.rb b/lib/rubyhaze/persisted.rb
index 53b3cdc..cb70eb9 100644
--- a/lib/rubyhaze/persisted.rb
+++ b/lib/rubyhaze/persisted.rb
@@ -1,12 +1,13 @@
+begin
+ gem "rubyhaze", "~> 0.0.6"
+rescue NoMethodError
+ require 'rubygems'
+ gem "rubyhaze", "~> 0.0.6"
+ensure
+ require "rubyhaze"
+end
+
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'persisted'))
+
require 'shadow_class_generator'
require 'model'
-
-class D
- include RubyHaze::Persisted
- attribute :name, :string
- attribute :age, :int
-
-
- validates_presence_of :name
-end
\ No newline at end of file
diff --git a/lib/rubyhaze/persisted/model.rb b/lib/rubyhaze/persisted/model.rb
index 4fe6f91..89b8aab 100644
--- a/lib/rubyhaze/persisted/model.rb
+++ b/lib/rubyhaze/persisted/model.rb
@@ -1,218 +1,252 @@
-require "rubyhaze"
-
-gem "activesupport"
-
+gem "activesupport", "3.0.0"
require "active_support/core_ext/module/attr_accessor_with_default"
require "active_support/core_ext/object/blank"
require "active_support/concern"
require "active_support/callbacks"
+gem "activemodel", "3.0.0"
require "active_model"
module RubyHaze
+
module Persisted
+ class Register
+ class << self
+ def classes
+ @classes ||= []
+ end
- extend ActiveSupport::Concern
- include ActiveSupport::Callbacks
+ def add(base)
+ return false if classes.include? base.name
+ classes << base.name
+ true
+ end
+ end
+ end
- extend ActiveModel::Naming
- extend ActiveModel::Translation
- extend ActiveModel::Callbacks
+ def self.included(base)
+ return unless RubyHaze::Persisted::Register.add(base)
- include ActiveModel::AttributeMethods
- include ActiveModel::Conversion
- include ActiveModel::Dirty
- include ActiveModel::Serialization
- include ActiveModel::Serializers::JSON
- include ActiveModel::Serializers::Xml
- include ActiveModel::Validations
+ base.send :extend, ClassMethods
+ base.send :extend, ActiveModel::Naming
+ base.send :extend, ActiveModel::Translation
+ base.send :extend, ActiveModel::Callbacks
- included do
- attribute_method_suffix '', '=', '?'
- extend ClassMethods
- end
+ base.send :include, ActiveModel::AttributeMethods
+ base.send :include, ActiveModel::Conversion
+ base.send :include, ActiveModel::Dirty
+ base.send :include, ActiveModel::Serialization
+ base.send :include, ActiveModel::Serializers::JSON
+ base.send :include, ActiveModel::Serializers::Xml
+ base.send :include, ActiveModel::Validations
+ base.send :include, InstanceMethods
+
+ base.attribute_method_suffix '', '=', '?'
+ base.define_model_callbacks :create, :update, :load, :destroy
+ end
module InstanceMethods
def initialize(options = {})
options.each { |name, value| send "#{name}=", value }
@callbacks = []
@new_record = true
@destroyed = false
end
def new_record?
@new_record
end
def persisted?
!(new_record? || destroyed?)
end
def destroyed?
@destroyed
end
def attribute(key)
instance_variable_get("@#{key}")
end
def attribute=(key, value)
send("#{key}_will_change!") unless value == attribute(key)
instance_variable_set("@#{key}", value)
end
def attribute?(key)
instance_variable_get("@#{key}").present?
end
def attribute_names
self.class.attribute_names
end
def attribute_types
self.class.attribute_types
end
def attribute_options
self.class.attribute_options
end
def attributes
attrs = {}
attribute_names.each { |name| attrs[name.to_s] = attribute(name) }
attrs
end
def values
attribute_names.map { |name| attribute(name) }
end
def to_ary
attribute_names.map { |name| [name.to_s, instance_variable_get("@#{name}")] }.unshift ['class', self.class.name]
end
def ==(other)
return false unless other.respond_to? :to_ary
to_ary == other.to_ary
end
def shadow_object
self.class.map_java_class.new *values
end
def load_shadow_object(shadow)
attribute_names.each do |name|
send "attribute=", name, shadow.send(name)
end
self
end
def save
create_or_update
end
def save!
create_or_update || raise("Not saved")
end
def create_or_update
result = new_record? ? create : update
result != false
end
- def update
- raise "Missing uid" unless uid?
- self.class.map[uid] = shadow_object
- @previously_changed = changes
- @changed_attributes.clear
- true
+ def create
+ _run_create_callbacks do
+ @uid ||= RubyHaze.random_uuid
+ self.class.map[uid] = shadow_object
+ @previously_changed = changes
+ @changed_attributes.clear
+ @new_record = false
+ uid
+ end
end
- def create
- @uid ||= RubyHaze.random_uuid
- self.class.map[uid] = shadow_object
- @previously_changed = changes
- @changed_attributes.clear
- @new_record = false
- uid
+ def update
+ _run_update_callbacks do
+ raise "Missing uid" unless uid?
+ self.class.map[uid] = shadow_object
+ @previously_changed = changes
+ @changed_attributes.clear
+ true
+ end
end
def load
- raise "Missing uid for load" if uid.blank?
- found = self.class.map[uid]
- raise "Record not found" unless found
- load_shadow_object(found)
- @changed_attributes.clear
- @new_record = false
- self
+ _run_load_callbacks do
+ raise "Missing uid for load" if uid.blank?
+ found = self.class.map[uid]
+ raise "Record not found" unless found
+ load_shadow_object(found)
+ @changed_attributes.clear
+ @new_record = false
+ self
+ end
end
alias :reload :load
alias :reset :load
+ def destroy
+ _run_destroy_callbacks do
+ if persisted?
+ self.class.map.remove uid
+ end
+ @destroyed = true
+ freeze
+ end
+ end
+ alias :delete :destroy
+
def to_s
"<#{self.class.name}:#{object_id} #{to_ary[1..-1].map { |k, v| "#{k}=#{v}" }.join(" ")} >"
end
alias :inspect :to_s
def to_key
persisted? ? [uid] : nil
end
end
module ClassMethods
def create(options = {})
obj = new options
obj.save
obj
end
- def map_java_class_name
- 'RubyHaze_Shadow__' + name
- end
-
def map_java_class
- @java_class ||= RubyHaze::Persisted::ShadowClassGenerator.get map_java_class_name, attributes
+ @java_class ||= RubyHaze::Persisted::Shadow::Generator.get name, attributes
end
def map
- @map ||= RubyHaze::Map.new map_java_class_name
+ @map ||= RubyHaze::Map.new "RubyHaze::Persisted #{name}"
end
def attributes
@attributes ||= [[:uid, :string, {}]]
end
def attribute_names()
attributes.map { |ary| ary[0] }
end
def attribute_types()
attributes.map { |ary| ary[1] }
end
def attribute_options()
attributes.map { |ary| ary[2] }
end
def attribute(name, type, options = {})
raise "Attribute [#{name}] already defined" if attribute_names.include?(name)
@attributes << [name, type, options]
-# attr_accessor name
+ @attribute_methods_generated = false
+ define_attribute_methods [ name ]
+ self
end
def find(predicate)
map.values(predicate).map { |shadow| new.load_shadow_object shadow }
end
+ def [](*args)
+ options = args.extract_options!
+ options[:uid] = args.first if RubyHaze.valid_uuid?(args.first)
+ find(options).first
+ end
+
def find_uids(predicate)
map.keys(predicate)
end
end
end
end
diff --git a/lib/rubyhaze/persisted/shadow_class_generator.rb b/lib/rubyhaze/persisted/shadow_class_generator.rb
index bdd3c25..d7ecd6d 100644
--- a/lib/rubyhaze/persisted/shadow_class_generator.rb
+++ b/lib/rubyhaze/persisted/shadow_class_generator.rb
@@ -1,64 +1,91 @@
+gem "bitescript", "0.0.6"
require 'bitescript'
module RubyHaze
module Persisted
- module ShadowClassGenerator
+ module Shadow
- def self.get(name, attributes)
- RubyHaze::Persisted.const_defined?(name) ?
- RubyHaze::Persisted.const_get(name) :
- generate(name, attributes)
+ module Classes
end
- def self.attribute_load_types
- {
- :string => :aload,
- :int => :iload,
- :boolean => :iload,
- :double => :dload,
- }
- end
+ class Generator
- def self.generate(name, attributes)
- tmp_path = (ENV['RUBYHAZE_PERSISTED_TMP_PATH'] || File.join(Dir.pwd, 'tmp'))
- builder = BiteScript::FileBuilder.new name + '.class'
- class_dsl = []
- class_dsl << %{public_class "#{name}", object, Java::JavaIo::Serializable do}
- attributes.each do |attr_name, type, options|
- class_dsl << %{ public_field :#{attr_name}, send(:#{type})}
- end
- class_dsl << %{ public_constructor [], #{attributes.map { |ary| ary[1].to_s }.join(', ')} do}
- class_dsl << %{ aload 0}
- class_dsl << %{ invokespecial object, "<init>", [void]}
- index = 1
- attributes.each do |attr_name, type, options|
- class_dsl << %{ aload 0}
- class_dsl << %{ #{attribute_load_types[type]} #{index}}
- index += 1
- class_dsl << %{ putfield this, :#{attr_name}, send(:#{type})}
- end
- class_dsl << %{ returnvoid}
- class_dsl << %{ end}
- class_dsl << %{end}
- class_dsl = class_dsl.join("\n")
- if $DEBUG
- FileUtils.mkdir_p tmp_path
- filename = File.join tmp_path, name + '.bc'
- File.open(filename, 'w') { |file| file.write class_dsl }
- end
- builder.instance_eval class_dsl, __FILE__, __LINE__
- builder.generate do |builder_filename, class_builder|
- bytes = class_builder.generate
- klass = JRuby.runtime.jruby_class_loader.define_class name, bytes.to_java_bytes
- if $DEBUG
- filename = File.join tmp_path, builder_filename
- File.open(filename, 'w') { |file| file.write class_builder.generate }
+ class << self
+
+ def get(name, attributes)
+ safe_name = name.gsub '::', '__'
+ RubyHaze::Persisted::Shadow::Classes.const_defined?(safe_name) ?
+ RubyHaze::Persisted::Shadow::Classes.const_get(safe_name) :
+ generate(name, attributes)
+ end
+
+ def attribute_load_types
+ {
+ :string => :aload,
+ :int => :iload,
+ :boolean => :iload,
+ :double => :dload,
+ }
end
- RubyHaze::Persisted.const_set name, JavaUtilities.get_proxy_class(klass.name)
+
+ def template(name, attributes)
+ str = []
+ packages = %w{org rubyhaze persisted shadow classes}
+ names = name.split '::'
+ name = names.pop
+ packages += names
+ str << "package '#{packages.join('.')}' do"
+ str << %{ public_class "#{name}", object, Java::JavaIo::Serializable do}
+ attributes.each do |attr_name, type, options|
+ str << %{ public_field :#{attr_name}, send(:#{type})}
+ end
+ str << %{ public_constructor [], #{attributes.map { |ary| ary[1].to_s }.join(', ')} do}
+ str << %{ aload 0}
+ str << %{ invokespecial object, "<init>", [void]}
+ index = 1
+ attributes.each do |attr_name, type, options|
+ str << %{ aload 0}
+ load_type = attribute_load_types[type]
+ raise "Unknown load type for attribute [#{attr_name}] on class [#{name}]" unless load_type
+ str << %{ #{load_type} #{index}}
+ index += 1
+ str << %{ putfield this, :#{attr_name}, send(:#{type})}
+ end
+ str << %{ returnvoid}
+ str << %{ end}
+ str << %{ end}
+ str << %{end}
+ str.join("\n")
+ end
+
+ def generate(name, attributes)
+ tmp_path = (ENV['RUBYHAZE_PERSISTED_TMP_PATH'] || File.join(Dir.pwd, 'tmp'))
+ builder = BiteScript::FileBuilder.new name + '.class'
+ str = template name, attributes
+ if $DEBUG
+ FileUtils.mkdir_p tmp_path
+ filename = File.join tmp_path, name + '.bc'
+ puts ">> Saving bitescript [#{filename}]..."
+ File.open(filename, 'w') { |file| file.write str }
+ end
+ builder.instance_eval str, __FILE__, __LINE__
+ safe_name = name.gsub '::', '__'
+ builder.generate do |builder_filename, class_builder|
+ bytes = class_builder.generate
+ klass = JRuby.runtime.jruby_class_loader.define_class builder_filename[0..-7].gsub('/', '.'), bytes.to_java_bytes
+ if $DEBUG
+ filename = File.join tmp_path, builder_filename
+ FileUtils.mkdir_p File.dirname(filename)
+ puts ">> Saving class [#{filename}]..."
+ File.open(filename, 'w') { |file| file.write class_builder.generate }
+ end
+ RubyHaze::Persisted::Shadow::Classes.const_set safe_name, JavaUtilities.get_proxy_class(klass.name)
+ end
+ RubyHaze::Persisted::Shadow::Classes.const_get safe_name
+ end
+
end
- RubyHaze::Persisted.const_get name
end
-
end
end
-end
\ No newline at end of file
+end
diff --git a/rubyhaze-persisted.gemspec b/rubyhaze-persisted.gemspec
index 3aaa3bc..30cf14c 100644
--- a/rubyhaze-persisted.gemspec
+++ b/rubyhaze-persisted.gemspec
@@ -1,55 +1,65 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{rubyhaze-persisted}
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.platform = %q{jruby}
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Adrian Madrid"]
- s.date = %q{2010-08-30}
- s.description = %q{Have your distributed Ruby objects and search them too.}
- s.email = %q{[email protected]}
+ s.date = %q{2010-09-08}
+ s.description = %q{Have your in-mempry distributed JRuby objects and search them too.}
+ s.email = %q{[email protected]}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
s.files = [
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
+ "lib/rubyhaze-persisted.rb",
"lib/rubyhaze/persisted.rb",
"lib/rubyhaze/persisted/model.rb",
"lib/rubyhaze/persisted/shadow_class_generator.rb",
"test/helper.rb",
"test/test_model.rb",
"test/test_persisted.rb"
]
s.homepage = %q{http://github.com/aemadrid/rubyhaze-persisted}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
s.test_files = [
"test/test_model.rb",
"test/test_persisted.rb"
]
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
- s.add_runtime_dependency(%q<bitescript>, [">= 0"])
+ s.add_runtime_dependency(%q<rubyhaze>, ["~> 0.0.6"])
+ s.add_runtime_dependency(%q<bitescript>, ["= 0.0.6"])
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
+ s.add_runtime_dependency(%q<activemodel>, ["~> 3.0.0"])
else
- s.add_dependency(%q<bitescript>, [">= 0"])
+ s.add_dependency(%q<rubyhaze>, ["~> 0.0.6"])
+ s.add_dependency(%q<bitescript>, ["= 0.0.6"])
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
+ s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
end
else
- s.add_dependency(%q<bitescript>, [">= 0"])
+ s.add_dependency(%q<rubyhaze>, ["~> 0.0.6"])
+ s.add_dependency(%q<bitescript>, ["= 0.0.6"])
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
+ s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
end
end
diff --git a/test/helper.rb b/test/helper.rb
index 8d1befd..603dd91 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -1,11 +1,39 @@
-require 'test/unit'
-require 'forwardable'
+unless defined?(HELPER_LOADED)
-require File.expand_path(File.dirname(__FILE__) + '/../lib/rubyhaze/persisted')
+ require 'test/unit'
+ require 'forwardable'
-class Test::Unit::TestCase
-end
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/rubyhaze/persisted')
+
+ class Notices
+ class << self
+ extend Forwardable
+ def all
+ @all ||= []
+ end
+ def_delegators :all, :size, :<<, :first, :last, :pop, :clear, :map
+ end
+ end
+
+ class Foo
+ include RubyHaze::Persisted
+ attribute :name, :string
+ attribute :age, :int
+ end
+
+ module Sub
+ class Foo
+ include RubyHaze::Persisted
+ attribute :name, :string
+ end
+ end
-# Start a new hazelcast cluster
-RubyHaze.init :group => { :username => "test_persisted", :password => "test_persisted" }
+ # Start a new hazelcast cluster
+ RubyHaze.init :group => { :username => "test_persisted", :password => "test_persisted" }
+ HELPER_LOADED = true
+
+ class Test::Unit::TestCase
+ end
+
+end
diff --git a/test/test_model.rb b/test/test_model.rb
index 014063e..4ad429c 100644
--- a/test/test_model.rb
+++ b/test/test_model.rb
@@ -1,14 +1,130 @@
-require File.expand_path(File.dirname(__FILE__) + '/helper')
+require(File.expand_path(File.dirname(__FILE__) + '/helper'))
class LintTest < ActiveModel::TestCase
include ActiveModel::Lint::Tests
- class PersistedTestModel
+ class Admin
+ class User
+ include RubyHaze::Persisted
+
+ attribute :name, :string
+ attribute :age, :integer
+ attribute :active, :boolean
+ attribute :salary, :double
+ end
+ end
+
+ class ImportantPerson
+ include RubyHaze::Persisted
+
+ attribute :name, :string
+
+ before_create :notice_create_before
+ after_update :notice_update_after
+ around_load :notice_load_around
+ after_destroy :notice_destroy_after
+
+ def notice_create_before
+ Notices.all << "ImportantPerson before create"
+ end
+
+ def notice_update_after
+ Notices.all << "ImportantPerson after update"
+ end
+
+ def notice_load_around
+ Notices.all << "ImportantPerson around load before"
+ yield
+ Notices.all << "ImportantPerson around load after"
+ end
+
+ def notice_destroy_after
+ Notices.all << "ImportantPerson after destroy"
+ end
+
+ end
+
+ class SimplePerson
include RubyHaze::Persisted
+
attribute :name, :string
end
def setup
- @model = PersistedTestModel.new
+ @model = Admin::User.new
+ end
+
+ def test_naming
+ @model_name = Admin::User.model_name
+ assert_equal "lint_test_admin_user", @model_name.singular
+ assert_equal "lint_test_admin_users", @model_name.plural
+ assert_equal "user", @model_name.element
+ assert_equal "lint_test/admin/users", @model_name.collection
+ assert_equal "lint_test/admin/users/user", @model_name.partial_path
+ end
+
+ def test_translation
+ I18n.backend = I18n::Backend::Simple.new
+ I18n.backend.store_translations 'en', :attributes => { :age => 'age default attribute' }
+ assert_equal 'age default attribute', Admin::User.human_attribute_name('age')
+ I18n.backend.store_translations 'en', :activemodel => {:attributes => {:foo => {:name => 'foo name attribute'} } }
+ assert_equal 'foo name attribute', Foo.human_attribute_name('name')
+ I18n.backend.store_translations 'en', :activemodel => {:models => {:foo => 'foo model'} }
+ assert_equal 'foo model', Foo.model_name.human
+ end
+
+ def test_callbacks
+ Notices.clear
+ assert_equal 0, Notices.size
+ important_person = ImportantPerson.create :name => "David"
+ ImportantPerson.attributes
+ assert_equal 1, Notices.size
+ assert_equal "ImportantPerson before create", Notices.pop
+ important_person.name = "David The Great"
+ important_person.update
+ assert_equal 1, Notices.size
+ assert_equal "ImportantPerson after update", Notices.pop
+ important_person.reload
+ assert_equal 2, Notices.size
+ assert_equal "ImportantPerson around load after", Notices.pop
+ assert_equal "ImportantPerson around load before", Notices.pop
+ important_person.destroy
+ assert_equal 1, Notices.size
+ assert_equal "ImportantPerson after destroy", Notices.pop
+ assert_equal 0, Notices.size
+ end
+
+ def test_attribute_methods
+ simple_person = SimplePerson.create :name => "David"
+ assert_equal simple_person.name, "David"
+ assert simple_person.name?
+ simple_person.name = "Joseph"
+ assert_equal simple_person.name, "Joseph"
+ end
+
+ def test_conversion
+ simple_person = SimplePerson.create :uid => '123', :name => "David"
+ assert_equal simple_person.to_model, simple_person
+ assert_nil simple_person.to_key
+ assert_nil simple_person.to_param
+ simple_person.save
+ assert_equal %w{123}, simple_person.to_key
+ assert_equal '123', simple_person.to_param
+ end
+
+ def test_dirty
+ uid = '456'
+ names = [ "David", "Bob", "James", "Earl" ]
+ SimplePerson.create :uid => uid, :name => names.first
+ simple_person = SimplePerson.find uid
+ assert_equal false, simple_person.changed?
+ simple_person.name = names[1]
+ assert simple_person.changed?
+ assert simple_person.name_changed?
+ assert_equal names[1], simple_person.name_was
+ assert_equal names[0,2], simple_person.name_change
+ exp_changes = { :name => names[0,2] }
+ assert_equal exp_changes, simple_person.changes
+
end
-end
\ No newline at end of file
+end
diff --git a/test/test_persisted.rb b/test/test_persisted.rb
index 9724497..2e6e31f 100644
--- a/test/test_persisted.rb
+++ b/test/test_persisted.rb
@@ -1,83 +1,82 @@
-require File.expand_path(File.dirname(__FILE__) + '/helper')
-
-class Foo
- include RubyHaze::Persisted
- attribute :name, :string
- attribute :age, :int
-end unless defined? Foo
+require(File.expand_path(File.dirname(__FILE__) + '/helper'))
class TestRubyHazePersistedClassMethods < Test::Unit::TestCase
def test_right_store
store = Foo.map
assert_equal store.class.name, "RubyHaze::Map"
- assert_equal store.name, "RubyHaze_Shadow__Foo"
- assert_equal store.name, RubyHaze::Map.new("RubyHaze_Shadow__Foo").name
+ assert_equal store.name, "RubyHaze::Persisted Foo"
+ assert_equal store.name, RubyHaze::Map.new("RubyHaze::Persisted Foo").name
end
def test_right_fields
- fields = Foo.attributes
- assert_equal fields, [[:uid, :string, {}], [:name, :string, {}], [:age, :int, {}]]
+ assert_equal Foo.attributes, [[:uid, :string, {}], [:name, :string, {}], [:age, :int, {}]]
assert_equal Foo.attribute_names, [:uid, :name, :age]
assert_equal Foo.attribute_types, [:string, :string, :int]
assert_equal Foo.attribute_options, [{}, {}, {}]
+
+ assert_equal Sub::Foo.attributes, [[:uid, :string, {}], [:name, :string, {}]]
+ assert_equal Sub::Foo.attribute_names, [:uid, :name]
+ assert_equal Sub::Foo.attribute_types, [:string, :string]
+ assert_equal Sub::Foo.attribute_options, [{}, {}]
end
def test_right_shadow_class
- assert_equal Foo.map_java_class_name, "RubyHaze_Shadow__Foo"
- assert_equal Foo.map_java_class.name, "Java::Default::RubyHaze_Shadow__Foo"
+ assert_equal Foo.map_java_class.name, "Java::OrgRubyhazePersistedShadowClasses::Foo"
+ assert_equal Sub::Foo.map_java_class.name, "Java::OrgRubyhazePersistedShadowClassesSub::Foo"
end
end
class TestRubyHazePersistedStorage < Test::Unit::TestCase
def test_store_reload_objects
Foo.map.clear
assert_equal Foo.map.size, 0
@a = Foo.create :name => "Leonardo", :age => 65
assert_equal Foo.map.size, 1
@b = Foo.create :name => "Michelangelo", :age => 45
assert_equal Foo.map.size, 2
@b.age = 47
@b.reload
assert_equal Foo.map.size, 2
assert_equal @b.age, 45
Foo.map.clear
assert_equal Foo.map.size, 0
end
def test_find_through_predicates
Foo.map.clear
@a = Foo.create :name => "Leonardo", :age => 65
@b = Foo.create :name => "Michelangelo", :age => 45
@c = Foo.create :name => "Raffaello", :age => 32
res = Foo.find 'age < 40'
assert_equal res.size, 1
assert_equal res.first, @c
assert_equal res.first.name, @c.name
res = Foo.find 'age BETWEEN 40 AND 50'
assert_equal res.size, 1
assert_equal res.first, @b
assert_equal res.first.name, @b.name
res = Foo.find "name LIKE 'Leo%'"
assert_equal res.size, 1
assert_equal res.first, @a
assert_equal res.first.name, @a.name
+# # Throws an internal exception
# res = Foo.find "age IN (32, 65)"
# assert_equal res.size, 2
# names = res.map{|x| x.name }.sort
# assert_equal names.first, @a.name
# assert_equal names.last, @b.name
- res = Foo.find "age < 40 AND name LIKE '%o'"
+ res = Foo.find "age < 60 AND name LIKE '%ae%'"
assert_equal res.size, 1
assert_equal res.first, @c
assert_equal res.first.name, @c.name
end
end
|
aemadrid/rubyhaze-persisted | 7a3770595710e24065ffe23a2f3f657b427a1f02 | Version bump to 0.0.2 | diff --git a/VERSION b/VERSION
index 8acdd82..4e379d2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.0.1
+0.0.2
|
aemadrid/rubyhaze-persisted | 68ee40876f9da0b3b561dbf7fb1ed9946a1cf14b | Touchup. | diff --git a/lib/rubyhaze-persisted.rb b/lib/rubyhaze-persisted.rb
new file mode 100644
index 0000000..e69de29
|
aemadrid/rubyhaze-persisted | 34229689421d461e46f5604af7fbb84ef6f141ea | Regenerated gemspec for version 0.0.1 | diff --git a/rubyhaze-persisted.gemspec b/rubyhaze-persisted.gemspec
index 9052258..3aaa3bc 100644
--- a/rubyhaze-persisted.gemspec
+++ b/rubyhaze-persisted.gemspec
@@ -1,55 +1,55 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{rubyhaze-persisted}
s.version = "0.0.1"
s.platform = %q{jruby}
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Adrian Madrid"]
s.date = %q{2010-08-30}
- s.description = %q{TODO: longer description of your gem}
+ s.description = %q{Have your distributed Ruby objects and search them too.}
s.email = %q{[email protected]}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
s.files = [
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/rubyhaze/persisted.rb",
"lib/rubyhaze/persisted/model.rb",
"lib/rubyhaze/persisted/shadow_class_generator.rb",
"test/helper.rb",
"test/test_model.rb",
"test/test_persisted.rb"
]
s.homepage = %q{http://github.com/aemadrid/rubyhaze-persisted}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
s.test_files = [
"test/test_model.rb",
"test/test_persisted.rb"
]
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
s.add_runtime_dependency(%q<bitescript>, [">= 0"])
else
s.add_dependency(%q<bitescript>, [">= 0"])
end
else
s.add_dependency(%q<bitescript>, [">= 0"])
end
end
|
aemadrid/rubyhaze-persisted | 2e4cac0fdbe140c33f5392493808fd7ec9e6baf3 | Touchup | diff --git a/Rakefile b/Rakefile
index b19ec56..6a494d0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,55 +1,55 @@
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rubyhaze-persisted"
gem.summary = %Q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
- gem.description = %Q{TODO: longer description of your gem}
+ gem.description = %Q{Have your distributed Ruby objects and search them too.}
gem.email = "[email protected]"
gem.homepage = "http://github.com/aemadrid/rubyhaze-persisted"
gem.authors = ["Adrian Madrid"]
gem.files = FileList['bin/*', 'lib/**/*.rb', 'test/**/*.rb', '[A-Z]*'].to_a
gem.test_files = Dir["test/test*.rb"]
gem.platform = "jruby"
gem.add_dependency "bitescript"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "rubyhaze-persisted #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
diff --git a/rubyhaze-persisted.gemspec b/rubyhaze-persisted.gemspec
new file mode 100644
index 0000000..9052258
--- /dev/null
+++ b/rubyhaze-persisted.gemspec
@@ -0,0 +1,55 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{rubyhaze-persisted}
+ s.version = "0.0.1"
+ s.platform = %q{jruby}
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Adrian Madrid"]
+ s.date = %q{2010-08-30}
+ s.description = %q{TODO: longer description of your gem}
+ s.email = %q{[email protected]}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.rdoc"
+ ]
+ s.files = [
+ "LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION",
+ "lib/rubyhaze/persisted.rb",
+ "lib/rubyhaze/persisted/model.rb",
+ "lib/rubyhaze/persisted/shadow_class_generator.rb",
+ "test/helper.rb",
+ "test/test_model.rb",
+ "test/test_persisted.rb"
+ ]
+ s.homepage = %q{http://github.com/aemadrid/rubyhaze-persisted}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.6}
+ s.summary = %q{ActiveRecord-like objects persisted with Hazelcast and RubyHaze}
+ s.test_files = [
+ "test/test_model.rb",
+ "test/test_persisted.rb"
+ ]
+
+ 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
+ s.add_runtime_dependency(%q<bitescript>, [">= 0"])
+ else
+ s.add_dependency(%q<bitescript>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<bitescript>, [">= 0"])
+ end
+end
+
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.