Permalink
Browse files

First commit

  • Loading branch information...
0 parents commit bcef45c8c5d9e7c765770c04f266b3d90c90256f @divineforest committed May 18, 2011
Showing with 63 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +4 −0 Gemfile
  3. +2 −0 Rakefile
  4. +29 −0 lib/rails-ssi.rb
  5. +3 −0 lib/rails-ssi/version.rb
  6. +21 −0 rails-ssi.gemspec
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in rails-ssi.gemspec
+gemspec
@@ -0,0 +1,2 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
@@ -0,0 +1,29 @@
+module RailsSsi
+
+ module Helpers
+
+ def ssi_datetime(format)
+ raw "<!--#config timefmt='#{format}' --><!--#echo var='DATE_LOCAL' -->"
+ end
+
+ def ssi_if(expression)
+ raw "<!--#if expr='#{expression}' -->"
+ end
+
+ def ssi_else
+ raw "<!--#else -->"
+ end
+
+ def ssi_end
+ raw "<!--#endif -->"
+ end
+
+ def ssi_include(path)
+ raw "<!--# include virtual='#{path}' -->"
+ end
+
+ end
+
+end
+
+ActionView::Base.send :include, RailsSsi::Helpers
@@ -0,0 +1,3 @@
+module RailsSsi
+ VERSION = "0.0.1"
+end
@@ -0,0 +1,21 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "rails-ssi/version"
+
+Gem::Specification.new do |s|
+ s.name = "rails-ssi"
+ s.version = RailsSsi::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["divineforest"]
+ s.email = ["technoforest@gmail.com"]
+ s.homepage = "http://github.com/divineforest/rails-ssi"
+ s.summary = %q{SSI in your Rails app}
+ s.description = %q{Helpers for SSI tags in your Rails app}
+
+ s.rubyforge_project = "rails-ssi"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end

0 comments on commit bcef45c

Please sign in to comment.