thor-zsh_completion 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  class Thor
2
2
  module ZshCompletion
3
3
  class Generator
4
- SUBCOMMAND_FUNCTION_TEMPLATE = ERB.new(File.read("#{__dir__}/template/subcommand_function.erb"), nil, "-")
4
+ SUBCOMMAND_FUNCTION_TEMPLATE = ERB.new(File.read("#{File.dirname(__FILE__)}/template/subcommand_function.erb"), nil, "-")
5
5
  attr_reader :thor, :name
6
6
 
7
7
  def initialize(thor, name)
@@ -50,12 +50,14 @@ class Thor
50
50
  subcommands: subcommand_metadata(thor)
51
51
  }
52
52
 
53
- erb = File.read("#{__dir__}/template/main.erb")
53
+ erb = File.read("#{File.dirname(__FILE__)}/template/main.erb")
54
54
  ERB.new(erb, nil, "-").result(binding)
55
55
  end
56
56
 
57
57
  private
58
- def render_subcommand_function(subcommand, prefix: [])
58
+ def render_subcommand_function(subcommand, options = {})
59
+ prefix = options[:prefix] || []
60
+
59
61
  source = []
60
62
 
61
63
  prefix = (prefix + [subcommand[:name]])
@@ -1,5 +1,5 @@
1
1
  class Thor
2
2
  module ZshCompletion
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,55 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-zsh_completion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - labocho
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
12
+ date: 2016-01-28 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.10'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.10'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - "~>"
35
+ - - ~>
32
36
  - !ruby/object:Gem::Version
33
37
  version: '10.0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - "~>"
43
+ - - ~>
39
44
  - !ruby/object:Gem::Version
40
45
  version: '10.0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  description: Create zsh completion script for Thor subclass
@@ -59,9 +66,9 @@ executables: []
59
66
  extensions: []
60
67
  extra_rdoc_files: []
61
68
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
69
+ - .gitignore
70
+ - .rspec
71
+ - .travis.yml
65
72
  - CODE_OF_CONDUCT.md
66
73
  - Gemfile
67
74
  - LICENSE.txt
@@ -79,25 +86,26 @@ files:
79
86
  homepage: https://github.com/labocho/thor-zsh_completion
80
87
  licenses:
81
88
  - MIT
82
- metadata: {}
83
89
  post_install_message:
84
90
  rdoc_options: []
85
91
  require_paths:
86
92
  - lib
87
93
  required_ruby_version: !ruby/object:Gem::Requirement
94
+ none: false
88
95
  requirements:
89
- - - ">="
96
+ - - ! '>='
90
97
  - !ruby/object:Gem::Version
91
98
  version: '0'
92
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
+ none: false
93
101
  requirements:
94
- - - ">="
102
+ - - ! '>='
95
103
  - !ruby/object:Gem::Version
96
104
  version: '0'
97
105
  requirements: []
98
106
  rubyforge_project:
99
- rubygems_version: 2.4.5.1
107
+ rubygems_version: 1.8.23.2
100
108
  signing_key:
101
- specification_version: 4
109
+ specification_version: 3
102
110
  summary: Create zsh completion script for Thor subclass
103
111
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 2d2b258587a459e70ec955724fb631aafc73786f
4
- data.tar.gz: 24905d7c013630ac13c9bea4e6a29cfb3af9f2b3
5
- SHA512:
6
- metadata.gz: 1b30db3b9e7649a2f3253aa6f54d061d40db7b5381829ceae9b923d6435ff68653f3c7d582a677dd304e73c84e0cd5b091f7028f82b7507c79548f6cde369877
7
- data.tar.gz: b69f1767db423e6f957573fe30f866adf44d7e0bd17b70a9cb3b06f77cdc5136a23feea4749ab5db07d3e481fcb52bc97070449fc59ff99b387da29e7f0fd4ed