sprout-flashplayer-bundle 10.22.0 → 10.22.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/clix_flash_player.rb +17 -5
- data/lib/clix_wrapper.rb +6 -8
- data/lib/sprout/flashplayer/version.rb +1 -1
- data/lib/sprout/tasks/flashplayer_task.rb +1 -1
- data/rakefile.rb +0 -4
- metadata +1 -11
data/lib/clix_flash_player.rb
CHANGED
@@ -28,12 +28,22 @@ class CLIXFlashPlayer
|
|
28
28
|
end
|
29
29
|
|
30
30
|
setup_trap
|
31
|
+
|
31
32
|
@thread = Thread.new {
|
32
33
|
@player_pid = open4.popen4("#{player.split(' ').join('\ ')}")[0]
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
begin
|
35
|
+
raise "clix_wrapper.rb could not be found at: #{wrapper}" if !File.exists?($CLIX_WRAPPER_TARGET)
|
36
|
+
command = "ruby #{$CLIX_WRAPPER_TARGET} '#{player}' '#{swf}'"
|
37
|
+
@activate_pid, stdin, stdout, stderr = open4.popen4(command)
|
38
|
+
puts stdout.read
|
39
|
+
error = stderr.read
|
40
|
+
raise error if !error.nil?
|
41
|
+
puts "after error"
|
42
|
+
# Process.wait(@player_pid)
|
43
|
+
rescue StandardError => e
|
44
|
+
kill
|
45
|
+
raise e
|
46
|
+
end
|
37
47
|
}
|
38
48
|
end
|
39
49
|
|
@@ -42,7 +52,9 @@ class CLIXFlashPlayer
|
|
42
52
|
end
|
43
53
|
|
44
54
|
def join
|
45
|
-
@thread.
|
55
|
+
if(@thread.alive?)
|
56
|
+
@thread.join
|
57
|
+
end
|
46
58
|
end
|
47
59
|
|
48
60
|
def alive?
|
data/lib/clix_wrapper.rb
CHANGED
@@ -1,24 +1,22 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
require 'rubygems'
|
3
|
-
require 'appscript'
|
4
3
|
|
5
4
|
player = ARGV[0]
|
6
5
|
swf = ARGV[1]
|
7
6
|
|
8
|
-
if(player.nil?)
|
9
|
-
|
10
|
-
end
|
7
|
+
raise "CLIXWrapper requires 'player' argument like:\nruby clix_wrapper [player] [swf]" if(player.nil?)
|
8
|
+
raise "CLIXWrapper could not find player at '#{player}'" if !File.exists?(player)
|
11
9
|
|
12
|
-
if(swf.nil?)
|
13
|
-
|
14
|
-
end
|
10
|
+
raise "CLIXWrapper requires 'swf' argument like:\nruby clix_wrapper [player] [swf]" if(swf.nil?)
|
11
|
+
raise "CLIXWrapper could not find swf at '#{swf}'" if !File.exists?(swf)
|
15
12
|
|
16
13
|
begin
|
14
|
+
require 'appscript'
|
17
15
|
# Give the player focus:
|
18
16
|
Appscript.app(player).activate
|
19
17
|
# Open the SWF:
|
20
18
|
Appscript.app(player).open(MacTypes::Alias.path(swf))
|
21
19
|
rescue LoadError => e
|
22
|
-
raise
|
20
|
+
raise "\n\n[ERROR] You must install the rb-appscript gem to use the desktop debug Flash Player, you do this by running:\n\nsudo gem install rb-appscript"
|
23
21
|
end
|
24
22
|
|
data/rakefile.rb
CHANGED
@@ -43,10 +43,6 @@ spec = Gem::Specification.new do |s|
|
|
43
43
|
|
44
44
|
s.add_dependency('sprout', '>= 0.7.189')
|
45
45
|
s.add_dependency('sprout-flashplayer-tool', '>= 10.22.0')
|
46
|
-
|
47
|
-
if RUBY_PLATFORM.match('darwin')
|
48
|
-
s.add_dependency('rb-appscript', '>= 0.5.1')
|
49
|
-
end
|
50
46
|
end
|
51
47
|
|
52
48
|
Rake::GemPackageTask.new(spec) do |p|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprout-flashplayer-bundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.22.
|
4
|
+
version: 10.22.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pattern Park
|
@@ -32,16 +32,6 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 10.22.0
|
34
34
|
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rb-appscript
|
37
|
-
type: :runtime
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 0.5.1
|
44
|
-
version:
|
45
35
|
description: Shared Project to support the Flash Player task
|
46
36
|
email: projectsprouts@googlegroups.com
|
47
37
|
executables: []
|