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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- terrimporter (0.7.0)
4
+ terrimporter (0.7.2)
5
5
  kwalify (>= 0.7.2)
6
6
 
7
7
  GEM
@@ -112,7 +112,9 @@ module TerrImporter
112
112
  end
113
113
 
114
114
  def replace_style_strings?
115
- !self['stylesheets'].nil? and !self['stylesheets']['replace_strings'].nil?
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
- @downloader.download(source_url, file_path + unclean_suffix)
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.debug "CSS line replacements"
58
+ LOG.info "CSS line replacements"
57
59
  File.open(file_path, 'w') do |d|
58
- File.open(file_path + unclean_suffix, 'r') do |s|
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
- LOG.debug "Deleting unclean css files"
69
- FileUtils.remove file_path + unclean_suffix
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
 
@@ -1,4 +1,4 @@
1
- #Generated by rake task, last bump: patch1major0minor7
1
+ #Generated by rake task, last bump: minor7patch2major0
2
2
  module TerrImporter
3
- VERSION = "0.7.1"
3
+ VERSION = "0.7.2"
4
4
  end
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: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 1
10
- version: 0.7.1
9
+ - 2
10
+ version: 0.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel Kummer