lib/eefgilm/gemfile.rb in eefgilm-0.0.4 vs lib/eefgilm/gemfile.rb in eefgilm-0.0.5
- old
+ new
@@ -15,10 +15,11 @@
def clean!
# Extract:
extract_to_array_of_lines
# Transform:
+ change_double_qoutes_to_single if @options[:alphabetize]
delete_comments! if @options[:delete_comments]
delete_whitespace! if @options[:delete_whitespace]
alphabetize_gems! if @options[:alphabetize]
# Load:
@@ -33,9 +34,15 @@
file_lines = gemfile.readlines
file_lines.each do |line|
self.source = line if line.match(/^source/)
group = line.match(//) if line.match(/^\s*group/)
self.lines << line if line.match(/^\s*gem/)
+ end
+ end
+
+ def change_double_qoutes_to_single
+ @lines.each do |line|
+ line.gsub!('"',"'")
end
end
def delete_comments!
@lines.each do |string|