maneki 1.0.2 → 1.1.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.
Files changed (6) hide show
  1. data/README.markdown +6 -0
  2. data/Rakefile +1 -1
  3. data/VERSION +1 -1
  4. data/lib/maneki.rb +5 -3
  5. data/maneki.gemspec +19 -27
  6. metadata +9 -12
@@ -99,6 +99,12 @@ If you want to get a list of the found categories then ask for it.
99
99
  Maneki.categories
100
100
 
101
101
 
102
+ Full Example
103
+ ------------
104
+
105
+ Have a look at [my Maneki Example repository](http://github.com/nathanhoad/maneki-example) for a full example of using Maneki (with Sinatra).
106
+
107
+
102
108
  Suggestions?
103
109
  ------------
104
110
 
data/Rakefile CHANGED
@@ -26,7 +26,7 @@ end
26
26
 
27
27
 
28
28
  ### DOCUMENTATION ###
29
- require 'rake/rdoctask'
29
+ require 'rdoc/task'
30
30
  Rake::RDocTask.new do |rdoc|
31
31
  if File.exist? 'VERSION'
32
32
  version = File.read('VERSION')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.1.0
@@ -41,8 +41,10 @@ class Maneki
41
41
 
42
42
  # Search for any documents
43
43
  def self.find (args = {})
44
- if args[:slug] or args.is_a? String
45
- return find_by_slug(args[:slug] || args)
44
+ if args.is_a? String
45
+ return find_by_slug(args)
46
+ elsif args[:slug]
47
+ return find_by_slug(args[:slug])
46
48
  end
47
49
 
48
50
  match = args[:match] || :all
@@ -128,7 +130,7 @@ class Maneki
128
130
 
129
131
  body = File.open(@filename).readlines
130
132
  body.each do |line|
131
- line.gsub!("\r", '') # fix up any DOS EOLs
133
+ line.chomp!("\r") # fix up any DOS EOLs
132
134
  end
133
135
 
134
136
  title = body.find { |item| /^\#.+/.match item }
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{maneki}
8
- s.version = "1.0.2"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Hoad"]
12
- s.date = %q{2010-05-30}
12
+ s.date = %q{2011-08-12}
13
13
  s.description = %q{Maneki loads and parses any relevant text files in a given directory}
14
14
  s.email = %q{nathan@nathanhoad.net}
15
15
  s.extra_rdoc_files = [
@@ -17,36 +17,28 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  "README.markdown",
20
- "Rakefile",
21
- "VERSION",
22
- "lib/maneki.rb",
23
- "maneki.gemspec",
24
- "test/chapter.rb",
25
- "test/content/chapters/01-the-first-chapter.text",
26
- "test/content/chapters/02-chapter-2.text",
27
- "test/content/chapters/03-chapter-with-headers.text",
28
- "test/content/chapters/04-different-chapter.text",
29
- "test/content/documents/first-document.text",
30
- "test/content/documents/second-document.text",
31
- "test/content/documents/third-document.text",
32
- "test/test_all.rb",
33
- "test/test_chapters.rb",
34
- "test/test_maneki.rb"
20
+ "Rakefile",
21
+ "VERSION",
22
+ "lib/maneki.rb",
23
+ "maneki.gemspec",
24
+ "test/chapter.rb",
25
+ "test/content/chapters/01-the-first-chapter.text",
26
+ "test/content/chapters/02-chapter-2.text",
27
+ "test/content/chapters/03-chapter-with-headers.text",
28
+ "test/content/chapters/04-different-chapter.text",
29
+ "test/content/documents/first-document.text",
30
+ "test/content/documents/second-document.text",
31
+ "test/content/documents/third-document.text",
32
+ "test/test_all.rb",
33
+ "test/test_chapters.rb",
34
+ "test/test_maneki.rb"
35
35
  ]
36
36
  s.homepage = %q{http://github.com/nathanhoad/maneki}
37
- s.rdoc_options = ["--charset=UTF-8"]
38
37
  s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.7}
38
+ s.rubygems_version = %q{1.6.2}
40
39
  s.summary = %q{A simple file-based model for your Ruby projects}
41
- s.test_files = [
42
- "test/chapter.rb",
43
- "test/test_all.rb",
44
- "test/test_chapters.rb",
45
- "test/test_maneki.rb"
46
- ]
47
40
 
48
41
  if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
42
  s.specification_version = 3
51
43
 
52
44
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -2,12 +2,12 @@
2
2
  name: maneki
3
3
  version: !ruby/object:Gem::Version
4
4
  hash: 19
5
- prerelease: false
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 2
10
- version: 1.0.2
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Hoad
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-30 00:00:00 +10:00
18
+ date: 2011-08-12 00:00:00 +10:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -49,8 +49,8 @@ homepage: http://github.com/nathanhoad/maneki
49
49
  licenses: []
50
50
 
51
51
  post_install_message:
52
- rdoc_options:
53
- - --charset=UTF-8
52
+ rdoc_options: []
53
+
54
54
  require_paths:
55
55
  - lib
56
56
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -74,12 +74,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements: []
75
75
 
76
76
  rubyforge_project:
77
- rubygems_version: 1.3.7
77
+ rubygems_version: 1.6.2
78
78
  signing_key:
79
79
  specification_version: 3
80
80
  summary: A simple file-based model for your Ruby projects
81
- test_files:
82
- - test/chapter.rb
83
- - test/test_all.rb
84
- - test/test_chapters.rb
85
- - test/test_maneki.rb
81
+ test_files: []
82
+