manifesto 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -7,6 +7,12 @@ By default it also includes a computed hash of the files' contents, so that if a
7
7
 
8
8
  * Ruby >= 1.8.6 (not tested with previous versions)
9
9
 
10
+ Manifesto has been successfully tested against the following Ruby releases:
11
+
12
+ * Ruby 1.8.6
13
+ * Ruby 1.8.7
14
+ * Ruby 1.9.1
15
+
10
16
  == Installation
11
17
 
12
18
  This library is intended to be installed as a Gem.
@@ -48,7 +54,20 @@ You might need administrator privileges on your system to install it.
48
54
 
49
55
  == Ruby on Rails Example
50
56
 
51
- TODO
57
+ * Create a route for the cache manifest:
58
+
59
+ map.manifest '/manifest', :controller => 'manifest', :action => 'show' # Rails 2.x
60
+
61
+ -- or --
62
+
63
+ match '/manifest' => 'manifest#show' # Rails 3.x
64
+
65
+ * Create a controller action:
66
+
67
+ def show
68
+ headers['Content-Type'] = 'text/cache-manifest'
69
+ render :text => Manifesto.cache, :layout => false
70
+ end
52
71
 
53
72
  == Issues
54
73
 
@@ -64,6 +83,10 @@ Please use the {GitHub issues tracker}[http://github.com/johntopley/manifesto/is
64
83
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
65
84
  * Send me a pull request. Bonus points for topic branches
66
85
 
86
+ == Thanks
87
+
88
+ * Thanks to {Nasir Jamal}[http://github.com/nas] for helping me with RSpec.
89
+
67
90
  == Copyright
68
91
 
69
92
  Copyright (c) 2010 John Topley. See LICENSE for details.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gem.description = %Q{Dynamically generates an HTML5 cache manifest from the contents of a directory}
10
10
  gem.email = "john@johntopley.com"
11
11
  gem.homepage = "http://github.com/johntopley/manifesto"
12
- gem.authors = ["John Topley"]
12
+ gem.authors = ["John Topley","Nasir Jamal"]
13
13
  gem.add_development_dependency "rspec", ">= 1.2.9"
14
14
  gem.rubyforge_project = "manifesto"
15
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.6.0
data/lib/manifesto.rb CHANGED
@@ -52,7 +52,7 @@ class Manifesto
52
52
  hash
53
53
  end
54
54
 
55
- # Recursively find all file entries from within a directory.
55
+ # Recursively finds all file entries from within a directory.
56
56
  def self.get_file_paths(directory)
57
57
  entries = []
58
58
  Find.find(directory) { |entry| entries << entry }
@@ -67,16 +67,19 @@ class Manifesto
67
67
  normalized_path
68
68
  end
69
69
 
70
+ # Checks that the options passed to the <tt>cache</tt> method are valid.
70
71
  def self.validate_options(directory, compute_hash)
71
72
  raise(ArgumentError, ":directory must be a real directory") unless valid_directory?(directory)
72
73
  raise(ArgumentError, ":compute_hash must be a boolean") unless valid_compute_hash?(compute_hash)
73
74
  end
74
75
 
76
+ # Checks that the <tt>compute_hash</tt> option is a boolean.
75
77
  def self.valid_compute_hash?(compute_hash)
76
78
  compute_hash.is_a?(TrueClass) || compute_hash.is_a?(FalseClass)
77
79
  end
78
80
 
81
+ # Checks that the <tt>directory</tt> option corresponds to a real directory.
79
82
  def self.valid_directory?(directory)
80
83
  File.directory?(directory)
81
84
  end
82
- end
85
+ end
data/manifesto.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{manifesto}
8
- s.version = "0.5.0"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["John Topley"]
12
- s.date = %q{2010-06-09}
11
+ s.authors = ["John Topley", "Nasir Jamal"]
12
+ s.date = %q{2010-06-30}
13
13
  s.description = %q{Dynamically generates an HTML5 cache manifest from the contents of a directory}
14
14
  s.email = %q{john@johntopley.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,21 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifesto
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Topley
14
+ - Nasir Jamal
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-06-09 00:00:00 +01:00
19
+ date: 2010-06-30 00:00:00 +01:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency