xtf-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/APACHE-2-LICENSE +13 -0
  6. data/CHANGELOG.md +12 -0
  7. data/CODE_OF_CONDUCT.md +84 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +50 -0
  10. data/LICENSE.txt +202 -0
  11. data/NOTICE.txt +1 -0
  12. data/README.md +51 -0
  13. data/Rakefile +9 -0
  14. data/lib/xtf/result/element/base.rb +54 -0
  15. data/lib/xtf/result/element/doc_hit.rb +61 -0
  16. data/lib/xtf/result/element/facet.rb +29 -0
  17. data/lib/xtf/result/element/group.rb +37 -0
  18. data/lib/xtf/result/element/result.rb +91 -0
  19. data/lib/xtf/result/element.rb +13 -0
  20. data/lib/xtf/result.rb +6 -0
  21. data/lib/xtf/ruby/version.rb +7 -0
  22. data/lib/xtf/ruby.rb +10 -0
  23. data/lib/xtf/search/element/all_docs.rb +23 -0
  24. data/lib/xtf/search/element/and.rb +13 -0
  25. data/lib/xtf/search/element/base.rb +32 -0
  26. data/lib/xtf/search/element/clause.rb +57 -0
  27. data/lib/xtf/search/element/exact.rb +8 -0
  28. data/lib/xtf/search/element/facet.rb +26 -0
  29. data/lib/xtf/search/element/near.rb +17 -0
  30. data/lib/xtf/search/element/not.rb +7 -0
  31. data/lib/xtf/search/element/or.rb +13 -0
  32. data/lib/xtf/search/element/or_near.rb +11 -0
  33. data/lib/xtf/search/element/phrase.rb +28 -0
  34. data/lib/xtf/search/element/query.rb +42 -0
  35. data/lib/xtf/search/element/range.rb +44 -0
  36. data/lib/xtf/search/element/result_data.rb +18 -0
  37. data/lib/xtf/search/element/section_type.rb +19 -0
  38. data/lib/xtf/search/element/term.rb +51 -0
  39. data/lib/xtf/search/element.rb +15 -0
  40. data/lib/xtf/search.rb +11 -0
  41. data/lib/xtf/xml.rb +85 -0
  42. data/lib/xtf.rb +31 -0
  43. data/sig/xtf/ruby.rbs +6 -0
  44. metadata +158 -0
data/lib/xtf.rb ADDED
@@ -0,0 +1,31 @@
1
+ # Copyright 2007-2022 James (Jamie) Edward Orchard-Hays
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module XTF
16
+ end
17
+
18
+ # Try loading from local environment, ie vendor/rails, if error, use rubygems
19
+ begin
20
+ require "active_support"
21
+ rescue LoadError => e
22
+ require "rubygems"
23
+ require "active_support"
24
+ end
25
+
26
+ require "active_support/core_ext/string"
27
+
28
+ # $:.unshift(File.dirname(__FILE__))
29
+ require_relative "xtf/xml"
30
+ require_relative "xtf/search"
31
+ require_relative "xtf/result"
data/sig/xtf/ruby.rbs ADDED
@@ -0,0 +1,6 @@
1
+ module XTF
2
+ module Ruby
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,158 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xtf-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - James (Jamie) Orchard-Hays
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: libxml-ruby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rexml
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.2'
83
+ description:
84
+ email:
85
+ - jamieorc@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".rspec"
91
+ - ".ruby-gemset"
92
+ - ".ruby-version"
93
+ - APACHE-2-LICENSE
94
+ - CHANGELOG.md
95
+ - CODE_OF_CONDUCT.md
96
+ - Gemfile
97
+ - Gemfile.lock
98
+ - LICENSE.txt
99
+ - NOTICE.txt
100
+ - README.md
101
+ - Rakefile
102
+ - lib/xtf.rb
103
+ - lib/xtf/result.rb
104
+ - lib/xtf/result/element.rb
105
+ - lib/xtf/result/element/base.rb
106
+ - lib/xtf/result/element/doc_hit.rb
107
+ - lib/xtf/result/element/facet.rb
108
+ - lib/xtf/result/element/group.rb
109
+ - lib/xtf/result/element/result.rb
110
+ - lib/xtf/ruby.rb
111
+ - lib/xtf/ruby/version.rb
112
+ - lib/xtf/search.rb
113
+ - lib/xtf/search/element.rb
114
+ - lib/xtf/search/element/all_docs.rb
115
+ - lib/xtf/search/element/and.rb
116
+ - lib/xtf/search/element/base.rb
117
+ - lib/xtf/search/element/clause.rb
118
+ - lib/xtf/search/element/exact.rb
119
+ - lib/xtf/search/element/facet.rb
120
+ - lib/xtf/search/element/near.rb
121
+ - lib/xtf/search/element/not.rb
122
+ - lib/xtf/search/element/or.rb
123
+ - lib/xtf/search/element/or_near.rb
124
+ - lib/xtf/search/element/phrase.rb
125
+ - lib/xtf/search/element/query.rb
126
+ - lib/xtf/search/element/range.rb
127
+ - lib/xtf/search/element/result_data.rb
128
+ - lib/xtf/search/element/section_type.rb
129
+ - lib/xtf/search/element/term.rb
130
+ - lib/xtf/xml.rb
131
+ - sig/xtf/ruby.rbs
132
+ homepage: https://github.com/jamieorc/xtf-ruby
133
+ licenses:
134
+ - Apache-2.0
135
+ metadata:
136
+ homepage_uri: https://github.com/jamieorc/xtf-ruby
137
+ source_code_uri: https://github.com/jamieorc/xtf-ruby
138
+ changelog_uri: https://github.com/jamieorc/xtf-ruby/CHANGELOG.md
139
+ post_install_message:
140
+ rdoc_options: []
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: 2.6.0
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubygems_version: 3.1.6
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: Ruby library for working with California Digital Library's XTF.
158
+ test_files: []