figs 2.0.2 → 2.0.3

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.
@@ -11,25 +11,28 @@ module Figs
11
11
  git_clone gitpath
12
12
  temp_filenames(([]<< Figs::DirectoryFlattener.flattened_filenames(filenames.collect {|filename| "#{TMP_GIT_DIR}#{filename}"})).flatten)
13
13
  rescue Exception => e
14
- p e
14
+ puts e
15
15
  clear_tmp_dir
16
16
  clear_temp_files
17
17
  end
18
-
18
+
19
19
  def clear_temp_files
20
20
  return unless !@temp_files.nil?
21
- @temp_files.each { |temp_file| temp_file.close temp_file.unlink }
21
+ @temp_files.each do |temp_file|
22
+ temp_file.close
23
+ temp_file.unlink
24
+ end
22
25
  end
23
-
26
+
24
27
  private
25
-
28
+
26
29
  def temp_filenames(filenames)
27
30
  temp_files = []
28
31
  filenames.each { |filename| temp_files << copy_to_temp_files(filename) }
29
32
  clear_tmp_dir
30
33
  temp_files
31
34
  end
32
-
35
+
33
36
  def copy_to_temp_files(filename)
34
37
  temp_file = Tempfile.new("#{filename.gsub('/','-')}")
35
38
  temp_file.open
@@ -38,12 +41,12 @@ module Figs
38
41
  @temp_files << temp_file
39
42
  temp_file.path
40
43
  end
41
-
44
+
42
45
  def git_clone(gitpath)
43
46
  clear_tmp_dir
44
47
  ::Git.clone gitpath, TMP_GIT_DIR
45
48
  end
46
-
49
+
47
50
  def clear_tmp_dir
48
51
  FileUtils.rm_rf TMP_GIT_DIR
49
52
  end
@@ -1,3 +1,3 @@
1
1
  module Figs
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-06 00:00:00.000000000 Z
12
+ date: 2015-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake