fridaycms 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in fridaycms.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,23 @@
1
+ class Fridaycms::PagesController < ApplicationController
2
+
3
+ # TODO: dont force the pages name. Someone might want to store his pages under /app/views/foobarz
4
+
5
+ def index
6
+ render "#{Rails.root}/app/views/pages/index"
7
+ end
8
+
9
+ def show
10
+ if params[:subpath]
11
+ if File.exists?("#{Rails.root}/app/views/pages/#{params[:path]}/#{params[:subpath]}.html.haml")
12
+ render "#{Rails.root}/app/views/pages/#{params[:path]}/#{params[:subpath]}"
13
+ else
14
+ redirect_to page_path('projekte')
15
+ end
16
+ elsif params[:path] && File.exists?("#{Rails.root}/app/views/pages/#{params[:path]}.html.haml")
17
+ render "#{Rails.root}/app/views/pages/#{params[:path]}"
18
+ else
19
+ render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
20
+ end
21
+ end
22
+
23
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do |map|
2
+ scope :module => :fridaycms do
3
+ match "/:path(/:subpath)" => "pages#show", :as => :page
4
+ end
5
+ end
data/fridaycms.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "fridaycms/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "fridaycms"
7
+ s.version = Fridaycms::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Felipe Kaufmann", "Philipp Schilter"]
10
+ s.email = ["developers@screenconcept.ch"]
11
+ s.homepage = "http://github.com/screenconcept/fridaycms"
12
+ s.summary = %q{A very minimalistic CMS. No db, just plain views.}
13
+ s.description = %q{Some might argue it's not even a CMS. Indeed, fridaycms does not use a database but just provides a simple mapping between haml/erb files organized in a folder struture and some routes}
14
+
15
+ s.rubyforge_project = "fridaycms"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency "rails", ">= 3.0.0"
23
+ end
@@ -0,0 +1,8 @@
1
+ require "rails"
2
+ require 'fridaycms'
3
+
4
+ module Fridaycms
5
+ class Engine < Rails::Engine
6
+ engine_name :fridaycms
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ module Fridaycms
2
+ VERSION = "0.0.1"
3
+ end
data/lib/fridaycms.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Fridaycms
2
+ require 'fridaycms/engine' if defined?(Rails)
3
+ end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fridaycms
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Felipe Kaufmann
14
+ - Philipp Schilter
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2011-02-27 00:00:00 +01:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ name: rails
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 7
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
35
+ version: 3.0.0
36
+ type: :runtime
37
+ version_requirements: *id001
38
+ description: Some might argue it's not even a CMS. Indeed, fridaycms does not use a database but just provides a simple mapping between haml/erb files organized in a folder struture and some routes
39
+ email:
40
+ - developers@screenconcept.ch
41
+ executables: []
42
+
43
+ extensions: []
44
+
45
+ extra_rdoc_files: []
46
+
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - Rakefile
51
+ - app/controllers/fridaycms/pages_controller.rb
52
+ - config/routes.rb
53
+ - fridaycms.gemspec
54
+ - lib/fridaycms.rb
55
+ - lib/fridaycms/engine.rb
56
+ - lib/fridaycms/version.rb
57
+ has_rdoc: true
58
+ homepage: http://github.com/screenconcept/fridaycms
59
+ licenses: []
60
+
61
+ post_install_message:
62
+ rdoc_options: []
63
+
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ hash: 3
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ requirements: []
85
+
86
+ rubyforge_project: fridaycms
87
+ rubygems_version: 1.3.7
88
+ signing_key:
89
+ specification_version: 3
90
+ summary: A very minimalistic CMS. No db, just plain views.
91
+ test_files: []
92
+