fridaycms 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ gem 'rspec'
4
+
3
5
  # Specify your gem's dependencies in fridaycms.gemspec
4
6
  gemspec
@@ -1,23 +1,25 @@
1
- class Fridaycms::PagesController < ApplicationController
1
+ module Fridaycms
2
+ class PagesController < ApplicationController
2
3
 
3
- # TODO: dont force the pages name. Someone might want to store his pages under /app/views/foobarz
4
+ unloadable
4
5
 
5
- def index
6
- render "#{Rails.root}/app/views/pages/index"
7
- end
6
+ def index
7
+ render "#{Rails.root}/app/views/pages/index"
8
+ end
8
9
 
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]}"
10
+ def show
11
+ if params[:subpath]
12
+ if File.exists?("#{Rails.root}/app/views/pages/#{params[:path]}/#{params[:subpath]}.html.haml")
13
+ render "#{Rails.root}/app/views/pages/#{params[:path]}/#{params[:subpath]}"
14
+ else
15
+ redirect_to page_path('projekte')
16
+ end
17
+ elsif params[:path] && File.exists?("#{Rails.root}/app/views/pages/#{params[:path]}.html.haml")
18
+ render "#{Rails.root}/app/views/pages/#{params[:path]}"
13
19
  else
14
- redirect_to page_path('projekte')
20
+ render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
15
21
  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
22
  end
21
- end
22
23
 
24
+ end
23
25
  end
data/fridaycms.gemspec CHANGED
@@ -6,9 +6,9 @@ Gem::Specification.new do |s|
6
6
  s.name = "fridaycms"
7
7
  s.version = Fridaycms::VERSION
8
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"
9
+ s.authors = ["Felipe Kaufmann", "Phil Schilter"]
10
+ s.email = ["felipe@override.ch"]
11
+ s.homepage = "http://github.com/effkay/fridaycms"
12
12
  s.summary = %q{A very minimalistic CMS. No db, just plain views.}
13
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
14
 
data/lib/fridaycms.rb CHANGED
@@ -1,3 +1,8 @@
1
1
  module Fridaycms
2
2
  require 'fridaycms/engine' if defined?(Rails)
3
+
4
+ def self.add_mapping
5
+
6
+ end
7
+
3
8
  end
@@ -0,0 +1,5 @@
1
+ module Fridaycms
2
+ class Mapper
3
+
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ module ActionDispatch::Routing
2
+ class Mapper
3
+
4
+ def fridaycms_for(*resources)
5
+ resources.map!(&:to_sym)
6
+ Fridaycms.add_mapping(resource)
7
+ end
8
+
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Fridaycms
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,22 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fridaycms
3
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
4
+ prerelease:
5
+ version: 0.0.2
11
6
  platform: ruby
12
7
  authors:
13
8
  - Felipe Kaufmann
14
- - Philipp Schilter
9
+ - Phil Schilter
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
13
 
19
- date: 2011-02-27 00:00:00 +01:00
14
+ date: 2011-02-28 00:00:00 +01:00
20
15
  default_executable:
21
16
  dependencies:
22
17
  - !ruby/object:Gem::Dependency
@@ -27,17 +22,12 @@ dependencies:
27
22
  requirements:
28
23
  - - ">="
29
24
  - !ruby/object:Gem::Version
30
- hash: 7
31
- segments:
32
- - 3
33
- - 0
34
- - 0
35
25
  version: 3.0.0
36
26
  type: :runtime
37
27
  version_requirements: *id001
38
28
  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
29
  email:
40
- - developers@screenconcept.ch
30
+ - felipe@override.ch
41
31
  executables: []
42
32
 
43
33
  extensions: []
@@ -53,9 +43,11 @@ files:
53
43
  - fridaycms.gemspec
54
44
  - lib/fridaycms.rb
55
45
  - lib/fridaycms/engine.rb
46
+ - lib/fridaycms/mapper.rb
47
+ - lib/fridaycms/rails/routes.rb
56
48
  - lib/fridaycms/version.rb
57
49
  has_rdoc: true
58
- homepage: http://github.com/screenconcept/fridaycms
50
+ homepage: http://github.com/effkay/fridaycms
59
51
  licenses: []
60
52
 
61
53
  post_install_message:
@@ -68,23 +60,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
60
  requirements:
69
61
  - - ">="
70
62
  - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
63
  version: "0"
75
64
  required_rubygems_version: !ruby/object:Gem::Requirement
76
65
  none: false
77
66
  requirements:
78
67
  - - ">="
79
68
  - !ruby/object:Gem::Version
80
- hash: 3
81
- segments:
82
- - 0
83
69
  version: "0"
84
70
  requirements: []
85
71
 
86
72
  rubyforge_project: fridaycms
87
- rubygems_version: 1.3.7
73
+ rubygems_version: 1.5.0
88
74
  signing_key:
89
75
  specification_version: 3
90
76
  summary: A very minimalistic CMS. No db, just plain views.