corl 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/VERSION +1 -1
  4. data/bootstrap/os/ubuntu/06_puppet.sh +1 -1
  5. data/corl.gemspec +171 -3
  6. data/lib/CORL/builder/identity.rb +6 -3
  7. data/lib/CORL/builder/package.rb +3 -3
  8. data/lib/CORL/configuration/file.rb +21 -7
  9. data/lib/CORL/machine/vagrant.rb +3 -3
  10. data/lib/CORL/node/vagrant.rb +2 -5
  11. data/lib/CORL/provisioner/puppetnode.rb +8 -8
  12. data/lib/core/facade.rb +7 -3
  13. data/lib/core/mixin/action/keypair.rb +3 -3
  14. data/lib/core/mixin/action/registration.rb +31 -0
  15. data/lib/core/mixin/lookup.rb +50 -6
  16. data/lib/core/mixin/machine/ssh.rb +4 -4
  17. data/lib/core/plugin/cloud_action.rb +8 -1
  18. data/lib/core/plugin/configuration.rb +6 -7
  19. data/lib/core/plugin/fog_node.rb +7 -0
  20. data/lib/core/plugin/network.rb +31 -0
  21. data/lib/core/plugin/node.rb +182 -117
  22. data/lib/core/vagrant/provisioner/provisioner.rb +1 -1
  23. data/lib/nucleon/action/cloud/config.rb +259 -0
  24. data/lib/nucleon/action/cloud/images.rb +1 -1
  25. data/lib/nucleon/action/cloud/inspect.rb +11 -2
  26. data/lib/nucleon/action/cloud/machines.rb +1 -1
  27. data/lib/nucleon/action/cloud/regions.rb +1 -1
  28. data/lib/nucleon/action/cloud/settings.rb +185 -0
  29. data/lib/nucleon/action/node/IP.rb +1 -1
  30. data/lib/nucleon/action/node/bootstrap.rb +1 -1
  31. data/lib/nucleon/action/node/cache.rb +133 -0
  32. data/lib/nucleon/action/node/fact.rb +119 -0
  33. data/lib/nucleon/action/node/facts.rb +16 -16
  34. data/lib/nucleon/action/node/group.rb +115 -0
  35. data/lib/nucleon/action/node/groups.rb +33 -0
  36. data/lib/nucleon/action/node/identity.rb +75 -0
  37. data/lib/nucleon/action/node/lookup.rb +20 -7
  38. data/lib/nucleon/action/node/seed.rb +6 -6
  39. data/lib/nucleon/action/node/status.rb +76 -0
  40. data/lib/nucleon/action/plugin/create.rb +169 -0
  41. data/lib/nucleon/action/plugin/list.rb +69 -0
  42. data/lib/nucleon/action/plugin/template/nucleon.action.erb +56 -0
  43. data/lib/nucleon/action/plugins.rb +14 -0
  44. data/locales/en.yml +3 -0
  45. data/rdoc/site/0.5.0/CORL/Build.html +757 -0
  46. data/rdoc/site/0.5.0/CORL/Builder/Identity.html +569 -0
  47. data/rdoc/site/0.5.0/CORL/Builder/Package.html +576 -0
  48. data/rdoc/site/0.5.0/CORL/Builder.html +360 -0
  49. data/rdoc/site/0.5.0/CORL/Configuration/File.html +1148 -0
  50. data/rdoc/site/0.5.0/CORL/Configuration.html +359 -0
  51. data/rdoc/site/0.5.0/CORL/Errors.html +359 -0
  52. data/rdoc/site/0.5.0/CORL/Facade.html +899 -0
  53. data/rdoc/site/0.5.0/CORL/Machine/AWS.html +753 -0
  54. data/rdoc/site/0.5.0/CORL/Machine/Fog.html +1289 -0
  55. data/rdoc/site/0.5.0/CORL/Machine/Physical.html +1059 -0
  56. data/rdoc/site/0.5.0/CORL/Machine/Rackspace.html +534 -0
  57. data/rdoc/site/0.5.0/CORL/Machine/Vagrant.html +1320 -0
  58. data/rdoc/site/0.5.0/CORL/Machine.html +363 -0
  59. data/rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html +592 -0
  60. data/rdoc/site/0.5.0/CORL/Mixin/Action.html +359 -0
  61. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html +604 -0
  62. data/rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html +696 -0
  63. data/rdoc/site/0.5.0/CORL/Mixin/Builder.html +359 -0
  64. data/rdoc/site/0.5.0/CORL/Mixin/Lookup.html +1139 -0
  65. data/rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html +675 -0
  66. data/rdoc/site/0.5.0/CORL/Mixin/Machine.html +359 -0
  67. data/rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html +484 -0
  68. data/rdoc/site/0.5.0/CORL/Mixin/Macro.html +359 -0
  69. data/rdoc/site/0.5.0/CORL/Mixin.html +363 -0
  70. data/rdoc/site/0.5.0/CORL/Network/CORL.html +411 -0
  71. data/rdoc/site/0.5.0/CORL/Network.html +359 -0
  72. data/rdoc/site/0.5.0/CORL/Node/AWS.html +736 -0
  73. data/rdoc/site/0.5.0/CORL/Node/Fog.html +1212 -0
  74. data/rdoc/site/0.5.0/CORL/Node/Local.html +444 -0
  75. data/rdoc/site/0.5.0/CORL/Node/Rackspace.html +729 -0
  76. data/rdoc/site/0.5.0/CORL/Node/Vagrant.html +1476 -0
  77. data/rdoc/site/0.5.0/CORL/Node.html +363 -0
  78. data/rdoc/site/0.5.0/CORL/Plugin/Builder.html +500 -0
  79. data/rdoc/site/0.5.0/CORL/Plugin/Configuration.html +1271 -0
  80. data/rdoc/site/0.5.0/CORL/Plugin/Machine.html +1299 -0
  81. data/rdoc/site/0.5.0/CORL/Plugin/Network.html +1580 -0
  82. data/rdoc/site/0.5.0/CORL/Plugin/Node.html +4041 -0
  83. data/rdoc/site/0.5.0/CORL/Plugin/Provisioner.html +1115 -0
  84. data/rdoc/site/0.5.0/CORL/Plugin.html +649 -0
  85. data/rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html +1177 -0
  86. data/rdoc/site/0.5.0/CORL/Provisioner.html +359 -0
  87. data/rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html +1058 -0
  88. data/rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html +940 -0
  89. data/rdoc/site/0.5.0/CORL/Util/Puppet.html +1107 -0
  90. data/rdoc/site/0.5.0/CORL/Util.html +361 -0
  91. data/rdoc/site/0.5.0/CORL/Vagrant/Config.html +943 -0
  92. data/rdoc/site/0.5.0/CORL/Vagrant.html +438 -0
  93. data/rdoc/site/0.5.0/CORL.html +471 -0
  94. data/rdoc/site/0.5.0/Fog/Compute/AWS/Server.html +443 -0
  95. data/rdoc/site/0.5.0/Fog/Compute/AWS.html +365 -0
  96. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html +428 -0
  97. data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html +365 -0
  98. data/rdoc/site/0.5.0/Fog/Compute.html +360 -0
  99. data/rdoc/site/0.5.0/Fog.html +360 -0
  100. data/rdoc/site/0.5.0/Hiera/Backend.html +442 -0
  101. data/rdoc/site/0.5.0/Hiera/Corl_logger.html +469 -0
  102. data/rdoc/site/0.5.0/Hiera.html +366 -0
  103. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html +538 -0
  104. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html +566 -0
  105. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html +572 -0
  106. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html +524 -0
  107. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html +567 -0
  108. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html +567 -0
  109. data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html +515 -0
  110. data/rdoc/site/0.5.0/Nucleon/Action/Cloud.html +365 -0
  111. data/rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html +543 -0
  112. data/rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html +604 -0
  113. data/rdoc/site/0.5.0/Nucleon/Action/Node/Build.html +526 -0
  114. data/rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html +573 -0
  115. data/rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html +530 -0
  116. data/rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html +456 -0
  117. data/rdoc/site/0.5.0/Nucleon/Action/Node/IP.html +453 -0
  118. data/rdoc/site/0.5.0/Nucleon/Action/Node/Image.html +573 -0
  119. data/rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html +572 -0
  120. data/rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html +532 -0
  121. data/rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html +553 -0
  122. data/rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html +573 -0
  123. data/rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html +541 -0
  124. data/rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html +583 -0
  125. data/rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html +602 -0
  126. data/rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html +675 -0
  127. data/rdoc/site/0.5.0/Nucleon/Action/Node/Start.html +573 -0
  128. data/rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html +573 -0
  129. data/rdoc/site/0.5.0/Nucleon/Action/Node.html +376 -0
  130. data/rdoc/site/0.5.0/Nucleon/Action.html +383 -0
  131. data/rdoc/site/0.5.0/Nucleon/Config.html +377 -0
  132. data/rdoc/site/0.5.0/Nucleon/Event/Puppet.html +693 -0
  133. data/rdoc/site/0.5.0/Nucleon/Event.html +359 -0
  134. data/rdoc/site/0.5.0/Nucleon/Plugin/Base.html +365 -0
  135. data/rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html +838 -0
  136. data/rdoc/site/0.5.0/Nucleon/Plugin.html +360 -0
  137. data/rdoc/site/0.5.0/Nucleon/Template/Environment.html +548 -0
  138. data/rdoc/site/0.5.0/Nucleon/Template.html +359 -0
  139. data/rdoc/site/0.5.0/Nucleon.html +387 -0
  140. data/rdoc/site/0.5.0/Object.html +378 -0
  141. data/rdoc/site/0.5.0/Puppet/DataBinding/Corl.html +365 -0
  142. data/rdoc/site/0.5.0/Puppet/DataBinding.html +358 -0
  143. data/rdoc/site/0.5.0/Puppet/Indirector/Corl.html +477 -0
  144. data/rdoc/site/0.5.0/Puppet/Indirector.html +358 -0
  145. data/rdoc/site/0.5.0/Puppet/Parser/Functions.html +500 -0
  146. data/rdoc/site/0.5.0/Puppet/Parser.html +358 -0
  147. data/rdoc/site/0.5.0/Puppet.html +358 -0
  148. data/rdoc/site/0.5.0/README_rdoc.html +360 -0
  149. data/rdoc/site/0.5.0/Vagrant/Config/Loader.html +419 -0
  150. data/rdoc/site/0.5.0/Vagrant/Config.html +359 -0
  151. data/rdoc/site/0.5.0/Vagrant/Vagrantfile.html +412 -0
  152. data/rdoc/site/0.5.0/Vagrant.html +366 -0
  153. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html +422 -0
  154. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html +428 -0
  155. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html +426 -0
  156. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html +361 -0
  157. data/rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html +511 -0
  158. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html +553 -0
  159. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html +359 -0
  160. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html +752 -0
  161. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html +359 -0
  162. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html +365 -0
  163. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html +556 -0
  164. data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html +359 -0
  165. data/rdoc/site/0.5.0/VagrantPlugins/CORL.html +366 -0
  166. data/rdoc/site/0.5.0/VagrantPlugins.html +366 -0
  167. data/rdoc/site/0.5.0/created.rid +103 -0
  168. data/rdoc/site/0.5.0/images/add.png +0 -0
  169. data/rdoc/site/0.5.0/images/brick.png +0 -0
  170. data/rdoc/site/0.5.0/images/brick_link.png +0 -0
  171. data/rdoc/site/0.5.0/images/bug.png +0 -0
  172. data/rdoc/site/0.5.0/images/bullet_black.png +0 -0
  173. data/rdoc/site/0.5.0/images/bullet_toggle_minus.png +0 -0
  174. data/rdoc/site/0.5.0/images/bullet_toggle_plus.png +0 -0
  175. data/rdoc/site/0.5.0/images/date.png +0 -0
  176. data/rdoc/site/0.5.0/images/delete.png +0 -0
  177. data/rdoc/site/0.5.0/images/find.png +0 -0
  178. data/rdoc/site/0.5.0/images/loadingAnimation.gif +0 -0
  179. data/rdoc/site/0.5.0/images/macFFBgHack.png +0 -0
  180. data/rdoc/site/0.5.0/images/package.png +0 -0
  181. data/rdoc/site/0.5.0/images/page_green.png +0 -0
  182. data/rdoc/site/0.5.0/images/page_white_text.png +0 -0
  183. data/rdoc/site/0.5.0/images/page_white_width.png +0 -0
  184. data/rdoc/site/0.5.0/images/plugin.png +0 -0
  185. data/rdoc/site/0.5.0/images/ruby.png +0 -0
  186. data/rdoc/site/0.5.0/images/tag_blue.png +0 -0
  187. data/rdoc/site/0.5.0/images/tag_green.png +0 -0
  188. data/rdoc/site/0.5.0/images/transparent.png +0 -0
  189. data/rdoc/site/0.5.0/images/wrench.png +0 -0
  190. data/rdoc/site/0.5.0/images/wrench_orange.png +0 -0
  191. data/rdoc/site/0.5.0/images/zoom.png +0 -0
  192. data/rdoc/site/0.5.0/index.html +359 -0
  193. data/rdoc/site/0.5.0/js/darkfish.js +155 -0
  194. data/rdoc/site/0.5.0/js/jquery.js +18 -0
  195. data/rdoc/site/0.5.0/js/navigation.js +142 -0
  196. data/rdoc/site/0.5.0/js/search.js +94 -0
  197. data/rdoc/site/0.5.0/js/search_index.js +1 -0
  198. data/rdoc/site/0.5.0/js/searcher.js +228 -0
  199. data/rdoc/site/0.5.0/rdoc.css +543 -0
  200. data/rdoc/site/0.5.0/table_of_contents.html +1797 -0
  201. metadata +171 -3
  202. data/lib/nucleon/action/cloud/hiera.rb +0 -61
@@ -0,0 +1,228 @@
1
+ Searcher = function(data) {
2
+ this.data = data;
3
+ this.handlers = [];
4
+ }
5
+
6
+ Searcher.prototype = new function() {
7
+ // search is performed in chunks of 1000 for non-blocking user input
8
+ var CHUNK_SIZE = 1000;
9
+ // do not try to find more than 100 results
10
+ var MAX_RESULTS = 100;
11
+ var huid = 1;
12
+ var suid = 1;
13
+ var runs = 0;
14
+
15
+ this.find = function(query) {
16
+ var queries = splitQuery(query);
17
+ var regexps = buildRegexps(queries);
18
+ var highlighters = buildHilighters(queries);
19
+ var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
20
+ var _this = this;
21
+
22
+ this.currentSuid = state.n;
23
+
24
+ if (!query) return;
25
+
26
+ var run = function() {
27
+ // stop current search thread if new search started
28
+ if (state.n != _this.currentSuid) return;
29
+
30
+ var results =
31
+ performSearch(_this.data, regexps, queries, highlighters, state);
32
+ var hasMore = (state.limit > 0 && state.pass < 4);
33
+
34
+ triggerResults.call(_this, results, !hasMore);
35
+ if (hasMore) {
36
+ setTimeout(run, 2);
37
+ }
38
+ runs++;
39
+ };
40
+ runs = 0;
41
+
42
+ // start search thread
43
+ run();
44
+ }
45
+
46
+ /* ----- Events ------ */
47
+ this.ready = function(fn) {
48
+ fn.huid = huid;
49
+ this.handlers.push(fn);
50
+ }
51
+
52
+ /* ----- Utilities ------ */
53
+ function splitQuery(query) {
54
+ return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
55
+ return string.match(/\S/)
56
+ });
57
+ }
58
+
59
+ function buildRegexps(queries) {
60
+ return jQuery.map(queries, function(query) {
61
+ return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i')
62
+ });
63
+ }
64
+
65
+ function buildHilighters(queries) {
66
+ return jQuery.map(queries, function(query) {
67
+ return jQuery.map(query.split(''), function(l, i) {
68
+ return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2);
69
+ }).join('');
70
+ });
71
+ }
72
+
73
+ // function longMatchRegexp(index, longIndex, regexps) {
74
+ // for (var i = regexps.length - 1; i >= 0; i--){
75
+ // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false;
76
+ // };
77
+ // return true;
78
+ // }
79
+
80
+
81
+ /* ----- Mathchers ------ */
82
+
83
+ /*
84
+ * This record matches if the index starts with queries[0] and the record
85
+ * matches all of the regexps
86
+ */
87
+ function matchPassBeginning(index, longIndex, queries, regexps) {
88
+ if (index.indexOf(queries[0]) != 0) return false;
89
+ for (var i=1, l = regexps.length; i < l; i++) {
90
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
91
+ return false;
92
+ };
93
+ return true;
94
+ }
95
+
96
+ /*
97
+ * This record matches if the longIndex starts with queries[0] and the
98
+ * longIndex matches all of the regexps
99
+ */
100
+ function matchPassLongIndex(index, longIndex, queries, regexps) {
101
+ if (longIndex.indexOf(queries[0]) != 0) return false;
102
+ for (var i=1, l = regexps.length; i < l; i++) {
103
+ if (!longIndex.match(regexps[i]))
104
+ return false;
105
+ };
106
+ return true;
107
+ }
108
+
109
+ /*
110
+ * This record matches if the index contains queries[0] and the record
111
+ * matches all of the regexps
112
+ */
113
+ function matchPassContains(index, longIndex, queries, regexps) {
114
+ if (index.indexOf(queries[0]) == -1) return false;
115
+ for (var i=1, l = regexps.length; i < l; i++) {
116
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
117
+ return false;
118
+ };
119
+ return true;
120
+ }
121
+
122
+ /*
123
+ * This record matches if regexps[0] matches the index and the record
124
+ * matches all of the regexps
125
+ */
126
+ function matchPassRegexp(index, longIndex, queries, regexps) {
127
+ if (!index.match(regexps[0])) return false;
128
+ for (var i=1, l = regexps.length; i < l; i++) {
129
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
130
+ return false;
131
+ };
132
+ return true;
133
+ }
134
+
135
+
136
+ /* ----- Highlighters ------ */
137
+ function highlightRegexp(info, queries, regexps, highlighters) {
138
+ var result = createResult(info);
139
+ for (var i=0, l = regexps.length; i < l; i++) {
140
+ result.title = result.title.replace(regexps[i], highlighters[i]);
141
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
142
+ };
143
+ return result;
144
+ }
145
+
146
+ function hltSubstring(string, pos, length) {
147
+ return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length);
148
+ }
149
+
150
+ function highlightQuery(info, queries, regexps, highlighters) {
151
+ var result = createResult(info);
152
+ var pos = 0;
153
+ var lcTitle = result.title.toLowerCase();
154
+
155
+ pos = lcTitle.indexOf(queries[0]);
156
+ if (pos != -1) {
157
+ result.title = hltSubstring(result.title, pos, queries[0].length);
158
+ }
159
+
160
+ result.namespace = result.namespace.replace(regexps[0], highlighters[0]);
161
+ for (var i=1, l = regexps.length; i < l; i++) {
162
+ result.title = result.title.replace(regexps[i], highlighters[i]);
163
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
164
+ };
165
+ return result;
166
+ }
167
+
168
+ function createResult(info) {
169
+ var result = {};
170
+ result.title = info[0];
171
+ result.namespace = info[1];
172
+ result.path = info[2];
173
+ result.params = info[3];
174
+ result.snippet = info[4];
175
+ return result;
176
+ }
177
+
178
+ /* ----- Searching ------ */
179
+ function performSearch(data, regexps, queries, highlighters, state) {
180
+ var searchIndex = data.searchIndex;
181
+ var longSearchIndex = data.longSearchIndex;
182
+ var info = data.info;
183
+ var result = [];
184
+ var i = state.from;
185
+ var l = searchIndex.length;
186
+ var togo = CHUNK_SIZE;
187
+ var matchFunc, hltFunc;
188
+
189
+ while (state.pass < 4 && state.limit > 0 && togo > 0) {
190
+ if (state.pass == 0) {
191
+ matchFunc = matchPassBeginning;
192
+ hltFunc = highlightQuery;
193
+ } else if (state.pass == 1) {
194
+ matchFunc = matchPassLongIndex;
195
+ hltFunc = highlightQuery;
196
+ } else if (state.pass == 2) {
197
+ matchFunc = matchPassContains;
198
+ hltFunc = highlightQuery;
199
+ } else if (state.pass == 3) {
200
+ matchFunc = matchPassRegexp;
201
+ hltFunc = highlightRegexp;
202
+ }
203
+
204
+ for (; togo > 0 && i < l && state.limit > 0; i++, togo--) {
205
+ if (info[i].n == state.n) continue;
206
+ if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
207
+ info[i].n = state.n;
208
+ result.push(hltFunc(info[i], queries, regexps, highlighters));
209
+ state.limit--;
210
+ }
211
+ };
212
+ if (searchIndex.length <= i) {
213
+ state.pass++;
214
+ i = state.from = 0;
215
+ } else {
216
+ state.from = i;
217
+ }
218
+ }
219
+ return result;
220
+ }
221
+
222
+ function triggerResults(results, isLast) {
223
+ jQuery.each(this.handlers, function(i, fn) {
224
+ fn.call(this, results, isLast)
225
+ })
226
+ }
227
+ }
228
+