chef-solr 0.9.14 → 0.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ class Chef
81
81
  data.each do |field, values|
82
82
  values.each do |v|
83
83
  xml << FIELD_ATTR
84
- xml << field
84
+ xml << xml_escape(field)
85
85
  xml << FIELD_ATTR_END
86
86
  xml << xml_escape(v)
87
87
  xml << CLOSE_FIELD
@@ -1,5 +1,5 @@
1
1
  class Chef
2
2
  class Solr
3
- VERSION = '0.9.14'
3
+ VERSION = '0.9.16'
4
4
  end
5
5
  end
@@ -160,6 +160,14 @@ describe Chef::Solr do
160
160
 
161
161
  @solr.solr_add(@data)
162
162
  end
163
+
164
+ it "XML escapes keys before sending to SOLR" do
165
+ @data.delete("foo")
166
+ @data["foo&bar"] = ["baz"]
167
+ @solr.should_receive(:post_to_solr).with("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<add><doc><field name=\"foo&amp;bar\">baz</field></doc></add>\n")
168
+
169
+ @solr.solr_add(@data)
170
+ end
163
171
  end
164
172
 
165
173
  describe "solr_commit" do
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-solr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 9
9
- - 14
10
- version: 0.9.14
4
+ prerelease:
5
+ version: 0.9.16
11
6
  platform: ruby
12
7
  authors:
13
8
  - Adam Jacob
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-03-04 00:00:00 -08:00
13
+ date: 2011-04-15 00:00:00 -07:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 1
32
- - 1
33
- - 3
34
24
  version: 1.1.3
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 15
46
- segments:
47
- - 2
48
- - 0
49
- - 0
50
35
  version: 2.0.0
51
36
  type: :runtime
52
37
  version_requirements: *id002
@@ -58,12 +43,7 @@ dependencies:
58
43
  requirements:
59
44
  - - "="
60
45
  - !ruby/object:Gem::Version
61
- hash: 39
62
- segments:
63
- - 0
64
- - 9
65
- - 14
66
- version: 0.9.14
46
+ version: 0.9.16
67
47
  type: :runtime
68
48
  version_requirements: *id003
69
49
  description:
@@ -80,24 +60,24 @@ files:
80
60
  - README.rdoc
81
61
  - Rakefile
82
62
  - LICENSE
83
- - bin/chef-solr-indexer
84
63
  - bin/chef-solr
64
+ - bin/chef-solr-indexer
85
65
  - bin/chef-solr-rebuild
86
- - lib/chef/solr/index.rb
87
- - lib/chef/solr/version.rb
88
66
  - lib/chef/solr/application/indexer.rb
89
- - lib/chef/solr/application/solr.rb
90
67
  - lib/chef/solr/application/rebuild.rb
91
- - lib/chef/solr/query.rb
68
+ - lib/chef/solr/application/solr.rb
69
+ - lib/chef/solr/index.rb
92
70
  - lib/chef/solr/index_queue_consumer.rb
71
+ - lib/chef/solr/query.rb
72
+ - lib/chef/solr/version.rb
93
73
  - lib/chef/solr.rb
94
- - solr/solr-jetty.tar.gz
95
74
  - solr/solr-home.tar.gz
75
+ - solr/solr-jetty.tar.gz
96
76
  - spec/chef/solr/index_spec.rb
97
77
  - spec/chef/solr/query_spec.rb
98
78
  - spec/chef/solr_spec.rb
99
- - spec/spec_helper.rb
100
79
  - spec/spec.opts
80
+ - spec/spec_helper.rb
101
81
  has_rdoc: true
102
82
  homepage: http://wiki.opscode.com/display/chef
103
83
  licenses: []
@@ -112,23 +92,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
92
  requirements:
113
93
  - - ">="
114
94
  - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
95
  version: "0"
119
96
  required_rubygems_version: !ruby/object:Gem::Requirement
120
97
  none: false
121
98
  requirements:
122
99
  - - ">="
123
100
  - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
126
- - 0
127
101
  version: "0"
128
102
  requirements: []
129
103
 
130
104
  rubyforge_project:
131
- rubygems_version: 1.3.7
105
+ rubygems_version: 1.6.2
132
106
  signing_key:
133
107
  specification_version: 3
134
108
  summary: Search indexing for Chef