smartmachine 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +0 -0
  3. data/README.rdoc +87 -0
  4. data/bin/buildpacker +8 -0
  5. data/bin/prereceiver +8 -0
  6. data/bin/smartmachine +81 -0
  7. data/bin/smartrunner +28 -0
  8. data/lib/smart_machine.rb +24 -0
  9. data/lib/smart_machine/apps.rb +14 -0
  10. data/lib/smart_machine/apps/app.rb +182 -0
  11. data/lib/smart_machine/apps/rails.rb +250 -0
  12. data/lib/smart_machine/base.rb +11 -0
  13. data/lib/smart_machine/boot.rb +31 -0
  14. data/lib/smart_machine/buildpacker.rb +106 -0
  15. data/lib/smart_machine/credentials.rb +126 -0
  16. data/lib/smart_machine/docker.rb +144 -0
  17. data/lib/smart_machine/engine.rb +82 -0
  18. data/lib/smart_machine/engine/Dockerfile +27 -0
  19. data/lib/smart_machine/engine/buildpacks/rails/Dockerfile +21 -0
  20. data/lib/smart_machine/gem_version.rb +17 -0
  21. data/lib/smart_machine/grids.rb +15 -0
  22. data/lib/smart_machine/grids/elasticsearch.rb +97 -0
  23. data/lib/smart_machine/grids/elasticsearch/.keep +0 -0
  24. data/lib/smart_machine/grids/minio.rb +77 -0
  25. data/lib/smart_machine/grids/minio/.keep +0 -0
  26. data/lib/smart_machine/grids/mysql.rb +66 -0
  27. data/lib/smart_machine/grids/mysql/docker-entrypoint-initdb.d/.keep +0 -0
  28. data/lib/smart_machine/grids/nginx.rb +137 -0
  29. data/lib/smart_machine/grids/nginx/.keep +0 -0
  30. data/lib/smart_machine/grids/prereceiver.rb +170 -0
  31. data/lib/smart_machine/grids/prereceiver/Dockerfile +20 -0
  32. data/lib/smart_machine/grids/prereceiver/fcgiwrap/APKBUILD +49 -0
  33. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.confd +6 -0
  34. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.initd +43 -0
  35. data/lib/smart_machine/grids/prereceiver/fcgiwrap/fcgiwrap.pre-install +7 -0
  36. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/APKINDEX.tar.gz +0 -0
  37. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-1.1.1-r4.apk +0 -0
  38. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-doc-1.1.1-r4.apk +0 -0
  39. data/lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-openrc-1.1.1-r4.apk +0 -0
  40. data/lib/smart_machine/grids/redis.rb +58 -0
  41. data/lib/smart_machine/grids/redis/.keep +0 -0
  42. data/lib/smart_machine/grids/solr.rb +99 -0
  43. data/lib/smart_machine/grids/solr/config/.keep +0 -0
  44. data/lib/smart_machine/grids/solr/config/README.txt +77 -0
  45. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_ca.txt +8 -0
  46. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_fr.txt +15 -0
  47. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_ga.txt +5 -0
  48. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/contractions_it.txt +23 -0
  49. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/hyphenations_ga.txt +5 -0
  50. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stemdict_nl.txt +6 -0
  51. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stoptags_ja.txt +420 -0
  52. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ar.txt +125 -0
  53. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_bg.txt +193 -0
  54. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ca.txt +220 -0
  55. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_cz.txt +172 -0
  56. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_da.txt +110 -0
  57. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_de.txt +294 -0
  58. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_el.txt +78 -0
  59. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_en.txt +54 -0
  60. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_es.txt +356 -0
  61. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_eu.txt +99 -0
  62. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fa.txt +313 -0
  63. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fi.txt +97 -0
  64. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_fr.txt +186 -0
  65. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ga.txt +110 -0
  66. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_gl.txt +161 -0
  67. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hi.txt +235 -0
  68. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hu.txt +211 -0
  69. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_hy.txt +46 -0
  70. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_id.txt +359 -0
  71. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_it.txt +303 -0
  72. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ja.txt +127 -0
  73. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_lv.txt +172 -0
  74. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_nl.txt +119 -0
  75. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_no.txt +194 -0
  76. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_pt.txt +253 -0
  77. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ro.txt +233 -0
  78. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_ru.txt +243 -0
  79. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_sv.txt +133 -0
  80. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_th.txt +119 -0
  81. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/stopwords_tr.txt +212 -0
  82. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/lang/userdict_ja.txt +29 -0
  83. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/managed-schema +1007 -0
  84. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/params.json +20 -0
  85. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/protwords.txt +21 -0
  86. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/solrconfig.xml +1355 -0
  87. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/stopwords.txt +14 -0
  88. data/lib/smart_machine/grids/solr/config/configsets/_default/conf/synonyms.txt +29 -0
  89. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_rest_managed.json +1 -0
  90. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_schema_analysis_stopwords_english.json +38 -0
  91. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/_schema_analysis_synonyms_english.json +11 -0
  92. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/README.txt +11 -0
  93. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/kmeans-attributes.xml +19 -0
  94. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/lingo-attributes.xml +24 -0
  95. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/clustering/carrot2/stc-attributes.xml +19 -0
  96. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/currency.xml +67 -0
  97. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/elevate.xml +42 -0
  98. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_ca.txt +8 -0
  99. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_fr.txt +15 -0
  100. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_ga.txt +5 -0
  101. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/contractions_it.txt +23 -0
  102. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/hyphenations_ga.txt +5 -0
  103. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stemdict_nl.txt +6 -0
  104. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stoptags_ja.txt +420 -0
  105. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ar.txt +125 -0
  106. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_bg.txt +193 -0
  107. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ca.txt +220 -0
  108. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ckb.txt +136 -0
  109. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_cz.txt +172 -0
  110. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_da.txt +110 -0
  111. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_de.txt +294 -0
  112. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_el.txt +78 -0
  113. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_en.txt +54 -0
  114. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_es.txt +356 -0
  115. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_eu.txt +99 -0
  116. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fa.txt +313 -0
  117. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fi.txt +97 -0
  118. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_fr.txt +186 -0
  119. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ga.txt +110 -0
  120. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_gl.txt +161 -0
  121. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hi.txt +235 -0
  122. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hu.txt +211 -0
  123. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_hy.txt +46 -0
  124. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_id.txt +359 -0
  125. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_it.txt +303 -0
  126. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ja.txt +127 -0
  127. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_lv.txt +172 -0
  128. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_nl.txt +119 -0
  129. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_no.txt +194 -0
  130. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_pt.txt +253 -0
  131. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ro.txt +233 -0
  132. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_ru.txt +243 -0
  133. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_sv.txt +133 -0
  134. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_th.txt +119 -0
  135. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/stopwords_tr.txt +212 -0
  136. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/lang/userdict_ja.txt +29 -0
  137. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/managed-schema +1187 -0
  138. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/mapping-FoldToASCII.txt +3813 -0
  139. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/mapping-ISOLatin1Accent.txt +246 -0
  140. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/params.json +11 -0
  141. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/protwords.txt +21 -0
  142. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/solrconfig.xml +1616 -0
  143. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/spellings.txt +2 -0
  144. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/stopwords.txt +14 -0
  145. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/synonyms.txt +29 -0
  146. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js +53 -0
  147. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/README.txt +101 -0
  148. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/VM_global_library.vm +186 -0
  149. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/browse.vm +33 -0
  150. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/cluster.vm +19 -0
  151. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/cluster_results.vm +31 -0
  152. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/debug.vm +28 -0
  153. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/did_you_mean.vm +11 -0
  154. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/error.vm +11 -0
  155. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm +24 -0
  156. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_pivot.vm +12 -0
  157. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_queries.vm +12 -0
  158. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facet_ranges.vm +23 -0
  159. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/facets.vm +10 -0
  160. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/footer.vm +43 -0
  161. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/head.vm +37 -0
  162. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/header.vm +7 -0
  163. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit.vm +25 -0
  164. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit_grouped.vm +43 -0
  165. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/hit_plain.vm +25 -0
  166. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/join_doc.vm +20 -0
  167. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.css +48 -0
  168. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/jquery.autocomplete.js +763 -0
  169. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/layout.vm +24 -0
  170. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/main.css +231 -0
  171. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/mime_type_lists.vm +68 -0
  172. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/pagination_bottom.vm +22 -0
  173. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/pagination_top.vm +29 -0
  174. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/product_doc.vm +32 -0
  175. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query.vm +42 -0
  176. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_form.vm +64 -0
  177. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_group.vm +43 -0
  178. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/query_spatial.vm +75 -0
  179. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/results_list.vm +22 -0
  180. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/richtext_doc.vm +153 -0
  181. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/suggest.vm +8 -0
  182. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/velocity/tabs.vm +50 -0
  183. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example.xsl +132 -0
  184. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example_atom.xsl +67 -0
  185. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl +66 -0
  186. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/luke.xsl +337 -0
  187. data/lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl +70 -0
  188. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/_rest_managed.json +1 -0
  189. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/admin-extra.html +31 -0
  190. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/currency.xml +67 -0
  191. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/elevate.xml +36 -0
  192. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/lang/stopwords_en.txt +54 -0
  193. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/mapping-ISOLatin1Accent.txt +246 -0
  194. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/protwords.txt +21 -0
  195. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/schema.xml +278 -0
  196. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/scripts.conf +24 -0
  197. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/solrconfig.xml +632 -0
  198. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/spellings.txt +2 -0
  199. data/lib/smart_machine/grids/solr/config/configsets/sunspot/conf/synonyms.txt +29 -0
  200. data/lib/smart_machine/grids/solr/config/lib/.keep +0 -0
  201. data/lib/smart_machine/grids/solr/config/solr.xml +53 -0
  202. data/lib/smart_machine/grids/solr/config/zoo.cfg +31 -0
  203. data/lib/smart_machine/grids/solr/docker-entrypoint-initdb.d/.keep +0 -0
  204. data/lib/smart_machine/grids/solr/sunspot/conf/schema.xml +278 -0
  205. data/lib/smart_machine/grids/solr/sunspot/conf/solrconfig.xml +632 -0
  206. data/lib/smart_machine/logger.rb +35 -0
  207. data/lib/smart_machine/machine.rb +192 -0
  208. data/lib/smart_machine/ssh.rb +43 -0
  209. data/lib/smart_machine/sync.rb +108 -0
  210. data/lib/smart_machine/templates/dotsmartmachine/apps/containers/.keep +0 -0
  211. data/lib/smart_machine/templates/dotsmartmachine/apps/repositories/.keep +0 -0
  212. data/lib/smart_machine/templates/dotsmartmachine/config/environment.rb +18 -0
  213. data/lib/smart_machine/templates/dotsmartmachine/config/users.yml +4 -0
  214. data/lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/data/.keep +0 -0
  215. data/lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/logs/.keep +0 -0
  216. data/lib/smart_machine/templates/dotsmartmachine/grids/minio/data/.keep +0 -0
  217. data/lib/smart_machine/templates/dotsmartmachine/grids/mysql/data/.keep +0 -0
  218. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/certificates/.keep +0 -0
  219. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/fastcgi.conf +11 -0
  220. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/htpasswd/.keep +0 -0
  221. data/lib/smart_machine/templates/dotsmartmachine/grids/nginx/nginx.tmpl +373 -0
  222. data/lib/smart_machine/templates/dotsmartmachine/grids/prereceiver/pre-receive +17 -0
  223. data/lib/smart_machine/templates/dotsmartmachine/grids/redis/data/.keep +0 -0
  224. data/lib/smart_machine/templates/dotsmartmachine/grids/solr/solr/.keep +0 -0
  225. data/lib/smart_machine/templates/dotsmartmachine/tmp/.keep +0 -0
  226. data/lib/smart_machine/user.rb +38 -0
  227. data/lib/smart_machine/version.rb +10 -0
  228. metadata +297 -12
  229. data/README.md +0 -9
@@ -0,0 +1,24 @@
1
+ #**
2
+ * Overall HTML page layout
3
+ *#
4
+
5
+ <html>
6
+ <head>
7
+ #parse("head.vm")
8
+ </head>
9
+ <body>
10
+ <div id="admin"><a href="#url_root/#/#core_name">Solr Admin</a></div>
11
+ <div id="header">
12
+ #parse("header.vm")
13
+ </div>
14
+ <div id="tabs">
15
+ #parse("tabs.vm")
16
+ </div>
17
+ <div id="content">
18
+ $content
19
+ </div>
20
+ <div id="footer">
21
+ #parse("footer.vm")
22
+ </div>
23
+ </body>
24
+ </html>
@@ -0,0 +1,231 @@
1
+ #admin{
2
+ text-align: right;
3
+ vertical-align: top;
4
+ }
5
+
6
+ #head{
7
+ width: 100%;
8
+ }
9
+ .array-field {
10
+ border: 2px solid #474747;
11
+ background: #FFE9D8;
12
+ padding: 5px;
13
+ margin: 5px;
14
+ }
15
+
16
+ .array-field-list li {
17
+ list-style: circle;
18
+ margin-left: 20px;
19
+ }
20
+
21
+ .parsed_query_header {
22
+ font-family: Helvetica, Arial, sans-serif;
23
+ font-size: 10pt;
24
+ font-weight: bold;
25
+ }
26
+
27
+ .parsed_query {
28
+ font-family: Courier, Courier New, monospaced;
29
+ font-size: 10pt;
30
+ font-weight: normal;
31
+ }
32
+
33
+ body {
34
+ font-family: Helvetica, Arial, sans-serif;
35
+ font-size: 10pt;
36
+ }
37
+
38
+ a {
39
+ color: #43a4b1;
40
+ }
41
+
42
+ .navigators {
43
+ float: left;
44
+ margin: 5px;
45
+ margin-top: 0px;
46
+ width: 185px;
47
+ padding: 5px;
48
+ top: -20px;
49
+ position: relative;
50
+ }
51
+
52
+ .tabs-bar {
53
+ padding: 5px;
54
+ width: 100%;
55
+ border: 1px solid;
56
+ border-width: 0px 0px 1px 0px;
57
+ }
58
+ .tab {
59
+ font-weight: bold;
60
+ padding: 5px;
61
+ margin: 0px 5px;
62
+ border: 1px solid;
63
+ background-color: #dddddd;
64
+ border-top-left-radius: 4px;
65
+ border-top-right-radius: 4px;
66
+ }
67
+ .tab:hover {
68
+ background: #FEC293;
69
+ }
70
+ .tab.selected {
71
+ background-color: #ffffff;
72
+ border-bottom: 1px solid #ffffff;
73
+ }
74
+
75
+ .navigators h2 {
76
+ background: #FEC293;
77
+ padding: 2px 5px;
78
+ }
79
+
80
+ .navigators ul {
81
+ list-style: none;
82
+ margin: 0;
83
+ margin-bottom: 5px;
84
+ margin-top: 5px;
85
+ padding-left: 10px;
86
+ }
87
+
88
+ .navigators ul li {
89
+ color: #999;
90
+ padding: 2px;
91
+ }
92
+
93
+
94
+
95
+ .facet-field {
96
+ font-weight: bold;
97
+ }
98
+
99
+ .highlight {
100
+ color: white;
101
+ background-color: gray;
102
+ border: 1px black solid;
103
+ }
104
+
105
+ .highlight-box {
106
+ margin-left: 15px;
107
+ }
108
+
109
+ .field-name {
110
+ font-weight: bold;
111
+ }
112
+
113
+ .highlighted-facet-field {
114
+ background: white;
115
+ }
116
+
117
+ .constraints {
118
+ margin-top: 10px;
119
+ }
120
+
121
+ #query-form{
122
+ width: 80%;
123
+ }
124
+
125
+
126
+
127
+ .query-box, .constraints {
128
+ padding: 5px;
129
+ margin: 5px;
130
+ font-weight: normal;
131
+ font-size: 24px;
132
+ letter-spacing: 0.08em;
133
+ }
134
+
135
+ .query-box #q {
136
+ margin-left: 8px;
137
+ width: 60%;
138
+ height: 50px;
139
+ border: 1px solid #999;
140
+ font-size: 1em;
141
+ padding: 0.4em;
142
+ }
143
+
144
+ .query-box {
145
+
146
+ }
147
+
148
+ .query-boost {
149
+
150
+ top: 10px;
151
+ left: 50px;
152
+ position: relative;
153
+ font-size: 0.8em;
154
+ }
155
+
156
+ .query-box .inputs{
157
+ left: 180px;
158
+ position: relative;
159
+
160
+ }
161
+
162
+ #logo {
163
+ width: 115px;
164
+ margin: 0px 0px 20px 12px;
165
+ border-style: none;
166
+ }
167
+
168
+ .pagination {
169
+ padding-left: 33%;
170
+ background: #eee;
171
+ margin: 5px;
172
+ margin-left: 210px;
173
+ padding-top: 5px;
174
+ padding-bottom: 5px;
175
+ }
176
+
177
+ .result-document {
178
+ border: 1px solid #999;
179
+ padding: 5px;
180
+ margin: 5px;
181
+ margin-left: 210px;
182
+ margin-bottom: 15px;
183
+ }
184
+
185
+ .result-document div{
186
+ padding: 5px;
187
+ }
188
+
189
+ .result-title{
190
+ width:60%;
191
+ }
192
+
193
+ .result-body{
194
+ background: #ddd;
195
+ }
196
+
197
+ .mlt{
198
+
199
+ }
200
+
201
+ .map{
202
+ float: right;
203
+ position: relative;
204
+ top: -25px;
205
+ }
206
+
207
+ .result-document:nth-child(2n+1) {
208
+ background-color: #eee;
209
+ }
210
+
211
+
212
+ .selected-facet-field {
213
+ font-weight: bold;
214
+ }
215
+
216
+ li.show {
217
+ list-style: disc;
218
+ }
219
+
220
+ .group-value{
221
+ font-weight: bold;
222
+ }
223
+
224
+ .error {
225
+ color: white;
226
+ background-color: red;
227
+ left: 210px;
228
+ width:80%;
229
+ position: relative;
230
+
231
+ }
@@ -0,0 +1,68 @@
1
+ #**
2
+ * Define some Mime-Types, short and long form
3
+ *#
4
+
5
+ ## MimeType to extension map for detecting file type
6
+ ## and showing proper icon
7
+ ## List of types match the icons in /solr/img/filetypes
8
+
9
+ ## Short MimeType Names
10
+ ## Was called $supportedtypes
11
+ #set($supportedMimeTypes = "7z;ai;aiff;asc;audio;bin;bz2;c;cfc;cfm;chm;class;conf;cpp;cs;css;csv;deb;divx;doc;dot;eml;enc;file;gif;gz;hlp;htm;html;image;iso;jar;java;jpeg;jpg;js;lua;m;mm;mov;mp3;mpg;odc;odf;odg;odi;odp;ods;odt;ogg;pdf;pgp;php;pl;png;ppt;ps;py;ram;rar;rb;rm;rpm;rtf;sig;sql;swf;sxc;sxd;sxi;sxw;tar;tex;tgz;txt;vcf;video;vsd;wav;wma;wmv;xls;xml;xpi;xvid;zip")
12
+
13
+ ## Long Form: map MimeType headers to our Short names
14
+ ## Was called $extMap
15
+ #set( $mimeExtensionsMap = {
16
+ "application/x-7z-compressed": "7z",
17
+ "application/postscript": "ai",
18
+ "application/pgp-signature": "asc",
19
+ "application/octet-stream": "bin",
20
+ "application/x-bzip2": "bz2",
21
+ "text/x-c": "c",
22
+ "application/vnd.ms-htmlhelp": "chm",
23
+ "application/java-vm": "class",
24
+ "text/css": "css",
25
+ "text/csv": "csv",
26
+ "application/x-debian-package": "deb",
27
+ "application/msword": "doc",
28
+ "message/rfc822": "eml",
29
+ "image/gif": "gif",
30
+ "application/winhlp": "hlp",
31
+ "text/html": "html",
32
+ "application/java-archive": "jar",
33
+ "text/x-java-source": "java",
34
+ "image/jpeg": "jpeg",
35
+ "application/javascript": "js",
36
+ "application/vnd.oasis.opendocument.chart": "odc",
37
+ "application/vnd.oasis.opendocument.formula": "odf",
38
+ "application/vnd.oasis.opendocument.graphics": "odg",
39
+ "application/vnd.oasis.opendocument.image": "odi",
40
+ "application/vnd.oasis.opendocument.presentation": "odp",
41
+ "application/vnd.oasis.opendocument.spreadsheet": "ods",
42
+ "application/vnd.oasis.opendocument.text": "odt",
43
+ "application/pdf": "pdf",
44
+ "application/pgp-encrypted": "pgp",
45
+ "image/png": "png",
46
+ "application/vnd.ms-powerpoint": "ppt",
47
+ "audio/x-pn-realaudio": "ram",
48
+ "application/x-rar-compressed": "rar",
49
+ "application/vnd.rn-realmedia": "rm",
50
+ "application/rtf": "rtf",
51
+ "application/x-shockwave-flash": "swf",
52
+ "application/vnd.sun.xml.calc": "sxc",
53
+ "application/vnd.sun.xml.draw": "sxd",
54
+ "application/vnd.sun.xml.impress": "sxi",
55
+ "application/vnd.sun.xml.writer": "sxw",
56
+ "application/x-tar": "tar",
57
+ "application/x-tex": "tex",
58
+ "text/plain": "txt",
59
+ "text/x-vcard": "vcf",
60
+ "application/vnd.visio": "vsd",
61
+ "audio/x-wav": "wav",
62
+ "audio/x-ms-wma": "wma",
63
+ "video/x-ms-wmv": "wmv",
64
+ "application/vnd.ms-excel": "xls",
65
+ "application/xml": "xml",
66
+ "application/x-xpinstall": "xpi",
67
+ "application/zip": "zip"
68
+ })
@@ -0,0 +1,22 @@
1
+ #**
2
+ * Paging and Statistics at bottom of results
3
+ *#
4
+
5
+ ## Usually rendered in pagination div tag
6
+
7
+ #if($response.response.get('grouped'))
8
+ ## pass
9
+ #else
10
+
11
+ #link_to_previous_page("previous")
12
+
13
+ <span class="results-found">$page.results_found</span>
14
+ results found.
15
+
16
+ Page <span class="page-num">$page.current_page_number</span>
17
+ of <span class="page-count">$page.page_count</span>
18
+
19
+ #link_to_next_page("next")
20
+
21
+ #end
22
+ <br/>
@@ -0,0 +1,29 @@
1
+ #**
2
+ * Paging and Statistics at top of results
3
+ *#
4
+
5
+ ## Usually rendered in pagination div tag
6
+
7
+ ## Grouped Results / Not Paginated
8
+ #if($response.response.get('grouped'))
9
+
10
+ <span>
11
+ <span class="results-found">
12
+ $response.response.get('grouped').size() group(s)
13
+ </span>
14
+ found in ${response.responseHeader.QTime} ms
15
+ </span>
16
+
17
+ ## Regular Results / Use Paging Links if needed
18
+ #else
19
+
20
+ <span>
21
+ <span class="results-found">$page.results_found</span>
22
+ results found in
23
+ ${response.responseHeader.QTime} ms
24
+ </span>
25
+
26
+ Page <span class="page-num">$page.current_page_number</span>
27
+ of <span class="page-count">$page.page_count</span>
28
+
29
+ #end ## end else non-grouped results, normal pagination
@@ -0,0 +1,32 @@
1
+ #**
2
+ * Render a hit representing a Product
3
+ * assumed to have a field called "name"
4
+ *#
5
+
6
+ <div class="result-title"><b>#field('name')</b><span class="mlt"> #if($params.getBool('mlt', false) == false)<a href="#lensNoQ&q=id:$docId&mlt=true">More Like This</a>#end</span></div>
7
+ ##do we have a physical store for this product
8
+ #set($store = $doc.getFieldValue('store'))
9
+ #if($store)<div class="map"><img src="http://maps.google.com/maps/api/staticmap?&zoom=12&size=150x80&maptype=roadmap&markers=$doc.getFieldValue('store')&sensor=false" /><div><small><a target="_map" href="http://maps.google.com/?q=$store&amp;source=embed">Larger Map</a></small></div></div>#end
10
+ <div>Id: #field('id')</div>
11
+ <div>Price: #field('price_c')</div>
12
+ <div>Features: #field('features')</div>
13
+ <div>In Stock: #field('inStock')</div>
14
+ <div class="mlt">
15
+ #set($mlt = $mltResults.get($docId))
16
+ #set($mltOn = $params.getBool('mlt'))
17
+ #if($mltOn == true)<div class="field-name">Similar Items</div>#end
18
+ #if ($mltOn && $mlt && $mlt.size() > 0)
19
+ <ul>
20
+ #foreach($mltHit in $mlt)
21
+ #set($mltId = $mltHit.getFieldValue('id'))
22
+ <li><div><a href="#url_for_home?q=id:$mltId">$mltId</a></div><div><span class="field-name">Name:</span> $mltHit.getFieldValue('name')</div>
23
+ <div><span class="field-name">Price:</span> $!number.currency($mltHit.getFieldValue('price')) <span class="field-name">In Stock:</span> $mltHit.getFieldValue('inStock')</div>
24
+
25
+ </li>
26
+ #end
27
+ </ul>
28
+ #elseif($mltOn && $mlt.size() == 0)
29
+ <div>No Similar Items Found</div>
30
+ #end
31
+ </div>
32
+ #parse('debug.vm')
@@ -0,0 +1,42 @@
1
+ <div class="query-box">
2
+ <form id="query-form" action="#{url_for_home}" method="GET">
3
+ <div class="inputs">
4
+ <span #annTitle("Add the query using the &q= parameter")>Find: <input type="text" id="q" name="q" value="$!esc.html($params.get('q'))"/> <input type="submit" id="querySubmit"/> <input type="reset"/></span>
5
+ <div class="query-boost"><span #annTitle("Add the boost function &bf=price to the query")><input type="checkbox" name="bf" value="price" #if($request.params.get('bf') == 'price')checked="true"#end>Boost by Price</input></span>
6
+ #parse("querySpatial.vm")
7
+ #parse("queryGroup.vm")
8
+ </div>
9
+ </div>
10
+
11
+ #if($request.params.get('debugQuery'))
12
+ <input type="hidden" name="debugQuery" value="true"/>
13
+ #end
14
+ #if($annotate == true)
15
+ <input type="hidden" name="annotateBrowse" value="true"/>
16
+ #end
17
+ #foreach($fq in $request.params.getParams('fq'))
18
+ #if ($fq != "{!bbox}")
19
+ <input type="hidden" name="fq" id="allFQs" value="$esc.html($fq)"/>
20
+ #end
21
+ #end
22
+ <div class="constraints" #annTitle("Lists out the &fq filters. Click to remove.")>
23
+ #foreach($fq in $params.getParams('fq'))
24
+ #set($previous_fq_count=$velocityCount - 1)
25
+ #if($fq != '')
26
+ &gt; <a style="{text-decoration: line-through;}" href="#url_for_filters($request.params.getParams('fq').subList(0,$previous_fq_count))">$fq</a>
27
+ #end
28
+ #end
29
+ </div>
30
+ <div class="parsed_query_header">
31
+ #if($request.params.get('debugQuery'))
32
+ <a href="#" onclick='jQuery(this).siblings("div").toggle(); return false;'>toggle parsed query</a>
33
+ <div class="parsed_query" style="display:none">$response.response.debug.parsedquery</div>
34
+ #end
35
+ #set($queryOpts = $request.params.get("queryOpts"))
36
+ #if($queryOpts && $queryOpts != "")
37
+ <input type="hidden" name="queryOpts" value="$queryOpts"/>
38
+ #end
39
+ </div>
40
+ </form>
41
+
42
+ </div>