snow 0.1.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +20 -0
- data/Gemfile +4 -0
- data/README.rdoc +36 -0
- data/Rakefile +11 -0
- data/lib/snow.rb +3 -0
- data/lib/snow/version.rb +3 -0
- data/snow.gemspec +23 -0
- metadata +93 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
= Snow
|
2
|
+
|
3
|
+
Generate static pages with ease.
|
4
|
+
|
5
|
+
Snow makes it easy to use a layout in <tt>app/views/layouts/</tt> for pages like <tt>public/404.html</tt> and <tt>public/500.html</tt>.
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
Snow is currently in *alpha*. Effectively, there's just a README right now, as we still need to extract some code from a project.
|
10
|
+
|
11
|
+
To install:
|
12
|
+
|
13
|
+
gem install snow --pre
|
14
|
+
|
15
|
+
Or in your Gemfile:
|
16
|
+
|
17
|
+
gem 'snow', '= 0.1.0.alpha.1' # or newer version as appropriate
|
18
|
+
|
19
|
+
== Tutorial
|
20
|
+
|
21
|
+
Snow adds the following <tt>rake</tt> tasks by default:
|
22
|
+
|
23
|
+
rake statics # Render all statics to files
|
24
|
+
rake statics:404 # Render static 404 page with layout
|
25
|
+
rake statics:422 # Render static 422 page with layout
|
26
|
+
rake statics:500 # Render static 500 page with layout
|
27
|
+
|
28
|
+
Snow uses actions in a controller named <tt>StaticsController</tt>. Essentially, <tt>rake statics</tt> does this:
|
29
|
+
|
30
|
+
app/views/statics/not_found.html.erb => public/404.html
|
31
|
+
app/views/statics/unprocessable.html.erb => public/422.html
|
32
|
+
app/views/statics/server_error.html.erb => public/500.html
|
33
|
+
|
34
|
+
This is a one time rendering so that you don't have to resort to any strange ApplicationController/Rails changes just to easily have a layout for your statics.
|
35
|
+
|
36
|
+
Did your layout change? Just run <tt>rake statics</tt> and all the statics will be refreshed.
|
data/Rakefile
ADDED
data/lib/snow.rb
ADDED
data/lib/snow/version.rb
ADDED
data/snow.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "snow/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "snow"
|
7
|
+
s.version = Snow::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Benjamin Oakes"]
|
10
|
+
s.email = ["boakes@hedgeye.com"]
|
11
|
+
s.homepage = "http://github.com/hedgeyedev/snow"
|
12
|
+
s.summary = %q{Generate static pages with ease, using a layout for public/404.html, etc}
|
13
|
+
s.description = s.summary
|
14
|
+
|
15
|
+
s.rubyforge_project = "snow"
|
16
|
+
|
17
|
+
s.add_dependency('rails', '~> 3.0.0')
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split("\n")
|
20
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: snow
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: -3702664370
|
5
|
+
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
- alpha
|
11
|
+
- 1
|
12
|
+
version: 0.1.0.alpha.1
|
13
|
+
platform: ruby
|
14
|
+
authors:
|
15
|
+
- Benjamin Oakes
|
16
|
+
autorequire:
|
17
|
+
bindir: bin
|
18
|
+
cert_chain: []
|
19
|
+
|
20
|
+
date: 2011-06-03 00:00:00 -04:00
|
21
|
+
default_executable:
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
name: rails
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ~>
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 7
|
32
|
+
segments:
|
33
|
+
- 3
|
34
|
+
- 0
|
35
|
+
- 0
|
36
|
+
version: 3.0.0
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
39
|
+
description: Generate static pages with ease, using a layout for public/404.html, etc
|
40
|
+
email:
|
41
|
+
- boakes@hedgeye.com
|
42
|
+
executables: []
|
43
|
+
|
44
|
+
extensions: []
|
45
|
+
|
46
|
+
extra_rdoc_files: []
|
47
|
+
|
48
|
+
files:
|
49
|
+
- .gitignore
|
50
|
+
- Gemfile
|
51
|
+
- README.rdoc
|
52
|
+
- Rakefile
|
53
|
+
- lib/snow.rb
|
54
|
+
- lib/snow/version.rb
|
55
|
+
- snow.gemspec
|
56
|
+
has_rdoc: true
|
57
|
+
homepage: http://github.com/hedgeyedev/snow
|
58
|
+
licenses: []
|
59
|
+
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
|
63
|
+
require_paths:
|
64
|
+
- lib
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
hash: 25
|
80
|
+
segments:
|
81
|
+
- 1
|
82
|
+
- 3
|
83
|
+
- 1
|
84
|
+
version: 1.3.1
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project: snow
|
88
|
+
rubygems_version: 1.6.2
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Generate static pages with ease, using a layout for public/404.html, etc
|
92
|
+
test_files: []
|
93
|
+
|