flatrack 0.0.1.dev → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/flatrack.gemspec +9 -2
- data/lib/flatrack/asset_extensions.rb +1 -1
- data/lib/flatrack/renderer/base.rb +1 -1
- data/lib/flatrack/renderer.rb +3 -6
- data/lib/flatrack/request.rb +1 -1
- data/lib/flatrack/response/view_context.rb +3 -3
- data/lib/flatrack/response.rb +1 -1
- data/lib/flatrack/{app.rb → site.rb} +3 -3
- data/lib/flatrack/version.rb +2 -2
- data/lib/flatrack.rb +3 -3
- data/lib/rake/asset_tasks.rb +1 -1
- data/renderers/erb.rb +1 -1
- data/renderers/html.rb +1 -1
- data/renderers/rb.rb +1 -1
- data/spec/lib/flatrack_spec.rb +0 -0
- data/spec/rake/asset_tasks_spec.rb +0 -0
- metadata +35 -29
- data/lib/flatrack/rake/tasks.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d90823dca4b0df1edc0c568691ac712057a7ea2
|
4
|
+
data.tar.gz: 99bdd53e90658a39b0e169be58ac515a6dadb61f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81a880337d5fdc94f45b21cf9184e2ec7bb1ed986265aafbca65dcf8a2e23891c3046fc80bfe2b3ea555c7b8fb708aed2fa693ce59e84388f1f90e013bb3fd31
|
7
|
+
data.tar.gz: 9e4fc3e262e518ce79f3954e5ce807653db9d23f8ff37879635ab5f6d2c317a72723ad1c1b73141b1aab30f655aa68c7618f017878ac908987769ddf52dab489
|
data/.rspec
ADDED
data/flatrack.gemspec
CHANGED
@@ -4,20 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'flatrack/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
+
|
8
|
+
# Information
|
7
9
|
spec.name = "flatrack"
|
8
|
-
spec.version =
|
10
|
+
spec.version = Flatrack::VERSION
|
9
11
|
spec.authors = ["Jason Waldrip"]
|
10
12
|
spec.email = ["jason@waldrip.net"]
|
11
13
|
spec.summary = 'A template based flat rack site'
|
12
14
|
spec.homepage = "https://github.com/jwaldrip/flatrack"
|
13
15
|
spec.license = "MIT"
|
14
16
|
|
17
|
+
# Files
|
15
18
|
spec.files = `git ls-files`.split($/)
|
16
|
-
spec.files = Dir.glob File.join __dir__, '**', '*'
|
17
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
21
|
spec.require_paths = ["lib"]
|
20
22
|
|
23
|
+
# Ruby Version
|
24
|
+
spec.required_ruby_version = '>= 1.6.8'
|
25
|
+
|
26
|
+
# Dependencies
|
21
27
|
spec.add_dependency 'rack'
|
22
28
|
spec.add_dependency 'activesupport'
|
23
29
|
spec.add_dependency 'sass'
|
@@ -26,6 +32,7 @@ Gem::Specification.new do |spec|
|
|
26
32
|
spec.add_dependency 'coffee-script'
|
27
33
|
spec.add_dependency 'rake'
|
28
34
|
|
35
|
+
# Dev Dependencies
|
29
36
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
30
37
|
spec.add_development_dependency 'rspec'
|
31
38
|
end
|
data/lib/flatrack/renderer.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Flatrack
|
2
2
|
module Renderer
|
3
3
|
extend self
|
4
4
|
extend ActiveSupport::Autoload
|
@@ -10,13 +10,10 @@ module FlatRack
|
|
10
10
|
raise FileNotFound, "could not find #{file}" unless template
|
11
11
|
ext = File.extname(template).sub(/\./, '')
|
12
12
|
|
13
|
-
Base.descendants.find { |descendant| descendant.renders?(ext) } ||
|
13
|
+
renderer = Base.descendants.find { |descendant| descendant.renders?(ext) } ||
|
14
14
|
raise(RendererNotFound, "could not find a renderer for #{file}")
|
15
15
|
|
16
|
-
|
17
|
-
klass.new template
|
18
|
-
rescue NameError, TypeError
|
19
|
-
raise RendererNotFound, "could not find a renderer for #{file}"
|
16
|
+
renderer.new template
|
20
17
|
end
|
21
18
|
|
22
19
|
end
|
data/lib/flatrack/request.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Flatrack
|
2
2
|
class Response
|
3
3
|
class ViewContext
|
4
4
|
|
@@ -63,11 +63,11 @@ module FlatRack
|
|
63
63
|
private
|
64
64
|
|
65
65
|
def stylesheet_exists?(name)
|
66
|
-
|
66
|
+
Flatrack.assets[name]
|
67
67
|
end
|
68
68
|
|
69
69
|
def javascript_exists?(name)
|
70
|
-
|
70
|
+
Flatrack.assets[name]
|
71
71
|
end
|
72
72
|
|
73
73
|
end
|
data/lib/flatrack/response.rb
CHANGED
data/lib/flatrack/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
2
|
-
VERSION = "0.0.1
|
1
|
+
module Flatrack
|
2
|
+
VERSION = "0.0.1"
|
3
3
|
end
|
data/lib/flatrack.rb
CHANGED
@@ -2,16 +2,16 @@ require 'flatrack/version'
|
|
2
2
|
require 'sprockets'
|
3
3
|
require 'active_support/all'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Flatrack
|
6
6
|
extend ActiveSupport::Autoload
|
7
7
|
|
8
8
|
autoload :Renderer
|
9
9
|
autoload :Request
|
10
10
|
autoload :Response
|
11
|
-
autoload :
|
11
|
+
autoload :Site
|
12
12
|
autoload :AssetExtensions
|
13
13
|
|
14
|
-
RendererNotFound = Class.new
|
14
|
+
RendererNotFound = Class.new StandardError
|
15
15
|
FileNotFound = Class.new StandardError
|
16
16
|
|
17
17
|
FORMATS = {
|
data/lib/rake/asset_tasks.rb
CHANGED
data/renderers/erb.rb
CHANGED
data/renderers/html.rb
CHANGED
data/renderers/rb.rb
CHANGED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flatrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Waldrip
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -139,32 +139,35 @@ dependencies:
|
|
139
139
|
description:
|
140
140
|
email:
|
141
141
|
- jason@waldrip.net
|
142
|
-
executables:
|
142
|
+
executables:
|
143
|
+
- flatrack
|
143
144
|
extensions: []
|
144
145
|
extra_rdoc_files: []
|
145
146
|
files:
|
146
|
-
- "
|
147
|
-
-
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
164
|
-
-
|
165
|
-
-
|
166
|
-
-
|
167
|
-
-
|
147
|
+
- ".rspec"
|
148
|
+
- Gemfile
|
149
|
+
- Gemfile.lock
|
150
|
+
- LICENSE.txt
|
151
|
+
- README.md
|
152
|
+
- Rakefile
|
153
|
+
- bin/flatrack
|
154
|
+
- flatrack.gemspec
|
155
|
+
- lib/flatrack.rb
|
156
|
+
- lib/flatrack/asset_extensions.rb
|
157
|
+
- lib/flatrack/renderer.rb
|
158
|
+
- lib/flatrack/renderer/base.rb
|
159
|
+
- lib/flatrack/request.rb
|
160
|
+
- lib/flatrack/response.rb
|
161
|
+
- lib/flatrack/response/view_context.rb
|
162
|
+
- lib/flatrack/site.rb
|
163
|
+
- lib/flatrack/version.rb
|
164
|
+
- lib/rake/asset_tasks.rb
|
165
|
+
- renderers/erb.rb
|
166
|
+
- renderers/html.rb
|
167
|
+
- renderers/rb.rb
|
168
|
+
- spec/lib/flatrack_spec.rb
|
169
|
+
- spec/rake/asset_tasks_spec.rb
|
170
|
+
- spec/spec_helper.rb
|
168
171
|
homepage: https://github.com/jwaldrip/flatrack
|
169
172
|
licenses:
|
170
173
|
- MIT
|
@@ -177,16 +180,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
180
|
requirements:
|
178
181
|
- - ">="
|
179
182
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
183
|
+
version: 1.6.8
|
181
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
185
|
requirements:
|
183
|
-
- - "
|
186
|
+
- - ">="
|
184
187
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
188
|
+
version: '0'
|
186
189
|
requirements: []
|
187
190
|
rubyforge_project:
|
188
191
|
rubygems_version: 2.2.0
|
189
192
|
signing_key:
|
190
193
|
specification_version: 4
|
191
194
|
summary: A template based flat rack site
|
192
|
-
test_files:
|
195
|
+
test_files:
|
196
|
+
- spec/lib/flatrack_spec.rb
|
197
|
+
- spec/rake/asset_tasks_spec.rb
|
198
|
+
- spec/spec_helper.rb
|