gli 1.1.2 → 1.1.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.
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,9 @@
1
+ == Changelog
2
+
3
+ === 1.1.3 - 10/24/2010
4
+
5
+ * Changed the way we locate <code>__FILE__</code>'s directory; if it's a symlink it would've have worked. Required adding <code>:realpath</code> method to <code>File</code> for pre 1.9.2 rubies
6
+
7
+ === 0.0 - 1.1.2
8
+
9
+ No changelog tracking was done for these versions :(
data/README.rdoc CHANGED
@@ -40,7 +40,7 @@ This example demonstrates most of the features of GLI.
40
40
  This sets you up to use the DSL that GLI defines:
41
41
 
42
42
  #!/usr/bin/ruby
43
- $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
43
+ $: << File.expand_path(File.dirname(File.realpath(__FILE__)) + '/../lib')
44
44
 
45
45
  require 'gli'
46
46
 
@@ -171,7 +171,6 @@ This command is automatically created and added to your application's commands w
171
171
  config file. When invoked, all global options set on the command line are configured
172
172
  inside the configuration file. Further, a blank area for each
173
173
  command of your application is created, to allow the user edit the config file ith command-specific default values.
174
-
175
174
  ---
176
175
  # Global options are here
177
176
  :f: foo
@@ -253,6 +252,7 @@ they start with a "--"
253
252
 
254
253
  :include:gli.rdoc
255
254
 
255
+ :include:CHANGELOG.rdoc
256
256
  == Links
257
257
 
258
258
  * [http://davetron5000.github.com/gli] - RubyDoc
data/bin/gli CHANGED
@@ -1,5 +1,17 @@
1
1
  #!/usr/bin/ruby
2
- $: << File.expand_path(File.dirname(__FILE__) + '/../lib')
2
+ # 1.9 adds realpath to resolve symlinks; 1.8 doesn't
3
+ # have this method, so we add it so we get resolved symlinks
4
+ # and compatibility
5
+ unless File.respond_to? :realpath
6
+ class File
7
+ def self.realpath path
8
+ return realpath(File.readlink(path)) if symlink?(path)
9
+ path
10
+ end
11
+ end
12
+ end
13
+
14
+ $: << File.expand_path(File.dirname(File.realpath(__FILE__)) + '/../lib')
3
15
 
4
16
  require 'gli'
5
17
  require 'support/scaffold'
data/lib/gli_version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GLI
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -121,8 +121,21 @@ EOS
121
121
  File.open(bin_file,'w') do |file|
122
122
  file.chmod(0755)
123
123
  file.puts '#!/usr/bin/ruby'
124
- file.puts '$: << File.expand_path(File.dirname(__FILE__) + \'/../lib\')'
125
- file.puts '$: << File.expand_path(File.dirname(__FILE__) + \'/../ext\')' if create_ext_dir
124
+ file.puts <<EOS
125
+ # 1.9 adds realpath to resolve symlinks; 1.8 doesn't
126
+ # have this method, so we add it so we get resolved symlinks
127
+ # and compatibility
128
+ unless File.respond_to? :realpath
129
+ class File
130
+ def self.realpath path
131
+ return realpath(File.readlink(path)) if symlink?(path)
132
+ path
133
+ end
134
+ end
135
+ end
136
+ EOS
137
+ file.puts '$: << File.expand_path(File.dirname(File.realpath(__FILE__)) + \'/../lib\')'
138
+ file.puts '$: << File.expand_path(File.dirname(File.realpath(__FILE__)) + \'/../ext\')' if create_ext_dir
126
139
  file.puts <<EOS
127
140
  require 'rubygems'
128
141
  require 'gli'
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gli
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 1
9
- - 2
10
- version: 1.1.2
8
+ - 3
9
+ version: 1.1.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - David Copeland
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-10-19 00:00:00 -04:00
17
+ date: 2010-10-24 00:00:00 -04:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -28,6 +27,7 @@ extensions: []
28
27
  extra_rdoc_files:
29
28
  - README.rdoc
30
29
  - gli.rdoc
30
+ - CHANGELOG.rdoc
31
31
  files:
32
32
  - lib/gli/command.rb
33
33
  - lib/gli/command_line_token.rb
@@ -43,6 +43,7 @@ files:
43
43
  - bin/gli
44
44
  - README.rdoc
45
45
  - gli.rdoc
46
+ - CHANGELOG.rdoc
46
47
  has_rdoc: true
47
48
  homepage: http://davetron5000.github.com/gli
48
49
  licenses: []
@@ -53,7 +54,7 @@ rdoc_options:
53
54
  - Git Like Interface
54
55
  - --main
55
56
  - README.rdoc
56
- - -ri
57
+ - -R
57
58
  require_paths:
58
59
  - lib
59
60
  - lib
@@ -62,7 +63,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
63
  requirements:
63
64
  - - ">="
64
65
  - !ruby/object:Gem::Version
65
- hash: 3
66
66
  segments:
67
67
  - 0
68
68
  version: "0"
@@ -71,7 +71,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- hash: 3
75
74
  segments:
76
75
  - 0
77
76
  version: "0"