vanilla 1.11.3 → 1.11.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ if Object.const_defined?(:Gem)
24
24
 
25
25
  # Change these as appropriate
26
26
  s.name = "vanilla"
27
- s.version = "1.11.3"
27
+ s.version = "1.11.4"
28
28
  s.summary = "A bliki-type web content thing."
29
29
  s.author = "James Adam"
30
30
  s.email = "james@lazyatom.com.com"
@@ -41,7 +41,7 @@ if Object.const_defined?(:Gem)
41
41
 
42
42
  # All the other gems we need.
43
43
  s.add_dependency("rack", ">= 0.9.1")
44
- s.add_dependency("soup", ">= 0.9.13")
44
+ s.add_dependency("soup", ">= 1.0.0")
45
45
  s.add_dependency("ratom", ">= 0.3.5")
46
46
  s.add_dependency("RedCloth", ">= 4.1.1")
47
47
  s.add_dependency("BlueCloth", ">= 1.0.0")
@@ -99,9 +99,9 @@ EOF
99
99
 
100
100
  task :load_snips do
101
101
  print "Preparing soup... "
102
- system_soup = ::Soup.new(::Soup::Backends::YAMLBackend.new("soup/system"))
102
+ system_soup = ::Soup.new(::Soup::Backends::FileBackend.new("soup/system"))
103
103
  system_soup << eval(File.read(File.join(File.dirname(__FILE__), '..', 'vanilla', 'snips', 'system.rb')))
104
- dynasnip_soup = ::Soup.new(::Soup::Backends::YAMLBackend.new("soup/system/dynasnips"))
104
+ dynasnip_soup = ::Soup.new(::Soup::Backends::FileBackend.new("soup/system/dynasnips"))
105
105
  Dynasnip.all.each { |ds| dynasnip_soup << ds.snip_attributes }
106
106
  Dir[File.join(File.dirname(__FILE__), '..', 'vanilla', 'snips', '{start,tutorial}.rb')].each do |f|
107
107
  load f
data/lib/vanilla/app.rb CHANGED
@@ -102,10 +102,10 @@ module Vanilla
102
102
 
103
103
  def prepare_soup(config)
104
104
  if config[:soups]
105
- backends = [config[:soups]].flatten.map { |path| Vanilla::Soup::TimestampBackend.new(::Soup::Backends::YAMLBackend.new(path)) }
105
+ backends = [config[:soups]].flatten.map { |path| ::Soup::Backends::FileBackend.new(path) }
106
106
  ::Soup.new(::Soup::Backends::MultiSoup.new(*backends))
107
107
  else
108
- ::Soup.new(Vanilla::Soup::TimestampBackend.new(::Soup::Backends::YAMLBackend.new(config[:soup])))
108
+ ::Soup.new(::Soup::Backends::FileBackend.new(config[:soup]))
109
109
  end
110
110
  end
111
111
  end
@@ -15,7 +15,7 @@ class Comments < Dynasnip
15
15
 
16
16
  def get(disable_new_comments=false)
17
17
  return usage if self.class.snip_name == app.request.snip_name
18
- comments = app.soup.sieve(:commenting_on => enclosing_snip.name)
18
+ comments = app.soup.with(:commenting_on => enclosing_snip.name)
19
19
  comments_html = if app.request.snip_name == enclosing_snip.name
20
20
  rendered_comments = render_comments(comments)
21
21
  rendered_comments += comment_form.gsub('SNIP_NAME', enclosing_snip.name) unless disable_new_comments
@@ -28,7 +28,7 @@ class Comments < Dynasnip
28
28
 
29
29
  def post(*args)
30
30
  snip_name = app.request.params[:snip]
31
- existing_comments = app.soup.sieve(:commenting_on => snip_name)
31
+ existing_comments = app.soup.with(:commenting_on => snip_name)
32
32
  comment = app.request.params.reject { |k,v| ![:author, :email, :website, :content].include?(k) }
33
33
 
34
34
  return "You need to add some details!" if comment.empty?
@@ -5,7 +5,7 @@ require 'date'
5
5
  class Kind < Dynasnip
6
6
  def handle(kind, limit=10, as=:html)
7
7
  as = as.to_sym
8
- snips = app.soup.sieve(:kind => kind)
8
+ snips = app.soup.with(:kind => kind)
9
9
  entries = snips.sort_by { |s| s.created_at || Time.at(0) }.reverse[0...limit.to_i].map do |snip|
10
10
  render_entry_in_template(snip, as, kind)
11
11
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 11
8
- - 3
9
- version: 1.11.3
8
+ - 4
9
+ version: 1.11.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - James Adam
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-14 00:00:00 +01:00
17
+ date: 2010-08-08 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -39,10 +39,10 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  segments:
42
+ - 1
42
43
  - 0
43
- - 9
44
- - 13
45
- version: 0.9.13
44
+ - 0
45
+ version: 1.0.0
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency