terrimporter 0.7.1 → 0.7.2
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.lock +1 -1
- data/lib/terrimporter/configuration.rb +3 -1
- data/lib/terrimporter/importer.rb +10 -5
- data/lib/terrimporter/version.rb +2 -2
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -112,7 +112,9 @@ module TerrImporter
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def replace_style_strings?
|
115
|
-
!self['stylesheets'].nil? and
|
115
|
+
!self['stylesheets'].nil? and
|
116
|
+
!self['stylesheets']['replace_strings'].nil? and
|
117
|
+
!self['stylesheets']['replace_strings'].first.nil?
|
116
118
|
end
|
117
119
|
|
118
120
|
def libraries_destination_path
|
@@ -50,12 +50,14 @@ module TerrImporter
|
|
50
50
|
options = {}
|
51
51
|
options[:suffix] = $1 if css =~ /(ie.*).css$/ #add ie option if in array
|
52
52
|
source_url = export_path(:css, options)
|
53
|
-
|
53
|
+
unclean_file_path = file_path + unclean_suffix;
|
54
|
+
constructed_file_path = (config.replace_style_strings? ? unclean_file_path : file_path)
|
55
|
+
@downloader.download(source_url, constructed_file_path)
|
54
56
|
|
55
57
|
if config.replace_style_strings?
|
56
|
-
LOG.
|
58
|
+
LOG.info "CSS line replacements"
|
57
59
|
File.open(file_path, 'w') do |d|
|
58
|
-
File.open(
|
60
|
+
File.open(constructed_file_path, 'r') do |s|
|
59
61
|
lines = s.readlines
|
60
62
|
lines.each do |line|
|
61
63
|
d.print replace_stylesheet_lines!(line)
|
@@ -65,8 +67,11 @@ module TerrImporter
|
|
65
67
|
else
|
66
68
|
LOG.debug "Skipping css line replacements"
|
67
69
|
end
|
68
|
-
|
69
|
-
|
70
|
+
|
71
|
+
if File.exists?(unclean_file_path)
|
72
|
+
LOG.debug "Deleting unclean css files"
|
73
|
+
#FileUtils.remove unclean_file_path
|
74
|
+
end
|
70
75
|
end
|
71
76
|
end
|
72
77
|
|
data/lib/terrimporter/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terrimporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Kummer
|