gli 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/gli.rb +2 -2
  2. data/lib/gli_version.rb +1 -1
  3. data/lib/support/help.rb +2 -1
  4. metadata +75 -119
data/lib/gli.rb CHANGED
@@ -141,12 +141,12 @@ module GLI
141
141
  #
142
142
  # +filename+:: A String representing the path to the file to use for the config file. If it's an absolute
143
143
  # path, this is treated as the path to the file. If it's *not*, it's treated as relative to the user's home
144
- # directory as produced by <code>Etc.getpwuid.dir</code>.
144
+ # directory as produced by <code>File.expand_path('~')</code>.
145
145
  def config_file(filename)
146
146
  if filename =~ /^\//
147
147
  @@config_file = filename
148
148
  else
149
- @@config_file = Etc.getpwuid.dir + '/' + filename
149
+ @@config_file = File.join(File.expand_path('~'),filename)
150
150
  end
151
151
  commands[:initconfig] = InitConfig.new(@@config_file)
152
152
  @@config_file
data/lib/gli_version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GLI
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.3'
3
3
  end
data/lib/support/help.rb CHANGED
@@ -145,6 +145,7 @@ module GLI
145
145
  # Assumes that the first line doesn't need the padding, as its filled
146
146
  # up with other stuff
147
147
  def wrap(line,pad_length=0,line_length=nil)
148
+ line ||= ''
148
149
  if line_length.nil?
149
150
  line_length = Terminal.instance.size[0]
150
151
  end
@@ -165,7 +166,7 @@ module GLI
165
166
  wrapped += "\n"
166
167
  this_line = line_padding
167
168
  words.each do |word|
168
- if this_line.length + word.length > line_length
169
+ if this_line.length + word.length >= line_length
169
170
  wrapped += this_line
170
171
  wrapped += "\n"
171
172
  this_line = line_padding + word
metadata CHANGED
@@ -1,152 +1,116 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gli
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 3
8
- - 2
9
- version: 1.3.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.3
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - David Copeland
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-07-02 00:00:00 -04:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-03 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70307756013540 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 8
31
- - 0
20
+ - !ruby/object:Gem::Version
32
21
  version: 0.8.0
33
22
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rdoc
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70307756013540
25
+ - !ruby/object:Gem::Dependency
26
+ name: rdoc
27
+ requirement: &70307756012980 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
29
+ requirements:
41
30
  - - ~>
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 2
45
- - 4
46
- - 0
31
+ - !ruby/object:Gem::Version
47
32
  version: 2.4.0
48
33
  type: :development
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: sdoc
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70307756012980
36
+ - !ruby/object:Gem::Dependency
37
+ name: sdoc
38
+ requirement: &70307756012480 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
40
+ requirements:
56
41
  - - ~>
57
- - !ruby/object:Gem::Version
58
- segments:
59
- - 0
60
- - 2
61
- - 0
42
+ - !ruby/object:Gem::Version
62
43
  version: 0.2.0
63
44
  type: :development
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: reek
67
45
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70307756012480
47
+ - !ruby/object:Gem::Dependency
48
+ name: reek
49
+ requirement: &70307756011920 !ruby/object:Gem::Requirement
69
50
  none: false
70
- requirements:
51
+ requirements:
71
52
  - - ~>
72
- - !ruby/object:Gem::Version
73
- segments:
74
- - 1
75
- - 2
76
- - 0
53
+ - !ruby/object:Gem::Version
77
54
  version: 1.2.0
78
55
  type: :development
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: roodi
82
56
  prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70307756011920
58
+ - !ruby/object:Gem::Dependency
59
+ name: roodi
60
+ requirement: &70307756011320 !ruby/object:Gem::Requirement
84
61
  none: false
85
- requirements:
62
+ requirements:
86
63
  - - ~>
87
- - !ruby/object:Gem::Version
88
- segments:
89
- - 2
90
- - 1
91
- - 0
64
+ - !ruby/object:Gem::Version
92
65
  version: 2.1.0
93
66
  type: :development
94
- version_requirements: *id005
95
- - !ruby/object:Gem::Dependency
96
- name: grancher
97
67
  prerelease: false
98
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *70307756011320
69
+ - !ruby/object:Gem::Dependency
70
+ name: grancher
71
+ requirement: &70307756010740 !ruby/object:Gem::Requirement
99
72
  none: false
100
- requirements:
73
+ requirements:
101
74
  - - ~>
102
- - !ruby/object:Gem::Version
103
- segments:
104
- - 0
105
- - 1
106
- - 5
75
+ - !ruby/object:Gem::Version
107
76
  version: 0.1.5
108
77
  type: :development
109
- version_requirements: *id006
110
- - !ruby/object:Gem::Dependency
111
- name: rainbow
112
78
  prerelease: false
113
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *70307756010740
80
+ - !ruby/object:Gem::Dependency
81
+ name: rainbow
82
+ requirement: &70307756010060 !ruby/object:Gem::Requirement
114
83
  none: false
115
- requirements:
84
+ requirements:
116
85
  - - ~>
117
- - !ruby/object:Gem::Version
118
- segments:
119
- - 1
120
- - 1
121
- - 1
86
+ - !ruby/object:Gem::Version
122
87
  version: 1.1.1
123
88
  type: :development
124
- version_requirements: *id007
125
- - !ruby/object:Gem::Dependency
126
- name: aruba
127
89
  prerelease: false
128
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *70307756010060
91
+ - !ruby/object:Gem::Dependency
92
+ name: aruba
93
+ requirement: &70307756009540 !ruby/object:Gem::Requirement
129
94
  none: false
130
- requirements:
95
+ requirements:
131
96
  - - ~>
132
- - !ruby/object:Gem::Version
133
- segments:
134
- - 0
135
- - 3
136
- - 6
97
+ - !ruby/object:Gem::Version
137
98
  version: 0.3.6
138
99
  type: :development
139
- version_requirements: *id008
140
- description: An application and API for describing command line interfaces that can be used to quickly create a shell for executing command-line tasks. The command line user interface is similar to Gits, in that it takes global options, a command, command-specific options, and arguments
100
+ prerelease: false
101
+ version_requirements: *70307756009540
102
+ description: An application and API for describing command line interfaces that can
103
+ be used to quickly create a shell for executing command-line tasks. The command
104
+ line user interface is similar to Gits, in that it takes global options, a command,
105
+ command-specific options, and arguments
141
106
  email: davidcopeland@naildrivin5.com
142
- executables:
107
+ executables:
143
108
  - gli
144
109
  extensions: []
145
-
146
- extra_rdoc_files:
110
+ extra_rdoc_files:
147
111
  - README.rdoc
148
112
  - gli.rdoc
149
- files:
113
+ files:
150
114
  - lib/gli/command.rb
151
115
  - lib/gli/command_line_token.rb
152
116
  - lib/gli/copy_options_to_aliases.rb
@@ -164,42 +128,34 @@ files:
164
128
  - bin/gli
165
129
  - README.rdoc
166
130
  - gli.rdoc
167
- has_rdoc: true
168
131
  homepage: http://davetron5000.github.com/gli
169
132
  licenses: []
170
-
171
133
  post_install_message:
172
- rdoc_options:
134
+ rdoc_options:
173
135
  - --title
174
136
  - Git Like Interface
175
137
  - --main
176
138
  - README.rdoc
177
139
  - -R
178
- require_paths:
140
+ require_paths:
179
141
  - lib
180
142
  - lib
181
- required_ruby_version: !ruby/object:Gem::Requirement
143
+ required_ruby_version: !ruby/object:Gem::Requirement
182
144
  none: false
183
- requirements:
184
- - - ">="
185
- - !ruby/object:Gem::Version
186
- segments:
187
- - 0
188
- version: "0"
189
- required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ! '>='
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
150
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- segments:
195
- - 0
196
- version: "0"
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
197
155
  requirements: []
198
-
199
156
  rubyforge_project: gli
200
- rubygems_version: 1.3.7
157
+ rubygems_version: 1.8.6
201
158
  signing_key:
202
159
  specification_version: 3
203
160
  summary: A Git Like Interface for building command line apps
204
161
  test_files: []
205
-