moneypools-rake_helpers 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rake_helpers/rsl_manager.rb +10 -0
- data/lib/rake_helpers/tasks/rsl.rb +23 -0
- data/lib/rake_helpers/tasks/trust.rb +14 -0
- data/lib/rake_helpers/trust_manager.rb +28 -0
- metadata +6 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rake_helpers/rsl_manager'
|
2
|
+
|
3
|
+
class RSLCopyTask < Rake::Task
|
4
|
+
attr_accessor :source_dir, :output_dir, :rsls
|
5
|
+
|
6
|
+
def execute(*args)
|
7
|
+
super
|
8
|
+
do_copy
|
9
|
+
end
|
10
|
+
|
11
|
+
def do_copy
|
12
|
+
if defined?(flex_config)
|
13
|
+
self.source_dir ||= flex_config.flex_sdk_path
|
14
|
+
self.output_dir ||= File.join(flex_config.swf_output_path, 'rsls')
|
15
|
+
end
|
16
|
+
|
17
|
+
rsls ||= %w(framework_3.4.0.9271.swz
|
18
|
+
framework_3.4.0.9271.swf
|
19
|
+
datavisualization_3.4.0.9271.swz
|
20
|
+
datavisualization_3.4.0.9271.swf)
|
21
|
+
RSLManager.new.copy_rsls(source_dir, output_dir, *rsls)
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rake_helpers/trust_manager'
|
2
|
+
|
3
|
+
class AddTrustPathsTask < Rake::Task
|
4
|
+
attr_accessor :trusted_paths, :trust_name
|
5
|
+
|
6
|
+
def execute(*args)
|
7
|
+
super
|
8
|
+
do_enable_trust
|
9
|
+
end
|
10
|
+
|
11
|
+
def do_enable_trust
|
12
|
+
TrustManager.new.add_to_trust(trust_name, *trusted_paths)
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class TrustManager
|
2
|
+
def add_to_trust(name, *dirs)
|
3
|
+
FileUtils.mkdir_p trust_dir
|
4
|
+
File.open(File.join(trust_dir, name), 'w') do |file|
|
5
|
+
dirs = dirs.map { |dir| File.expand_path(dir) }
|
6
|
+
file.puts(dirs.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
# based on http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide/flash_player_admin_guide.pdf
|
12
|
+
# around page 83
|
13
|
+
def trust_dir
|
14
|
+
if PLATFORM =~ /(mswin)|(mingw)/
|
15
|
+
# vista
|
16
|
+
# "C:\Users\username\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust"
|
17
|
+
|
18
|
+
# windows 2000 & XP
|
19
|
+
File.join(ENV['HOME'], 'Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust')
|
20
|
+
elsif PLATFORM =~ /darwin/
|
21
|
+
File.join(ENV['HOME'], 'Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust')
|
22
|
+
elsif PLATFORM =~ /linux/
|
23
|
+
File.join(ENV['HOME'], '.macromedia/#Security/FlashPlayerTrust')
|
24
|
+
else
|
25
|
+
raise "Unsupported platform #{PLATFORM}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneypools-rake_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moneypools
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-24 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -30,7 +30,11 @@ files:
|
|
30
30
|
- lib/rake_helpers/build_info.rb
|
31
31
|
- lib/rake_helpers/config.rb
|
32
32
|
- lib/rake_helpers/erb_helper.rb
|
33
|
+
- lib/rake_helpers/rsl_manager.rb
|
33
34
|
- lib/rake_helpers/tasks/build_info_task.rb
|
35
|
+
- lib/rake_helpers/tasks/rsl.rb
|
36
|
+
- lib/rake_helpers/tasks/trust.rb
|
37
|
+
- lib/rake_helpers/trust_manager.rb
|
34
38
|
has_rdoc: true
|
35
39
|
homepage: http://github.com/moneypools/rake_helpers
|
36
40
|
licenses: []
|