outoftime-sunspot 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/History.txt +9 -6
  2. data/README.rdoc +45 -13
  3. data/Rakefile +5 -21
  4. data/VERSION.yml +4 -0
  5. data/bin/sunspot-solr +39 -0
  6. data/lib/sunspot/builder.rb +78 -0
  7. data/lib/sunspot/dsl/fields.rb +39 -0
  8. data/lib/sunspot/dsl/query.rb +32 -0
  9. data/lib/sunspot/dsl/scope.rb +35 -0
  10. data/lib/sunspot/dsl.rb +3 -0
  11. data/lib/sunspot/query.rb +9 -20
  12. data/lib/sunspot/search.rb +8 -25
  13. data/lib/sunspot.rb +2 -3
  14. data/solr/etc/jetty.xml +10 -4
  15. data/solr/solr/conf/{admin-extra.html → elevate.xml} +18 -13
  16. data/solr/solr/conf/solrconfig.xml +369 -67
  17. data/solr/webapps/solr.war +0 -0
  18. data/spec/api/build_search_spec.rb +195 -0
  19. data/spec/api/indexer_spec.rb +112 -0
  20. data/spec/api/search_retrieval_spec.rb +59 -0
  21. data/spec/api/session_spec.rb +44 -0
  22. data/spec/api/spec_helper.rb +1 -0
  23. data/spec/api/standard_search_builder_spec.rb +76 -0
  24. data/{test → spec}/custom_expectation.rb +0 -0
  25. data/{test/integration/test_field_types.rb → spec/integration/field_types_spec.rb} +9 -9
  26. data/{test/integration/test_keyword_search.rb → spec/integration/keyword_search_spec.rb} +5 -5
  27. data/spec/integration/spec_helper.rb +1 -0
  28. data/{test → spec}/integration/test_pagination.rb +5 -5
  29. data/{test → spec}/mocks/base_class.rb +0 -0
  30. data/{test → spec}/mocks/comment.rb +0 -0
  31. data/{test → spec}/mocks/mock_adapter.rb +0 -0
  32. data/{test → spec}/mocks/post.rb +0 -0
  33. data/{test/test_helper.rb → spec/spec_helper.rb} +6 -12
  34. data/tasks/gemspec.rake +18 -0
  35. data/tasks/rcov.rake +27 -5
  36. data/tasks/spec.rake +21 -0
  37. metadata +90 -125
  38. data/Manifest.txt +0 -104
  39. data/PostInstall.txt +0 -7
  40. data/config/hoe.rb +0 -74
  41. data/config/requirements.rb +0 -15
  42. data/lib/sunspot/conditions.rb +0 -50
  43. data/lib/sunspot/conditions_builder.rb +0 -37
  44. data/lib/sunspot/field_builder.rb +0 -37
  45. data/lib/sunspot/query_builder.rb +0 -30
  46. data/lib/sunspot/scope_builder.rb +0 -33
  47. data/lib/sunspot/version.rb +0 -10
  48. data/setup.rb +0 -1585
  49. data/solr/README.txt +0 -36
  50. data/solr/exampledocs/books.csv +0 -11
  51. data/solr/exampledocs/hd.xml +0 -46
  52. data/solr/exampledocs/ipod_other.xml +0 -50
  53. data/solr/exampledocs/ipod_video.xml +0 -35
  54. data/solr/exampledocs/mem.xml +0 -58
  55. data/solr/exampledocs/monitor.xml +0 -31
  56. data/solr/exampledocs/monitor2.xml +0 -30
  57. data/solr/exampledocs/mp500.xml +0 -39
  58. data/solr/exampledocs/post.jar +0 -0
  59. data/solr/exampledocs/post.sh +0 -28
  60. data/solr/exampledocs/sd500.xml +0 -33
  61. data/solr/exampledocs/solr.xml +0 -38
  62. data/solr/exampledocs/spellchecker.xml +0 -58
  63. data/solr/exampledocs/utf8-example.xml +0 -42
  64. data/solr/exampledocs/vidcard.xml +0 -52
  65. data/solr/solr/README.txt +0 -52
  66. data/solr/solr/bin/abc +0 -176
  67. data/solr/solr/bin/abo +0 -176
  68. data/solr/solr/bin/backup +0 -108
  69. data/solr/solr/bin/backupcleaner +0 -142
  70. data/solr/solr/bin/commit +0 -128
  71. data/solr/solr/bin/optimize +0 -129
  72. data/solr/solr/bin/readercycle +0 -129
  73. data/solr/solr/bin/rsyncd-disable +0 -77
  74. data/solr/solr/bin/rsyncd-enable +0 -76
  75. data/solr/solr/bin/rsyncd-start +0 -145
  76. data/solr/solr/bin/rsyncd-stop +0 -105
  77. data/solr/solr/bin/scripts-util +0 -83
  78. data/solr/solr/bin/snapcleaner +0 -148
  79. data/solr/solr/bin/snapinstaller +0 -168
  80. data/solr/solr/bin/snappuller +0 -248
  81. data/solr/solr/bin/snappuller-disable +0 -77
  82. data/solr/solr/bin/snappuller-enable +0 -77
  83. data/solr/solr/bin/snapshooter +0 -109
  84. data/solr/solr/conf/scripts.conf +0 -24
  85. data/tasks/deployment.rake +0 -34
  86. data/tasks/environment.rake +0 -7
  87. data/tasks/solr.rake +0 -12
  88. data/tasks/website.rake +0 -17
  89. data/test/api/test_build_search.rb +0 -216
  90. data/test/api/test_helper.rb +0 -4
  91. data/test/api/test_indexer.rb +0 -110
  92. data/test/api/test_retrieve_search.rb +0 -114
  93. data/test/api/test_session.rb +0 -46
  94. data/test/integration/test_helper.rb +0 -1
@@ -1,33 +0,0 @@
1
- module Sunspot
2
- class ScopeBuilder
3
- def initialize(query)
4
- @query = query
5
- end
6
-
7
- def method_missing(field_name, *args)
8
- if args.length == 0 then RestrictionBuilder.new(field_name, @query)
9
- elsif args.length == 1 then @query.add_scope @query.build_condition(field_name, ::Sunspot::Restriction::EqualTo, args.first)
10
- else super(field_name.to_sym, *args)
11
- end
12
- end
13
-
14
- class RestrictionBuilder
15
- def initialize(field_name, query)
16
- @field_name, @query = field_name, query
17
- end
18
-
19
- def method_missing(condition_name, *args)
20
- clazz = begin
21
- ::Sunspot::Restriction.const_get(condition_name.to_s.camel_case)
22
- rescue(NameError)
23
- super(condition_name.to_sym, *args)
24
- end
25
- if value = args.first
26
- @query.add_scope @query.build_condition(@field_name, clazz, args.first)
27
- else
28
- @query.interpret_condition @field_name, clazz
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,10 +0,0 @@
1
- module Sunspot
2
- module VERSION #:nodoc:
3
- MAJOR = 0
4
- MINOR = 0
5
- TINY = 1
6
-
7
- STRING = [MAJOR, MINOR, TINY].join('.')
8
- self
9
- end
10
- end