synvert-core 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f24ec1fdcc29492b0b5e7747f7541c3eaac7e40
4
- data.tar.gz: 3ff09347d10f30e79cd03a53c00d57dd0cb6a299
3
+ metadata.gz: e44cab5416bd9de8678694d4ce6e43ab51987f48
4
+ data.tar.gz: f995113c274ee42968de2328ffe813978d3d19db
5
5
  SHA512:
6
- metadata.gz: 8fc6bf37a059cb3d04bdcdc1bb8d464250eab3fb81c8ac724f2e6ce2eb88908c166ca258b831b1c6569fcb8006aba3be4da57ee0602955aaa657395edc2691a4
7
- data.tar.gz: 879e33c2e928a1607bbabf7d4746242510e655e7fd7aea4d0f72b66efd84183d818347c609fa85afa2bf3c2339c688c266a24ee692cf93df2242702ffcc4c416
6
+ metadata.gz: 4f3913e797193b3628db4471ccd7878482985156d96414cc900447de827db6de0a8adc0f3bd39b7e9d73d1e1599e240faea15ffe52b4bec0d0b6bc1ea7fed81b
7
+ data.tar.gz: 3cb996acbece4316c55dd8dfae6aaf93b0c45ae5773c199e63bc56ee89a4d29cce6dd57a06957d0b02a5fc7fee4ece45d2f8bcb21a5427e4c2fca0164e6adbaf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.11.1
4
+
5
+ * Warning if add_file already exists and make sure directory exists for add_file
6
+
3
7
  ## 0.11.0 (2016-07-31)
4
8
 
5
9
  * Add options to Rewriter::Instance
@@ -227,7 +227,14 @@ module Synvert::Core
227
227
  def add_file(filename, content)
228
228
  return if @sandbox
229
229
 
230
- File.open File.join(Configuration.instance.get(:path), filename), 'w' do |file|
230
+ filepath = File.join(Configuration.instance.get(:path), filename)
231
+ if File.exist?(filepath)
232
+ puts "File #{filepath} already exists."
233
+ return
234
+ end
235
+
236
+ FileUtils.mkdir_p File.dirname(filepath)
237
+ File.open filepath, 'w' do |file|
231
238
  file.write content
232
239
  end
233
240
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Synvert
4
4
  module Core
5
- VERSION = "0.11.0"
5
+ VERSION = "0.11.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang