This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.3' | |
gem 'locomotive_cms', '1.0.0.beta', :require => 'locomotive/engine' | |
gem 'unicorn', :group => 'development' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.3' | |
gem 'locomotive_cms', :git => 'git://github.com/locomotivecms/engine.git', :require => 'locomotive/engine', :branch => 'mongoid-2.0.0.rc.6' | |
gem 'unicorn', :group => 'development' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for feature in asset_collections.features %} | |
{% if feature.home %} | |
<li class="feature {% cycle ' ', ' ', 'last' %}"> | |
<div class="image"> | |
{% if feature.popup %} | |
<a href="{{ feature.url }}" target="_blank"> | |
<img src="{{ feature.thumb.url }}" alt="{{ feature.name }}" /> | |
</a> | |
{% else %} | |
<img src="{{ feature.thumb.url }}" alt="{{ feature.name }}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe EditableElement do | |
before(:each) do | |
@site = Factory(:site) | |
@home = @site.pages.root.first | |
@home.update_attributes :raw_template => "{% block body %}{% editable_short_text 'body' %}Lorem ipsum{% endeditable_short_text %}{% endblock %}" | |
@sub_page_1 = Factory(:page, :slug => 'sub_page_1', :parent => @home, :raw_template => "{% extends 'parent' %}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% consume blog from "http://blog.locomotiveapp.org/api/read/json?num=3&type=text", expires_in: 3000 %} | |
{% if blog == null %} | |
<p class="error">We are sorry but the Tumblr API seems to be broken now. Click <a href="http://blog.locomotiveapp.org">here</a> to see the blog.</p> | |
{% else %} | |
{% for article in blog.posts %} | |
<li class="article {% cycle ' ', ' ', 'last' %}"> | |
<h3><a href="{{ article.url }}">{{ article.regular_title }}</a></h3> | |
<p class="date">{{ article.date_gmt | localized_date: '%A %d %B %Y', 'en' }}</p> | |
<div class="body"> | |
{{ article.regular_body | strip_html | truncate: 200 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Liquid::Tags | |
class PageBanners < ::Liquid::Tag | |
Syntax = /(#{::Liquid::Expression}+)\s+max\s+([0-9]+)/ | |
def initialize(tag_name, markup, tokens, context) | |
if markup =~ Syntax | |
@collection_name = $1 | |
@max_number = $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sass/scss/parser' | |
module Sass | |
module SCSS | |
class Parser | |
private | |
def each_directive | |
list = tok! STRING |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/dependencies' | |
module ActiveSupport::Dependencies | |
alias_method :require_or_load_without_multiple, :require_or_load | |
def require_or_load(file_name, const_path = nil) | |
if file_name.starts_with?(Rails.root.to_s + '/app') | |
relative_name = file_name.gsub(Rails.root.to_s, '') | |
@engine_paths ||= Rails::Application.railties.engines.collect{|engine| engine.config.root.to_s } | |
@engine_paths.each do |path| | |
engine_file = File.join(path, relative_name) | |
require_or_load_without_multiple(engine_file, const_path) if File.file?(engine_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'mongoid' | |
# Limit feature for embedded documents | |
module Mongoid #:nodoc: | |
module Criterion #:nodoc: | |
module Exclusion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>{{ artist.name }}</h2> | |
<div>{{ artist.bio }}</div> | |
{% with_scope artist: artist._id %} | |
{% assign comments = contents.comments %} | |
{% if comments == empty %} |
OlderNewer