vim_printer 0.0.1 → 0.0.2

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: 7e5a86cef7010bb8114f742c4591e7b6067aed22
4
- data.tar.gz: 7d275164d3fe3e242ad70e5bb190e3f9de84d198
3
+ metadata.gz: 627dd0639342f4d39918630c32d8071d23428011
4
+ data.tar.gz: d4aeddd9698d21abcd92411c47fa46a3da0ce6f4
5
5
  SHA512:
6
- metadata.gz: 681876c8a44e88a6611020a5b040acf27697736bb96557322f2f20bfe78db2e9aeb47d16f41b35b9765ae3240fbba04e309d55866d6c7c490b181faa30e529bd
7
- data.tar.gz: ac5e1c4c46079a4a893bcfeccc2f6f07f8a0c19eda485f1e0d9426cb3dd5927c33b43ae465968117f7c51a89452eba2b90f5cb7d351192d4ccf65a7314b8315a
6
+ metadata.gz: 52f8a0c49c1cbc6db7d9fb3de4b024bc261b41b443be37a09736170083e0647f59a65d468377501bbbc029e911ca61c3780e0fbb38fe7eb49813b2fc8d4a5fba
7
+ data.tar.gz: 084e97a8ad34092e53547d4a3728a0c6f7a22f1d4e036447971ec1bd7fd8270d745833e48e938faf7cb98265f43683d046af22acc6a4a33e0b8cbb43dfe6dd2b
Binary file
Binary file
Binary file
Binary file
data/README.md CHANGED
@@ -169,6 +169,12 @@ rake
169
169
 
170
170
  ### Changelog
171
171
 
172
+ #### 0.0.2
173
+
174
+ - Add the 'index_html' gem to generate the 'index.html' to the output
175
+
176
+ - Fix the error in documentation (YARD syntax error)
177
+
172
178
  #### 0.0.1
173
179
 
174
180
  - Initial release
@@ -1,4 +1,5 @@
1
1
  require 'code_lister'
2
+ require 'index_html'
2
3
  require_relative '../vim_printer'
3
4
 
4
5
  module VimPrinter
@@ -52,7 +53,8 @@ Print the list of files
52
53
 
53
54
  private
54
55
 
55
- # @param args [Hash<Symbol, Object>] options argument
56
+ #
57
+ # @param [Hash<Symbol, Object>] options the options argument
56
58
  def execute(options = {})
57
59
 
58
60
  input_files = CodeLister.files(options)
@@ -61,17 +63,29 @@ Print the list of files
61
63
  puts "No file found for your option: #{options}"
62
64
  return
63
65
  end
66
+
64
67
  to_htmls(input_files, options)
65
68
 
66
- # search for files that we created
69
+ # Search for files that we created
67
70
  generated_files = VimPrinter::Utility.find(options[:base_dir])
68
71
 
69
- # tar.gzip them for user
72
+ # Generate the 'index.html' file
73
+ index_file = "#{options[:base_dir]}/index.html"
74
+ IndexHtml.htmlify generated_files,
75
+ base_dir: options[:base_dir],
76
+ output: index_file
77
+
78
+ # We add the missing index file
79
+ generated_files << index_file
80
+
70
81
  VimPrinter::Utility.tar_gzip_files(generated_files, 'output.tar.gz')
71
82
 
72
- # cleanup after ourself
83
+ # Cleanup after ourself
73
84
  VimPrinter::Utility.delete(generated_files)
74
85
 
86
+ # Remove the extra index.html file as well
87
+ FileUtils.rm_rf(index_file)
88
+
75
89
  # report the result
76
90
  puts "Your result should be available at `output.tar.gz`"
77
91
  end
@@ -17,7 +17,8 @@ module VimPrinter
17
17
  class << self
18
18
 
19
19
  # Find list of files based on certain extension
20
- # @param [String] bas_dir the starting directory
20
+ #
21
+ # @param [String] base_dir the starting directory
21
22
  # @param [String] extension the file extension to search for
22
23
  #
23
24
  # @return [Array<String>] list of matching files or empty list
@@ -58,7 +59,7 @@ module VimPrinter
58
59
 
59
60
  # Add suffix to each extensions
60
61
  #
61
- # @param [Array<String>] extension list of extension
62
+ # @param [Array<String>] extensions list of extension
62
63
  # @param [String] suffix the suffix string
63
64
  #
64
65
  # @return [Array<String>] new list with the suffix added to each element
@@ -1,3 +1,3 @@
1
1
  module VimPrinter
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/vim_printer.gemspec CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_runtime_dependency "thor", "~> 0.18"
21
21
  spec.add_runtime_dependency "code_lister", "~> 0.0.6"
22
+ spec.add_runtime_dependency "index_html", "~> 0.0.5"
22
23
  spec.add_runtime_dependency "minitar", "~> 0.5.4"
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.3"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vim_printer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-16 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.0.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: index_html
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.5
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: minitar
43
57
  requirement: !ruby/object:Gem::Requirement