twine 1.0 → 1.0.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: 107f74e29483071d8a72edba115daa2dbea7d1c9
4
- data.tar.gz: 4b81eccc076aa40a7649d6779ef4ccac51fbf0dc
3
+ metadata.gz: 303ce6c7d8bab093ca71941fe800a657fb809ef3
4
+ data.tar.gz: 429d906f86a7f7bd566ffc4eb8590f8157a000e0
5
5
  SHA512:
6
- metadata.gz: 3173909e712d67f0e63e2ce0dadf3c6bc39d287208d159f798ee29ed220ab87b69cc49692b0472a9961589eda36ce0f31f2d402aab67c736ab4458d8beddcf4e
7
- data.tar.gz: a2d07cfa6b89a6650aed7ee25a3cb2944a83c63b8ac1b5918a64f2804e4485e91b1d26ab329e381a3f4892b38dd76902639dab73f9ecb8445c512fd74477e8f3
6
+ metadata.gz: 5998ed4a6f39b0d09bcfd33d404239ccf2b7f6523aeae9fd36cd3af3b0c897ab589575ae91f365e77629718eba457ffaf6915d0965b12f40a097fb06cc054472
7
+ data.tar.gz: 0659ce0901ebef294dd81b59a08a1467d1f7399e04d84b4e303900a10ffbbf9252234d059fa1ec143fcacbf93b3ef857708c3e00b7fe55166be83464ffafa0e5
@@ -69,8 +69,11 @@ module Twine
69
69
  end
70
70
  end
71
71
 
72
- formatter_for_directory = find_formatter { |f| f.can_handle_directory?(@options[:output_path]) }
73
- formatter = formatter_for_format(@options[:format]) || formatter_for_directory
72
+ if @options[:format]
73
+ formatter = formatter_for_format(@options[:format])
74
+ else
75
+ formatter = find_formatter { |f| f.can_handle_directory?(@options[:output_path]) }
76
+ end
74
77
 
75
78
  unless formatter
76
79
  raise Twine::Error.new "Could not determine format given the contents of #{@options[:output_path]}"
@@ -312,8 +315,11 @@ module Twine
312
315
  end
313
316
 
314
317
  def prepare_read_write(path, lang)
315
- formatter_for_path = find_formatter { |f| f.extension == File.extname(path) }
316
- formatter = formatter_for_format(@options[:format]) || formatter_for_path
318
+ if @options[:format]
319
+ formatter = formatter_for_format(@options[:format])
320
+ else
321
+ formatter = find_formatter { |f| f.extension == File.extname(path) }
322
+ end
317
323
 
318
324
  unless formatter
319
325
  raise Twine::Error.new "Unable to determine format of #{path}"
@@ -1,3 +1,3 @@
1
1
  module Twine
2
- VERSION = '1.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twine
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-16 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip