webget_ramp 1.7.1.3 → 1.7.1.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/lib/webget_ramp.rb CHANGED
@@ -25,6 +25,11 @@ Testing:
25
25
  * remove_column_and_index: database migration helper to add a table column and index at the same time.
26
26
 
27
27
 
28
+ == ActiveRecord::SaveExtensions
29
+
30
+ * save_false_then_reload!: a transaction to save and reload a record, to help repair associations
31
+
32
+
28
33
  == Array
29
34
 
30
35
  * car, cdr: aka first, rest (see shifted)
@@ -111,6 +116,11 @@ Testing:
111
116
  * logn(x,b): log of x in base b
112
117
 
113
118
 
119
+ == NilClass
120
+
121
+ * blank?: return true (same as Rails)
122
+
123
+
114
124
  == Numeric
115
125
 
116
126
  * if: returns 0 if the passed flag is any of: nil, false, 0, [], {} and otherwise returns self
@@ -190,6 +200,7 @@ Extensions that help debug Ruby programs.
190
200
 
191
201
  == Changes
192
202
 
203
+ - 1.7.1.4 Add ActiveRecord::SaveExtensions#save_false_then_reload!
193
204
  - 1.7.1.3 Add XML#strip_xxx
194
205
  - 1.7.1.2 Update gems: Gemcutter, Ruby 1.9.1, JRuby sqlite3
195
206
  - 1.7.1.0 Add XML attributes methods #
@@ -1,5 +1,10 @@
1
1
  class NilClass
2
2
 
3
+ # Same as Rails
4
+ def blank?
5
+ return true
6
+ end
7
+
3
8
  # Return false
4
9
  def size?
5
10
  return false
@@ -71,9 +71,10 @@ module XML
71
71
  # comments, and generally anything else we might need
72
72
  # to enable the XML parser to handle a dirty document.
73
73
  #
74
- # ==Example
75
- # s="<foo a=b c=d><!--comment-->Hello<!-[if bar]>Microsoft<![endif]>World</foo>"
76
- # XML.strip_all(s) => "<foo>HelloWorld</foo>"
74
+ # ==Example
75
+ # # This example shows curly braces instead of angle braces because of HTML formatting
76
+ # s="{foo a=b c=d}{!--comment--}Hello{!-[if bar]}Microsoft{![endif]}World{/foo}"
77
+ # XML.strip_all(s) => "{foo}HelloWorld{/foo}"
77
78
  #
78
79
  # This method calls these in order:
79
80
  # - XML.strip_unprintables
@@ -100,7 +101,8 @@ module XML
100
101
  # Strip out all comments from the xml text.
101
102
  #
102
103
  # ==Example
103
- # s="Hello<!--comment-->World"
104
+ # # This example shows curly braces instead of angle braces because of HTML formatting
105
+ # s="Hello{!--comment--}World"
104
106
  # XML.strip_comments(s) => "HelloWorld"
105
107
 
106
108
  def XML.strip_comments(xml_text)
@@ -3,6 +3,10 @@ require 'webget_ramp'
3
3
 
4
4
  class NilTest < Test::Unit::TestCase
5
5
 
6
+ def test_blank
7
+ assert_equal(true,nil.blank?)
8
+ end
9
+
6
10
  def test_size
7
11
  assert_equal(false,nil.size?)
8
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webget_ramp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1.3
4
+ version: 1.7.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - WebGet
@@ -32,7 +32,7 @@ cert_chain:
32
32
  DXnLFY0cVuBnNDMOOFl8vk1qIcZjcTovhzgcixpG6Uk5qmUsKHRLQf4oQJx7TfLK
33
33
  -----END CERTIFICATE-----
34
34
 
35
- date: 2009-10-29 00:00:00 -07:00
35
+ date: 2009-12-10 00:00:00 -08:00
36
36
  default_executable:
37
37
  dependencies: []
38
38
 
metadata.gz.sig CHANGED
Binary file