jquery-cheat 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,4 +11,15 @@
11
11
  == 0.1.2 2007-06-01
12
12
 
13
13
  * 1 minor bugfix
14
- * removed dependency on Marshal
14
+ * removed dependency on Marshal
15
+
16
+ == 0.2.0 2007-06-01
17
+
18
+ * 2 major enhancements:
19
+ * complete refactor
20
+ * support for filters
21
+
22
+ == 0.2.1 2007-06-01
23
+
24
+ * 1 trivial enhancement
25
+ * fixed tests
@@ -2,7 +2,7 @@ module JQueryCheat #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,8 +1,8 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
2
  require 'flexmock/test_unit'
3
3
 
4
- StubMethod = JQueryMethod.dup
5
- StubMethods = JQueryMethods.dup
4
+ StubMethod = JQuery::Method.dup
5
+ StubMethods = JQuery::Methods.dup
6
6
 
7
7
  class StubMethod
8
8
  def initialize options = {}
@@ -33,11 +33,11 @@ class TestJQueryCheat < Test::Unit::TestCase
33
33
 
34
34
  def test_named
35
35
  assert_hash_equals_filter({:name => '$'}, "method[@name='$']")
36
- assert_hash_equals_filter({:name => '$', :precise => true}, "method[@name='$']")
36
+ assert_hash_equals_filter({:name => '$', :substring => false}, "method[@name='$']")
37
37
  end
38
38
 
39
39
  def test_named_imprecise
40
- assert_hash_equals_filter({:name => '$', :precise => false}, "method[@name*='$']")
40
+ assert_hash_equals_filter({:name => '$', :substring => true}, "method[@name*='$']")
41
41
  end
42
42
 
43
43
  def test_module
@@ -51,22 +51,22 @@ class TestJQueryCheat < Test::Unit::TestCase
51
51
 
52
52
  def test_like
53
53
  expected_parse = @@parsed.search("method[@cat*='Plugins']").reject {|m| m.search("> desc").inner_text !~ /clear/i }
54
- assert_equal JQueryParser.get_methods_by_hash(:module => "Plugins", :recursive => true, :like => ["clear"]).inner_html, expected_parse.inner_html
54
+ assert_equal JQuery::Parser.get_methods_by_hash(:module => "Plugins", :recursive => true, :like => ["clear"]).inner_html, expected_parse.inner_html
55
55
  end
56
56
 
57
57
  def test_like_multiple
58
58
  expected_parse = @@parsed.search("method[@cat*='Plugins']").reject {|m| m.search("> desc").inner_text !~ /clear/i || m.search("> desc").inner_text !~ /field/i }
59
- assert_equal JQueryParser.get_methods_by_hash(:module => "Plugins", :recursive => true, :like => ["clear", "field"]).inner_html, expected_parse.inner_html
59
+ assert_equal JQuery::Parser.get_methods_by_hash(:module => "Plugins", :recursive => true, :like => ["clear", "field"]).inner_html, expected_parse.inner_html
60
60
  end
61
61
 
62
62
  def test_params
63
63
  expected_parse = @@parsed.search("method[@cat*='Core']").reject {|m| m.search("params[@name=html]").length == 0 }
64
- assert_equal JQueryParser.get_methods_by_hash(:module => "Core", :recursive => true, :params => ["html"]).inner_html, expected_parse.inner_html
64
+ assert_equal JQuery::Parser.get_methods_by_hash(:module => "Core", :recursive => true, :params => ["html"]).inner_html, expected_parse.inner_html
65
65
  end
66
66
 
67
67
  def test_params_multiple
68
68
  expected_parse = @@parsed.search("method[@cat*='Core']").reject {|m| m.search("params[@name=expr]").length == 0 || m.search("params[@name=context]").length == 0}
69
- assert_equal JQueryParser.get_methods_by_hash(:module => "Core", :recursive => true, :params => ["expr", "context"]).inner_html, expected_parse.inner_html
69
+ assert_equal JQuery::Parser.get_methods_by_hash(:module => "Core", :recursive => true, :params => ["expr", "context"]).inner_html, expected_parse.inner_html
70
70
  end
71
71
 
72
72
  def test_signature
@@ -82,11 +82,11 @@ class TestJQueryCheat < Test::Unit::TestCase
82
82
  end
83
83
 
84
84
  def test_new_methods_by_hash
85
- assert_equal JQueryMethods.new(:name => '$').length, JQueryParser.get_methods_by_hash(:name => '$').length
85
+ assert_equal JQuery::Methods.new(:name => '$').length, JQuery::Parser.get_methods_by_hash(:name => '$').length
86
86
  end
87
87
 
88
88
  def assert_hash_equals_filter hash, filter
89
- assert_equal JQueryParser.get_methods_by_hash(hash).inner_html, @@parsed.search(filter).inner_html
89
+ assert_equal JQuery::Parser.get_methods_by_hash(hash).inner_html, @@parsed.search(filter).inner_html
90
90
  end
91
91
 
92
92
  end
@@ -33,7 +33,7 @@
33
33
  <h1>jquery cheat</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/jquery-cheat"; return false'>
35
35
  Get Version
36
- <a href="http://rubyforge.org/projects/jquery-cheat" class="numbers">0.2.0</a>
36
+ <a href="http://rubyforge.org/projects/jquery-cheat" class="numbers">0.2.1</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;jquery-cheat&#8217;</h1>
39
39
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: jquery-cheat
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
6
+ version: 0.2.1
7
7
  date: 2007-06-01 00:00:00 -07:00
8
8
  summary: jQuery command-line API reference
9
9
  require_paths: