gumdrop 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ *.gem
3
+ *.lock
data/ChangeLog.md ADDED
@@ -0,0 +1,8 @@
1
+ # v0.2.3
2
+ - Updated code to use autoload. Added primary dependencies to the gemspec. Version bump.
3
+
4
+ # v0.2.2
5
+ - Fixed bug where partials weren't rendered via the dev server.
6
+
7
+ # v0.2.1
8
+ - Initial release. Yay!
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/Notes.md ADDED
@@ -0,0 +1,3 @@
1
+ # Future Features/Changes
2
+ - Generator support of some kind... Where you can define how pages can be built from data. Include support for paging and RSS/ATOM feeds.
3
+ - Add options to config for `source/` and `output/` folder names. `data/` too?
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
2
+ require "gumdrop/version"
3
+
4
+ desc "builds gem"
5
+ task :build do
6
+ system "gem build gumdrop.gemspec"
7
+ end
8
+
9
+ desc "releases gem"
10
+ task :release => :build do
11
+ system "gem push gumdrop-#{Gumdrop::VERSION}.gem"
12
+ end
13
+
14
+ desc "installs gem"
15
+ task :install => :build do
16
+ system "gem install gumdrop-#{Gumdrop::VERSION}"
17
+ end
18
+
19
+ desc "uninstalls gem"
20
+ task :uninstall do
21
+ system "gem uninstall gumdrop"
22
+ end
data/gumdrop.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
3
+
4
+ require 'gumdrop/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{gumdrop}
8
+ s.version = Gumdrop::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.rubyforge_project = 'gumdrop'
11
+ s.has_rdoc = false
12
+ s.date = %q{2011-07-22}
13
+
14
+ s.authors = ["Matt McCray"]
15
+ s.email = %q{matt@elucidata.net}
16
+ s.summary = %q{A simple cms/prototyping tool.}
17
+ s.homepage = %q{https://github.com/darthapo/gumdrop}
18
+ s.description = %q{A simple cms/prototyping tool.}
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.require_paths = ["lib"]
24
+
25
+ s.add_dependency 'sinatra'
26
+ s.add_dependency 'tilt'
27
+ s.add_dependency 'active_support'
28
+ s.add_dependency 'trollop'
29
+ s.add_dependency 'haml'
30
+ s.add_dependency 'sass'
31
+
32
+ end
@@ -0,0 +1,16 @@
1
+ # For clean urls
2
+ DirectoryIndex index.html
3
+
4
+ <IfModule mod_rewrite.c>
5
+ RewriteEngine On
6
+ RewriteBase /
7
+
8
+ # Do not do anything for already existing files and folders
9
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
10
+ RewriteCond %{REQUEST_FILENAME} -d
11
+ RewriteRule .+ - [L]
12
+
13
+ # add .html file extension (if such file does exist)
14
+ RewriteCond %{DOCUMENT_ROOT}/$1\.html -f
15
+ RewriteRule ^(.+[^/])/?$ $1.html [L,QSA]
16
+ </IfModule>
@@ -1,5 +1,5 @@
1
1
  module Gumdrop
2
2
 
3
- VERSION = "0.2.2" unless defined?(::Gumdrop::VERSION)
3
+ VERSION = "0.2.3" unless defined?(::Gumdrop::VERSION)
4
4
 
5
5
  end
data/lib/gumdrop.rb CHANGED
@@ -10,6 +10,14 @@ DEFAULT_OPTIONS= {
10
10
 
11
11
  module Gumdrop
12
12
 
13
+ autoload :HashObject, "gumdrop/hash_object"
14
+ autoload :VERSION, "gumdrop/version"
15
+ autoload :ViewHelpers, "gumdrop/view_helpers"
16
+ autoload :Context, "gumdrop/context"
17
+ autoload :Content, "gumdrop/content"
18
+ autoload :Server, "gumdrop/server"
19
+ autoload :Generator, "gumdrop/generator"
20
+
13
21
  class << self
14
22
 
15
23
  attr_accessor :root_path, :source_path, :site, :layouts, :generators, :partials, :config
@@ -34,8 +42,8 @@ module Gumdrop
34
42
 
35
43
  # Scan
36
44
  #puts "Running in: #{root}"
37
- Dir["#{src}/**/*"].each do |path|
38
- unless File.directory? path
45
+ Dir.glob("#{src}/**/*", File::FNM_DOTMATCH).each do |path|
46
+ unless File.directory? path or File.basename(path) == '.DS_Store'
39
47
  file_path = (path.split('/') - @root_path).join '/'
40
48
  node= Content.new(file_path)
41
49
  @site[node.to_s]= node
@@ -71,15 +79,14 @@ module Gumdrop
71
79
 
72
80
  end
73
81
 
74
- base= File.dirname(__FILE__)
75
-
76
- require "#{base}/gumdrop/hash_object.rb"
82
+ # base= File.dirname(__FILE__)
83
+ # require "#{base}/gumdrop/hash_object.rb"
77
84
 
78
85
  Gumdrop.config= Gumdrop::HashObject.new(DEFAULT_OPTIONS)
79
86
 
80
- require "#{base}/gumdrop/version.rb"
81
- require "#{base}/gumdrop/view_helpers.rb"
82
- require "#{base}/gumdrop/context.rb"
83
- require "#{base}/gumdrop/content.rb"
84
- require "#{base}/gumdrop/server.rb"
85
- require "#{base}/gumdrop/generator.rb"
87
+ # require "#{base}/gumdrop/version.rb"
88
+ # require "#{base}/gumdrop/view_helpers.rb"
89
+ # require "#{base}/gumdrop/context.rb"
90
+ # require "#{base}/gumdrop/content.rb"
91
+ # require "#{base}/gumdrop/server.rb"
92
+ # require "#{base}/gumdrop/generator.rb"
metadata CHANGED
@@ -1,44 +1,111 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gumdrop
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.3
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Matt McCray
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-07-22 00:00:00 -05:00
18
- default_executable:
19
- dependencies: []
20
-
12
+ date: 2011-07-22 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sinatra
16
+ requirement: &70168329255500 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70168329255500
25
+ - !ruby/object:Gem::Dependency
26
+ name: tilt
27
+ requirement: &70168329255080 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70168329255080
36
+ - !ruby/object:Gem::Dependency
37
+ name: active_support
38
+ requirement: &70168329254660 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70168329254660
47
+ - !ruby/object:Gem::Dependency
48
+ name: trollop
49
+ requirement: &70168329254240 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70168329254240
58
+ - !ruby/object:Gem::Dependency
59
+ name: haml
60
+ requirement: &70168329253820 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70168329253820
69
+ - !ruby/object:Gem::Dependency
70
+ name: sass
71
+ requirement: &70168329253400 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70168329253400
21
80
  description: A simple cms/prototyping tool.
22
81
  email: matt@elucidata.net
23
- executables:
82
+ executables:
24
83
  - gumdrop
25
84
  extensions: []
26
-
27
85
  extra_rdoc_files: []
28
-
29
- files:
86
+ files:
87
+ - .gitignore
88
+ - ChangeLog.md
89
+ - Gemfile
90
+ - License
91
+ - Notes.md
92
+ - Rakefile
93
+ - Readme.md
30
94
  - bin/gumdrop
95
+ - gumdrop.gemspec
96
+ - lib/gumdrop.rb
31
97
  - lib/gumdrop/cli.rb
32
98
  - lib/gumdrop/content.rb
33
99
  - lib/gumdrop/context.rb
34
100
  - lib/gumdrop/generator.rb
35
101
  - lib/gumdrop/hash_object.rb
36
102
  - lib/gumdrop/server.rb
103
+ - lib/gumdrop/template/.htaccess
104
+ - lib/gumdrop/template/Gemfile
105
+ - lib/gumdrop/template/Rakefile
37
106
  - lib/gumdrop/template/config.ru
38
107
  - lib/gumdrop/template/data/config.yml
39
- - lib/gumdrop/template/Gemfile
40
108
  - lib/gumdrop/template/lib/view_helpers.rb
41
- - lib/gumdrop/template/Rakefile
42
109
  - lib/gumdrop/template/source/favicon.ico
43
110
  - lib/gumdrop/template/source/index.html.erb
44
111
  - lib/gumdrop/template/source/theme/screen.css.scss
@@ -47,40 +114,28 @@ files:
47
114
  - lib/gumdrop/template/source/theme/templates/site.template.haml
48
115
  - lib/gumdrop/version.rb
49
116
  - lib/gumdrop/view_helpers.rb
50
- - lib/gumdrop.rb
51
- - License
52
- - Readme.md
53
- has_rdoc: true
54
117
  homepage: https://github.com/darthapo/gumdrop
55
118
  licenses: []
56
-
57
119
  post_install_message:
58
120
  rdoc_options: []
59
-
60
- require_paths:
121
+ require_paths:
61
122
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
123
+ required_ruby_version: !ruby/object:Gem::Requirement
63
124
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 0
69
- version: "0"
70
- required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ! '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
130
  none: false
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- segments:
76
- - 0
77
- version: "0"
131
+ requirements:
132
+ - - ! '>='
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
78
135
  requirements: []
79
-
80
136
  rubyforge_project: gumdrop
81
- rubygems_version: 1.3.7
137
+ rubygems_version: 1.8.6
82
138
  signing_key:
83
139
  specification_version: 3
84
140
  summary: A simple cms/prototyping tool.
85
141
  test_files: []
86
-