Permalink
Browse files

Updated searchlogic

  • Loading branch information...
binarylogic committed Nov 3, 2008
1 parent f9b6cfb commit 68c01e77bea46d9586c4fdea21b0e885618a7660
Showing with 803 additions and 794 deletions.
  1. +5 −5 README.rdoc
  2. +1 −1 app/views/jquery/users/index.html.erb
  3. +7 −7 app/views/layouts/application.html.erb
  4. +1 −1 app/views/non_ajax/users/index.html.erb
  5. +1 −1 app/views/rails_ajax/users/index.html.erb
  6. +3 −3 config/database.example.yml
  7. +2 −2 config/environment.rb
  8. +3 −3 config/initializers/searchgasm.rb
  9. +0 −125 vendor/plugins/searchgasm/Manifest
  10. +0 −4 vendor/plugins/searchgasm/examples/README.rdoc
  11. +0 −1 vendor/plugins/searchgasm/init.rb
  12. +0 −52 vendor/plugins/searchgasm/test/test_condition_base.rb
  13. +0 −137 vendor/plugins/searchgasm/test/test_condition_types.rb
  14. 0 vendor/plugins/{searchgasm → searchlogic}/.gitignore
  15. +16 −15 vendor/plugins/{searchgasm → searchlogic}/CHANGELOG.rdoc
  16. 0 vendor/plugins/{searchgasm → searchlogic}/MIT-LICENSE
  17. +123 −0 vendor/plugins/searchlogic/Manifest
  18. +22 −22 vendor/plugins/{searchgasm → searchlogic}/README.rdoc
  19. +5 −5 vendor/plugins/{searchgasm → searchlogic}/Rakefile
  20. 0 vendor/plugins/{searchgasm → searchlogic}/TODO.rdoc
  21. +4 −0 vendor/plugins/searchlogic/examples/README.rdoc
  22. +1 −0 vendor/plugins/searchlogic/init.rb
  23. +34 −34 vendor/plugins/{searchgasm/lib/searchgasm.rb → searchlogic/lib/searchlogic.rb}
  24. +15 −15 ...r/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/active_record/associations.rb
  25. +29 −29 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/active_record/base.rb
  26. +2 −2 .../lib/searchgasm → searchlogic/lib/searchlogic}/active_record/connection_adapters/mysql_adapter.rb
  27. +2 −2 ...searchgasm → searchlogic/lib/searchlogic}/active_record/connection_adapters/postgresql_adapter.rb
  28. +2 −2 ...lib/searchgasm → searchlogic/lib/searchlogic}/active_record/connection_adapters/sqlite_adapter.rb
  29. +4 −4 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/base.rb
  30. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/begins_with.rb
  31. +3 −3 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/blank.rb
  32. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/child_of.rb
  33. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/descendant_of.rb
  34. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/ends_with.rb
  35. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/equals.rb
  36. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/greater_than.rb
  37. +1 −1 ...s/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/greater_than_or_equal_to.rb
  38. +1 −1 ...ns/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/inclusive_descendant_of.rb
  39. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/keywords.rb
  40. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/less_than.rb
  41. +1 −1 ...gins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/less_than_or_equal_to.rb
  42. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/like.rb
  43. +3 −3 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/nil.rb
  44. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_begin_with.rb
  45. +3 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_blank.rb
  46. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_end_with.rb
  47. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_equal.rb
  48. +1 −1 .../plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_have_keywords.rb
  49. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_like.rb
  50. +3 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/not_nil.rb
  51. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/sibling_of.rb
  52. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/condition/tree.rb
  53. +13 −13 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/conditions/base.rb
  54. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/conditions/protection.rb
  55. +5 −5 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/config.rb
  56. +6 −6 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/config/helpers.rb
  57. +6 −6 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/config/search.rb
  58. +2 −2 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/core_ext/hash.rb
  59. +27 −27 ...r/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/link.rb
  60. +11 −11 .../plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/links.rb
  61. +2 −2 ...ns/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/remote_link.rb
  62. +2 −2 ...s/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/remote_links.rb
  63. +2 −2 .../{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/remote_select.rb
  64. +16 −16 ...plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/control_types/select.rb
  65. +47 −47 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/form.rb
  66. +31 −31 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/helpers/utilities.rb
  67. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/absolute.rb
  68. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/acos.rb
  69. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/asin.rb
  70. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/atan.rb
  71. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/base.rb
  72. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/ceil.rb
  73. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/char_length.rb
  74. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/cos.rb
  75. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/cot.rb
  76. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/day_of_month.rb
  77. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/day_of_week.rb
  78. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/day_of_year.rb
  79. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/degrees.rb
  80. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/exp.rb
  81. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/floor.rb
  82. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/hex.rb
  83. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/hour.rb
  84. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/log.rb
  85. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/log10.rb
  86. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/log2.rb
  87. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/lower.rb
  88. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/ltrim.rb
  89. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/md5.rb
  90. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/microseconds.rb
  91. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/milliseconds.rb
  92. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/minute.rb
  93. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/month.rb
  94. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/octal.rb
  95. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/radians.rb
  96. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/round.rb
  97. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/rtrim.rb
  98. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/second.rb
  99. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/sign.rb
  100. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/sin.rb
  101. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/square_root.rb
  102. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/tan.rb
  103. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/trim.rb
  104. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/upper.rb
  105. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/week.rb
  106. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/modifiers/year.rb
  107. +11 −11 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/base.rb
  108. +6 −6 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/conditions.rb
  109. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/ordering.rb
  110. +3 −3 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/pagination.rb
  111. +2 −2 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/protection.rb
  112. +3 −3 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/search/searching.rb
  113. +1 −1 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/shared/utilities.rb
  114. +4 −4 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/shared/virtual_classes.rb
  115. +2 −2 vendor/plugins/{searchgasm/lib/searchgasm → searchlogic/lib/searchlogic}/version.rb
  116. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/accounts.yml
  117. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/cats.yml
  118. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/dogs.yml
  119. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/orders.yml
  120. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/user_groups.yml
  121. 0 vendor/plugins/{searchgasm → searchlogic}/test/fixtures/users.yml
  122. +3 −3 vendor/plugins/{searchgasm → searchlogic}/test/test_active_record_associations.rb
  123. +3 −3 vendor/plugins/{searchgasm → searchlogic}/test/test_active_record_base.rb
  124. +52 −0 vendor/plugins/searchlogic/test/test_condition_base.rb
  125. +143 −0 vendor/plugins/searchlogic/test/test_condition_types.rb
  126. +30 −30 vendor/plugins/{searchgasm → searchlogic}/test/test_conditions_base.rb
  127. 0 vendor/plugins/{searchgasm → searchlogic}/test/test_conditions_protection.rb
  128. +2 −2 vendor/plugins/{searchgasm → searchlogic}/test/test_config.rb
  129. +1 −1 vendor/plugins/{searchgasm → searchlogic}/test/test_helper.rb
  130. +5 −5 vendor/plugins/{searchgasm → searchlogic}/test/test_search_base.rb
  131. +2 −2 vendor/plugins/{searchgasm → searchlogic}/test/test_search_conditions.rb
  132. 0 vendor/plugins/{searchgasm → searchlogic}/test/test_search_ordering.rb
  133. +1 −1 vendor/plugins/{searchgasm → searchlogic}/test/test_search_pagination.rb
  134. +4 −4 vendor/plugins/{searchgasm → searchlogic}/test/test_search_protection.rb
  135. 0 vendor/plugins/{searchgasm → searchlogic}/test_libs/acts_as_tree.rb
  136. 0 vendor/plugins/{searchgasm → searchlogic}/test_libs/ordered_hash.rb
  137. 0 vendor/plugins/{searchgasm → searchlogic}/test_libs/rexml_fix.rb
View
@@ -1,19 +1,19 @@
-= Searchgasm Example
+= Searchlogic Example
-This is an example of how to use Searchgasm in a rails app. Searchgasm is simple searching, ordering, and pagination all in one plugin.
+This is an example of how to use Searchlogic in a rails app. Searchlogic is simple searching, ordering, and pagination all in one plugin.
-This application live: http://searchgasm_example.binarylogic.com
+This application live: http://searchlogic_example.binarylogic.com
Quick tutorial on how to build this application here: http://www.binarylogic.com/2008/9/7/tutorial-pagination-ordering-and-searching-with-searchgasm
-Searchgasm: http://github.com/binarylogic/searchgasm
+Searchlogic: http://github.com/binarylogic/searchlogic
=== Key files
Here are the files you want to glance at:
1. All of the controllers and their respective views
-2. config/initializers/searchgasm.rb
+2. config/initializers/searchlogic.rb
=== Generate Test Data
@@ -15,7 +15,7 @@ This is the preferred method. Really nice, check out jquery_setup.js on how to s
<%= users.text_field :first_name_keywords %><br />
<br />
- <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchgasm.rb)" %><br />
+ <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchlogic.rb)" %><br />
<%= users.text_field :first_name_sounds_like %><br />
<br />
@@ -1,6 +1,6 @@
<html>
<head>
- <title>Searchgasm Example</title>
+ <title>Searchlogic Example</title>
<% if controller.controller_path == "jquery/users" %>
<%= javascript_include_tag "jquery.min", "jquery.livequery", "jquery.form", "jquery_setup" %>
<% else %>
@@ -9,13 +9,13 @@
<%= stylesheet_link_tag "application" %>
</head>
<body>
- <h1 style="font-size: 1.5em">Searchgasm example</h1>
- This is a simple / plain example of how to implement searching, ordering, and pagination using Searchgasm into a rails application. Here are some helpful links:<br />
+ <h1 style="font-size: 1.5em">Searchlogic example</h1>
+ This is a simple / plain example of how to implement searching, ordering, and pagination using Searchlogic into a rails application. Here are some helpful links:<br />
<br />
- <%= link_to "source code for this example", "http://github.com/binarylogic/searchgasm_example" %>&nbsp;&nbsp;|&nbsp;&nbsp;
- <%= link_to "tutorial on this example", "http://www.binarylogic.com/2008/9/7/tutorial-pagination-ordering-and-searching-with-searchgasm" %>&nbsp;&nbsp;|&nbsp;&nbsp;
- <%= link_to "searchgasm repository", "http://github.com/binarylogic/searchgasm" %>&nbsp;&nbsp;|&nbsp;&nbsp;
- <%= link_to "searchgasm docs", "http://searchgasm.rubyforge.org" %>
+ <%= link_to "source code for this example", "http://github.com/binarylogic/searchlogic_example" %>&nbsp;&nbsp;|&nbsp;&nbsp;
+ <%= link_to "tutorial on this example", "http://www.binarylogic.com/2008/9/7/tutorial-pagination-ordering-and-searching-with-searchlogic" %>&nbsp;&nbsp;|&nbsp;&nbsp;
+ <%= link_to "searchlogic repository", "http://github.com/binarylogic/searchlogic" %>&nbsp;&nbsp;|&nbsp;&nbsp;
+ <%= link_to "searchlogic docs", "http://searchlogic.rubyforge.org" %>
<br />
<br />
<strong>
@@ -15,7 +15,7 @@ Good ol' regular http requests.
<%= users.text_field :first_name_keywords %><br />
<br />
- <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchgasm.rb)" %><br />
+ <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchlogic.rb)" %><br />
<%= users.text_field :first_name_sounds_like %><br />
<br />
@@ -17,7 +17,7 @@ If you are wanting to do unobtrusive javascript take a look at the jQuery exampl
<%= users.text_field :first_name_keywords %><br />
<br />
- <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchgasm.rb)" %><br />
+ <%= users.label :first_name_sounds_like, "First name sounds like: (try &quot;bin&quot;, this is a custom condition, checkout config/initializers/searchlogic.rb)" %><br />
<%= users.text_field :first_name_sounds_like %><br />
<br />
@@ -3,15 +3,15 @@ login: &login
development:
adapter: mysql
- database: searchgasm_development
+ database: searchlogic_development
<<: *login
test:
adapter: mysql
- database: searchgasm_test
+ database: searchlogic_test
<<: *login
production:
adapter: mysql
- database: searchgasm_production
+ database: searchlogic_production
<<: *login
View
@@ -47,7 +47,7 @@
#if RAILS_ENV == "development" # putting this in environments/development.rb doesn't work, not sure why
# config.plugin_paths += ["#{RAILS_ROOT}/../../Libs"]
- # config.plugins = [:searchgasm]
+ # config.plugins = [:searchlogic]
# require "ruby-debug"
#end
@@ -56,7 +56,7 @@
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
#config.action_controller.session = {
- # :session_key => '_searchgasm_example_session',
+ # :session_key => '_searchlogic_example_session',
# :secret => '4d7db02f53d3bccd73428357072797fb6b04507ad3ef08f0abc589c2f1a6ee8f10e71bdbbc357f8fd50a7620f4bb433836e18017517a9df9df70c910fa3006c8'
#}
@@ -1,10 +1,10 @@
# Confugration
-Searchgasm::Config.configure do |config|
+Searchlogic::Config.configure do |config|
config.search.per_page = config.helpers.per_page_select_choices.first.last # 10
end
# Actual function for MySQL databases only
-class SoundsLike < Searchgasm::Condition::Base
+class SoundsLike < Searchlogic::Condition::Base
class << self
# The name of the conditions. By default its the name of the class, if you want alternate or alias conditions just add them on.
# If you don't want to add aliases you don't even need to define this method
@@ -22,4 +22,4 @@ def to_conditions(value)
end
end
-Searchgasm::Conditions::Base.register_condition(SoundsLike)
+Searchlogic::Conditions::Base.register_condition(SoundsLike)
@@ -1,125 +0,0 @@
-CHANGELOG.rdoc
-examples/README.rdoc
-init.rb
-lib/searchgasm/active_record/associations.rb
-lib/searchgasm/active_record/base.rb
-lib/searchgasm/active_record/connection_adapters/mysql_adapter.rb
-lib/searchgasm/active_record/connection_adapters/postgresql_adapter.rb
-lib/searchgasm/active_record/connection_adapters/sqlite_adapter.rb
-lib/searchgasm/condition/base.rb
-lib/searchgasm/condition/begins_with.rb
-lib/searchgasm/condition/blank.rb
-lib/searchgasm/condition/child_of.rb
-lib/searchgasm/condition/descendant_of.rb
-lib/searchgasm/condition/ends_with.rb
-lib/searchgasm/condition/equals.rb
-lib/searchgasm/condition/greater_than.rb
-lib/searchgasm/condition/greater_than_or_equal_to.rb
-lib/searchgasm/condition/ilike.rb
-lib/searchgasm/condition/inclusive_descendant_of.rb
-lib/searchgasm/condition/keywords.rb
-lib/searchgasm/condition/less_than.rb
-lib/searchgasm/condition/less_than_or_equal_to.rb
-lib/searchgasm/condition/like.rb
-lib/searchgasm/condition/nil.rb
-lib/searchgasm/condition/not_begin_with.rb
-lib/searchgasm/condition/not_blank.rb
-lib/searchgasm/condition/not_end_with.rb
-lib/searchgasm/condition/not_equal.rb
-lib/searchgasm/condition/not_have_keywords.rb
-lib/searchgasm/condition/not_ilike.rb
-lib/searchgasm/condition/not_like.rb
-lib/searchgasm/condition/not_nil.rb
-lib/searchgasm/condition/sibling_of.rb
-lib/searchgasm/condition/tree.rb
-lib/searchgasm/conditions/base.rb
-lib/searchgasm/conditions/protection.rb
-lib/searchgasm/config/helpers.rb
-lib/searchgasm/config/search.rb
-lib/searchgasm/config.rb
-lib/searchgasm/core_ext/hash.rb
-lib/searchgasm/helpers/control_types/link.rb
-lib/searchgasm/helpers/control_types/links.rb
-lib/searchgasm/helpers/control_types/remote_link.rb
-lib/searchgasm/helpers/control_types/remote_links.rb
-lib/searchgasm/helpers/control_types/remote_select.rb
-lib/searchgasm/helpers/control_types/select.rb
-lib/searchgasm/helpers/form.rb
-lib/searchgasm/helpers/utilities.rb
-lib/searchgasm/modifiers/absolute.rb
-lib/searchgasm/modifiers/acos.rb
-lib/searchgasm/modifiers/asin.rb
-lib/searchgasm/modifiers/atan.rb
-lib/searchgasm/modifiers/base.rb
-lib/searchgasm/modifiers/ceil.rb
-lib/searchgasm/modifiers/char_length.rb
-lib/searchgasm/modifiers/cos.rb
-lib/searchgasm/modifiers/cot.rb
-lib/searchgasm/modifiers/day_of_month.rb
-lib/searchgasm/modifiers/day_of_week.rb
-lib/searchgasm/modifiers/day_of_year.rb
-lib/searchgasm/modifiers/degrees.rb
-lib/searchgasm/modifiers/exp.rb
-lib/searchgasm/modifiers/floor.rb
-lib/searchgasm/modifiers/hex.rb
-lib/searchgasm/modifiers/hour.rb
-lib/searchgasm/modifiers/log.rb
-lib/searchgasm/modifiers/log10.rb
-lib/searchgasm/modifiers/log2.rb
-lib/searchgasm/modifiers/lower.rb
-lib/searchgasm/modifiers/ltrim.rb
-lib/searchgasm/modifiers/md5.rb
-lib/searchgasm/modifiers/microseconds.rb
-lib/searchgasm/modifiers/milliseconds.rb
-lib/searchgasm/modifiers/minute.rb
-lib/searchgasm/modifiers/month.rb
-lib/searchgasm/modifiers/octal.rb
-lib/searchgasm/modifiers/radians.rb
-lib/searchgasm/modifiers/round.rb
-lib/searchgasm/modifiers/rtrim.rb
-lib/searchgasm/modifiers/second.rb
-lib/searchgasm/modifiers/sign.rb
-lib/searchgasm/modifiers/sin.rb
-lib/searchgasm/modifiers/square_root.rb
-lib/searchgasm/modifiers/tan.rb
-lib/searchgasm/modifiers/trim.rb
-lib/searchgasm/modifiers/upper.rb
-lib/searchgasm/modifiers/week.rb
-lib/searchgasm/modifiers/year.rb
-lib/searchgasm/search/base.rb
-lib/searchgasm/search/conditions.rb
-lib/searchgasm/search/ordering.rb
-lib/searchgasm/search/pagination.rb
-lib/searchgasm/search/protection.rb
-lib/searchgasm/search/searching.rb
-lib/searchgasm/shared/utilities.rb
-lib/searchgasm/shared/virtual_classes.rb
-lib/searchgasm/version.rb
-lib/searchgasm.rb
-Manifest
-MIT-LICENSE
-Rakefile
-README.rdoc
-test/fixtures/accounts.yml
-test/fixtures/cats.yml
-test/fixtures/dogs.yml
-test/fixtures/orders.yml
-test/fixtures/user_groups.yml
-test/fixtures/users.yml
-test/test_active_record_associations.rb
-test/test_active_record_base.rb
-test/test_condition_base.rb
-test/test_condition_types.rb
-test/test_conditions_base.rb
-test/test_conditions_protection.rb
-test/test_config.rb
-test/test_helper.rb
-test/test_search_base.rb
-test/test_search_conditions.rb
-test/test_search_ordering.rb
-test/test_search_pagination.rb
-test/test_search_protection.rb
-test_libs/acts_as_tree.rb
-test_libs/ordered_hash.rb
-test_libs/rexml_fix.rb
-TODO.rdoc
@@ -1,4 +0,0 @@
-=== Live example
-
-* Please see the live example: http://searchgasm_example.binarylogic.com
-* Source / Github project for the example: http://github.com/binarylogic/searchgasm_example.binarylogic.com
@@ -1 +0,0 @@
-require File.dirname(__FILE__) << "/lib/searchgasm"
@@ -1,52 +0,0 @@
-require File.dirname(__FILE__) + '/test_helper.rb'
-
-class TestConditionBase < Test::Unit::TestCase
- def test_condition_type_name
- assert_equal "equals", Searchgasm::Condition::Equals.condition_type_name
- assert_equal "keywords", Searchgasm::Condition::Keywords.condition_type_name
- assert_equal "greater_than_or_equal_to", Searchgasm::Condition::GreaterThanOrEqualTo.condition_type_name
- end
-
- def test_ignore_meaningless_value?
- assert !Searchgasm::Condition::Equals.ignore_meaningless_value?
- assert Searchgasm::Condition::Keywords.ignore_meaningless_value?
- assert !Searchgasm::Condition::NotEqual.ignore_meaningless_value?
- end
-
- def test_value_type
- assert_equal nil, Searchgasm::Condition::Equals.value_type
- assert_equal nil, Searchgasm::Condition::Keywords.value_type
- assert_equal :boolean, Searchgasm::Condition::Nil.value_type
- assert_equal :boolean, Searchgasm::Condition::Blank.value_type
- assert_equal nil, Searchgasm::Condition::GreaterThan.value_type
- end
-
- def test_initialize
- condition = Searchgasm::Condition::Keywords.new(Account, :column => Account.columns_hash["name"])
- assert_equal condition.klass, Account
- assert_equal Account.columns_hash["name"], condition.column
-
- condition = Searchgasm::Condition::GreaterThan.new(Account, :column => "id")
- assert_equal Account.columns_hash["id"], condition.column
-
- condition = Searchgasm::Condition::GreaterThan.new(Account, :column => "id", :column_type => :string, :column_sql_format => "some sql")
- assert_equal Account.columns_hash["id"], condition.column
- condition.value = "awesome"
- assert_equal ["some sql > ?", "awesome"], condition.sanitize
- end
-
- def test_explicitly_set_value
- condition = Searchgasm::Condition::Keywords.new(Account, :column => Account.columns_hash["name"])
- assert !condition.explicitly_set_value?
- condition.value = "test"
- assert condition.explicitly_set_value?
- end
-
- def test_sanitize
- # This is tested thoroughly in test_condition_types
- end
-
- def test_value
- # This is tested thoroughly in test_condition_types
- end
-end
Oops, something went wrong.

0 comments on commit 68c01e7

Please sign in to comment.