statica 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  Gemfile.lock
2
+ .rvmrc
2
3
 
3
4
  *.swp
4
5
 
data/README.md CHANGED
@@ -16,7 +16,7 @@ TODO:
16
16
 
17
17
  The goal is to achieve the simplicity of appending a query parameter and the precision offered by implementing a per file digest system.
18
18
 
19
- In order to achieve this, Statica takes the simple approach of appendin the hex digest to the end of the static asset path like so:
19
+ In order to achieve this, Statica takes the simple approach of appending the hex digest to the end of the static asset path like so:
20
20
 
21
21
  > Statica.digest_url("/javascripts/application.js")
22
22
  =>"/javascripts/application.js/d79dbf6e6c051b22f1ab91fec4cf81855883cc7d0a3f3e242b56b97fbcd756cb"
@@ -26,7 +26,7 @@ Notice how the file name does not change. We are simply appending a qualifier to
26
26
  # If Statica path, remove the digest portion, allow app to serve normally
27
27
  use Rack::StaticaServer
28
28
 
29
- If you want an HTTP Server like [Apache](http://httpd.apache.org/) or [Nginx](http://wiki.nginx.org/Main) you can setup rules to ignore the digest and server the asset. I'll sample rules here later.
29
+ If you use an HTTP Server like [Apache](http://httpd.apache.org/) or [Nginx](http://wiki.nginx.org/Main) you can setup rules to ignore the digest and server the asset. I'll post sample rules here later.
30
30
 
31
31
  # About
32
32
 
@@ -3,6 +3,10 @@ require 'digest/sha2'
3
3
  module Statica
4
4
  class ResourceNotFoundError < StandardError; end
5
5
 
6
+ # Statica version string
7
+ # @api public
8
+ VERSION = '0.2.0'
9
+
6
10
  extend self
7
11
 
8
12
  # Fully qualified path to the root directory
@@ -17,7 +21,7 @@ module Statica
17
21
  end
18
22
 
19
23
  def sub_dirs
20
- @sub_dirs ||= %w{javascripts stylesheets images}
24
+ @sub_dirs ||= %w{javascripts stylesheets images js css}
21
25
  end
22
26
 
23
27
  def sub_dirs=(array)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.dirname(__FILE__) + '/lib/statica/version'
2
+ require File.dirname(__FILE__) + '/lib/statica'
3
3
  require 'date'
4
4
 
5
5
  Gem::Specification.new do |s|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-07 00:00:00.000000000 Z
12
+ date: 2011-12-22 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -25,7 +25,6 @@ files:
25
25
  - Rakefile
26
26
  - lib/rack/statica_server.rb
27
27
  - lib/statica.rb
28
- - lib/statica/version.rb
29
28
  - statica.gemspec
30
29
  - test/helper.rb
31
30
  - test/test_statica.rb
@@ -1,5 +0,0 @@
1
- module Statica
2
- # Statica version string
3
- # @api public
4
- VERSION = '0.1.0'
5
- end