beta_tools 0.0.4

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.
Files changed (97) hide show
  1. data/.gitignore +11 -0
  2. data/Capfile +2 -0
  3. data/Gemfile +4 -0
  4. data/README +7 -0
  5. data/Rakefile +7 -0
  6. data/beta_tools.gemspec +31 -0
  7. data/bin/deploy +9 -0
  8. data/bin/documentation_daemon +12 -0
  9. data/bin/loginToUrl +6 -0
  10. data/bin/onVpn +6 -0
  11. data/bin/pub +91 -0
  12. data/bin/query_solr +11 -0
  13. data/bin/solrWebApp +6 -0
  14. data/conf/schema.xml +220 -0
  15. data/config/deploy.rb +44 -0
  16. data/config.ru +2 -0
  17. data/docs/#next_design.mmd# +0 -0
  18. data/features/deploy.feature +9 -0
  19. data/features/git.feature +15 -0
  20. data/features/maven.feature +21 -0
  21. data/features/step_definitions/deploy_steps.rb +11 -0
  22. data/features/step_definitions/git_steps.rb +20 -0
  23. data/features/step_definitions/maven_steps.rb +35 -0
  24. data/features/support/env.rb +8 -0
  25. data/int/it_tools/suite_it_tools.rb +2 -0
  26. data/int/it_tools/test_integ1.rb +17 -0
  27. data/lib/beta_tools/version.rb +3 -0
  28. data/lib/beta_tools.rb +5 -0
  29. data/lib/it_tools/calc.rb +14 -0
  30. data/lib/it_tools/config.ru +2 -0
  31. data/lib/it_tools/environment.rb +86 -0
  32. data/lib/it_tools/git.rb +3 -0
  33. data/lib/it_tools/html_publish.rb +287 -0
  34. data/lib/it_tools/mail.rb +21 -0
  35. data/lib/it_tools/maven.rb +101 -0
  36. data/lib/it_tools/md5.rb +4 -0
  37. data/lib/it_tools/multipart.rb +78 -0
  38. data/lib/it_tools/network_tools.rb +72 -0
  39. data/lib/it_tools/options.rb +46 -0
  40. data/lib/it_tools/pub_driver.rb +188 -0
  41. data/lib/it_tools/publisher2.rb +232 -0
  42. data/lib/it_tools/sample.rb +9 -0
  43. data/lib/it_tools/shared.rb +22 -0
  44. data/lib/it_tools/solr.rb +157 -0
  45. data/lib/it_tools/views/search_results.erb +16 -0
  46. data/log/thin.log +177 -0
  47. data/spec/it_tools/deploy_spec.rb +20 -0
  48. data/spec/spec_helper.rb +0 -0
  49. data/test/bin/test_pub.rb +30 -0
  50. data/test/cleaner.rb +6 -0
  51. data/test/driver.rb +24 -0
  52. data/test/integration/tp.rb +107 -0
  53. data/test/it_tools/for_debugger.rb +4 -0
  54. data/test/it_tools/publisher2.rb +13 -0
  55. data/test/it_tools/suite_it_tools.rb +6 -0
  56. data/test/it_tools/suite_it_tools.rb~ +13 -0
  57. data/test/it_tools/test_deploy.rb +83 -0
  58. data/test/it_tools/test_html_publish.rb +54 -0
  59. data/test/it_tools/test_maven.rb +31 -0
  60. data/test/it_tools/test_multipart.rb +31 -0
  61. data/test/it_tools/test_network_tools.rb +14 -0
  62. data/test/it_tools/test_publisher2.rb +42 -0
  63. data/test/it_tools/test_publisher2_support.rb +16 -0
  64. data/test/it_tools/test_sample.rb +10 -0
  65. data/test/it_tools/test_shared.rb +36 -0
  66. data/test/it_tools/test_solr.rb +22 -0
  67. data/test/it_tools/test_solr2.rb +22 -0
  68. data/testdata/assembly_pom.xml +157 -0
  69. data/testdata/desir.txt +39 -0
  70. data/testdata/ear_pom.xml +82 -0
  71. data/testdata/java.html +524 -0
  72. data/testdata/pom.xml +174 -0
  73. data/testdata/publish/src_dir/#arch.mmd# +0 -0
  74. data/testdata/publish/src_dir/ajax-loader.gif +0 -0
  75. data/testdata/publish/src_dir/file1.mmd +5 -0
  76. data/testdata/publish/src_dir/file2.mmd +3 -0
  77. data/testdata/publish/src_dir/file3.abc +0 -0
  78. data/testdata/publish/src_dir/file4.mmd +3 -0
  79. data/testdata/publish/src_dir/help.png +0 -0
  80. data/testdata/publish/src_dir/images/linux.jpeg +0 -0
  81. data/testdata/publish/src_dir/inputStyles.css +0 -0
  82. data/testdata/publish/src_dir/search.html +0 -0
  83. data/testdata/publish/src_dir/search.js +0 -0
  84. data/testdata/publish/target_dir/.@arch.html +0 -0
  85. data/testdata/publish/target_dir/file1.html +7 -0
  86. data/testdata/publish/target_dir/file2.html +5 -0
  87. data/testdata/publish/target_dir/search.js +0 -0
  88. data/testdata/publish/target_dir_static/.@arch.html +1 -0
  89. data/testdata/publish/target_dir_static/file1.html +7 -0
  90. data/testdata/publish/target_dir_static/index.html +1 -0
  91. data/testdata/publish/target_dir_static/style.css +61 -0
  92. data/testdata/ruby.mmd +404 -0
  93. data/testdata/simple.mmd +3 -0
  94. data/testdata/simple.xml +3 -0
  95. data/testdata/small.txt +2 -0
  96. data/testdata/utf8_chars.txt +1 -0
  97. metadata +338 -0
data/log/thin.log ADDED
@@ -0,0 +1,177 @@
1
+ >> Writing PID to tmp/pids/thin.pid
2
+ >> Thin web server (v1.3.1 codename Triple Espresso)
3
+ >> Maximum connections set to 1024
4
+ >> Listening on 0.0.0.0:2003, CTRL+C to stop
5
+ 127.0.0.1 - - [10/Feb/2012 15:31:38] "GET /srch?query=f HTTP/1.1" 200 1984 0.1023
6
+ 127.0.0.1 - - [10/Feb/2012 15:31:47] "GET /srch?query=th HTTP/1.1" 200 2328 0.1290
7
+ 127.0.0.1 - - [10/Feb/2012 15:31:47] "GET /srch?query=thi HTTP/1.1" 200 17 0.0033
8
+ 127.0.0.1 - - [10/Feb/2012 15:31:47] "GET /srch?query=thin HTTP/1.1" 200 582 0.0457
9
+ 127.0.0.1 - - [10/Feb/2012 15:31:47] "GET /srch?query=thin HTTP/1.1" 200 582 0.0541
10
+ 127.0.0.1 - - [10/Feb/2012 15:31:52] "GET /favicon.ico HTTP/1.1" 404 447 0.0016
11
+ 127.0.0.1 - - [10/Feb/2012 15:31:57] "GET /ruby.html HTTP/1.1" 200 32507 0.0078
12
+ 127.0.0.1 - - [10/Feb/2012 15:32:04] "GET /favicon.ico HTTP/1.1" 404 447 0.0005
13
+ 127.0.0.1 - - [10/Feb/2012 15:32:27] "GET /favicon.ico HTTP/1.1" 404 447 0.0009
14
+ 127.0.0.1 - - [10/Feb/2012 15:33:24] "GET /search.html HTTP/1.1" 304 - 0.0010
15
+ 127.0.0.1 - - [10/Feb/2012 15:33:24] "GET /favicon.ico HTTP/1.1" 404 447 0.0006
16
+ 127.0.0.1 - - [10/Feb/2012 15:33:26] "GET /srch?query=thi HTTP/1.1" 200 17 0.0105
17
+ 127.0.0.1 - - [10/Feb/2012 15:33:26] "GET /srch?query=thi HTTP/1.1" 200 17 0.0089
18
+ 127.0.0.1 - - [10/Feb/2012 15:33:26] "GET /srch?query=thin HTTP/1.1" 200 582 0.0441
19
+ 127.0.0.1 - - [10/Feb/2012 15:33:26] "GET /srch?query=thin HTTP/1.1" 200 582 0.0435
20
+ 127.0.0.1 - - [10/Feb/2012 15:33:56] "GET /srch?query=n HTTP/1.1" 200 1695 0.1369
21
+ 127.0.0.1 - - [10/Feb/2012 15:33:56] "GET /srch?query=nma HTTP/1.1" 200 17 0.0083
22
+ 127.0.0.1 - - [10/Feb/2012 15:33:56] "GET /srch?query=nmap HTTP/1.1" 200 202 0.0354
23
+ 127.0.0.1 - - [10/Feb/2012 15:33:56] "GET /srch?query=nmap HTTP/1.1" 200 202 0.0339
24
+ 127.0.0.1 - - [10/Feb/2012 15:41:52] "GET /srch?query=up HTTP/1.1" 200 2217 0.1166
25
+ 127.0.0.1 - - [10/Feb/2012 15:41:52] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0003
26
+ 127.0.0.1 - - [10/Feb/2012 15:41:52] "GET /srch?query=upd HTTP/1.1" 200 17 0.0031
27
+ 127.0.0.1 - - [10/Feb/2012 15:41:53] "GET /srch?query=upd HTTP/1.1" 200 17 0.0084
28
+ 127.0.0.1 - - [10/Feb/2012 15:41:53] "GET /srch?query=updat HTTP/1.1" 200 2100 0.1504
29
+ 127.0.0.1 - - [10/Feb/2012 15:41:53] "GET /srch?query=update HTTP/1.1" 200 2100 0.1192
30
+ 127.0.0.1 - - [10/Feb/2012 15:41:53] "GET /srch?query=update HTTP/1.1" 200 2100 0.1183
31
+ 127.0.0.1 - - [10/Feb/2012 15:41:53] "GET /srch?query=update- HTTP/1.1" 200 2100 0.1217
32
+ 127.0.0.1 - - [10/Feb/2012 15:41:54] "GET /srch?query=update-r HTTP/1.1" 200 17 0.0468
33
+ 127.0.0.1 - - [10/Feb/2012 15:41:54] "GET /srch?query=update-rc HTTP/1.1" 200 11 0.0532
34
+ 127.0.0.1 - - [10/Feb/2012 15:41:54] "GET /srch?query=update-rc.d HTTP/1.1" 200 11 0.0574
35
+ 127.0.0.1 - - [10/Feb/2012 15:41:54] "GET /srch?query=update-rc.d HTTP/1.1" 200 11 0.0525
36
+ 127.0.0.1 - - [10/Feb/2012 15:41:57] "GET /srch?query=update-rc. HTTP/1.1" 200 11 0.0346
37
+ 127.0.0.1 - - [10/Feb/2012 15:41:57] "GET /srch?query=update-rc HTTP/1.1" 200 11 0.0301
38
+ 127.0.0.1 - - [10/Feb/2012 15:41:58] "GET /srch?query=update-r HTTP/1.1" 200 17 0.0074
39
+ 127.0.0.1 - - [10/Feb/2012 15:41:59] "GET /srch?query=update- HTTP/1.1" 200 2100 0.1320
40
+ 127.0.0.1 - - [10/Feb/2012 15:42:02] "GET /srch?query=update HTTP/1.1" 200 2100 0.1453
41
+ 127.0.0.1 - - [10/Feb/2012 15:42:07] "GET /srch?query=s HTTP/1.1" 200 1630 0.1003
42
+ 127.0.0.1 - - [10/Feb/2012 15:42:07] "GET /srch?query=st HTTP/1.1" 200 473 0.0569
43
+ 127.0.0.1 - - [10/Feb/2012 15:42:08] "GET /srch?query=star HTTP/1.1" 200 17 0.0077
44
+ 127.0.0.1 - - [10/Feb/2012 15:42:08] "GET /srch?query=star HTTP/1.1" 200 17 0.0071
45
+ 127.0.0.1 - - [10/Feb/2012 15:42:08] "GET /srch?query=start HTTP/1.1" 200 2291 0.0937
46
+ 127.0.0.1 - - [10/Feb/2012 15:42:33] "GET /solr.html HTTP/1.1" 200 12479 0.0093
47
+ >> Writing PID to tmp/pids/thin.pid
48
+ >> Thin web server (v1.3.1 codename Triple Espresso)
49
+ >> Maximum connections set to 1024
50
+ >> Listening on 0.0.0.0:2003, CTRL+C to stop
51
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /search.html HTTP/1.1" 200 697 0.0233
52
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /style.css HTTP/1.1" 304 - 0.0004
53
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /jquery-1.7.1.min.js HTTP/1.1" 304 - 0.0003
54
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /search.js HTTP/1.1" 304 - 0.0003
55
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /help.png HTTP/1.1" 304 - 0.0010
56
+ 127.0.0.1 - - [14/Feb/2012 10:46:18] "GET /favicon.ico HTTP/1.1" 404 447 0.0005
57
+ 127.0.0.1 - - [14/Feb/2012 10:46:20] "GET /srch?query=go HTTP/1.1" 200 2330 0.6468
58
+ 127.0.0.1 - - [14/Feb/2012 10:46:20] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0003
59
+ 127.0.0.1 - - [14/Feb/2012 10:46:21] "GET /srch?query=go HTTP/1.1" 200 2330 0.1091
60
+ 127.0.0.1 - - [14/Feb/2012 10:46:21] "GET /srch?query=goto HTTP/1.1" 200 1890 0.1649
61
+ 127.0.0.1 - - [14/Feb/2012 10:46:21] "GET /srch?query=goto HTTP/1.1" 200 1890 0.1463
62
+ 127.0.0.1 - - [14/Feb/2012 10:46:24] "GET /srch?query=goto HTTP/1.1" 200 1890 0.1653
63
+ 127.0.0.1 - - [14/Feb/2012 10:46:24] "GET /srch?query=goto%20lin HTTP/1.1" 200 1890 0.1474
64
+ 127.0.0.1 - - [14/Feb/2012 10:46:24] "GET /srch?query=goto%20lin HTTP/1.1" 200 1890 0.1132
65
+ 127.0.0.1 - - [14/Feb/2012 10:46:24] "GET /srch?query=goto%20line HTTP/1.1" 200 2157 0.1198
66
+ 127.0.0.1 - - [14/Feb/2012 10:46:24] "GET /srch?query=goto%20line HTTP/1.1" 200 2157 0.1016
67
+ 127.0.0.1 - - [14/Feb/2012 10:46:34] "GET /emacs.html HTTP/1.1" 200 58819 0.0162
68
+ >> Writing PID to tmp/pids/thin.pid
69
+ >> Thin web server (v1.3.1 codename Triple Espresso)
70
+ >> Maximum connections set to 1024
71
+ >> Listening on 0.0.0.0:2003, CTRL+C to stop
72
+ 127.0.0.1 - - [15/Feb/2012 10:38:18] "GET /search.html HTTP/1.1" 200 697 0.0495
73
+ 127.0.0.1 - - [15/Feb/2012 10:38:18] "GET /style.css HTTP/1.1" 304 - 0.0019
74
+ 127.0.0.1 - - [15/Feb/2012 10:38:18] "GET /jquery-1.7.1.min.js HTTP/1.1" 304 - 0.0013
75
+ 127.0.0.1 - - [15/Feb/2012 10:38:18] "GET /search.js HTTP/1.1" 304 - 0.0012
76
+ 127.0.0.1 - - [15/Feb/2012 10:38:18] "GET /help.png HTTP/1.1" 304 - 0.0015
77
+ 127.0.0.1 - - [15/Feb/2012 10:38:19] "GET /favicon.ico HTTP/1.1" 404 447 0.0025
78
+ 127.0.0.1 - - [15/Feb/2012 10:38:23] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0021
79
+ 127.0.0.1 - - [15/Feb/2012 10:38:26] "GET /srch?query=j HTTP/1.1" 200 1300 2.7264
80
+ 127.0.0.1 - - [15/Feb/2012 10:38:26] "GET /srch?query=jen HTTP/1.1" 200 17 0.0134
81
+ 127.0.0.1 - - [15/Feb/2012 10:38:26] "GET /srch?query=jen HTTP/1.1" 200 17 0.0110
82
+ 127.0.0.1 - - [15/Feb/2012 10:38:26] "GET /srch?query=jenk HTTP/1.1" 200 17 0.0116
83
+ 127.0.0.1 - - [15/Feb/2012 10:38:26] "GET /srch?query=jenkins HTTP/1.1" 200 1174 0.3913
84
+ 127.0.0.1 - - [15/Feb/2012 10:38:27] "GET /srch?query=jenkins HTTP/1.1" 200 1174 0.3001
85
+ 127.0.0.1 - - [15/Feb/2012 10:38:27] "GET /srch?query=jenkins HTTP/1.1" 200 1174 0.2534
86
+ 127.0.0.1 - - [15/Feb/2012 10:38:33] "GET /jenkins.html HTTP/1.1" 200 3994 0.0326
87
+ 127.0.0.1 - - [15/Feb/2012 10:38:47] "GET /favicon.ico HTTP/1.1" 404 447 0.0021
88
+ 127.0.0.1 - - [15/Feb/2012 10:41:19] "GET /srch?query=b HTTP/1.1" 200 2024 0.6158
89
+ 127.0.0.1 - - [15/Feb/2012 10:41:19] "GET /srch?query=bz HTTP/1.1" 200 17 0.0169
90
+ 127.0.0.1 - - [15/Feb/2012 10:41:19] "GET /srch?query=bzi HTTP/1.1" 200 17 0.0132
91
+ 127.0.0.1 - - [15/Feb/2012 10:41:19] "GET /srch?query=bzip HTTP/1.1" 200 333 0.2006
92
+ 127.0.0.1 - - [15/Feb/2012 10:41:26] "GET /SettingUpVirtualLab.html HTTP/1.1" 200 36208 0.0095
93
+ 127.0.0.1 - - [15/Feb/2012 10:44:45] "GET /favicon.ico HTTP/1.1" 404 447 0.0030
94
+ 127.0.0.1 - - [15/Feb/2012 11:22:13] "GET /favicon.ico HTTP/1.1" 404 447 0.0028
95
+ 127.0.0.1 - - [15/Feb/2012 12:30:15] "GET /srch?query=bzip HTTP/1.1" 200 333 0.2362
96
+ >> Writing PID to tmp/pids/thin.pid
97
+ >> Thin web server (v1.3.1 codename Triple Espresso)
98
+ >> Maximum connections set to 1024
99
+ >> Listening on 0.0.0.0:2003, CTRL+C to stop
100
+ 127.0.0.1 - - [17/Feb/2012 11:50:07] "GET /search.html HTTP/1.1" 200 697 0.0235
101
+ 127.0.0.1 - - [17/Feb/2012 11:50:07] "GET /style.css HTTP/1.1" 304 - 0.0012
102
+ 127.0.0.1 - - [17/Feb/2012 11:50:07] "GET /jquery-1.7.1.min.js HTTP/1.1" 304 - 0.0003
103
+ 127.0.0.1 - - [17/Feb/2012 11:50:07] "GET /search.js HTTP/1.1" 304 - 0.0006
104
+ 127.0.0.1 - - [17/Feb/2012 11:50:07] "GET /help.png HTTP/1.1" 304 - 0.0010
105
+ 127.0.0.1 - - [17/Feb/2012 11:50:08] "GET /favicon.ico HTTP/1.1" 404 447 0.0007
106
+ 127.0.0.1 - - [17/Feb/2012 11:50:10] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0010
107
+ 127.0.0.1 - - [17/Feb/2012 11:50:10] "GET /srch?query=ru HTTP/1.1" 200 235 0.3876
108
+ 127.0.0.1 - - [17/Feb/2012 11:50:10] "GET /srch?query=ru HTTP/1.1" 200 235 0.1004
109
+ 127.0.0.1 - - [17/Feb/2012 11:50:10] "GET /srch?query=ruby HTTP/1.1" 200 1368 0.1532
110
+ 127.0.0.1 - - [17/Feb/2012 11:50:10] "GET /srch?query=ruby HTTP/1.1" 200 1368 0.0939
111
+ 127.0.0.1 - - [17/Feb/2012 11:50:11] "GET /srch?query=ruby HTTP/1.1" 200 1368 0.0676
112
+ 127.0.0.1 - - [17/Feb/2012 11:50:15] "GET /srch?query=ruby%20ha HTTP/1.1" 200 1368 0.0819
113
+ 127.0.0.1 - - [17/Feb/2012 11:50:15] "GET /srch?query=ruby%20ha HTTP/1.1" 200 1368 0.0814
114
+ 127.0.0.1 - - [17/Feb/2012 11:50:16] "GET /srch?query=ruby%20hash HTTP/1.1" 200 2200 0.1689
115
+ 127.0.0.1 - - [17/Feb/2012 11:50:16] "GET /srch?query=ruby%20hash HTTP/1.1" 200 2200 0.1070
116
+ 127.0.0.1 - - [17/Feb/2012 11:50:21] "GET /ruby.html HTTP/1.1" 304 - 0.0004
117
+ >> Exiting!
118
+ >> Writing PID to tmp/pids/thin.pid
119
+ >> Thin web server (v1.3.1 codename Triple Espresso)
120
+ >> Maximum connections set to 1024
121
+ >> Listening on 0.0.0.0:2003, CTRL+C to stop
122
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /search.html HTTP/1.1" 200 697 0.0361
123
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /jquery-1.7.1.min.js HTTP/1.1" 200 93868 0.0035
124
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /style.css HTTP/1.1" 200 3730 0.0008
125
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /search.js HTTP/1.1" 200 1197 0.0008
126
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /help.png HTTP/1.1" 200 308 0.0016
127
+ 127.0.0.1 - - [20/Feb/2012 17:31:49] "GET /favicon.ico HTTP/1.1" 404 447 0.0013
128
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /ajax-loader.gif HTTP/1.1" 200 1737 0.0112
129
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /srch?query=f HTTP/1.1" 200 17 0.1203
130
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /srch?query=fent HTTP/1.1" 200 17 0.0045
131
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /srch?query=fento HTTP/1.1" 200 17 0.0082
132
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /srch?query=fenton HTTP/1.1" 200 17 0.0083
133
+ 127.0.0.1 - - [20/Feb/2012 17:31:51] "GET /srch?query=fenton HTTP/1.1" 200 17 0.0070
134
+ 127.0.0.1 - - [20/Feb/2012 17:31:53] "GET /srch?query=fento HTTP/1.1" 200 17 0.0075
135
+ 127.0.0.1 - - [20/Feb/2012 17:31:53] "GET /srch?query=fent HTTP/1.1" 200 17 0.0073
136
+ 127.0.0.1 - - [20/Feb/2012 17:31:53] "GET /srch?query=fen HTTP/1.1" 200 17 0.0074
137
+ 127.0.0.1 - - [20/Feb/2012 17:31:53] "GET /srch?query=fe HTTP/1.1" 200 17 0.0073
138
+ 127.0.0.1 - - [20/Feb/2012 17:31:54] "GET /srch?query=f HTTP/1.1" 200 17 0.0074
139
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /search.html HTTP/1.1" 200 697 0.0008
140
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /style.css HTTP/1.1" 200 3730 0.0007
141
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /jquery-1.7.1.min.js HTTP/1.1" 200 93868 0.0007
142
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /search.js HTTP/1.1" 200 1197 0.0006
143
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /help.png HTTP/1.1" 200 308 0.0005
144
+ 127.0.0.1 - - [21/Feb/2012 10:42:56] "GET /favicon.ico HTTP/1.1" 404 447 0.0008
145
+ 127.0.0.1 - - [21/Feb/2012 10:42:58] "GET /ajax-loader.gif HTTP/1.1" 200 1737 0.0006
146
+ 127.0.0.1 - - [21/Feb/2012 10:42:59] "GET /srch?query=f HTTP/1.1" 200 1986 0.4826
147
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0005
148
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /srch?query=c HTTP/1.1" 200 1943 0.3504
149
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /srch?query=ct HTTP/1.1" 200 230 0.0275
150
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /srch?query=cta HTTP/1.1" 200 17 0.0030
151
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /srch?query=ctag HTTP/1.1" 200 420 0.0647
152
+ 127.0.0.1 - - [21/Feb/2012 10:43:06] "GET /srch?query=ctags HTTP/1.1" 200 420 0.0424
153
+ 127.0.0.1 - - [21/Feb/2012 10:43:09] "GET /ruby.html HTTP/1.1" 200 40002 0.0006
154
+ 127.0.0.1 - - [21/Feb/2012 11:07:04] "GET /search.html HTTP/1.1" 304 - 0.0020
155
+ 127.0.0.1 - - [21/Feb/2012 11:07:04] "GET /style.css HTTP/1.1" 304 - 0.0021
156
+ 127.0.0.1 - - [21/Feb/2012 11:07:04] "GET /jquery-1.7.1.min.js HTTP/1.1" 304 - 0.0017
157
+ 127.0.0.1 - - [21/Feb/2012 11:07:04] "GET /search.js HTTP/1.1" 304 - 0.0015
158
+ 127.0.0.1 - - [21/Feb/2012 11:07:04] "GET /help.png HTTP/1.1" 304 - 0.0019
159
+ 127.0.0.1 - - [21/Feb/2012 11:07:05] "GET /favicon.ico HTTP/1.1" 404 447 0.0030
160
+ 127.0.0.1 - - [21/Feb/2012 11:07:07] "GET /ajax-loader.gif HTTP/1.1" 304 - 0.0020
161
+ 127.0.0.1 - - [21/Feb/2012 11:07:07] "GET /srch?query=e HTTP/1.1" 200 2317 0.5160
162
+ 127.0.0.1 - - [21/Feb/2012 11:07:07] "GET /srch?query=ev HTTP/1.1" 200 17 0.0099
163
+ 127.0.0.1 - - [21/Feb/2012 11:07:07] "GET /srch?query=evn HTTP/1.1" 200 17 0.0089
164
+ 127.0.0.1 - - [21/Feb/2012 11:07:08] "GET /srch?query=evna HTTP/1.1" 200 17 0.0099
165
+ 127.0.0.1 - - [21/Feb/2012 11:07:08] "GET /srch?query=evn HTTP/1.1" 200 17 0.0443
166
+ 127.0.0.1 - - [21/Feb/2012 11:07:08] "GET /srch?query=ev HTTP/1.1" 200 17 0.0113
167
+ 127.0.0.1 - - [21/Feb/2012 11:07:08] "GET /srch?query=eval HTTP/1.1" 200 659 0.2452
168
+ 127.0.0.1 - - [21/Feb/2012 11:07:09] "GET /srch?query=eval HTTP/1.1" 200 659 0.2635
169
+ 127.0.0.1 - - [21/Feb/2012 11:07:13] "GET /srch?query=eva HTTP/1.1" 200 17 0.0103
170
+ 127.0.0.1 - - [21/Feb/2012 11:07:14] "GET /srch?query=ev HTTP/1.1" 200 17 0.0096
171
+ 127.0.0.1 - - [21/Feb/2012 11:07:14] "GET /srch?query=e HTTP/1.1" 200 2317 0.5308
172
+ 127.0.0.1 - - [21/Feb/2012 13:02:11] "GET /ajax-loader.gif HTTP/1.1" 200 1737 0.0008
173
+ 127.0.0.1 - - [21/Feb/2012 13:02:12] "GET /srch?query=w HTTP/1.1" 200 1944 0.1649
174
+ 127.0.0.1 - - [21/Feb/2012 13:02:12] "GET /srch?query=wg HTTP/1.1" 200 17 0.0030
175
+ 127.0.0.1 - - [21/Feb/2012 13:02:12] "GET /srch?query=wget HTTP/1.1" 200 2083 0.1513
176
+ 127.0.0.1 - - [21/Feb/2012 13:02:12] "GET /srch?query=wget HTTP/1.1" 200 2083 0.1490
177
+ 127.0.0.1 - - [21/Feb/2012 13:02:18] "GET /bugzilla.html HTTP/1.1" 200 2995 0.0005
@@ -0,0 +1,20 @@
1
+ require_relative '../spec_helper'
2
+ require_relative '../../lib/it_tools/deploy'
3
+
4
+ describe Deployment::Maven do
5
+ before :each do
6
+ @maven = Deployment::Maven.new
7
+ end
8
+ describe "#new" do
9
+ it "returns a new Maven object" do
10
+ @maven.should be_an_instance_of Deployment::Maven
11
+ end
12
+ end
13
+
14
+ describe "#get_artifact_type" do
15
+ it "should return a type of assembled jar" do
16
+ # @maven.
17
+ end
18
+ end
19
+
20
+ end
File without changes
@@ -0,0 +1,30 @@
1
+ require_relative '../../bin/pub'
2
+ require 'logger'
3
+ require 'optparse'
4
+ require_relative '../it_tools/test_publisher2_support'
5
+ require_relative '../../lib/it_tools/pub_driver'
6
+
7
+ src_dir = '/home/fenton/projects/documentation'
8
+ dest_dir = '/home/fenton/bin/website'
9
+ stat_dir = '/home/fenton/bin/website_static'
10
+
11
+ # src_dir = '/home/fenton/projects/beta_tools/testdata/publish/src_dir'
12
+ # dest_dir = '/home/fenton/projects/beta_tools/testdata/publish/target_dir'
13
+ # stat_dir = '/home/fenton/projects/beta_tools/testdata/publish/target_dir_static'
14
+
15
+ #support = PublisherSupport.new
16
+ #support.before src_dir
17
+
18
+ ARGV[0] = '-s'
19
+ ARGV[1] = src_dir
20
+ ARGV[2] = '-w'
21
+ ARGV[3] = dest_dir
22
+ ARGV[4] = '-t'
23
+ ARGV[5] = stat_dir
24
+ ARGV[6] = '-d'
25
+ ARGV[7] = 'debug'
26
+
27
+ pub = PubDriver::Pub.new
28
+ pub.all
29
+
30
+ # support.after [dest_dir, stat_dir]
data/test/cleaner.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'fileutils'
2
+
3
+ FileUtils.touch '../testdata/src_dir/file1.mmd'
4
+ FileUtils.rm_rf '../testdata/target_dir/file4.html'
5
+ FileUtils.rm_rf '../testdata/target_dir/images'
6
+ FileUtils.rm_rf '../testdata/target_dir_static'
data/test/driver.rb ADDED
@@ -0,0 +1,24 @@
1
+ require_relative '../lib/it_tools/publisher2'
2
+ require 'fileutils'
3
+ require 'logger'
4
+
5
+ FileUtils.touch '../testdata/src_dir/file1.mmd'
6
+ FileUtils.rm_rf '../testdata/target_dir/file4.html'
7
+ FileUtils.rm_rf '../testdata/target_dir/images'
8
+
9
+ solr_search_files = [ "search.html",
10
+ "search.js",
11
+ "ajax-loader.gif",
12
+ "help.png" ]
13
+
14
+ parameters = {
15
+ :indexer_url => "http://127.0.0.1:8983/solr/",
16
+ :style_sheet => "inputStyles.css",
17
+ :solr_search_files => solr_search_files,
18
+ :src_dir => '../testdata/src_dir',
19
+ :target_dir => '../testdata/target_dir',
20
+ :debug_level => Logger::DEBUG
21
+ }
22
+
23
+ publisher = Publisher::Markdown.new parameters
24
+ publisher.process_files
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ path_root = "../../lib/it_tools"
4
+ require_relative "#{path_root}/html_publish"
5
+ require_relative "#{path_root}/network_tools"
6
+ require_relative "#{path_root}/options"
7
+
8
+ class Publisher
9
+ attr_accessor :ops, :debug, :params, :log
10
+ def initialize
11
+ @ops = Options.new.options
12
+ @debug = @ops[:debug]
13
+ @params = {
14
+ :indexer_url => 'http://127.0.0.1:8983/solr/',
15
+ :read_from_dir => '/home/fenton/projects/documentation',
16
+ :write_to_dir_for_indexing => '/home/fenton/bin/website',
17
+ :write_to_dir_with_style_for_standalone => '/home/fenton/bin/website_with_style'
18
+ }
19
+ @log = Logger.new('log.txt')
20
+ if level = @ops[:debug_level]
21
+ @log.level = level
22
+ else
23
+ @log.level = Logger::DEBUG
24
+ end
25
+ end
26
+
27
+ def test_go
28
+ converter = Website::MarkdownConverter.new params
29
+ converter.go
30
+ end
31
+ def test_process_files
32
+ converter = Website::MarkdownConverter.new params
33
+ read_dir = @params[:read_from_dir]
34
+ write_dir = @params[:write_to_dir_for_indexing]
35
+ static_dir = @params[:write_to_dir_with_style_for_standalone]
36
+ files_to_process, all_files = converter.get_files_to_process read_dir, write_dir
37
+ @params[:for_indexer_dir] = write_dir
38
+ @params[:for_static_files_dir] = static_dir
39
+ converter.process_files files_to_process, read_dir, @params
40
+ converter.create_index(all_files, static_dir)
41
+ converter.write_stylesheet read_dir, static_dir
42
+ end
43
+
44
+
45
+ def test_process_file
46
+ write_dir = @params[:write_to_dir_for_indexing]
47
+ delete_files_in_dir write_dir
48
+ converter = Website::MarkdownConverter.new @params
49
+ converter.process_file "java.mmd", @params[:read_from_dir], write_dir
50
+ end
51
+
52
+ def delete_files_in_dir(dir)
53
+ Dir["#{dir}/*"].each do |file|
54
+ next if File.basename(file) == File.basename(dir)
55
+ FileUtils.rm_f file, :noop => false, :verbose => true
56
+ end
57
+ end
58
+
59
+ def test_get_process_files_list
60
+ converter = Website::MarkdownConverter.new @params
61
+ files_to_process, all_files = converter.get_files_to_process @params[:read_from_dir]
62
+ p "Files to process: " if @debug
63
+ p files_to_process if @debug
64
+ end
65
+
66
+ def publish_locally
67
+ solr_indexer = "http://127.0.0.1:8983/solr/"
68
+ converter = Website::MarkdownConverter.new :indexer_url => solr_indexer
69
+ converter.go
70
+ end
71
+
72
+ def publish ops
73
+ command = "rsync -avP --stats #{ops[:from_dir]} #{ops[:to_host]}:#{ops[:to_dir]}"
74
+ p "[command]: " + command
75
+ system command
76
+ end
77
+
78
+ def publish_remote
79
+ home_dir = ENV['HOME']
80
+ vpnTools = NetworkTools::VpnTools.new
81
+ if vpnTools.on_vpn
82
+ ops = {
83
+ :to_host => 'l1',
84
+ :from_dir => home_dir + '/bin/work-doco/',
85
+ :to_dir => '/home/fenton/work-doco/' }
86
+ publish ops
87
+ ops[:to_dir] = '/home/fenton/website/'
88
+ else
89
+ ops = {
90
+ :to_dir => '/home/ftravers/spicevan.com/current/public/',
91
+ :to_host => 'dh' }
92
+ end
93
+ ops[:from_dir] = home_dir + '/bin/website/'
94
+ publish ops
95
+ end
96
+ def pub_all
97
+ publish_locally
98
+ publish_remote
99
+ end
100
+ end
101
+
102
+ pub = Publisher.new
103
+ #pub.publish_locally
104
+ #pub.test_get_process_files_list
105
+ #pub.test_process_file
106
+ #pub.test_process_files
107
+ pub.test_go
@@ -0,0 +1,4 @@
1
+ require_relative 'test_publisher2'
2
+
3
+ tp = TestPublisher2.new
4
+ tp.test_copy_images
@@ -0,0 +1,13 @@
1
+ require "test/unit"
2
+ require_relative "../../lib/it_tools/publisher2"
3
+
4
+ class TestPublisher2 < Test::Unit::TestCase
5
+ # integration test
6
+ def test_which_files_have_changed_since_last_publish
7
+ src_dir = 'testdata/src_dir'
8
+ target_dir = 'testdata/target_dir'
9
+ publisher = Publisher::Markdown.new
10
+ newer_files = publisher.which_files_newer src_dir, target_dir
11
+ p newer_files
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ require_relative 'test_html_publish'
2
+ require_relative 'test_deploy'
3
+ require_relative 'test_shared'
4
+ require_relative 'test_maven'
5
+ require_relative 'test_multipart'
6
+ require_relative 'test_solr'
@@ -0,0 +1,13 @@
1
+ require 'pathname'
2
+ testpath = Pathname.new(
3
+ File.join(File.dirname(__FILE__), ".."*1)
4
+ ).cleanpath.to_s
5
+ $:.unshift(testpath) unless $:.include?(testpath)
6
+
7
+ require 'it_tools/test_html_publish'
8
+ require 'it_tools/test_deploy'
9
+ require 'it_tools/test_shared'
10
+ require 'it_tools/test_multipart'
11
+
12
+ # Integration Tests
13
+ # require 'it_tools/test_solr'
@@ -0,0 +1,83 @@
1
+ require "test/unit"
2
+
3
+ require_relative "../../lib/it_tools/environment"
4
+
5
+ module TestDeployment
6
+ class TestEnvironment < Test::Unit::TestCase
7
+ $env = Environment.new(:debug => false)
8
+ def test_initialize
9
+ flag = '-s'
10
+ value = '/home/fenton/projects/autoSR2-EAR'
11
+ ARGV[0] = flag
12
+ ARGV[1] = value
13
+ en = Environment.new
14
+ assert_equal en.ops[:source_folder], value
15
+ end
16
+ def test_get_deploy_dir
17
+ assert_equal('/scratch/ngsp/hrmsToCrmod', $env.get_deploy_dir('dev'))
18
+ end
19
+ def test_set_options
20
+ deploy = Environment.new
21
+ debug = deploy.ops[:debug]
22
+ assert_equal(false, debug)
23
+ deploy.set_options(:debug => true)
24
+ debug = deploy.ops[:debug]
25
+ assert_equal(true, debug)
26
+ end
27
+ def test_set_options_2
28
+ to = TestDeployment::TestOptions.new("Junk")
29
+ ops = to.test_parse_options
30
+ env = Environment.new(ops)
31
+ e = env.ops[:environment]
32
+ d = env.ops[:debug]
33
+ assert_equal('loc', e)
34
+ assert_equal(false, d)
35
+ end
36
+
37
+ def test_get_deploy_command
38
+ enviro = Environment.new(:debug => false)
39
+ env = "dev"
40
+ deploy_command = enviro.get_deploy_command(env, "testdata/assembly_pom.xml")
41
+ expected = "rsync -avP --stats "
42
+ expected += "target/hrmsToCrmodUserDataIntegration-jar-with-dependencies.jar "
43
+ expected += "ftravers@sta00418.us.oracle.com:/scratch/ngsp/hrmsToCrmod/"
44
+ expected += "hrmsToCrmodUserDataIntegration-0.0.90.jar"
45
+ assert_equal(expected, deploy_command)
46
+ contents = File.open("testdata/pom.xml").read
47
+ deploy_command = enviro.get_deploy_command(env, contents, :use_scp => true)
48
+ assert_equal("scp target/crmod-ws-wrapper.jar ftravers@sta00418.us.oracle.com:/scratch/ngsp/hrmsToCrmod/hrm-0.0.90.jar", deploy_command)
49
+
50
+ contents = File.open("testdata/pom.xml").read
51
+ deploy_command = enviro.get_deploy_command(env, contents, :use_scp => true)
52
+ expected = "rsync -avP --stats "
53
+ expected += "target/autoSR2-EAR.ear "
54
+ expected += "ftravers@sta00418.us.oracle.com:/scratch/ngsp/hrmsToCrmod/"
55
+ expected += "autoSR2-EAR-0.3.0.ear"
56
+ assert_equal(expected, deploy_command)
57
+ end
58
+
59
+ end
60
+
61
+ class TestOptions < Test::Unit::TestCase
62
+ def test_initialize
63
+ clas = Options.new
64
+ assert_equal(clas.options[:debug], false)
65
+ assert_equal(clas.options[:environment], 'loc')
66
+ assert_equal(clas.options[:indexer_url], nil)
67
+ end
68
+
69
+ def test_parse_options
70
+ loc = 'loc'
71
+ e = '-e'
72
+ ARGV[0] = e
73
+ ARGV[1] = loc
74
+
75
+ deployment = Options.new
76
+ env = deployment.options[:environment]
77
+
78
+ assert_equal(loc, env)
79
+ return deployment.options
80
+ end
81
+ end
82
+ end
83
+
@@ -0,0 +1,54 @@
1
+ # -*- coding: utf-8 -*-
2
+ require "test/unit"
3
+ require_relative "../../lib/it_tools/html_publish"
4
+
5
+ module TestWebsite
6
+ class TestMarkdownConverter < Test::Unit::TestCase
7
+ # integration test
8
+ def test_send_to_indexer
9
+ file = "java.html"
10
+ contents = File.open("testdata/" + file).read
11
+ mc = Website::MarkdownConverter.new :indexer_url => "http://127.0.0.1:8983/solr/"
12
+ mc.send_to_indexer(file, contents)
13
+ end
14
+ def test_go
15
+ mc = Website::MarkdownConverter.new :indexer_url => "http://127.0.0.1:8983/solr/"
16
+ mc.go
17
+ end
18
+ # unit tests
19
+ def test_convert_mmd
20
+ contents = File.open("testdata/simple.mmd").read
21
+ mc = Website::MarkdownConverter.new :indexer_url => "http://127.0.0.1:8983/solr/"
22
+ actual = mc.convert_markdown_contents contents
23
+ expected = "<div class=\"toc1\"><a href=\"#Hello\">1 - Hello</a></div><br/>\n\n<h1 id=\"Hello\">1 - Hello</h1>\n\n<p>Body</p>\n"
24
+ assert_equal(expected, actual)
25
+ end
26
+ def test_intialize
27
+ mc = Website::MarkdownConverter.new
28
+ end
29
+ def test_remove_non_ascii
30
+ contents = File.open("testdata/utf8_chars.txt").read
31
+ assert_equal "Oracle® Data\n", contents
32
+ new_contents = contents.remove_non_ascii
33
+ assert_equal "Oracle Data\n", new_contents
34
+ end
35
+ def test_initialize
36
+ eflag = '-e'
37
+ loc = 'loc'
38
+ ARGV[0] = eflag
39
+ ARGV[1] = loc
40
+ conv = Website::MarkdownConverter.new
41
+ assert_not_equal nil, conv
42
+ env = conv.ops[:environment]
43
+ # assert_equal(loc, env, "Environment")
44
+ end
45
+ def test_set_options
46
+ var = Website::MarkdownConverter.new
47
+ assert_equal(false, var.ops[:debug])
48
+ var.set_options(:debug => true)
49
+ assert_equal(true, var.ops[:debug])
50
+ end
51
+ end
52
+ end
53
+
54
+
@@ -0,0 +1,31 @@
1
+ require "test/unit"
2
+ require_relative "../../lib/it_tools/maven"
3
+
4
+ class TestMaven < Test::Unit::TestCase
5
+ $mv = Maven.new "testdata/assembly_pom.xml"
6
+
7
+ def test_initialize
8
+ maven = Maven.new "testdata/assembly_pom.xml"
9
+ end
10
+ def test_get_artifact_type
11
+ file = "testdata/ear_pom.xml"
12
+ # artifact_type = $mv.
13
+ end
14
+ def test_get_artifact_name
15
+ artifact_name = $mv.get_artifact_name("testdata/pom.xml")
16
+ assert_equal("hrmsToCrmodUserDataIntegration.jar", artifact_name)
17
+ end
18
+ def test_get_built_artifact_name_with_version
19
+ new_name = $mv.get_built_artifact_name_with_version("testdata/pom.xml")
20
+ assert_equal("hrmsToCrmodUserDataIntegration-0.0.90.jar", new_name)
21
+ end
22
+ def test2_get_built_artifact_name_with_version
23
+ new_name = $mv.get_built_artifact_name_with_version("testdata/pom.xml")
24
+ assert_equal("hrmsToCrmodUserDataIntegration-0.0.90.jar", new_name)
25
+ end
26
+ def test_get_prev_version
27
+ prev_ver = $mv.get_prev_version("0.8.4")
28
+ assert_equal("0.8.3", prev_ver)
29
+ end
30
+ end
31
+
@@ -0,0 +1,31 @@
1
+ require "test/unit"
2
+ require 'pathname'
3
+ libpath = Pathname.new(
4
+ File.join(File.dirname(__FILE__), [".."]*2, "lib")
5
+ ).cleanpath.to_s
6
+ $:.unshift(libpath) unless $:.include?(libpath)
7
+
8
+ require "it_tools/multipart"
9
+ module TestMultipart
10
+ class TestPost < Test::Unit::TestCase
11
+ def test_get_query
12
+ mp = Multipart::Post.new
13
+ mp.add_params("fenton" => "travers")
14
+ query, header = mp.get_query
15
+ query_should_be = "--0123456789ABLEWASIEREISAWELBA9876543210\r\nContent-Disposition: form-data; name=\"fenton\"\r\n\r\ntravers\r\n--0123456789ABLEWASIEREISAWELBA9876543210--"
16
+ assert_equal( query_should_be, query )
17
+ header_should_be = {"Content-Type"=>"multipart/form-data; boundary=0123456789ABLEWASIEREISAWELBA9876543210", "User-Agent"=>"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/523.10.6 (KHTML, like Gecko) Version/3.0.4 Safari/523.10.6"}
18
+ assert_equal( header_should_be, header)
19
+ end
20
+ def test_add_file
21
+ mp = Multipart::Post.new
22
+ mp.add_params("Fenton" => "Travers")
23
+ filename = "small.txt"
24
+ contents = File.open("testdata/" + filename).read
25
+ mp.add_file( filename, contents)
26
+ query, header = mp.get_query
27
+ expected_query = "--0123456789ABLEWASIEREISAWELBA9876543210\r\nContent-Disposition: form-data; name=\"Fenton\"\r\n\r\nTravers\r\n--0123456789ABLEWASIEREISAWELBA9876543210\r\nContent-Disposition: form-data; name=\"small.txt\"; filename=\"small.txt\"\r\nContent-Type: text/plain\r\n\r\nThis is a small file.\nFenton Oliver Travers.\n\r\n--0123456789ABLEWASIEREISAWELBA9876543210--"
28
+ assert_equal(expected_query, query)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,14 @@
1
+ require "test/unit"
2
+
3
+ require_relative "../../lib/it_tools/network_tools"
4
+
5
+ module TestNetworkTools
6
+ class TestVpnTools < Test::Unit::TestCase
7
+
8
+ def test_login_to_url
9
+ net = NetworkTools::VpnTools.new
10
+ net.login_to_url
11
+ end
12
+
13
+ end
14
+ end