vim_printer 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cdc677eae53a6321444d481a27dd0cef67d80f7
4
- data.tar.gz: 84cf9b6d15cbcdd69fe07cca45944d9b82cbed1b
3
+ metadata.gz: 794403cc35fff7f41e02d06aac06951b0767c342
4
+ data.tar.gz: f28af061e28706b4e3b8c72acbf6d577346bc66e
5
5
  SHA512:
6
- metadata.gz: 14c80f48f9436d45f73c48ab0778cb90ff54d751ce3571fc741d65c5aee3eaa5bd6372357eec580c8588a0e0b3ffbdf49b6f251a84c563ba9ae77cd83c4dde36
7
- data.tar.gz: 7a02d8b03da73552678f1a458c20fd5620cb676cd0f1e2942b951f034d5b9bd9fa090c22c206653b038bf5e7da1fd7aff7821a5afde6908f04573397e4392ae0
6
+ metadata.gz: 1fdd9a5dc0a9e058ce70bddea10f413806dbd5baae20f966798ba5c93e955ae02c5477e7d16049ac8db0fda72e70ac7f5f4f204fe6722e41fe1f0ece03f9de44
7
+ data.tar.gz: f16b7505f09ea14f7c49c7e6718bf8554374742e83b2755e8e498478ed6eaedc40c111a8543a8c3a8d545873e3e36250ad40ec8938e48ac45b15e476e864fa71
data/README.md CHANGED
@@ -62,8 +62,6 @@ vim_printer print -b test/fixtures/inputs -e rb java -r
62
62
  Will produce the file `output.tar.gz` with the following result on the screen.
63
63
 
64
64
  ```
65
- FYI: your options {:base_dir=>"test/fixtures/inputs/", :exts=>["rb", "java"], :non_exts=>[], :inc_words=>[], :exc_words=>[], :ignore_case=>true, :recursive=>true, :version=>false, :theme=>"default"}
66
-
67
65
  FYI: process file 1 of 8 : test/fixtures/inputs/demo1.xxx.rb
68
66
  FYI: process file 2 of 8 : test/fixtures/inputs/demo1.yyy.rb
69
67
  FYI: process file 3 of 8 : test/fixtures/inputs/demo2.xxx.rb
@@ -72,9 +70,7 @@ FYI: process file 5 of 8 : test/fixtures/inputs/java/demo3.xxx.java
72
70
  FYI: process file 6 of 8 : test/fixtures/inputs/java/demo3.yyy.java
73
71
  FYI: process file 7 of 8 : test/fixtures/inputs/java/demo4.xxx.java
74
72
  FYI: process file 8 of 8 : test/fixtures/inputs/java/demo4.yyy.java
75
-
76
- Your result should be available at `output.tar.gz`
77
-
73
+ Your output file is output.tar.gz
78
74
  ```
79
75
 
80
76
  ### Usage
@@ -169,6 +165,14 @@ rake
169
165
 
170
166
  ### Changelog
171
167
 
168
+ #### 0.0.6
169
+
170
+ - Move the theme option to [vim_printer][]
171
+
172
+ - Use [agile_utils][] versino 0.0.8
173
+
174
+ - Make location of the 'index.html' to the current run directory
175
+
172
176
  #### 0.0.5
173
177
 
174
178
  - Use [agile_utils][] version 0.0.5 that have the option bug fix
@@ -6,7 +6,7 @@ require_relative '../vim_printer'
6
6
  module VimPrinter
7
7
  include AgileUtils
8
8
 
9
- class CLI < CodeLister::BaseCLI
9
+ class CLI < Thor
10
10
  desc 'print', 'Print the list of files'
11
11
 
12
12
  method_option *AgileUtils::Options::BASE_DIR
@@ -16,9 +16,12 @@ module VimPrinter
16
16
  method_option *AgileUtils::Options::EXC_WORDS
17
17
  method_option *AgileUtils::Options::IGNORE_CASE
18
18
  method_option *AgileUtils::Options::RECURSIVE
19
- method_option *AgileUtils::Options::THEME
20
19
  method_option *AgileUtils::Options::VERSION
21
20
 
21
+ method_option :theme,
22
+ aliases: '-t',
23
+ desc: 'Vim colorscheme to use',
24
+ default: 'default'
22
25
  def print
23
26
  opts = options.symbolize_keys
24
27
  if opts[:version]
@@ -74,8 +77,7 @@ Print the list of files
74
77
  # TODO: may be use the CodeLister.files(..) instead?
75
78
  generated_files = AgileUtils::FileUtil.find(options[:base_dir])
76
79
 
77
- # Generate the 'index.html' file
78
- index_file = "#{options[:base_dir]}/index.html"
80
+ index_file = "./index.html"
79
81
 
80
82
  IndexHtml.htmlify generated_files,
81
83
  base_dir: options[:base_dir],
@@ -1,3 +1,3 @@
1
1
  module VimPrinter
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
data/lib/vim_printer.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'thor'
2
2
  require 'agile_utils'
3
3
  require 'code_lister'
4
- require_relative 'vim_printer/core_ext/hash'
5
4
  require_relative 'vim_printer/version'
6
5
  require_relative 'vim_printer/logger'
7
6
  require_relative 'vim_printer/cli'
data/test/test_helper.rb CHANGED
@@ -2,7 +2,6 @@
2
2
  require 'minitest/autorun'
3
3
  require 'minitest/pride'
4
4
  require 'minitest-spec-context'
5
-
6
5
  require 'awesome_print'
7
6
  require 'pry'
8
7
  require_relative '../lib/vim_printer'
data/vim_printer.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.add_runtime_dependency 'thor', '~> 0.18'
20
20
  spec.add_runtime_dependency 'code_lister', '~> 0.0.6'
21
21
  spec.add_runtime_dependency 'index_html', '~> 0.0.7'
22
- spec.add_runtime_dependency 'agile_utils', '~> 0.0.5'
22
+ spec.add_runtime_dependency 'agile_utils', '~> 0.0.8'
23
23
  spec.add_development_dependency 'bundler', '~> 1.3'
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'awesome_print', '~> 1.2'
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.5
4
+ version: 0.0.6
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-25 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.0.5
61
+ version: 0.0.8
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.0.5
68
+ version: 0.0.8
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -230,7 +230,6 @@ files:
230
230
  - bin/vim_printer
231
231
  - lib/vim_printer.rb
232
232
  - lib/vim_printer/cli.rb
233
- - lib/vim_printer/core_ext/hash.rb
234
233
  - lib/vim_printer/logger.rb
235
234
  - lib/vim_printer/version.rb
236
235
  - test/fixtures/inputs/demo1.xxx.rb
@@ -1,56 +0,0 @@
1
- class Hash
2
-
3
- # File activesupport/lib/active_support/core_ext/hash/keys.rb
4
- #
5
- # hash = { name: 'Rob', age: '28' }
6
- # hash.transform_keys{ |key| key.to_s.upcase }
7
- # => { "NAME" => "Rob", "AGE" => "28" }
8
- def transform_keys
9
- result = {}
10
- each_key do |key|
11
- result[yield(key)] = self[key]
12
- end
13
- result
14
- end
15
-
16
- def transform_keys!(&block)
17
- keys.each do |key|
18
- value = delete(key)
19
- self[yield(key)] = value.is_a?(Hash) ? value.transform_keys!(&block) : value
20
- end
21
- self
22
- end
23
-
24
- # hash = { 'name' => 'Rob', 'age' => '28' }
25
- # hash.symbolize_keys
26
- # => { name: "Rob", age: "28" }
27
- def symbolize_keys
28
- transform_keys{ |key| key.to_sym rescue key }
29
- end
30
-
31
- # File activesupport/lib/active_support/core_ext/hash/keys.rb, line 135
32
- def symbolize_keys!
33
- transform_keys!{ |key| key.to_sym rescue key }
34
- end
35
-
36
- # Merges the caller into +other_hash+. For example,
37
- #
38
- # options = options.reverse_merge(size: 25, velocity: 10)
39
- #
40
- # is equivalent to
41
- #
42
- # options = { size: 25, velocity: 10 }.merge(options)
43
- #
44
- # This is particularly useful for initializing an options hash
45
- # with default values.
46
- def reverse_merge(other_hash)
47
- other_hash.merge(self)
48
- end
49
-
50
- # Destructive +reverse_merge+.
51
- def reverse_merge!(other_hash)
52
- # right wins if there is no left
53
- merge!(other_hash) { |key,left,right| left }
54
- end
55
-
56
- end