beta_tools 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/Capfile +2 -0
- data/Gemfile +4 -0
- data/README +7 -0
- data/Rakefile +7 -0
- data/beta_tools.gemspec +31 -0
- data/bin/deploy +9 -0
- data/bin/documentation_daemon +12 -0
- data/bin/loginToUrl +6 -0
- data/bin/onVpn +6 -0
- data/bin/pub +91 -0
- data/bin/query_solr +11 -0
- data/bin/solrWebApp +6 -0
- data/conf/schema.xml +220 -0
- data/config/deploy.rb +44 -0
- data/config.ru +2 -0
- data/docs/#next_design.mmd# +0 -0
- data/features/deploy.feature +9 -0
- data/features/git.feature +15 -0
- data/features/maven.feature +21 -0
- data/features/step_definitions/deploy_steps.rb +11 -0
- data/features/step_definitions/git_steps.rb +20 -0
- data/features/step_definitions/maven_steps.rb +35 -0
- data/features/support/env.rb +8 -0
- data/int/it_tools/suite_it_tools.rb +2 -0
- data/int/it_tools/test_integ1.rb +17 -0
- data/lib/beta_tools/version.rb +3 -0
- data/lib/beta_tools.rb +5 -0
- data/lib/it_tools/calc.rb +14 -0
- data/lib/it_tools/config.ru +2 -0
- data/lib/it_tools/environment.rb +86 -0
- data/lib/it_tools/git.rb +3 -0
- data/lib/it_tools/html_publish.rb +287 -0
- data/lib/it_tools/mail.rb +21 -0
- data/lib/it_tools/maven.rb +101 -0
- data/lib/it_tools/md5.rb +4 -0
- data/lib/it_tools/multipart.rb +78 -0
- data/lib/it_tools/network_tools.rb +72 -0
- data/lib/it_tools/options.rb +46 -0
- data/lib/it_tools/pub_driver.rb +188 -0
- data/lib/it_tools/publisher2.rb +232 -0
- data/lib/it_tools/sample.rb +9 -0
- data/lib/it_tools/shared.rb +22 -0
- data/lib/it_tools/solr.rb +157 -0
- data/lib/it_tools/views/search_results.erb +16 -0
- data/log/thin.log +177 -0
- data/spec/it_tools/deploy_spec.rb +20 -0
- data/spec/spec_helper.rb +0 -0
- data/test/bin/test_pub.rb +30 -0
- data/test/cleaner.rb +6 -0
- data/test/driver.rb +24 -0
- data/test/integration/tp.rb +107 -0
- data/test/it_tools/for_debugger.rb +4 -0
- data/test/it_tools/publisher2.rb +13 -0
- data/test/it_tools/suite_it_tools.rb +6 -0
- data/test/it_tools/suite_it_tools.rb~ +13 -0
- data/test/it_tools/test_deploy.rb +83 -0
- data/test/it_tools/test_html_publish.rb +54 -0
- data/test/it_tools/test_maven.rb +31 -0
- data/test/it_tools/test_multipart.rb +31 -0
- data/test/it_tools/test_network_tools.rb +14 -0
- data/test/it_tools/test_publisher2.rb +42 -0
- data/test/it_tools/test_publisher2_support.rb +16 -0
- data/test/it_tools/test_sample.rb +10 -0
- data/test/it_tools/test_shared.rb +36 -0
- data/test/it_tools/test_solr.rb +22 -0
- data/test/it_tools/test_solr2.rb +22 -0
- data/testdata/assembly_pom.xml +157 -0
- data/testdata/desir.txt +39 -0
- data/testdata/ear_pom.xml +82 -0
- data/testdata/java.html +524 -0
- data/testdata/pom.xml +174 -0
- data/testdata/publish/src_dir/#arch.mmd# +0 -0
- data/testdata/publish/src_dir/ajax-loader.gif +0 -0
- data/testdata/publish/src_dir/file1.mmd +5 -0
- data/testdata/publish/src_dir/file2.mmd +3 -0
- data/testdata/publish/src_dir/file3.abc +0 -0
- data/testdata/publish/src_dir/file4.mmd +3 -0
- data/testdata/publish/src_dir/help.png +0 -0
- data/testdata/publish/src_dir/images/linux.jpeg +0 -0
- data/testdata/publish/src_dir/inputStyles.css +0 -0
- data/testdata/publish/src_dir/search.html +0 -0
- data/testdata/publish/src_dir/search.js +0 -0
- data/testdata/publish/target_dir/.@arch.html +0 -0
- data/testdata/publish/target_dir/file1.html +7 -0
- data/testdata/publish/target_dir/file2.html +5 -0
- data/testdata/publish/target_dir/search.js +0 -0
- data/testdata/publish/target_dir_static/.@arch.html +1 -0
- data/testdata/publish/target_dir_static/file1.html +7 -0
- data/testdata/publish/target_dir_static/index.html +1 -0
- data/testdata/publish/target_dir_static/style.css +61 -0
- data/testdata/ruby.mmd +404 -0
- data/testdata/simple.mmd +3 -0
- data/testdata/simple.xml +3 -0
- data/testdata/small.txt +2 -0
- data/testdata/utf8_chars.txt +1 -0
- metadata +338 -0
data/.gitignore
ADDED
data/Capfile
ADDED
data/Gemfile
ADDED
data/README
ADDED
data/Rakefile
ADDED
data/beta_tools.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "beta_tools/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "beta_tools"
|
7
|
+
s.version = BetaTools::VERSION
|
8
|
+
s.authors = ["Fenton Travers"]
|
9
|
+
s.email = ["fenton.travers@oracle.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{tools that are working and not in active development, to cutdown on rake install time}
|
12
|
+
s.description = %q{tools that are working and not in active development, to cutdown on rake install time}
|
13
|
+
s.rubyforge_project = "beta_tools"
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_dependency "pygments.rb"
|
21
|
+
s.add_dependency "RedCloth"
|
22
|
+
s.add_dependency "redcarpet"
|
23
|
+
s.add_dependency "shotgun"
|
24
|
+
s.add_dependency "sinatra"
|
25
|
+
s.add_dependency "mime-types"
|
26
|
+
s.add_dependency "sanitize"
|
27
|
+
s.add_dependency "xml-simple"
|
28
|
+
s.add_dependency "it_tools"
|
29
|
+
s.add_dependency "thin"
|
30
|
+
|
31
|
+
end
|
data/bin/deploy
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.dirname(__FILE__) + '/../lib/it_tools/solr'
|
4
|
+
require 'thin'
|
5
|
+
|
6
|
+
rackup_file = "#{File.dirname(__FILE__)}/../lib/it_tools/config.ru"
|
7
|
+
|
8
|
+
argv = ARGV
|
9
|
+
argv << ["-R", rackup_file] unless ARGV.include?("-R")
|
10
|
+
argv << ["-p", "2003"] unless ARGV.include?("-p")
|
11
|
+
argv << ["-e", "production"] unless ARGV.include?("-e")
|
12
|
+
Thin::Runner.new(argv.flatten).run!
|
data/bin/loginToUrl
ADDED
data/bin/onVpn
ADDED
data/bin/pub
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'logger'
|
4
|
+
require 'optparse'
|
5
|
+
require_relative '../test/it_tools/test_publisher2_support'
|
6
|
+
require_relative '../lib/it_tools/pub_driver'
|
7
|
+
require_relative '../lib/it_tools/network_tools'
|
8
|
+
|
9
|
+
src_dir = '/home/fenton/projects/documentation'
|
10
|
+
dest_dir = '/home/fenton/bin/website'
|
11
|
+
stat_dir = '/home/fenton/bin/website_static'
|
12
|
+
solr_search_files_dir = '/home/fenton/projects/documentation'
|
13
|
+
index_category = 'public'
|
14
|
+
|
15
|
+
# src_dir = '/home/fenton/projects/beta_tools/testdata/publish/src_dir'
|
16
|
+
# dest_dir = '/home/fenton/projects/beta_tools/testdata/publish/target_dir'
|
17
|
+
# stat_dir = '/home/fenton/projects/beta_tools/testdata/publish/target_dir_static'
|
18
|
+
|
19
|
+
#support = PublisherSupport.new
|
20
|
+
#support.before src_dir
|
21
|
+
|
22
|
+
ARGV[0] = '-s'
|
23
|
+
ARGV[1] = src_dir
|
24
|
+
ARGV[2] = '-w'
|
25
|
+
ARGV[3] = dest_dir
|
26
|
+
ARGV[4] = '-t'
|
27
|
+
ARGV[5] = stat_dir
|
28
|
+
ARGV[6] = '-d'
|
29
|
+
ARGV[7] = 'debug'
|
30
|
+
ARGV[8] = '-l'
|
31
|
+
ARGV[9] = solr_search_files_dir
|
32
|
+
ARGV[10] = '-c'
|
33
|
+
ARGV[11] = index_category
|
34
|
+
|
35
|
+
|
36
|
+
pub = PubDriver::Pub.new
|
37
|
+
pub.publish_locally2
|
38
|
+
|
39
|
+
# support.after [dest_dir, stat_dir]
|
40
|
+
|
41
|
+
# -----------------------------------------------------
|
42
|
+
|
43
|
+
|
44
|
+
src_dir = '/home/fenton/projects/work-doco/docs'
|
45
|
+
dest_dir = '/home/fenton/bin/work-doco'
|
46
|
+
stat_dir = '/home/fenton/bin/work-doco_static'
|
47
|
+
solr_search_files_dir = '/home/fenton/projects/documentation'
|
48
|
+
index_category = 'work'
|
49
|
+
|
50
|
+
ARGV[0] = '-s'
|
51
|
+
ARGV[1] = src_dir
|
52
|
+
ARGV[2] = '-w'
|
53
|
+
ARGV[3] = dest_dir
|
54
|
+
ARGV[4] = '-t'
|
55
|
+
ARGV[5] = stat_dir
|
56
|
+
ARGV[6] = '-d'
|
57
|
+
ARGV[7] = 'debug'
|
58
|
+
ARGV[8] = '-l'
|
59
|
+
ARGV[9] = solr_search_files_dir
|
60
|
+
ARGV[10] = '-c'
|
61
|
+
ARGV[11] = index_category
|
62
|
+
|
63
|
+
pub = PubDriver::Pub.new
|
64
|
+
pub.publish_locally2
|
65
|
+
|
66
|
+
# ---------------------------------------------------------
|
67
|
+
vpnTools = NetworkTools::VpnTools.new
|
68
|
+
if not vpnTools.on_vpn
|
69
|
+
ops = { :wdoc => '/home/fenton/bin/work-doco_static/',
|
70
|
+
:doc => '/home/fenton/bin/website_static/',
|
71
|
+
:int_docs => '/home/fenton/website/',
|
72
|
+
:int_wdocs => '/home/fenton/work-doco/',
|
73
|
+
:ext_docs => '/home/ftravers/spicevan.com/current/public/',
|
74
|
+
:int_host => 'l1',
|
75
|
+
:ext_host => 'dh'}
|
76
|
+
pub = PubDriver::Pub.new
|
77
|
+
pub.publish_remote ops
|
78
|
+
|
79
|
+
rsync_ops = {}
|
80
|
+
rsync_ops[:from_dir] = '/home/fenton/bin/website/'
|
81
|
+
rsync_ops[:to_host] = 'searcher'
|
82
|
+
rsync_ops[:to_dir] = '/data/documentation/'
|
83
|
+
rsync_ops[:as_user] = 'docs'
|
84
|
+
pub.rsync_it rsync_ops
|
85
|
+
|
86
|
+
rsync_ops[:from_dir] = '/home/fenton/bin/work-doco/'
|
87
|
+
rsync_ops[:to_host] = 'searcher'
|
88
|
+
rsync_ops[:to_dir] = '/data/documentation/'
|
89
|
+
rsync_ops[:as_user] = 'docs'
|
90
|
+
pub.rsync_it rsync_ops
|
91
|
+
end
|
data/bin/query_solr
ADDED
data/bin/solrWebApp
ADDED
data/conf/schema.xml
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
|
3
|
+
<schema name="example" version="1.2">
|
4
|
+
<types>
|
5
|
+
field type definitions. The "name" attribute is
|
6
|
+
just a label to be used by field definitions. The "class"
|
7
|
+
attribute and any other attributes determine the real
|
8
|
+
behavior of the fieldType.
|
9
|
+
Class names starting with "solr" refer to java classes in the
|
10
|
+
org.apache.solr.analysis package.
|
11
|
+
|
12
|
+
The StrField type is not analyzed, but indexed/stored verbatim.
|
13
|
+
- StrField and TextField support an optional compressThreshold which
|
14
|
+
limits compression (if enabled in the derived fields) to values which
|
15
|
+
exceed a certain size (in characters).
|
16
|
+
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
|
17
|
+
|
18
|
+
<!-- boolean type: "true" or "false" -->
|
19
|
+
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
|
20
|
+
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
|
21
|
+
<fieldtype name="binary" class="solr.BinaryField"/>
|
22
|
+
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
23
|
+
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
24
|
+
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
25
|
+
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
|
26
|
+
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
27
|
+
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
28
|
+
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
29
|
+
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
|
30
|
+
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
|
31
|
+
|
32
|
+
<!-- A Trie based date field for faster date range queries and date faceting. -->
|
33
|
+
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
|
34
|
+
<fieldType name="pint" class="solr.IntField" omitNorms="true"/>
|
35
|
+
<fieldType name="plong" class="solr.LongField" omitNorms="true"/>
|
36
|
+
<fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
|
37
|
+
<fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
|
38
|
+
<fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
|
39
|
+
|
40
|
+
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
|
41
|
+
<fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
|
42
|
+
<fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
|
43
|
+
<fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
|
44
|
+
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
|
45
|
+
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
|
46
|
+
<analyzer>
|
47
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
48
|
+
</analyzer>
|
49
|
+
</fieldType>
|
50
|
+
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
51
|
+
<analyzer type="index">
|
52
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
53
|
+
<filter class="solr.StopFilterFactory"
|
54
|
+
ignoreCase="true"
|
55
|
+
words="stopwords.txt"
|
56
|
+
enablePositionIncrements="true"
|
57
|
+
/>
|
58
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
|
59
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
60
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
61
|
+
</analyzer>
|
62
|
+
<analyzer type="query">
|
63
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
64
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
65
|
+
<filter class="solr.StopFilterFactory"
|
66
|
+
ignoreCase="true"
|
67
|
+
words="stopwords.txt"
|
68
|
+
enablePositionIncrements="true"
|
69
|
+
/>
|
70
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
|
71
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
72
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
73
|
+
</analyzer>
|
74
|
+
</fieldType>
|
75
|
+
<fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
|
76
|
+
<analyzer>
|
77
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
78
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
|
79
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
80
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
81
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
82
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
83
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
84
|
+
</analyzer>
|
85
|
+
</fieldType>
|
86
|
+
<fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">
|
87
|
+
<analyzer type="index">
|
88
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
89
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
|
90
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
|
91
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
92
|
+
</analyzer>
|
93
|
+
<analyzer type="query">
|
94
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
95
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
96
|
+
<filter class="solr.StopFilterFactory"
|
97
|
+
ignoreCase="true"
|
98
|
+
words="stopwords.txt"
|
99
|
+
enablePositionIncrements="true"
|
100
|
+
/>
|
101
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
|
102
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
103
|
+
</analyzer>
|
104
|
+
</fieldType>
|
105
|
+
<fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
|
106
|
+
<analyzer type="index">
|
107
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
108
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
|
109
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
|
110
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
111
|
+
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
|
112
|
+
maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
|
113
|
+
</analyzer>
|
114
|
+
<analyzer type="query">
|
115
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
116
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
117
|
+
<filter class="solr.StopFilterFactory"
|
118
|
+
ignoreCase="true"
|
119
|
+
words="stopwords.txt"
|
120
|
+
enablePositionIncrements="true"
|
121
|
+
/>
|
122
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
|
123
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
124
|
+
</analyzer>
|
125
|
+
</fieldType>
|
126
|
+
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
|
127
|
+
<analyzer>
|
128
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
129
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
130
|
+
<filter class="solr.TrimFilterFactory" />
|
131
|
+
<filter class="solr.PatternReplaceFilterFactory"
|
132
|
+
pattern="([^a-z])" replacement="" replace="all"
|
133
|
+
/>
|
134
|
+
</analyzer>
|
135
|
+
</fieldType>
|
136
|
+
|
137
|
+
<fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
|
138
|
+
<analyzer>
|
139
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
140
|
+
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
|
141
|
+
</analyzer>
|
142
|
+
</fieldtype>
|
143
|
+
|
144
|
+
<fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
|
145
|
+
<analyzer>
|
146
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
147
|
+
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
|
148
|
+
</analyzer>
|
149
|
+
</fieldtype>
|
150
|
+
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
|
151
|
+
<analyzer>
|
152
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
153
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
154
|
+
</analyzer>
|
155
|
+
</fieldType>
|
156
|
+
<fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
|
157
|
+
</types>
|
158
|
+
<fields>
|
159
|
+
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
160
|
+
<field name="sku" type="textTight" indexed="true" stored="true" omitNorms="true"/>
|
161
|
+
<field name="name" type="textgen" indexed="true" stored="true"/>
|
162
|
+
<field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>
|
163
|
+
<field name="manu" type="textgen" indexed="true" stored="true" omitNorms="true"/>
|
164
|
+
<field name="cat" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />
|
165
|
+
<field name="features" type="text" indexed="true" stored="true" multiValued="true"/>
|
166
|
+
<field name="includes" type="text" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
|
167
|
+
<field name="weight" type="float" indexed="true" stored="true"/>
|
168
|
+
<field name="price" type="float" indexed="true" stored="true"/>
|
169
|
+
<field name="popularity" type="int" indexed="true" stored="true" />
|
170
|
+
<field name="inStock" type="boolean" indexed="true" stored="true" />
|
171
|
+
<field name="title" type="text" indexed="true" stored="true" multiValued="true"/>
|
172
|
+
<field name="subject" type="text" indexed="true" stored="true"/>
|
173
|
+
<field name="description" type="text" indexed="true" stored="true"/>
|
174
|
+
<field name="comments" type="text" indexed="true" stored="true"/>
|
175
|
+
<field name="author" type="textgen" indexed="true" stored="true"/>
|
176
|
+
<field name="keywords" type="textgen" indexed="true" stored="true"/>
|
177
|
+
<field name="category" type="textgen" indexed="true" stored="true"/>
|
178
|
+
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
|
179
|
+
<field name="last_modified" type="date" indexed="true" stored="true"/>
|
180
|
+
<field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
|
181
|
+
|
182
|
+
<field name="body" type="text" indexed="true" stored="true" multiValued="true"/>
|
183
|
+
<field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
|
184
|
+
<field name="text_rev" type="text_rev" indexed="true" stored="false" multiValued="true"/>
|
185
|
+
<field name="manu_exact" type="string" indexed="true" stored="false"/>
|
186
|
+
<field name="payloads" type="payloads" indexed="true" stored="true"/>
|
187
|
+
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
|
188
|
+
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
|
189
|
+
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
|
190
|
+
<dynamicField name="*_t" type="text" indexed="true" stored="true"/>
|
191
|
+
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
|
192
|
+
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
|
193
|
+
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
|
194
|
+
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
|
195
|
+
|
196
|
+
<!-- some trie-coded dynamic fields for faster range queries -->
|
197
|
+
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
|
198
|
+
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
|
199
|
+
<dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
|
200
|
+
<dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
|
201
|
+
<dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
|
202
|
+
|
203
|
+
<dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
|
204
|
+
|
205
|
+
<dynamicField name="ignored_*" type="ignored" multiValued="true"/>
|
206
|
+
<dynamicField name="attr_*" type="textgen" indexed="true" stored="true" multiValued="true"/>
|
207
|
+
|
208
|
+
<dynamicField name="random_*" type="random" />
|
209
|
+
</fields>
|
210
|
+
<uniqueKey>id</uniqueKey>
|
211
|
+
<defaultSearchField>text</defaultSearchField>
|
212
|
+
<solrQueryParser defaultOperator="OR"/>
|
213
|
+
<copyField source="cat" dest="text"/>
|
214
|
+
<copyField source="name" dest="text"/>
|
215
|
+
<copyField source="manu" dest="text"/>
|
216
|
+
<copyField source="features" dest="text"/>
|
217
|
+
<copyField source="includes" dest="text"/>
|
218
|
+
<copyField source="manu" dest="manu_exact"/>
|
219
|
+
<copyField source="body" dest="text"/>
|
220
|
+
</schema>
|
data/config/deploy.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#========================
|
2
|
+
#CONFIG
|
3
|
+
#========================
|
4
|
+
set :application, "searcher"
|
5
|
+
|
6
|
+
set :scm, :git
|
7
|
+
set :git_enable_submodules, 1
|
8
|
+
set :repository, "ft_git3@spicevan.com:beta_tools.git"
|
9
|
+
set :branch, "master"
|
10
|
+
set :ssh_options, { :forward_agent => true }
|
11
|
+
|
12
|
+
set :stage, :production
|
13
|
+
set :user, "docs"
|
14
|
+
set :use_sudo, false
|
15
|
+
set :runner, "docs"
|
16
|
+
set :deploy_to, "/data/apps/#{stage}/#{application}"
|
17
|
+
set :app_server, :passenger
|
18
|
+
set :domain, "searcher"
|
19
|
+
|
20
|
+
#========================
|
21
|
+
#ROLES
|
22
|
+
#========================
|
23
|
+
role :app, domain
|
24
|
+
role :web, domain
|
25
|
+
role :db, domain, :primary => true
|
26
|
+
|
27
|
+
#========================
|
28
|
+
#CUSTOM
|
29
|
+
#========================
|
30
|
+
|
31
|
+
namespace :deploy do
|
32
|
+
task :start, :roles => :app do
|
33
|
+
run "touch #{current_release}/tmp/restart.txt"
|
34
|
+
end
|
35
|
+
|
36
|
+
task :stop, :roles => :app do
|
37
|
+
# Do nothing.
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "Restart Application"
|
41
|
+
task :restart, :roles => :app do
|
42
|
+
run "touch #{current_release}/tmp/restart.txt"
|
43
|
+
end
|
44
|
+
end
|
data/config.ru
ADDED
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Feature: Deployment
|
2
|
+
In order to easily deploy artifacts to their servers
|
3
|
+
As the jenkins build server
|
4
|
+
I want to be able to deploy all artifacts that I build
|
5
|
+
|
6
|
+
Scenario: Deploy assembly artifact
|
7
|
+
Given I have built the assembly jar
|
8
|
+
When I press execute deploy
|
9
|
+
Then the artifact should get deployed
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: GIT Repo Info
|
2
|
+
In order to deploy maven artifacts
|
3
|
+
As the jenkins build server
|
4
|
+
I need to know details about the constructed artifacts
|
5
|
+
|
6
|
+
Scenario Outline: There are no uncommitted changes in the current project
|
7
|
+
Given the git repo: "<git repo directory>"
|
8
|
+
Given there are no uncommitted changes in that directory
|
9
|
+
When I ask if there are any uncommitted changes
|
10
|
+
Then the program should return "<output>"
|
11
|
+
|
12
|
+
Examples:
|
13
|
+
| git repo directory | output |
|
14
|
+
| /tmp/git_repo_no_uncommitted | true |
|
15
|
+
| /tmp/git_repo_uncommitted | false |
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Feature: Maven
|
2
|
+
In order to deploy maven artifacts
|
3
|
+
As the jenkins build server
|
4
|
+
I need to know details about the constructed artifact
|
5
|
+
|
6
|
+
Scenario: I get the correct artifact name for an assembly project
|
7
|
+
Given I have an assembly pom.xml
|
8
|
+
Given that the assembly jar is built
|
9
|
+
When I ask for the artifact name
|
10
|
+
Then I should return the name of the assembly jar
|
11
|
+
|
12
|
+
Scenario Outline: I get the correct artifact name for an assembly project and a regular project
|
13
|
+
Given I have an "<input pom>"
|
14
|
+
Given its artifact "<artifact>" is built
|
15
|
+
When I ask for the artifact name
|
16
|
+
Then I should return the name of the "<artifact>"
|
17
|
+
|
18
|
+
Examples:
|
19
|
+
| input pom | artifact |
|
20
|
+
| CRMOD_WS_Wriassembly_pom.xml | hrmsToCrmodUserDataIntegration-jar-with-dependencies.jar |
|
21
|
+
| autosr2_ear_pom.xml | autoSR2-EAR.ear |
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given /^I have built the assembly jar$/ do
|
2
|
+
pending # express the regexp above with the code you wish you had
|
3
|
+
end
|
4
|
+
|
5
|
+
When /^I press execute deploy$/ do
|
6
|
+
pending # express the regexp above with the code you wish you had
|
7
|
+
end
|
8
|
+
|
9
|
+
Then /^the artifact should get deployed$/ do
|
10
|
+
pending # express the regexp above with the code you wish you had
|
11
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Before do
|
2
|
+
@git = Git.new
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^the git repo: "([^"]*)"$/ do |arg1|
|
6
|
+
pending # express the regexp above with the code you wish you had
|
7
|
+
end
|
8
|
+
|
9
|
+
Given /^there are no uncommitted changes in that directory$/ do
|
10
|
+
pending # express the regexp above with the code you wish you had
|
11
|
+
end
|
12
|
+
|
13
|
+
When /^I ask if there are any uncommitted changes$/ do
|
14
|
+
pending # express the regexp above with the code you wish you had
|
15
|
+
end
|
16
|
+
|
17
|
+
Then /^the program should return "([^"]*)"$/ do |arg1|
|
18
|
+
pending # express the regexp above with the code you wish you had
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Given /^I have an assembly pom\.xml$/ do
|
2
|
+
maven = Maven.new "testdata/assembly_pom.xml"
|
3
|
+
maven.ops[:artifact_type].should == "assembly"
|
4
|
+
end
|
5
|
+
|
6
|
+
Given /^that the assembly jar is built$/ do
|
7
|
+
pending # express the regexp above with the code you wish you had
|
8
|
+
end
|
9
|
+
|
10
|
+
Then /^I should return the name of the assembly jar$/ do
|
11
|
+
pending # express the regexp above with the code you wish you had
|
12
|
+
end
|
13
|
+
|
14
|
+
#------------------------------------------------------
|
15
|
+
|
16
|
+
When /^I ask for the artifact name$/ do
|
17
|
+
# @maven.ops[:artifact_name].should == "abc"
|
18
|
+
end
|
19
|
+
|
20
|
+
Then /^I should get the name of the artifact$/ do
|
21
|
+
pending # express the regexp above with the code you wish you had
|
22
|
+
end
|
23
|
+
|
24
|
+
Given /^I have an "([^"]*)"$/ do |arg1|
|
25
|
+
@maven.ops[:deploy_artifact_type].should == "assembly"
|
26
|
+
end
|
27
|
+
|
28
|
+
Given /^its artifact "([^"]*)" is built$/ do |arg1|
|
29
|
+
pending # express the regexp above with the code you wish you had
|
30
|
+
end
|
31
|
+
|
32
|
+
Then /^I should return the name of the "([^"]*)"$/ do |arg1|
|
33
|
+
pending # express the regexp above with the code you wish you had
|
34
|
+
end
|
35
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require_relative '../../lib/it_tools/calc'
|
2
|
+
require_relative '../../lib/it_tools/deploy'
|
3
|
+
require_relative '../../lib/it_tools/maven'
|
4
|
+
require_relative '../../lib/it_tools/environment'
|
5
|
+
require_relative '../../lib/it_tools/options'
|
6
|
+
require_relative '../../lib/it_tools/git'
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require_relative "../../../it_tools/lib/it_tools/solr.rb"
|
3
|
+
require_relative "../../lib/it_tools/html_publish.rb"
|
4
|
+
|
5
|
+
class TestInteg1 < Test::Unit::TestCase
|
6
|
+
def test_convert_upload
|
7
|
+
converter = Website::MarkdownConverter.new
|
8
|
+
file = "ruby"
|
9
|
+
input = file + ".mmd"
|
10
|
+
output = file + ".html"
|
11
|
+
contents = File.open("testdata/" + input).read
|
12
|
+
converted = converter.convert_markdown_contents contents
|
13
|
+
solr_url = "http://127.0.0.1:8983/solr/"
|
14
|
+
uploader = Solr::Upload.new(:solr_base_url => solr_url )
|
15
|
+
uploader.upload_file(output, converted, output)
|
16
|
+
end
|
17
|
+
end
|