darkhelmet-darkext 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.9.2 2009-2-27
2
+
3
+ * Few fixes
4
+
5
+ == 0.9.1 2009-2-26
6
+
7
+ * go back to regular partial
8
+
1
9
  == 0.9.0 2009-2-26
2
10
 
3
11
  * fix and let's release a new minor
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 9
3
- :patch: 0
3
+ :patch: 2
4
4
  :major: 0
@@ -64,7 +64,9 @@ private
64
64
  section_hash = Hash.new
65
65
  section_lines.each do |line|
66
66
  if !line.include?('=') || line.starts_with?(' Snip')
67
- k,v = line.split(':')
67
+ parts = line.split(':')
68
+ k = parts.shift
69
+ v = parts.join(':')
68
70
  else
69
71
  k,v = line.split('=')
70
72
  k = k.split(':').last
@@ -7,16 +7,8 @@ module Sinatra
7
7
  html
8
8
  end
9
9
 
10
- def partial(template, options = {})
11
- options.merge!(:layout => false)
12
- if collection = options.delete(:collection) then
13
- collection.inject([]) do |buffer, member|
14
- buffer << haml(template, options.merge(:layout => false,
15
- :locals => {template.to_sym => member}))
16
- end.join("\n")
17
- else
18
- haml(template, options)
19
- end
10
+ def partial(view, options = {})
11
+ haml(view,options.merge(:layout => false))
20
12
  end
21
13
 
22
14
  def css_link_tag(sheet, media = 'screen,projection')
@@ -62,6 +54,10 @@ module Sinatra
62
54
  def base
63
55
  host + options.site_base
64
56
  end
57
+
58
+ def redirect_back
59
+ redirect(request.env['HTTP_REFERER'])
60
+ end
65
61
  end
66
62
 
67
63
  def self.registered(app)
@@ -43,5 +43,13 @@ class String
43
43
  Kernel.print(self + "\n")
44
44
  end
45
45
 
46
+ def true?
47
+ self.downcase == 'true'
48
+ end
49
+
50
+ def false?
51
+ self.downcase == 'false'
52
+ end
53
+
46
54
  alias :/ :split
47
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkhelmet-darkext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Huckstep
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-26 00:00:00 -08:00
12
+ date: 2009-02-27 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15