nginxtra 1.2.2.3 → 1.2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (368) hide show
  1. data/bin/nginxtra +2 -1
  2. data/bin/nginxtra_rails +6 -0
  3. data/lib/nginxtra.rb +3 -0
  4. data/lib/nginxtra/actions/compile.rb +1 -1
  5. data/lib/nginxtra/actions/install.rb +9 -1
  6. data/lib/nginxtra/actions/rails/server.rb +78 -0
  7. data/lib/nginxtra/cli.rb +15 -0
  8. data/lib/nginxtra/config.rb +1 -6
  9. data/lib/nginxtra/error.rb +7 -2
  10. data/lib/nginxtra/rails/cli.rb +21 -0
  11. data/lib/nginxtra/version.rb +9 -0
  12. data/templates/files/nginx.conf.rb +14 -0
  13. data/templates/partials/nginx.conf/rails.rb +16 -0
  14. data/templates/partials/nginx.conf/static.rb +8 -0
  15. data/templates/partials/nginx.conf/wordpress.rb +36 -0
  16. data/{src → vendor}/nginx/CHANGES +0 -0
  17. data/{src → vendor}/nginx/CHANGES.ru +0 -0
  18. data/{src → vendor}/nginx/LICENSE +0 -0
  19. data/{src → vendor}/nginx/README +0 -0
  20. data/{src → vendor}/nginx/auto/cc/acc +0 -0
  21. data/{src → vendor}/nginx/auto/cc/bcc +0 -0
  22. data/{src → vendor}/nginx/auto/cc/ccc +0 -0
  23. data/{src → vendor}/nginx/auto/cc/conf +0 -0
  24. data/{src → vendor}/nginx/auto/cc/gcc +0 -0
  25. data/{src → vendor}/nginx/auto/cc/icc +0 -0
  26. data/{src → vendor}/nginx/auto/cc/msvc +0 -0
  27. data/{src → vendor}/nginx/auto/cc/name +0 -0
  28. data/{src → vendor}/nginx/auto/cc/owc +0 -0
  29. data/{src → vendor}/nginx/auto/cc/sunc +0 -0
  30. data/{src → vendor}/nginx/auto/define +0 -0
  31. data/{src → vendor}/nginx/auto/endianness +0 -0
  32. data/{src → vendor}/nginx/auto/feature +0 -0
  33. data/{src → vendor}/nginx/auto/have +0 -0
  34. data/{src → vendor}/nginx/auto/have_headers +0 -0
  35. data/{src → vendor}/nginx/auto/headers +0 -0
  36. data/{src → vendor}/nginx/auto/include +0 -0
  37. data/{src → vendor}/nginx/auto/init +0 -0
  38. data/{src → vendor}/nginx/auto/install +0 -0
  39. data/{src → vendor}/nginx/auto/lib/conf +0 -0
  40. data/{src → vendor}/nginx/auto/lib/geoip/conf +0 -0
  41. data/{src → vendor}/nginx/auto/lib/google-perftools/conf +0 -0
  42. data/{src → vendor}/nginx/auto/lib/libatomic/conf +0 -0
  43. data/{src → vendor}/nginx/auto/lib/libatomic/make +0 -0
  44. data/{src → vendor}/nginx/auto/lib/libgd/conf +0 -0
  45. data/{src → vendor}/nginx/auto/lib/libxslt/conf +0 -0
  46. data/{src → vendor}/nginx/auto/lib/make +0 -0
  47. data/{src → vendor}/nginx/auto/lib/md5/conf +0 -0
  48. data/{src → vendor}/nginx/auto/lib/md5/make +0 -0
  49. data/{src → vendor}/nginx/auto/lib/md5/makefile.bcc +0 -0
  50. data/{src → vendor}/nginx/auto/lib/md5/makefile.msvc +0 -0
  51. data/{src → vendor}/nginx/auto/lib/md5/makefile.owc +0 -0
  52. data/{src → vendor}/nginx/auto/lib/openssl/conf +0 -0
  53. data/{src → vendor}/nginx/auto/lib/openssl/make +0 -0
  54. data/{src → vendor}/nginx/auto/lib/openssl/makefile.bcc +0 -0
  55. data/{src → vendor}/nginx/auto/lib/openssl/makefile.msvc +0 -0
  56. data/{src → vendor}/nginx/auto/lib/pcre/conf +0 -0
  57. data/{src → vendor}/nginx/auto/lib/pcre/make +0 -0
  58. data/{src → vendor}/nginx/auto/lib/pcre/makefile.bcc +0 -0
  59. data/{src → vendor}/nginx/auto/lib/pcre/makefile.msvc +0 -0
  60. data/{src → vendor}/nginx/auto/lib/pcre/makefile.owc +0 -0
  61. data/{src → vendor}/nginx/auto/lib/perl/conf +0 -0
  62. data/{src → vendor}/nginx/auto/lib/perl/make +0 -0
  63. data/{src → vendor}/nginx/auto/lib/sha1/conf +0 -0
  64. data/{src → vendor}/nginx/auto/lib/sha1/make +0 -0
  65. data/{src → vendor}/nginx/auto/lib/sha1/makefile.bcc +0 -0
  66. data/{src → vendor}/nginx/auto/lib/sha1/makefile.msvc +0 -0
  67. data/{src → vendor}/nginx/auto/lib/sha1/makefile.owc +0 -0
  68. data/{src → vendor}/nginx/auto/lib/test +0 -0
  69. data/{src → vendor}/nginx/auto/lib/zlib/conf +0 -0
  70. data/{src → vendor}/nginx/auto/lib/zlib/make +0 -0
  71. data/{src → vendor}/nginx/auto/lib/zlib/makefile.bcc +0 -0
  72. data/{src → vendor}/nginx/auto/lib/zlib/makefile.msvc +0 -0
  73. data/{src → vendor}/nginx/auto/lib/zlib/makefile.owc +0 -0
  74. data/{src → vendor}/nginx/auto/lib/zlib/patch.zlib.h +0 -0
  75. data/{src → vendor}/nginx/auto/make +0 -0
  76. data/{src → vendor}/nginx/auto/modules +0 -0
  77. data/{src → vendor}/nginx/auto/nohave +0 -0
  78. data/{src → vendor}/nginx/auto/options +0 -0
  79. data/{src → vendor}/nginx/auto/os/conf +0 -0
  80. data/{src → vendor}/nginx/auto/os/darwin +0 -0
  81. data/{src → vendor}/nginx/auto/os/freebsd +0 -0
  82. data/{src → vendor}/nginx/auto/os/linux +0 -0
  83. data/{src → vendor}/nginx/auto/os/solaris +0 -0
  84. data/{src → vendor}/nginx/auto/os/win32 +0 -0
  85. data/{src → vendor}/nginx/auto/sources +0 -0
  86. data/{src → vendor}/nginx/auto/stubs +0 -0
  87. data/{src → vendor}/nginx/auto/summary +0 -0
  88. data/{src → vendor}/nginx/auto/types/sizeof +0 -0
  89. data/{src → vendor}/nginx/auto/types/typedef +0 -0
  90. data/{src → vendor}/nginx/auto/types/uintptr_t +0 -0
  91. data/{src → vendor}/nginx/auto/types/value +0 -0
  92. data/{src → vendor}/nginx/auto/unix +0 -0
  93. data/{src → vendor}/nginx/conf/fastcgi.conf +0 -0
  94. data/{src → vendor}/nginx/conf/fastcgi_params +0 -0
  95. data/{src → vendor}/nginx/conf/koi-utf +0 -0
  96. data/{src → vendor}/nginx/conf/koi-win +0 -0
  97. data/{src → vendor}/nginx/conf/mime.types +0 -0
  98. data/{src → vendor}/nginx/conf/nginx.conf +0 -0
  99. data/{src → vendor}/nginx/conf/scgi_params +0 -0
  100. data/{src → vendor}/nginx/conf/uwsgi_params +0 -0
  101. data/{src → vendor}/nginx/conf/win-utf +0 -0
  102. data/{src → vendor}/nginx/configure +0 -0
  103. data/{src → vendor}/nginx/contrib/README +0 -0
  104. data/{src → vendor}/nginx/contrib/geo2nginx.pl +0 -0
  105. data/{src → vendor}/nginx/contrib/unicode2nginx/koi-utf +0 -0
  106. data/{src → vendor}/nginx/contrib/unicode2nginx/unicode-to-nginx.pl +0 -0
  107. data/{src → vendor}/nginx/contrib/unicode2nginx/win-utf +0 -0
  108. data/{src → vendor}/nginx/html/50x.html +0 -0
  109. data/{src → vendor}/nginx/html/index.html +0 -0
  110. data/{src → vendor}/nginx/man/nginx.8 +0 -0
  111. data/{src → vendor}/nginx/src/core/nginx.c +0 -0
  112. data/{src → vendor}/nginx/src/core/nginx.h +0 -0
  113. data/{src → vendor}/nginx/src/core/ngx_array.c +0 -0
  114. data/{src → vendor}/nginx/src/core/ngx_array.h +0 -0
  115. data/{src → vendor}/nginx/src/core/ngx_buf.c +0 -0
  116. data/{src → vendor}/nginx/src/core/ngx_buf.h +0 -0
  117. data/{src → vendor}/nginx/src/core/ngx_conf_file.c +0 -0
  118. data/{src → vendor}/nginx/src/core/ngx_conf_file.h +0 -0
  119. data/{src → vendor}/nginx/src/core/ngx_config.h +0 -0
  120. data/{src → vendor}/nginx/src/core/ngx_connection.c +0 -0
  121. data/{src → vendor}/nginx/src/core/ngx_connection.h +0 -0
  122. data/{src → vendor}/nginx/src/core/ngx_core.h +0 -0
  123. data/{src → vendor}/nginx/src/core/ngx_cpuinfo.c +0 -0
  124. data/{src → vendor}/nginx/src/core/ngx_crc.h +0 -0
  125. data/{src → vendor}/nginx/src/core/ngx_crc32.c +0 -0
  126. data/{src → vendor}/nginx/src/core/ngx_crc32.h +0 -0
  127. data/{src → vendor}/nginx/src/core/ngx_crypt.c +0 -0
  128. data/{src → vendor}/nginx/src/core/ngx_crypt.h +0 -0
  129. data/{src → vendor}/nginx/src/core/ngx_cycle.c +0 -0
  130. data/{src → vendor}/nginx/src/core/ngx_cycle.h +0 -0
  131. data/{src → vendor}/nginx/src/core/ngx_file.c +0 -0
  132. data/{src → vendor}/nginx/src/core/ngx_file.h +0 -0
  133. data/{src → vendor}/nginx/src/core/ngx_hash.c +0 -0
  134. data/{src → vendor}/nginx/src/core/ngx_hash.h +0 -0
  135. data/{src → vendor}/nginx/src/core/ngx_inet.c +0 -0
  136. data/{src → vendor}/nginx/src/core/ngx_inet.h +0 -0
  137. data/{src → vendor}/nginx/src/core/ngx_list.c +0 -0
  138. data/{src → vendor}/nginx/src/core/ngx_list.h +0 -0
  139. data/{src → vendor}/nginx/src/core/ngx_log.c +0 -0
  140. data/{src → vendor}/nginx/src/core/ngx_log.h +0 -0
  141. data/{src → vendor}/nginx/src/core/ngx_md5.c +0 -0
  142. data/{src → vendor}/nginx/src/core/ngx_md5.h +0 -0
  143. data/{src → vendor}/nginx/src/core/ngx_murmurhash.c +0 -0
  144. data/{src → vendor}/nginx/src/core/ngx_murmurhash.h +0 -0
  145. data/{src → vendor}/nginx/src/core/ngx_open_file_cache.c +0 -0
  146. data/{src → vendor}/nginx/src/core/ngx_open_file_cache.h +0 -0
  147. data/{src → vendor}/nginx/src/core/ngx_output_chain.c +0 -0
  148. data/{src → vendor}/nginx/src/core/ngx_palloc.c +0 -0
  149. data/{src → vendor}/nginx/src/core/ngx_palloc.h +0 -0
  150. data/{src → vendor}/nginx/src/core/ngx_parse.c +0 -0
  151. data/{src → vendor}/nginx/src/core/ngx_parse.h +0 -0
  152. data/{src → vendor}/nginx/src/core/ngx_queue.c +0 -0
  153. data/{src → vendor}/nginx/src/core/ngx_queue.h +0 -0
  154. data/{src → vendor}/nginx/src/core/ngx_radix_tree.c +0 -0
  155. data/{src → vendor}/nginx/src/core/ngx_radix_tree.h +0 -0
  156. data/{src → vendor}/nginx/src/core/ngx_rbtree.c +0 -0
  157. data/{src → vendor}/nginx/src/core/ngx_rbtree.h +0 -0
  158. data/{src → vendor}/nginx/src/core/ngx_regex.c +0 -0
  159. data/{src → vendor}/nginx/src/core/ngx_regex.h +0 -0
  160. data/{src → vendor}/nginx/src/core/ngx_resolver.c +0 -0
  161. data/{src → vendor}/nginx/src/core/ngx_resolver.h +0 -0
  162. data/{src → vendor}/nginx/src/core/ngx_sha1.h +0 -0
  163. data/{src → vendor}/nginx/src/core/ngx_shmtx.c +0 -0
  164. data/{src → vendor}/nginx/src/core/ngx_shmtx.h +0 -0
  165. data/{src → vendor}/nginx/src/core/ngx_slab.c +0 -0
  166. data/{src → vendor}/nginx/src/core/ngx_slab.h +0 -0
  167. data/{src → vendor}/nginx/src/core/ngx_spinlock.c +0 -0
  168. data/{src → vendor}/nginx/src/core/ngx_string.c +0 -0
  169. data/{src → vendor}/nginx/src/core/ngx_string.h +0 -0
  170. data/{src → vendor}/nginx/src/core/ngx_times.c +0 -0
  171. data/{src → vendor}/nginx/src/core/ngx_times.h +0 -0
  172. data/{src → vendor}/nginx/src/event/modules/ngx_aio_module.c +0 -0
  173. data/{src → vendor}/nginx/src/event/modules/ngx_devpoll_module.c +0 -0
  174. data/{src → vendor}/nginx/src/event/modules/ngx_epoll_module.c +0 -0
  175. data/{src → vendor}/nginx/src/event/modules/ngx_eventport_module.c +0 -0
  176. data/{src → vendor}/nginx/src/event/modules/ngx_kqueue_module.c +0 -0
  177. data/{src → vendor}/nginx/src/event/modules/ngx_poll_module.c +0 -0
  178. data/{src → vendor}/nginx/src/event/modules/ngx_rtsig_module.c +0 -0
  179. data/{src → vendor}/nginx/src/event/modules/ngx_select_module.c +0 -0
  180. data/{src → vendor}/nginx/src/event/modules/ngx_win32_select_module.c +0 -0
  181. data/{src → vendor}/nginx/src/event/ngx_event.c +0 -0
  182. data/{src → vendor}/nginx/src/event/ngx_event.h +0 -0
  183. data/{src → vendor}/nginx/src/event/ngx_event_accept.c +0 -0
  184. data/{src → vendor}/nginx/src/event/ngx_event_busy_lock.c +0 -0
  185. data/{src → vendor}/nginx/src/event/ngx_event_busy_lock.h +0 -0
  186. data/{src → vendor}/nginx/src/event/ngx_event_connect.c +0 -0
  187. data/{src → vendor}/nginx/src/event/ngx_event_connect.h +0 -0
  188. data/{src → vendor}/nginx/src/event/ngx_event_mutex.c +0 -0
  189. data/{src → vendor}/nginx/src/event/ngx_event_openssl.c +0 -0
  190. data/{src → vendor}/nginx/src/event/ngx_event_openssl.h +0 -0
  191. data/{src → vendor}/nginx/src/event/ngx_event_pipe.c +0 -0
  192. data/{src → vendor}/nginx/src/event/ngx_event_pipe.h +0 -0
  193. data/{src → vendor}/nginx/src/event/ngx_event_posted.c +0 -0
  194. data/{src → vendor}/nginx/src/event/ngx_event_posted.h +0 -0
  195. data/{src → vendor}/nginx/src/event/ngx_event_timer.c +0 -0
  196. data/{src → vendor}/nginx/src/event/ngx_event_timer.h +0 -0
  197. data/{src → vendor}/nginx/src/http/modules/ngx_http_access_module.c +0 -0
  198. data/{src → vendor}/nginx/src/http/modules/ngx_http_addition_filter_module.c +0 -0
  199. data/{src → vendor}/nginx/src/http/modules/ngx_http_auth_basic_module.c +0 -0
  200. data/{src → vendor}/nginx/src/http/modules/ngx_http_autoindex_module.c +0 -0
  201. data/{src → vendor}/nginx/src/http/modules/ngx_http_browser_module.c +0 -0
  202. data/{src → vendor}/nginx/src/http/modules/ngx_http_charset_filter_module.c +0 -0
  203. data/{src → vendor}/nginx/src/http/modules/ngx_http_chunked_filter_module.c +0 -0
  204. data/{src → vendor}/nginx/src/http/modules/ngx_http_dav_module.c +0 -0
  205. data/{src → vendor}/nginx/src/http/modules/ngx_http_degradation_module.c +0 -0
  206. data/{src → vendor}/nginx/src/http/modules/ngx_http_empty_gif_module.c +0 -0
  207. data/{src → vendor}/nginx/src/http/modules/ngx_http_fastcgi_module.c +0 -0
  208. data/{src → vendor}/nginx/src/http/modules/ngx_http_flv_module.c +0 -0
  209. data/{src → vendor}/nginx/src/http/modules/ngx_http_geo_module.c +0 -0
  210. data/{src → vendor}/nginx/src/http/modules/ngx_http_geoip_module.c +0 -0
  211. data/{src → vendor}/nginx/src/http/modules/ngx_http_gzip_filter_module.c +0 -0
  212. data/{src → vendor}/nginx/src/http/modules/ngx_http_gzip_static_module.c +0 -0
  213. data/{src → vendor}/nginx/src/http/modules/ngx_http_headers_filter_module.c +0 -0
  214. data/{src → vendor}/nginx/src/http/modules/ngx_http_image_filter_module.c +0 -0
  215. data/{src → vendor}/nginx/src/http/modules/ngx_http_index_module.c +0 -0
  216. data/{src → vendor}/nginx/src/http/modules/ngx_http_limit_conn_module.c +0 -0
  217. data/{src → vendor}/nginx/src/http/modules/ngx_http_limit_req_module.c +0 -0
  218. data/{src → vendor}/nginx/src/http/modules/ngx_http_log_module.c +0 -0
  219. data/{src → vendor}/nginx/src/http/modules/ngx_http_map_module.c +0 -0
  220. data/{src → vendor}/nginx/src/http/modules/ngx_http_memcached_module.c +0 -0
  221. data/{src → vendor}/nginx/src/http/modules/ngx_http_mp4_module.c +0 -0
  222. data/{src → vendor}/nginx/src/http/modules/ngx_http_not_modified_filter_module.c +0 -0
  223. data/{src → vendor}/nginx/src/http/modules/ngx_http_proxy_module.c +0 -0
  224. data/{src → vendor}/nginx/src/http/modules/ngx_http_random_index_module.c +0 -0
  225. data/{src → vendor}/nginx/src/http/modules/ngx_http_range_filter_module.c +0 -0
  226. data/{src → vendor}/nginx/src/http/modules/ngx_http_realip_module.c +0 -0
  227. data/{src → vendor}/nginx/src/http/modules/ngx_http_referer_module.c +0 -0
  228. data/{src → vendor}/nginx/src/http/modules/ngx_http_rewrite_module.c +0 -0
  229. data/{src → vendor}/nginx/src/http/modules/ngx_http_scgi_module.c +0 -0
  230. data/{src → vendor}/nginx/src/http/modules/ngx_http_secure_link_module.c +0 -0
  231. data/{src → vendor}/nginx/src/http/modules/ngx_http_split_clients_module.c +0 -0
  232. data/{src → vendor}/nginx/src/http/modules/ngx_http_ssi_filter_module.c +0 -0
  233. data/{src → vendor}/nginx/src/http/modules/ngx_http_ssi_filter_module.h +0 -0
  234. data/{src → vendor}/nginx/src/http/modules/ngx_http_ssl_module.c +0 -0
  235. data/{src → vendor}/nginx/src/http/modules/ngx_http_ssl_module.h +0 -0
  236. data/{src → vendor}/nginx/src/http/modules/ngx_http_static_module.c +0 -0
  237. data/{src → vendor}/nginx/src/http/modules/ngx_http_stub_status_module.c +0 -0
  238. data/{src → vendor}/nginx/src/http/modules/ngx_http_sub_filter_module.c +0 -0
  239. data/{src → vendor}/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +0 -0
  240. data/{src → vendor}/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +0 -0
  241. data/{src → vendor}/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +0 -0
  242. data/{src → vendor}/nginx/src/http/modules/ngx_http_userid_filter_module.c +0 -0
  243. data/{src → vendor}/nginx/src/http/modules/ngx_http_uwsgi_module.c +0 -0
  244. data/{src → vendor}/nginx/src/http/modules/ngx_http_xslt_filter_module.c +0 -0
  245. data/{src → vendor}/nginx/src/http/modules/perl/Makefile.PL +0 -0
  246. data/{src → vendor}/nginx/src/http/modules/perl/nginx.pm +0 -0
  247. data/{src → vendor}/nginx/src/http/modules/perl/nginx.xs +0 -0
  248. data/{src → vendor}/nginx/src/http/modules/perl/ngx_http_perl_module.c +0 -0
  249. data/{src → vendor}/nginx/src/http/modules/perl/ngx_http_perl_module.h +0 -0
  250. data/{src → vendor}/nginx/src/http/modules/perl/typemap +0 -0
  251. data/{src → vendor}/nginx/src/http/ngx_http.c +0 -0
  252. data/{src → vendor}/nginx/src/http/ngx_http.h +0 -0
  253. data/{src → vendor}/nginx/src/http/ngx_http_busy_lock.c +0 -0
  254. data/{src → vendor}/nginx/src/http/ngx_http_busy_lock.h +0 -0
  255. data/{src → vendor}/nginx/src/http/ngx_http_cache.h +0 -0
  256. data/{src → vendor}/nginx/src/http/ngx_http_config.h +0 -0
  257. data/{src → vendor}/nginx/src/http/ngx_http_copy_filter_module.c +0 -0
  258. data/{src → vendor}/nginx/src/http/ngx_http_core_module.c +0 -0
  259. data/{src → vendor}/nginx/src/http/ngx_http_core_module.h +0 -0
  260. data/{src → vendor}/nginx/src/http/ngx_http_file_cache.c +0 -0
  261. data/{src → vendor}/nginx/src/http/ngx_http_header_filter_module.c +0 -0
  262. data/{src → vendor}/nginx/src/http/ngx_http_parse.c +0 -0
  263. data/{src → vendor}/nginx/src/http/ngx_http_parse_time.c +0 -0
  264. data/{src → vendor}/nginx/src/http/ngx_http_postpone_filter_module.c +0 -0
  265. data/{src → vendor}/nginx/src/http/ngx_http_request.c +0 -0
  266. data/{src → vendor}/nginx/src/http/ngx_http_request.h +0 -0
  267. data/{src → vendor}/nginx/src/http/ngx_http_request_body.c +0 -0
  268. data/{src → vendor}/nginx/src/http/ngx_http_script.c +0 -0
  269. data/{src → vendor}/nginx/src/http/ngx_http_script.h +0 -0
  270. data/{src → vendor}/nginx/src/http/ngx_http_special_response.c +0 -0
  271. data/{src → vendor}/nginx/src/http/ngx_http_upstream.c +0 -0
  272. data/{src → vendor}/nginx/src/http/ngx_http_upstream.h +0 -0
  273. data/{src → vendor}/nginx/src/http/ngx_http_upstream_round_robin.c +0 -0
  274. data/{src → vendor}/nginx/src/http/ngx_http_upstream_round_robin.h +0 -0
  275. data/{src → vendor}/nginx/src/http/ngx_http_variables.c +0 -0
  276. data/{src → vendor}/nginx/src/http/ngx_http_variables.h +0 -0
  277. data/{src → vendor}/nginx/src/http/ngx_http_write_filter_module.c +0 -0
  278. data/{src → vendor}/nginx/src/mail/ngx_mail.c +0 -0
  279. data/{src → vendor}/nginx/src/mail/ngx_mail.h +0 -0
  280. data/{src → vendor}/nginx/src/mail/ngx_mail_auth_http_module.c +0 -0
  281. data/{src → vendor}/nginx/src/mail/ngx_mail_core_module.c +0 -0
  282. data/{src → vendor}/nginx/src/mail/ngx_mail_handler.c +0 -0
  283. data/{src → vendor}/nginx/src/mail/ngx_mail_imap_handler.c +0 -0
  284. data/{src → vendor}/nginx/src/mail/ngx_mail_imap_module.c +0 -0
  285. data/{src → vendor}/nginx/src/mail/ngx_mail_imap_module.h +0 -0
  286. data/{src → vendor}/nginx/src/mail/ngx_mail_parse.c +0 -0
  287. data/{src → vendor}/nginx/src/mail/ngx_mail_pop3_handler.c +0 -0
  288. data/{src → vendor}/nginx/src/mail/ngx_mail_pop3_module.c +0 -0
  289. data/{src → vendor}/nginx/src/mail/ngx_mail_pop3_module.h +0 -0
  290. data/{src → vendor}/nginx/src/mail/ngx_mail_proxy_module.c +0 -0
  291. data/{src → vendor}/nginx/src/mail/ngx_mail_smtp_handler.c +0 -0
  292. data/{src → vendor}/nginx/src/mail/ngx_mail_smtp_module.c +0 -0
  293. data/{src → vendor}/nginx/src/mail/ngx_mail_smtp_module.h +0 -0
  294. data/{src → vendor}/nginx/src/mail/ngx_mail_ssl_module.c +0 -0
  295. data/{src → vendor}/nginx/src/mail/ngx_mail_ssl_module.h +0 -0
  296. data/{src → vendor}/nginx/src/misc/ngx_cpp_test_module.cpp +0 -0
  297. data/{src → vendor}/nginx/src/misc/ngx_google_perftools_module.c +0 -0
  298. data/{src → vendor}/nginx/src/os/unix/ngx_aio_read.c +0 -0
  299. data/{src → vendor}/nginx/src/os/unix/ngx_aio_read_chain.c +0 -0
  300. data/{src → vendor}/nginx/src/os/unix/ngx_aio_write.c +0 -0
  301. data/{src → vendor}/nginx/src/os/unix/ngx_aio_write_chain.c +0 -0
  302. data/{src → vendor}/nginx/src/os/unix/ngx_alloc.c +0 -0
  303. data/{src → vendor}/nginx/src/os/unix/ngx_alloc.h +0 -0
  304. data/{src → vendor}/nginx/src/os/unix/ngx_atomic.h +0 -0
  305. data/{src → vendor}/nginx/src/os/unix/ngx_channel.c +0 -0
  306. data/{src → vendor}/nginx/src/os/unix/ngx_channel.h +0 -0
  307. data/{src → vendor}/nginx/src/os/unix/ngx_daemon.c +0 -0
  308. data/{src → vendor}/nginx/src/os/unix/ngx_darwin.h +0 -0
  309. data/{src → vendor}/nginx/src/os/unix/ngx_darwin_config.h +0 -0
  310. data/{src → vendor}/nginx/src/os/unix/ngx_darwin_init.c +0 -0
  311. data/{src → vendor}/nginx/src/os/unix/ngx_darwin_sendfile_chain.c +0 -0
  312. data/{src → vendor}/nginx/src/os/unix/ngx_errno.c +0 -0
  313. data/{src → vendor}/nginx/src/os/unix/ngx_errno.h +0 -0
  314. data/{src → vendor}/nginx/src/os/unix/ngx_file_aio_read.c +0 -0
  315. data/{src → vendor}/nginx/src/os/unix/ngx_files.c +0 -0
  316. data/{src → vendor}/nginx/src/os/unix/ngx_files.h +0 -0
  317. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd.h +0 -0
  318. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd_config.h +0 -0
  319. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd_init.c +0 -0
  320. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd_rfork_thread.c +0 -0
  321. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd_rfork_thread.h +0 -0
  322. data/{src → vendor}/nginx/src/os/unix/ngx_freebsd_sendfile_chain.c +0 -0
  323. data/{src → vendor}/nginx/src/os/unix/ngx_gcc_atomic_amd64.h +0 -0
  324. data/{src → vendor}/nginx/src/os/unix/ngx_gcc_atomic_ppc.h +0 -0
  325. data/{src → vendor}/nginx/src/os/unix/ngx_gcc_atomic_sparc64.h +0 -0
  326. data/{src → vendor}/nginx/src/os/unix/ngx_gcc_atomic_x86.h +0 -0
  327. data/{src → vendor}/nginx/src/os/unix/ngx_linux.h +0 -0
  328. data/{src → vendor}/nginx/src/os/unix/ngx_linux_aio_read.c +0 -0
  329. data/{src → vendor}/nginx/src/os/unix/ngx_linux_config.h +0 -0
  330. data/{src → vendor}/nginx/src/os/unix/ngx_linux_init.c +0 -0
  331. data/{src → vendor}/nginx/src/os/unix/ngx_linux_sendfile_chain.c +0 -0
  332. data/{src → vendor}/nginx/src/os/unix/ngx_os.h +0 -0
  333. data/{src → vendor}/nginx/src/os/unix/ngx_posix_config.h +0 -0
  334. data/{src → vendor}/nginx/src/os/unix/ngx_posix_init.c +0 -0
  335. data/{src → vendor}/nginx/src/os/unix/ngx_process.c +0 -0
  336. data/{src → vendor}/nginx/src/os/unix/ngx_process.h +0 -0
  337. data/{src → vendor}/nginx/src/os/unix/ngx_process_cycle.c +0 -0
  338. data/{src → vendor}/nginx/src/os/unix/ngx_process_cycle.h +0 -0
  339. data/{src → vendor}/nginx/src/os/unix/ngx_pthread_thread.c +0 -0
  340. data/{src → vendor}/nginx/src/os/unix/ngx_readv_chain.c +0 -0
  341. data/{src → vendor}/nginx/src/os/unix/ngx_recv.c +0 -0
  342. data/{src → vendor}/nginx/src/os/unix/ngx_send.c +0 -0
  343. data/{src → vendor}/nginx/src/os/unix/ngx_setaffinity.c +0 -0
  344. data/{src → vendor}/nginx/src/os/unix/ngx_setaffinity.h +0 -0
  345. data/{src → vendor}/nginx/src/os/unix/ngx_setproctitle.c +0 -0
  346. data/{src → vendor}/nginx/src/os/unix/ngx_setproctitle.h +0 -0
  347. data/{src → vendor}/nginx/src/os/unix/ngx_shmem.c +0 -0
  348. data/{src → vendor}/nginx/src/os/unix/ngx_shmem.h +0 -0
  349. data/{src → vendor}/nginx/src/os/unix/ngx_socket.c +0 -0
  350. data/{src → vendor}/nginx/src/os/unix/ngx_socket.h +0 -0
  351. data/{src → vendor}/nginx/src/os/unix/ngx_solaris.h +0 -0
  352. data/{src → vendor}/nginx/src/os/unix/ngx_solaris_config.h +0 -0
  353. data/{src → vendor}/nginx/src/os/unix/ngx_solaris_init.c +0 -0
  354. data/{src → vendor}/nginx/src/os/unix/ngx_solaris_sendfilev_chain.c +0 -0
  355. data/{src → vendor}/nginx/src/os/unix/ngx_sunpro_amd64.il +0 -0
  356. data/{src → vendor}/nginx/src/os/unix/ngx_sunpro_atomic_sparc64.h +0 -0
  357. data/{src → vendor}/nginx/src/os/unix/ngx_sunpro_sparc64.il +0 -0
  358. data/{src → vendor}/nginx/src/os/unix/ngx_sunpro_x86.il +0 -0
  359. data/{src → vendor}/nginx/src/os/unix/ngx_thread.h +0 -0
  360. data/{src → vendor}/nginx/src/os/unix/ngx_time.c +0 -0
  361. data/{src → vendor}/nginx/src/os/unix/ngx_time.h +0 -0
  362. data/{src → vendor}/nginx/src/os/unix/ngx_udp_recv.c +0 -0
  363. data/{src → vendor}/nginx/src/os/unix/ngx_user.c +0 -0
  364. data/{src → vendor}/nginx/src/os/unix/ngx_user.h +0 -0
  365. data/{src → vendor}/nginx/src/os/unix/ngx_writev_chain.c +0 -0
  366. data/{src → vendor}/nginx/src/os/unix/rfork_thread.S +0 -0
  367. metadata +364 -356
  368. data/VERSION +0 -1
data/bin/nginxtra CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "rubygems"
3
- gem "nginxtra", "= 1.2.2.3"
3
+ gem "nginxtra", "= 1.2.2.4"
4
+ gem "thor", "~> 0.15.0"
4
5
  require "nginxtra"
5
6
  Nginxtra::CLI.start
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+ gem "nginxtra", "= 1.2.2.4"
4
+ gem "thor", "~> 0.15.0"
5
+ require "nginxtra"
6
+ Nginxtra::Rails::CLI.start
data/lib/nginxtra.rb CHANGED
@@ -7,8 +7,11 @@ require "nginxtra/actions/restart"
7
7
  require "nginxtra/actions/start"
8
8
  require "nginxtra/actions/status"
9
9
  require "nginxtra/actions/stop"
10
+ require "nginxtra/actions/rails/server"
10
11
  require "nginxtra/cli"
11
12
  require "nginxtra/config"
12
13
  require "nginxtra/config_converter"
13
14
  require "nginxtra/error"
15
+ require "nginxtra/rails/cli"
14
16
  require "nginxtra/status"
17
+ require "nginxtra/version"
@@ -19,7 +19,7 @@ module Nginxtra
19
19
 
20
20
  # Copy the nginx source directory to the base directory.
21
21
  def copy_to_base
22
- @thor.directory "src/nginx", Nginxtra::Config.src_dir
22
+ @thor.directory "vendor/nginx", Nginxtra::Config.src_dir
23
23
  end
24
24
 
25
25
  # Configure nginx with the specified compile options.
@@ -22,6 +22,7 @@ module Nginxtra
22
22
  check_if_nginx_is_installed
23
23
  create_etc_script
24
24
  remember_config_location
25
+ remember_working_directory
25
26
  update_last_install
26
27
  end
27
28
 
@@ -43,6 +44,7 @@ module Nginxtra
43
44
  # via update-rc.d.
44
45
  def create_etc_script
45
46
  filename = "etc.init.d.nginxtra"
47
+ workingdir = File.expand_path "."
46
48
 
47
49
  @thor.inside Nginxtra::Config.base_dir do
48
50
  @thor.create_file filename, %{#!/bin/sh
@@ -59,7 +61,7 @@ module Nginxtra
59
61
 
60
62
  export GEM_HOME="#{ENV["GEM_HOME"]}"
61
63
  export GEM_PATH="#{ENV["GEM_PATH"]}"
62
- #{Nginxtra::Config.ruby_path} "#{File.join Nginxtra::Config.gem_dir, "bin/nginxtra"}" "$1" --basedir="#{Nginxtra::Config.base_dir}" --config="#{Nginxtra::Config.loaded_config_path}" --non-interactive
64
+ #{Nginxtra::Config.ruby_path} "#{File.join Nginxtra::Config.gem_dir, "bin/nginxtra"}" "$1" --basedir="#{Nginxtra::Config.base_dir}" --config="#{Nginxtra::Config.loaded_config_path}" --workingdir="#{workingdir}" --non-interactive
63
65
  }, :force => true
64
66
  @thor.chmod filename, 0755
65
67
  end
@@ -88,6 +90,12 @@ export GEM_PATH="#{ENV["GEM_PATH"]}"
88
90
  Nginxtra::Status[:remembered_config] = Nginxtra::Config.loaded_config_path.to_s
89
91
  end
90
92
 
93
+ # Remember the last working directory, and use it unless the
94
+ # working direcotry is explicitly passed in.
95
+ def remember_working_directory
96
+ Nginxtra::Status[:remembered_workingdir] = File.expand_path "."
97
+ end
98
+
91
99
  # Mark the last installed version and last installed time (the
92
100
  # former being used to determine if nginxtra has been installed
93
101
  # yet).
@@ -0,0 +1,78 @@
1
+ module Nginxtra
2
+ module Actions
3
+ module Rails
4
+ class Server
5
+ include Nginxtra::Action
6
+
7
+ def server
8
+ ensure_in_rails_app
9
+ ensure_server_gem_installed
10
+
11
+ begin
12
+ start_nginxtra
13
+ wait_till_finished
14
+ ensure
15
+ stop_nginxtra
16
+ end
17
+ end
18
+
19
+ def ensure_in_rails_app
20
+ unless in_rails_app?
21
+ raise Nginxtra::Error::IllegalState.new "You must be in a rails root directory to run nginxtra_rails."
22
+ end
23
+ end
24
+
25
+ def ensure_server_gem_installed
26
+ unless passenger_installed?
27
+ raise Nginxtra::Error::IllegalState.new "Please 'gem install passenger' to continue."
28
+ end
29
+ end
30
+
31
+ def start_nginxtra
32
+ port = @thor.options["port"]
33
+ @thor.empty_directory "tmp" unless File.directory? "tmp"
34
+ @thor.empty_directory "tmp/nginxtra" unless File.directory? "tmp/nginxtra"
35
+ @thor.create_file config_path, %{nginxtra.simple_config do
36
+ rails :port => #{port}
37
+ end
38
+ }, :force => true
39
+ @thor.invoke Nginxtra::CLI, ["start"], :basedir => basedir, :config => config_path, :workingdir => workingdir, :"non-interactive" => true
40
+ @thor.say "Listening on http://localhost:#{port}/"
41
+ end
42
+
43
+ def wait_till_finished
44
+ @thor.say "Ctrl-C or Ctrl-D to shutdown server"
45
+ next until $stdin.getc.nil?
46
+ @thor.say "Captured Ctrl-D..."
47
+ rescue Interrupt
48
+ @thor.say "Captured Ctrl-C..."
49
+ end
50
+
51
+ def stop_nginxtra
52
+ @thor.invoke Nginxtra::CLI, ["stop"], :basedir => basedir, :config => config_path, :workingdir => workingdir, :"non-interactive" => true
53
+ end
54
+
55
+ def passenger_installed?
56
+ Gem::Specification.find_by_name("passenger")
57
+ end
58
+
59
+ def basedir
60
+ File.absolute_path "tmp/nginxtra"
61
+ end
62
+
63
+ def config_path
64
+ File.absolute_path "tmp/nginxtra.conf.rb"
65
+ end
66
+
67
+ def workingdir
68
+ File.absolute_path "."
69
+ end
70
+
71
+ def in_rails_app?
72
+ return true if File.exists? "script/rails"
73
+ File.exists?("script/server") && File.exists?("app")
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
data/lib/nginxtra/cli.rb CHANGED
@@ -10,6 +10,7 @@ module Nginxtra
10
10
  class_option "ignore-nginx-check", :type => :boolean, :banner => "Ignore the nginx check if installing"
11
11
  class_option "config", :type => :string, :banner => "Specify the configuration file to use", :aliases => "-c"
12
12
  class_option "basedir", :type => :string, :banner => "Specify the directory to store nginx files", :aliases => "-b"
13
+ class_option "workingdir", :type => :string, :banner => "Specify the working directory", :aliases => "-w"
13
14
 
14
15
  desc "convert", "Convert an nginx.conf file to an nginxtra.conf.rb"
15
16
  long_desc "
@@ -42,6 +43,7 @@ module Nginxtra
42
43
  with the --force option."
43
44
  def compile
44
45
  Nginxtra::Error.protect self do
46
+ set_working_dir!
45
47
  Nginxtra::Actions::Compile.new(self, prepare_config!).compile
46
48
  end
47
49
  end
@@ -70,6 +72,7 @@ module Nginxtra
70
72
  compile or install task should be invoked if those need to be forced."
71
73
  def start
72
74
  Nginxtra::Error.protect self do
75
+ set_working_dir!
73
76
  Nginxtra::Actions::Start.new(self, prepare_config!).start
74
77
  end
75
78
  end
@@ -81,6 +84,7 @@ module Nginxtra
81
84
  (which will cause it to run the stop command regardless of the pidfile)."
82
85
  def stop
83
86
  Nginxtra::Error.protect self do
87
+ set_working_dir!
84
88
  Nginxtra::Actions::Stop.new(self, prepare_config!).stop
85
89
  end
86
90
  end
@@ -88,6 +92,7 @@ module Nginxtra
88
92
  desc "restart", "Restart nginx"
89
93
  def restart
90
94
  Nginxtra::Error.protect self do
95
+ set_working_dir!
91
96
  Nginxtra::Actions::Restart.new(self, prepare_config!).restart
92
97
  end
93
98
  end
@@ -96,6 +101,7 @@ module Nginxtra
96
101
  desc "reload", "Reload nginx"
97
102
  def reload
98
103
  Nginxtra::Error.protect self do
104
+ set_working_dir!
99
105
  Nginxtra::Actions::Reload.new(self, prepare_config!).reload
100
106
  end
101
107
  end
@@ -103,6 +109,7 @@ module Nginxtra
103
109
  desc "status", "Check if nginx is running"
104
110
  def status
105
111
  Nginxtra::Error.protect self do
112
+ set_working_dir!
106
113
  Nginxtra::Actions::Status.new(self, prepare_config!).status
107
114
  end
108
115
  end
@@ -115,6 +122,14 @@ module Nginxtra
115
122
  result
116
123
  end
117
124
 
125
+ def set_working_dir!
126
+ if options["workingdir"]
127
+ Dir.chdir options["workingdir"]
128
+ elsif Nginxtra::Status[:remembered_workingdir]
129
+ Dir.chdir Nginxtra::Status[:remembered_workingdir]
130
+ end
131
+ end
132
+
118
133
  class << self
119
134
  def source_root
120
135
  File.absolute_path File.expand_path("../../..", __FILE__)
@@ -152,14 +152,9 @@ module Nginxtra
152
152
  last_config
153
153
  end
154
154
 
155
- # The path to the VERSION file in the gem.
156
- def version_file
157
- File.join gem_dir, "VERSION"
158
- end
159
-
160
155
  # The current version of nginxtra.
161
156
  def version
162
- @version ||= File.read(version_file).strip
157
+ Nginxtra::Version.to_s
163
158
  end
164
159
 
165
160
  # The corresponding nginx version (based on the nginxtra
@@ -13,9 +13,14 @@ module Nginxtra
13
13
  end
14
14
  end
15
15
 
16
- # Raised if config conversion fails
16
+ # Raised if config conversion fails.
17
17
  class ConvertFailed < Nginxtra::Error::Base; end
18
18
 
19
+ # Raised when something is in an illegal state, such as when
20
+ # running nginxtra_rails from a directory other than a rails root
21
+ # directory.
22
+ class IllegalState < Nginxtra::Error::Base; end
23
+
19
24
  # Raised when an invalid configuration is specified, such as the
20
25
  # --prefix compile option.
21
26
  class InvalidConfig < Nginxtra::Error::Base; end
@@ -26,7 +31,7 @@ module Nginxtra
26
31
  # Raised when installing and nginx is detected to be installed.
27
32
  class NginxDetected < Nginxtra::Error::Base; end
28
33
 
29
- # Raised when a run command fails
34
+ # Raised when a run command fails.
30
35
  class RunFailed < Nginxtra::Error::Base; end
31
36
 
32
37
  class << self
@@ -0,0 +1,21 @@
1
+ require "thor"
2
+
3
+ module Nginxtra
4
+ module Rails
5
+ class CLI < Thor
6
+ include Thor::Actions
7
+
8
+ class_option "trace", :type => :boolean, :banner => "Output stack traces on error"
9
+
10
+ desc "server", "Start rails using nginxtra"
11
+ method_option "port", :type => :numeric, :banner => "Specify the port to use to run the server on", :aliases => "-p", :default => 3000
12
+ def server
13
+ Nginxtra::Error.protect self do
14
+ Nginxtra::Actions::Rails::Server.new(self, nil).server
15
+ end
16
+ end
17
+
18
+ default_task :server
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,9 @@
1
+ module Nginxtra
2
+ class Version
3
+ class << self
4
+ def to_s
5
+ "1.2.2.4"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ worker_processes(yield(:worker_processes) || 1)
2
+
3
+ events do
4
+ worker_connections(yield(:worker_connections) || 1024)
5
+ end
6
+
7
+ http do
8
+ include "mime.types"
9
+ default_type "application/octet-stream"
10
+ sendfile "on"
11
+ keepalive_timeout 65
12
+ gzip "on"
13
+ yield
14
+ end
@@ -0,0 +1,16 @@
1
+ rails_server = yield(:server) || :passenger
2
+
3
+ if rails_server == :passenger && !@passenger_requirements_done
4
+ @config.require_passenger!
5
+ passenger_root!
6
+ passenger_ruby!
7
+ @passenger_requirements_done = true
8
+ end
9
+
10
+ server do
11
+ listen(yield(:port) || 80)
12
+ server_name(yield(:server_name) || "localhost")
13
+ root File.join(File.absolute_path(File.expand_path(yield(:root) || ".")), "public")
14
+ gzip_static "on"
15
+ passenger_on! if rails_server == :passenger
16
+ end
@@ -0,0 +1,8 @@
1
+ @config.compile_option "--with-http_gzip_static_module"
2
+
3
+ server do
4
+ listen(yield(:port) || 80)
5
+ server_name(yield(:server_name) || "localhost")
6
+ root File.absolute_path(File.expand_path(yield(:root) || "."))
7
+ gzip_static "on"
8
+ end
@@ -0,0 +1,36 @@
1
+ raise Nginxtra::Error::InvalidConfig.new("The WordPress partial is currently an untested stub.")
2
+
3
+ server do
4
+ listen(yield(:port) || 80)
5
+ server_name(yield(:server_name) || "localhost")
6
+ root File.absolute_path(File.expand_path(yield(:root) || "."))
7
+ index "index.php"
8
+ client_max_body_size "50m"
9
+
10
+ location "= /favicon.ico" do
11
+ log_not_found "off"
12
+ access_log "off"
13
+ end
14
+
15
+ location "= /robots.txt" do
16
+ allow "all"
17
+ log_not_found "off"
18
+ access_log "off"
19
+ end
20
+
21
+ location "/" do
22
+ try_files "$uri", "$uri/", "/index.php"
23
+ end
24
+
25
+ location "~ \.php$" do
26
+ # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
27
+ include "fastcgi.conf"
28
+ fastcgi_intercept_errors "on"
29
+ fastcgi_pass "unix:/var/run/php-fastcgi/php-fastcgi.socket"
30
+ end
31
+
32
+ location "~* \.(js|css|png|jpg|jpeg|gif|ico)$" do
33
+ expires "max"
34
+ log_not_found "off"
35
+ end
36
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes