moneypools-sprouts-extensions 0.1.5 → 0.2.0
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/VERSION +1 -1
- metadata +2 -4
- data/lib/sprouts-extensions/rsl_manager.rb +0 -45
- data/lib/sprouts-extensions/tasks.rb +0 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneypools-sprouts-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richie Vos
|
@@ -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
|
|
@@ -28,8 +28,6 @@ files:
|
|
28
28
|
- Rakefile
|
29
29
|
- VERSION
|
30
30
|
- lib/sprouts-extensions.rb
|
31
|
-
- lib/sprouts-extensions/rsl_manager.rb
|
32
|
-
- lib/sprouts-extensions/tasks.rb
|
33
31
|
has_rdoc: true
|
34
32
|
homepage: http://github.com/moneypools/sprout-extensions
|
35
33
|
licenses: []
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
|
3
|
-
class RSLManager
|
4
|
-
include Singleton
|
5
|
-
|
6
|
-
attr_reader :source_dir, :output_dir
|
7
|
-
|
8
|
-
def load_params(params)
|
9
|
-
@source_dir, @output_dir = params.values_at(:source_dir, :output_dir)
|
10
|
-
@rsls, @trust_file_name = params.values_at(:rsls, :trust_file_name)
|
11
|
-
end
|
12
|
-
|
13
|
-
def copy_files
|
14
|
-
FileUtils.mkdir_p output_dir
|
15
|
-
@rsls.each do |rsl|
|
16
|
-
FileUtils.cp File.join(source_dir, 'frameworks/rsls', rsl), output_dir
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def add_output_to_trust_dirs
|
21
|
-
FileUtils.mkdir_p trust_dir
|
22
|
-
File.open(File.join(trust_dir, @trust_file_name), 'w') do |file|
|
23
|
-
file.puts(File.expand_path(output_dir))
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
# based on http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide/flash_player_admin_guide.pdf
|
29
|
-
# around page 83
|
30
|
-
def trust_dir
|
31
|
-
if PLATFORM =~ /(mswin)|(mingw)/
|
32
|
-
# vista
|
33
|
-
# "C:\Users\username\AppData\Roaming\Macromedia\Flash Player\#Security\FlashPlayerTrust"
|
34
|
-
|
35
|
-
# windows 2000 & XP
|
36
|
-
File.join(ENV['HOME'], 'Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust')
|
37
|
-
elsif PLATFORM =~ /darwin/
|
38
|
-
File.join(ENV['HOME'], 'Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust')
|
39
|
-
elsif PLATFORM =~ /linux/
|
40
|
-
File.join(ENV['HOME'], '.macromedia/#Security/FlashPlayerTrust')
|
41
|
-
else
|
42
|
-
raise "Unsupported platform #{PLATFORM}"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'sprouts-extensions/rsl_manager'
|
2
|
-
|
3
|
-
namespace :rsl do
|
4
|
-
desc "Copies the specified framework rsls into the output directory"
|
5
|
-
task :copy do
|
6
|
-
RSLManager.instance.copy_files
|
7
|
-
end
|
8
|
-
|
9
|
-
desc "Sets up the output directory of the rsls to be a trusted dir for running in the flash stand-alone"
|
10
|
-
task :configure_trust do
|
11
|
-
RSLManager.instance.add_output_to_trust_dirs
|
12
|
-
end
|
13
|
-
|
14
|
-
desc "Sets up the rsls"
|
15
|
-
task :setup => ['copy', 'configure_trust']
|
16
|
-
end
|