fusion 0.0.4 → 0.0.5
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/lib/fusion.rb +8 -8
- metadata +3 -3
data/lib/fusion.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'open4'
|
3
3
|
require 'uri'
|
4
|
+
require 'cgi'
|
4
5
|
require 'rubygems' #I'm getting an error loading mechanize ... do I need to load this?
|
5
6
|
require 'mechanize'
|
6
7
|
require 'logger'
|
@@ -43,8 +44,6 @@ module Fusion
|
|
43
44
|
|
44
45
|
if(config[:input_files])
|
45
46
|
config[:input_files].each do |input_file|
|
46
|
-
@log.debug "Remote file? #{!(input_file =~ URI::regexp).nil?}"
|
47
|
-
|
48
47
|
if (input_file =~ URI::regexp).nil?
|
49
48
|
# Not a URL
|
50
49
|
input_files << File.join(@bundle_options[:project_path], input_file)
|
@@ -58,12 +57,13 @@ module Fusion
|
|
58
57
|
if (config[:input_directory])
|
59
58
|
directory = File.join(@bundle_options[:project_path],config[:input_directory])
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
unless File.exists?(directory)
|
61
|
+
@log.debug "Path #{directory} does not exist"
|
62
|
+
FileUtils.mkpath(directory)
|
63
|
+
@log.debug "Created path: #{directory}"
|
65
64
|
end
|
66
|
-
|
65
|
+
|
66
|
+
file_names = Dir.open(directory).entries.sort.find_all {|filename| filename.end_with?(".js") }
|
67
67
|
|
68
68
|
input_files += file_names.collect do |file_name|
|
69
69
|
File.join(directory, file_name)
|
@@ -79,7 +79,7 @@ module Fusion
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def get_remote_file(url)
|
82
|
-
filename =
|
82
|
+
filename = CGI.escape(url)
|
83
83
|
local_directory = File.join(@bundle_options[:project_path], ".remote")
|
84
84
|
local_file_path = File.join(local_directory, filename)
|
85
85
|
|
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
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sean Jezewski
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-07-
|
17
|
+
date: 2011-07-26 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|