fridaycms 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/app/controllers/fridaycms/pages_controller.rb +23 -0
- data/config/routes.rb +5 -0
- data/fridaycms.gemspec +23 -0
- data/lib/fridaycms/engine.rb +8 -0
- data/lib/fridaycms/version.rb +3 -0
- data/lib/fridaycms.rb +3 -0
- metadata +92 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -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
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
|
data/lib/fridaycms.rb
ADDED
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
|
+
|