flashplayer 9.115.0 → 10.1.1.pre
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.
- data/Gemfile +9 -0
- data/VERSION +1 -0
- data/flashplayer.gemspec +22 -0
- data/lib/flashplayer.rb +13 -0
- data/lib/flashplayer/clix_flash_player.rb +92 -0
- data/lib/flashplayer/clix_wrapper.rb +22 -0
- data/lib/flashplayer/errors.rb +12 -0
- data/lib/flashplayer/log_file.rb +79 -0
- data/lib/flashplayer/mm_config.rb +88 -0
- data/lib/flashplayer/module.rb +52 -0
- data/lib/flashplayer/specification.rb +31 -0
- data/lib/flashplayer/task.rb +408 -0
- data/lib/flashplayer/trust.rb +44 -0
- data/rakefile.rb +20 -0
- data/test/fixtures/AsUnit4.swf +0 -0
- data/test/unit/flashplayer_test.rb +56 -0
- data/test/unit/log_file_test.rb +36 -0
- data/test/unit/mm_config_test.rb +47 -0
- data/test/unit/task_test.rb +36 -0
- data/test/unit/test_helper.rb +16 -0
- data/test/unit/trust_test.rb +31 -0
- metadata +118 -52
- data/LICENSE +0 -83
- data/bin/flashplayer +0 -11
- data/lib/sprout.spec +0 -20
- data/lib/sprout/flash_player/version.rb +0 -12
@@ -0,0 +1,44 @@
|
|
1
|
+
|
2
|
+
module FlashPlayer
|
3
|
+
|
4
|
+
class Trust
|
5
|
+
|
6
|
+
attr_accessor :logger
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@logger = $stdout
|
10
|
+
end
|
11
|
+
|
12
|
+
def add path
|
13
|
+
file = trust_file
|
14
|
+
create(file) unless File.exists?(file)
|
15
|
+
update_if_necessary file, path
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def create file
|
21
|
+
FileUtils.makedirs File.dirname(file)
|
22
|
+
FileUtils.touch file
|
23
|
+
end
|
24
|
+
|
25
|
+
def update_if_necessary file, path
|
26
|
+
path = File.expand_path path
|
27
|
+
if(!has_path?(file, path))
|
28
|
+
File.open(file, 'a') do |f|
|
29
|
+
f.puts path
|
30
|
+
end
|
31
|
+
logger.puts ">> Added #{path} to Flash Player Trust file at: #{file}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def has_path? file, path
|
36
|
+
!File.read(file).index(path).nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
def trust_file
|
40
|
+
FlashPlayer.trust
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
data/rakefile.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
|
4
|
+
Bundler.setup
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/clean'
|
8
|
+
require 'rake/testtask'
|
9
|
+
|
10
|
+
namespace :test do
|
11
|
+
|
12
|
+
Rake::TestTask.new(:units) do |t|
|
13
|
+
t.libs << "test/unit"
|
14
|
+
t.test_files = FileList["test/unit/*_test.rb"]
|
15
|
+
t.verbose = true
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
task :test => 'test:units'
|
Binary file
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class FlashPlayerTest < Test::Unit::TestCase
|
4
|
+
include SproutTestCase
|
5
|
+
|
6
|
+
context "The FlashPlayer module" do
|
7
|
+
|
8
|
+
context "should find home" do
|
9
|
+
|
10
|
+
setup do
|
11
|
+
@fixture = File.join(fixtures, 'home')
|
12
|
+
|
13
|
+
@osx_home1 = File.join(@fixture, 'Preferences', 'Macromedia', 'Flash Player')
|
14
|
+
@osx_home2 = File.join(@fixture, 'Application Support', 'Macromedia')
|
15
|
+
@win_home1 = File.join(@fixture, 'Application Data', 'Macromedia', 'Flash Player')
|
16
|
+
@win_home2 = File.join(@fixture, 'AppData', 'Roaming', 'Macromedia', 'Flash Player')
|
17
|
+
@nix_home1 = File.join(@fixture, '.macromedia', 'Flash_Player')
|
18
|
+
|
19
|
+
# Ensure the looks in our Fixtures folder instead of system:
|
20
|
+
FlashPlayer.stubs(:system_library).returns @fixture
|
21
|
+
FlashPlayer.stubs(:system_home).returns @fixture
|
22
|
+
end
|
23
|
+
|
24
|
+
teardown do
|
25
|
+
remove_file File.join(@fixture)
|
26
|
+
end
|
27
|
+
|
28
|
+
should "find home on osx" do
|
29
|
+
FileUtils.mkdir_p @osx_home1
|
30
|
+
assert_equal @osx_home1, FlashPlayer.home
|
31
|
+
end
|
32
|
+
|
33
|
+
should "find home on osx 2" do
|
34
|
+
FileUtils.mkdir_p @osx_home2
|
35
|
+
assert_equal @osx_home2, FlashPlayer.home
|
36
|
+
end
|
37
|
+
|
38
|
+
should "find home on win 1" do
|
39
|
+
FileUtils.mkdir_p @win_home1
|
40
|
+
assert_equal @win_home1, FlashPlayer.home
|
41
|
+
end
|
42
|
+
|
43
|
+
should "find home on win 2" do
|
44
|
+
FileUtils.mkdir_p @win_home2
|
45
|
+
assert_equal @win_home2, FlashPlayer.home
|
46
|
+
end
|
47
|
+
|
48
|
+
should "find home on nix 1" do
|
49
|
+
FileUtils.mkdir_p @nix_home1
|
50
|
+
assert_equal @nix_home1, FlashPlayer.home
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class LogFileTest < Test::Unit::TestCase
|
4
|
+
include SproutTestCase
|
5
|
+
|
6
|
+
context "A LogFile" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@logger = StringIO.new
|
10
|
+
@flashlog = File.join(fixtures, 'flashlog.txt')
|
11
|
+
@reader = FlashPlayer::LogFile.new
|
12
|
+
@reader.logger = @logger
|
13
|
+
@reader.stubs(:flashlog_path).returns @flashlog
|
14
|
+
|
15
|
+
FileUtils.touch @flashlog
|
16
|
+
end
|
17
|
+
|
18
|
+
teardown do
|
19
|
+
remove_file @flashlog
|
20
|
+
end
|
21
|
+
|
22
|
+
should "read until killed" do
|
23
|
+
|
24
|
+
blocked = true
|
25
|
+
t = Thread.new {
|
26
|
+
@reader.tail
|
27
|
+
blocked = false
|
28
|
+
}
|
29
|
+
|
30
|
+
assert blocked
|
31
|
+
t.kill
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class MMConfigTest < Test::Unit::TestCase
|
4
|
+
include SproutTestCase
|
5
|
+
|
6
|
+
context "An MMConfig" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@fixture = File.join(fixtures, 'home')
|
10
|
+
@osx_fp9 = File.join(@fixture, 'Application Support', 'Macromedia')
|
11
|
+
|
12
|
+
FileUtils.mkdir_p @fixture
|
13
|
+
FlashPlayer::MMConfig.any_instance.stubs(:user_confirmation?).returns true
|
14
|
+
|
15
|
+
@mm_config = FlashPlayer::MMConfig.new
|
16
|
+
@mm_config.logger = StringIO.new
|
17
|
+
end
|
18
|
+
|
19
|
+
teardown do
|
20
|
+
remove_file @fixture
|
21
|
+
end
|
22
|
+
|
23
|
+
should "create a config file on OS X with FP 9" do
|
24
|
+
FileUtils.mkdir_p @osx_fp9
|
25
|
+
|
26
|
+
@mm_config.stubs(:system_library).returns @fixture
|
27
|
+
@mm_config.stubs(:flashplayer_home).returns @osx_fp9
|
28
|
+
@mm_config.create
|
29
|
+
|
30
|
+
assert_file File.join(@osx_fp9, mm_config_file)
|
31
|
+
end
|
32
|
+
|
33
|
+
should "create a config file on OS X with FP 10+" do
|
34
|
+
@mm_config.stubs(:system_home).returns @fixture
|
35
|
+
@mm_config.create
|
36
|
+
|
37
|
+
assert_file File.join(@fixture, mm_config_file)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def mm_config_file
|
44
|
+
FlashPlayer::MMConfig::FILE_NAME
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class FlashPlayerTaskTest < Test::Unit::TestCase
|
4
|
+
include SproutTestCase
|
5
|
+
|
6
|
+
context "A FlashPlayerTask" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@swf = File.join(fixtures, 'AsUnit4.swf')
|
10
|
+
end
|
11
|
+
|
12
|
+
should "attempt to launch the Flash Player" do
|
13
|
+
sys = FakeSystem.new
|
14
|
+
|
15
|
+
@task = FlashPlayer::Task.new
|
16
|
+
@task.logger = StringIO.new
|
17
|
+
|
18
|
+
# Comment following lines to really launch the player:
|
19
|
+
@task.stubs(:current_system).returns sys
|
20
|
+
sys.expects(:open_flashplayer_with)
|
21
|
+
|
22
|
+
@task.execute @swf
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class FakeSystem
|
28
|
+
|
29
|
+
def clean_path path
|
30
|
+
path
|
31
|
+
end
|
32
|
+
|
33
|
+
def open_flashplayer_with player, swf
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
|
4
|
+
Bundler.setup :default, :development
|
5
|
+
|
6
|
+
# These require statments *must* be in this order:
|
7
|
+
# http://bit.ly/bCC0Ew
|
8
|
+
# Somewhat surprised they're not being required by Bundler...
|
9
|
+
require 'shoulda'
|
10
|
+
require 'mocha'
|
11
|
+
require 'test/unit'
|
12
|
+
|
13
|
+
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'flashplayer')
|
14
|
+
$:.unshift File.dirname(__FILE__)
|
15
|
+
|
16
|
+
require 'sprout/test/sprout_test_case'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
+
|
3
|
+
class TrustTest < Test::Unit::TestCase
|
4
|
+
include SproutTestCase
|
5
|
+
|
6
|
+
context "A Trust instance" do
|
7
|
+
|
8
|
+
setup do
|
9
|
+
@fixture = File.join fixtures, 'trust'
|
10
|
+
@file = File.join @fixture, 'trust.cfg'
|
11
|
+
@project = File.join fixtures, 'SomeProject'
|
12
|
+
|
13
|
+
@trust = FlashPlayer::Trust.new
|
14
|
+
@trust.logger = StringIO.new
|
15
|
+
@trust.stubs(:trust_file).returns @file
|
16
|
+
end
|
17
|
+
|
18
|
+
teardown do
|
19
|
+
remove_file @fixture
|
20
|
+
end
|
21
|
+
|
22
|
+
should "create and update trust config with provided path" do
|
23
|
+
@trust.add @project
|
24
|
+
|
25
|
+
assert_file @file do |content|
|
26
|
+
assert_matches File.expand_path(@project), content
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
metadata
CHANGED
@@ -1,68 +1,134 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: flashplayer
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
description:
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: false
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
hash: 961916136
|
5
|
+
prerelease: true
|
6
|
+
segments:
|
7
|
+
- 10
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
- pre
|
11
|
+
version: 10.1.1.pre
|
25
12
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
13
|
authors:
|
30
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
- lib/sprout/flash_player
|
35
|
-
- lib/sprout/flash_player/version.rb
|
36
|
-
- lib/sprout.spec
|
37
|
-
- LICENSE
|
38
|
-
test_files: []
|
39
|
-
|
40
|
-
rdoc_options: []
|
41
|
-
|
42
|
-
extra_rdoc_files: []
|
43
|
-
|
44
|
-
executables:
|
45
|
-
- flashplayer
|
46
|
-
extensions: []
|
47
|
-
|
48
|
-
requirements: []
|
14
|
+
- Luke Bayes
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
49
18
|
|
19
|
+
date: 2010-06-24 00:00:00 -07:00
|
20
|
+
default_executable:
|
50
21
|
dependencies:
|
51
22
|
- !ruby/object:Gem::Dependency
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 961915932
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
- pre
|
33
|
+
version: 1.0.pre
|
34
|
+
requirement: *id001
|
52
35
|
name: sprout
|
53
|
-
|
54
|
-
|
36
|
+
prerelease: false
|
37
|
+
type: :runtime
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
55
41
|
requirements:
|
56
42
|
- - ">="
|
57
43
|
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
requirement: *id002
|
49
|
+
name: shoulda
|
50
|
+
prerelease: false
|
51
|
+
type: :development
|
60
52
|
- !ruby/object:Gem::Dependency
|
61
|
-
|
62
|
-
|
63
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
64
55
|
requirements:
|
65
56
|
- - ">="
|
66
57
|
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
requirement: *id003
|
63
|
+
name: mocha
|
64
|
+
prerelease: false
|
65
|
+
type: :development
|
66
|
+
description: The Adobe Flash Player
|
67
|
+
email: projectsprouts@googlegroups.com
|
68
|
+
executables: []
|
69
|
+
|
70
|
+
extensions: []
|
71
|
+
|
72
|
+
extra_rdoc_files: []
|
73
|
+
|
74
|
+
files:
|
75
|
+
- flashplayer.gemspec
|
76
|
+
- Gemfile
|
77
|
+
- lib/flashplayer/clix_flash_player.rb
|
78
|
+
- lib/flashplayer/clix_wrapper.rb
|
79
|
+
- lib/flashplayer/errors.rb
|
80
|
+
- lib/flashplayer/log_file.rb
|
81
|
+
- lib/flashplayer/mm_config.rb
|
82
|
+
- lib/flashplayer/module.rb
|
83
|
+
- lib/flashplayer/specification.rb
|
84
|
+
- lib/flashplayer/task.rb
|
85
|
+
- lib/flashplayer/trust.rb
|
86
|
+
- lib/flashplayer.rb
|
87
|
+
- rakefile.rb
|
88
|
+
- test/fixtures/AsUnit4.swf
|
89
|
+
- test/unit/flashplayer_test.rb
|
90
|
+
- test/unit/log_file_test.rb
|
91
|
+
- test/unit/mm_config_test.rb
|
92
|
+
- test/unit/task_test.rb
|
93
|
+
- test/unit/test_helper.rb
|
94
|
+
- test/unit/trust_test.rb
|
95
|
+
- VERSION
|
96
|
+
has_rdoc: true
|
97
|
+
homepage: http://www.adobe.com/products/flex
|
98
|
+
licenses: []
|
99
|
+
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options: []
|
102
|
+
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
- lib
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
version: "0"
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ">"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
hash: 25
|
121
|
+
segments:
|
122
|
+
- 1
|
123
|
+
- 3
|
124
|
+
- 1
|
125
|
+
version: 1.3.1
|
126
|
+
requirements: []
|
127
|
+
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 1.3.7
|
130
|
+
signing_key:
|
131
|
+
specification_version: 3
|
132
|
+
summary: Adobe Flash Player
|
133
|
+
test_files: []
|
134
|
+
|