lib/generators/snake/parse_generator.rb in snake-1.0.0 vs lib/generators/snake/parse_generator.rb in snake-1.0.1

- old
+ new

@@ -5,12 +5,14 @@ def parse vars = Snake::Parser.parse(File.join(Rails.root, JSON_PATH)) Snake::Writer.write(vars) - inject_into_file File.join(Rails.root, STYLES_PATH), after: '@import "bootstrap-sprockets";' do + gsub_file File.join(Rails.root, STYLES_PATH), "@import 'bootstrap-sprockets';", "@import \"bootstrap-sprockets\";" + gsub_file File.join(Rails.root, STYLES_PATH), "@import \"snake_vars\";", "" + inject_into_file File.join(Rails.root, STYLES_PATH), after: /"@import \"bootstrap-sprockets\";\n" do <<-INSERT - @import "snake_vars"; +@import "snake_vars"; INSERT end end end end