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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 069be5f2f4982c44837bc6529a43e087c9abeee2
4
- data.tar.gz: e50462d7742e4c32eba46b4dc0e4ed7067db24c3
3
+ metadata.gz: 3d90823dca4b0df1edc0c568691ac712057a7ea2
4
+ data.tar.gz: 99bdd53e90658a39b0e169be58ac515a6dadb61f
5
5
  SHA512:
6
- metadata.gz: 87476f39909af938c08d85c1021ea22593566edd9e4c160d90c602feabb06f8f03fd1f37459fb47b251e4934212fc3003cdfc01c9ed0baf3512057bfc8be4dcc
7
- data.tar.gz: 2fa43b09d45be828162c4fb3552767cb0f86d306b815d95ad21a038881879ad2acce95d0b571b15e15feb5e1abf541494a36c9dd5f9b9832ca8e7a21862979c7
6
+ metadata.gz: 81a880337d5fdc94f45b21cf9184e2ec7bb1ed986265aafbca65dcf8a2e23891c3046fc80bfe2b3ea555c7b8fb708aed2fa693ce59e84388f1f90e013bb3fd31
7
+ data.tar.gz: 9e4fc3e262e518ce79f3954e5ce807653db9d23f8ff37879635ab5f6d2c317a72723ad1c1b73141b1aab30f655aa68c7618f017878ac908987769ddf52dab489
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
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 = FlatRack::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
@@ -1,4 +1,4 @@
1
- module FlatRack
1
+ module Flatrack
2
2
  module AssetExtensions
3
3
 
4
4
  def asset_path(path, options={})
@@ -1,4 +1,4 @@
1
- module FlatRack
1
+ module Flatrack
2
2
  module Renderer
3
3
  class Base
4
4
 
@@ -1,4 +1,4 @@
1
- module FlatRack
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
- klass = const_get(name.split('_').map(&:capitalize).join, false)
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
@@ -1,4 +1,4 @@
1
- module FlatRack
1
+ module Flatrack
2
2
  class Request
3
3
 
4
4
  DEFAULT_FORMAT = 'html'
@@ -1,4 +1,4 @@
1
- module FlatRack
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
- FlatRack.assets[name]
66
+ Flatrack.assets[name]
67
67
  end
68
68
 
69
69
  def javascript_exists?(name)
70
- FlatRack.assets[name]
70
+ Flatrack.assets[name]
71
71
  end
72
72
 
73
73
  end
@@ -1,4 +1,4 @@
1
- module FlatRack
1
+ module Flatrack
2
2
  class Response
3
3
 
4
4
  autoload :ViewContext, 'flatrack/response/view_context'
@@ -1,7 +1,7 @@
1
- module FlatRack
2
- App = Rack::Builder.app do
1
+ module Flatrack
2
+ Site = Rack::Builder.app do
3
3
  map '/assets' do
4
- run FlatRack.assets
4
+ run Flatrack.assets
5
5
  end
6
6
 
7
7
  map '/' do
@@ -1,3 +1,3 @@
1
- module FlatRack
2
- VERSION = "0.0.1.dev"
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 FlatRack
5
+ module Flatrack
6
6
  extend ActiveSupport::Autoload
7
7
 
8
8
  autoload :Renderer
9
9
  autoload :Request
10
10
  autoload :Response
11
- autoload :App
11
+ autoload :Site
12
12
  autoload :AssetExtensions
13
13
 
14
- RendererNotFound = Class.new(StandardError)
14
+ RendererNotFound = Class.new StandardError
15
15
  FileNotFound = Class.new StandardError
16
16
 
17
17
  FORMATS = {
@@ -43,7 +43,7 @@ module Rake
43
43
  end
44
44
 
45
45
  def initialize
46
- @environment = FlatRack.assets
46
+ @environment = Flatrack.assets
47
47
  @logger = Logger.new($stderr)
48
48
  @logger.level = Logger::INFO
49
49
  @index = environment.index
data/renderers/erb.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'flatrack/renderer/base'
2
2
 
3
- class FlatRack::Renderer::ERB < FlatRack::Renderer::Base
3
+ class Flatrack::Renderer::ERB < Flatrack::Renderer::Base
4
4
 
5
5
  renders :erb
6
6
 
data/renderers/html.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'flatrack/renderer/base'
2
2
 
3
- class FlatRack::Renderer::Html < FlatRack::Renderer::Base
3
+ class Flatrack::Renderer::Html < Flatrack::Renderer::Base
4
4
 
5
5
  renders :html
6
6
 
data/renderers/rb.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'flatrack/renderer/base'
2
2
 
3
- class FlatRack::Renderer::Rb < FlatRack::Renderer::Base
3
+ class Flatrack::Renderer::Rb < Flatrack::Renderer::Base
4
4
 
5
5
  renders :rb
6
6
 
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.dev
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-01-06 00:00:00.000000000 Z
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
- - "./Gemfile"
147
- - "./Gemfile.lock"
148
- - "./LICENSE.txt"
149
- - "./README.md"
150
- - "./Rakefile"
151
- - "./bin/flatrack"
152
- - "./flatrack.gemspec"
153
- - "./lib/flatrack.rb"
154
- - "./lib/flatrack/app.rb"
155
- - "./lib/flatrack/asset_extensions.rb"
156
- - "./lib/flatrack/rake/tasks.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/version.rb"
163
- - "./lib/rake/asset_tasks.rb"
164
- - "./renderers/erb.rb"
165
- - "./renderers/html.rb"
166
- - "./renderers/rb.rb"
167
- - "./spec/spec_helper.rb"
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: '0'
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: 1.3.1
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
@@ -1,9 +0,0 @@
1
- require 'rake'
2
- require 'flatrack'
3
- require 'rake/asset_tasks'
4
-
5
- Rake::AssetTasks.new do |t|
6
- t.environment = FlatRack.assets
7
- t.output = "./public/assets"
8
- t.assets = %w( application.js application.css )
9
- end