svxbox 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +12 -4
- data/VERSION +1 -1
- data/lib/svxbox/lexicali.rb +17 -8
- data/lib/svxbox/sinatricus.rb +1 -1
- data/test/fixtures/sample_text.txt +1 -0
- data/test/svxbox_test.rb +7 -0
- metadata +4 -4
- data/test/fixtures/amazon_response.yaml +0 -2503
data/Rakefile
CHANGED
@@ -15,8 +15,8 @@ task :testroll => [:versioncheck, :gemspec]
|
|
15
15
|
task :rollgem => [:testroll, :buildgem, :pushgem]
|
16
16
|
|
17
17
|
task :versioncheck do
|
18
|
-
@nv = File.open('VERSION') {|f| f.read }
|
19
|
-
@ov = File.open('OLDVERSION') {|f| f.read }
|
18
|
+
@nv = File.open('VERSION') {|f| f.read }.chop
|
19
|
+
@ov = File.open('OLDVERSION') {|f| f.read }.chop
|
20
20
|
raise if @nv == @ov
|
21
21
|
end
|
22
22
|
|
@@ -25,9 +25,17 @@ task :buildgem do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
task :pushgem do
|
28
|
-
|
28
|
+
cmd = 'gem1.8 push svxbox-' << @nv + '.gem'
|
29
|
+
system(cmd)
|
29
30
|
system('cp VERSION OLDVERSION')
|
30
|
-
|
31
|
+
cmd = 'rm svxbox-' << @nv + '.gem'
|
32
|
+
system(cmd)
|
33
|
+
end
|
34
|
+
|
35
|
+
task :pushgem => [:versioncheck]
|
36
|
+
|
37
|
+
task :frankup do
|
38
|
+
system('ssh 192.168.8.103 "sudo gem1.9.1 install svxbox"')
|
31
39
|
end
|
32
40
|
|
33
41
|
begin
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/lib/svxbox/lexicali.rb
CHANGED
@@ -13,18 +13,27 @@ module SvxBox
|
|
13
13
|
# given a string, it create a hash of each word and the number of times
|
14
14
|
# each word occurs in the text
|
15
15
|
def svxwc(wstring)
|
16
|
+
return if wstring.nil?
|
16
17
|
h = Hash.new(0)
|
17
|
-
wstring.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
wstring.downcase!
|
19
|
+
wstring.gsub!(%q{'s },' ')
|
20
|
+
wstring.gsub!(/[^a-z0-9\-_\ \n\t]/,'')
|
21
|
+
wstring.gsub!(/\ [0-9]+\ /,' ')
|
22
|
+
warr = wstring.split
|
23
|
+
warr.delete_if { |w| ! ((3..14).to_a.include?(w.size)) || STOPWORDS.include?(w) || w.include?('&') }
|
24
|
+
warr.each do |w|
|
25
|
+
if w[-1] == 's'
|
26
|
+
w.chop! if warr.include?(w[0..-1])
|
24
27
|
end
|
28
|
+
h[w] += 1
|
25
29
|
end
|
26
30
|
hh = h.delete_if {|key, value| value < 2 }
|
27
|
-
|
31
|
+
relkeys = hh.sort {|a,b| b[1]<=>a[1]}
|
32
|
+
|
33
|
+
if relkeys.size > 0
|
34
|
+
return relkeys[0..1].map{ |key| key[0] }.join(' ')
|
35
|
+
end
|
36
|
+
return false
|
28
37
|
end
|
29
38
|
|
30
39
|
end
|
data/lib/svxbox/sinatricus.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
Embodiments of the present invention provide a method and apparatus for maintaining smooth video transition between distinct applications. Preferably, the apparatus implementing the present invention includes a processor, a secondary memory and a system memory. In providing a smooth transition between two applications, the apparatus and method provides synchronization of the video and graphics components while transitioning from a first application to a second application. If there is no video component in either application, no action is needed to provide a smooth transition between applications, and when only the first application includes a video component, the video component need only be tamed off for smooth transition between the applications to occur. When both the first application and the second application include video components, smooth transition between the applications according to the present invention is dependent upon the display window size of the first application in comparison to the second application. The apparatus and method of the present invention triggers a process according to the size of the display windows of the first and second applications.
|
data/test/svxbox_test.rb
CHANGED
@@ -18,6 +18,13 @@ class SvxBoxTest < Test::Unit::TestCase
|
|
18
18
|
assert result.include?('buy')
|
19
19
|
end
|
20
20
|
end
|
21
|
+
context "Lexicali" do
|
22
|
+
should "search_aaws return a simple array" do
|
23
|
+
sample_text = fixture_file('sample_text.txt')
|
24
|
+
search = svxwc(sample_text)
|
25
|
+
assert_equal search, "application video"
|
26
|
+
end
|
27
|
+
end
|
21
28
|
context "Sinatricus" do
|
22
29
|
should "put msg when in development mode" do
|
23
30
|
ENV['RACK_ENV'] = 'development'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 11
|
9
|
+
version: 0.0.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Albert Lash
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-03 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,7 @@ files:
|
|
51
51
|
- lib/svxbox/sinatricus.rb
|
52
52
|
- lib/svxbox/supabali.rb
|
53
53
|
- test/fixtures/amazon_response.xml
|
54
|
-
- test/fixtures/
|
54
|
+
- test/fixtures/sample_text.txt
|
55
55
|
- test/spec.opts
|
56
56
|
- test/spec_helper.rb
|
57
57
|
- test/svxbox_test.rb
|