mack_ruby_core_extensions 0.1.23 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/doc/classes/Array.html +465 -0
  2. data/doc/classes/Class.html +233 -0
  3. data/doc/classes/Float.html +148 -0
  4. data/doc/classes/Hash.html +233 -0
  5. data/doc/classes/Kernel.html +184 -0
  6. data/doc/classes/Mack/Utils/Inflector.html +422 -0
  7. data/doc/classes/Math.html +188 -0
  8. data/doc/classes/MethodNotImplemented.html +155 -0
  9. data/doc/classes/Module.html +203 -0
  10. data/doc/classes/NilClass.html +151 -0
  11. data/doc/classes/Object.html +472 -0
  12. data/doc/classes/String.html +977 -0
  13. data/doc/classes/Symbol.html +148 -0
  14. data/doc/created.rid +1 -0
  15. data/doc/files/README.html +151 -0
  16. data/doc/files/lib/extensions/array_rb.html +101 -0
  17. data/doc/files/lib/extensions/class_rb.html +101 -0
  18. data/doc/files/lib/extensions/float_rb.html +101 -0
  19. data/doc/files/lib/extensions/hash_rb.html +108 -0
  20. data/doc/files/lib/extensions/kernel_rb.html +109 -0
  21. data/doc/files/lib/extensions/math_rb.html +101 -0
  22. data/doc/files/lib/extensions/method_not_implemented_rb.html +108 -0
  23. data/doc/files/lib/extensions/module_rb.html +101 -0
  24. data/doc/files/lib/extensions/nil_rb.html +101 -0
  25. data/doc/files/lib/extensions/object_rb.html +101 -0
  26. data/doc/files/lib/extensions/string_rb.html +108 -0
  27. data/doc/files/lib/extensions/symbol_rb.html +101 -0
  28. data/doc/files/lib/mack_ruby_core_extensions_rb.html +101 -0
  29. data/doc/files/lib/utils/inflections_rb.html +101 -0
  30. data/doc/files/lib/utils/inflector_rb.html +108 -0
  31. data/doc/files/lib/utils/options_merger_rb.html +101 -0
  32. data/doc/fr_class_index.html +39 -0
  33. data/doc/fr_file_index.html +43 -0
  34. data/doc/fr_method_index.html +97 -0
  35. data/doc/index.html +24 -0
  36. data/doc/rdoc-style.css +208 -0
  37. data/lib/extensions/hash.rb +0 -13
  38. data/lib/extensions/object.rb +4 -0
  39. data/lib/mack_ruby_core_extensions.rb +1 -1
  40. data/lib/utils/options_merger.rb +27 -0
  41. data/test/extensions/hash_test.rb +0 -14
  42. data/test/extensions/object_test.rb +16 -0
  43. data/test/test_helper.rb +16 -0
  44. metadata +40 -3
@@ -38,4 +38,20 @@ class ObjectTest < Test::Unit::TestCase
38
38
  assert_equal ["Animals", "Dog"], poodle.namespaces
39
39
  end
40
40
 
41
+ def test_with_options
42
+ route = Route.new
43
+ route.with_options(:controller => :users) do |r|
44
+ r.add(:action => :index)
45
+ end
46
+ assert_equal route.list.size, 1
47
+ assert_equal({:controller => :users, :action => :index}, route.list.first)
48
+
49
+ route.with_options(:controller => :posts) do |r|
50
+ r.add(:action => :new)
51
+ end
52
+ assert_equal route.list.size, 2
53
+ assert_equal({:controller => :users, :action => :index}, route.list.first)
54
+ assert_equal({:controller => :posts, :action => :new}, route.list.last)
55
+ end
56
+
41
57
  end
data/test/test_helper.rb CHANGED
@@ -58,4 +58,20 @@ class FauxLogger
58
58
  @messages
59
59
  end
60
60
 
61
+ end
62
+
63
+ class Route
64
+
65
+ def initialize
66
+ @routes = []
67
+ end
68
+
69
+ def add(options = {})
70
+ @routes << options
71
+ end
72
+
73
+ def list
74
+ @routes
75
+ end
76
+
61
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack_ruby_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-02 00:00:00 -04:00
12
+ date: 2008-05-07 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -37,7 +37,44 @@ files:
37
37
  - lib/mack_ruby_core_extensions.rb
38
38
  - lib/utils/inflections.rb
39
39
  - lib/utils/inflector.rb
40
+ - lib/utils/options_merger.rb
40
41
  - README
42
+ - doc/classes/Array.html
43
+ - doc/classes/Class.html
44
+ - doc/classes/Float.html
45
+ - doc/classes/Hash.html
46
+ - doc/classes/Kernel.html
47
+ - doc/classes/Mack/Utils/Inflector.html
48
+ - doc/classes/Math.html
49
+ - doc/classes/MethodNotImplemented.html
50
+ - doc/classes/Module.html
51
+ - doc/classes/NilClass.html
52
+ - doc/classes/Object.html
53
+ - doc/classes/String.html
54
+ - doc/classes/Symbol.html
55
+ - doc/created.rid
56
+ - doc/files/lib/extensions/array_rb.html
57
+ - doc/files/lib/extensions/class_rb.html
58
+ - doc/files/lib/extensions/float_rb.html
59
+ - doc/files/lib/extensions/hash_rb.html
60
+ - doc/files/lib/extensions/kernel_rb.html
61
+ - doc/files/lib/extensions/math_rb.html
62
+ - doc/files/lib/extensions/method_not_implemented_rb.html
63
+ - doc/files/lib/extensions/module_rb.html
64
+ - doc/files/lib/extensions/nil_rb.html
65
+ - doc/files/lib/extensions/object_rb.html
66
+ - doc/files/lib/extensions/string_rb.html
67
+ - doc/files/lib/extensions/symbol_rb.html
68
+ - doc/files/lib/mack_ruby_core_extensions_rb.html
69
+ - doc/files/lib/utils/inflections_rb.html
70
+ - doc/files/lib/utils/inflector_rb.html
71
+ - doc/files/lib/utils/options_merger_rb.html
72
+ - doc/files/README.html
73
+ - doc/fr_class_index.html
74
+ - doc/fr_file_index.html
75
+ - doc/fr_method_index.html
76
+ - doc/index.html
77
+ - doc/rdoc-style.css
41
78
  has_rdoc: true
42
79
  homepage: http://www.mackframework.com
43
80
  post_install_message:
@@ -66,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
103
  requirements: []
67
104
 
68
105
  rubyforge_project: magrathea
69
- rubygems_version: 1.0.1
106
+ rubygems_version: 1.1.1
70
107
  signing_key:
71
108
  specification_version: 2
72
109
  summary: mack_ruby_core_extensions