llt 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 604ec9b36e98e069903541a98acf14696dac8fd0
4
- data.tar.gz: e831fa21d882c0e9b6cfc8dc4445aaa8410d6267
3
+ metadata.gz: 62710f0c89880ccd7ea5906dc3c553dd85ff2dfb
4
+ data.tar.gz: 65320e4fe2d42a0c6391f5f7566807c70d143029
5
5
  SHA512:
6
- metadata.gz: 9f5f687c5a7f8e7b9ead461bf727d5330c39a894ad390459ecb0af9e7ed390bb040be8289024cc20fe2bfcab767221eeaccee7776a823657bdd57ab404915e91
7
- data.tar.gz: f5a2e4c97a04f11651874046a7688707b03ce4529bcde4f254978ffdc83d86d6d94a4b45140d4cbe9e4e5af5f94c92adddde4de073a1cd1b4221bb81003129d9
6
+ metadata.gz: dec6e021f7f3369ac6b2cfc17401516c5616aff0b69fab2f1a6dc6370505a047bed998bf9d987fb190987419538d6cb574efb4650cd62d393e1486fb2e6531ff
7
+ data.tar.gz: 62b2d5ef2a0f21e553427618c19c48af2b0c4b6b2c80d918117e987444d8e8206db188b034c3d868137d8aec0088af446d8e248fc13e88291322702a7bceb9d7
@@ -12,11 +12,14 @@ module LLT
12
12
  desc: 'path to Tomcat directory to copy the war file to'
13
13
  method_option :restart_server, type: :boolean, aliases: '-r',
14
14
  desc: 'Works only when -t is given'
15
+ method_option :seed, aliases: '-s',
16
+ desc: 'Reseeds the prometheus stem database'
15
17
  def deploy
16
18
  inside BASE_DIR do
17
19
  update_gems(llt_gems)
18
20
  run_warbler
19
21
  deploy_to_tomcat(options)
22
+ reseed_prometheus_stems(options)
20
23
  end
21
24
  end
22
25
 
@@ -55,6 +58,13 @@ module LLT
55
58
  system("#{bin_dir}/shutdown.sh")
56
59
  system("#{bin_dir}/startup.sh")
57
60
  end
61
+
62
+ def reseed_prometheus_stems(options)
63
+ if options[:seed]
64
+ say_status(:seeding, 'Prometheus stem database')
65
+ system('rake db:prometheus:seed')
66
+ end
67
+ end
58
68
  end
59
69
  end
60
70
  end
@@ -1,3 +1,3 @@
1
1
  module LLT
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -60,6 +60,36 @@ describe "main api" do
60
60
  body.should =~ /<w s_n="2" n="2">est<\/w>/
61
61
  body.should =~ /<pc s_n="2" n="3">\.<\/pc>/
62
62
  end
63
+
64
+ it "doesn't break with complex embedded xml elements" do
65
+ txt = { text: 'Arma <l no="1.1"> virumque cano. Troiae </l> qui primus.' }
66
+ params = {
67
+ indexing: true,
68
+ recursive: true,
69
+ inline: true,
70
+ xml: true,
71
+ }.merge(txt)
72
+
73
+ get '/segtok', params,
74
+ {"HTTP_ACCEPT" => "application/xml"}
75
+ last_response.should be_ok
76
+ body = last_response.body
77
+ elements = [
78
+ '<w s_n="1" n="1">Arma</w>',
79
+ '<l no="1.1">',
80
+ '<w s_n="1" n="2">-que</w>',
81
+ '<w s_n="1" n="3">virum</w>',
82
+ '<w s_n="1" n="4">cano</w>',
83
+ '<pc s_n="1" n="5">.</pc>',
84
+ '<w s_n="2" n="1">Troiae</w>',
85
+ '</l>',
86
+ '<w s_n="2" n="2">qui</w>',
87
+ '<w s_n="2" n="3">primus</w>',
88
+ '<pc s_n="2" n="4">.</pc>'
89
+ ]
90
+
91
+ body.should =~ /#{elements.join}/
92
+ end
63
93
  end
64
94
  end
65
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - LFDM, christof, lichtr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-28 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler