deprec 2.0.5 → 2.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.
Files changed (3) hide show
  1. data/CHANGELOG +4 -0
  2. data/bin/depify +33 -27
  3. metadata +1 -1
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  == git
2
2
 
3
+ == 2.0.6 (March 17, 2009)
4
+
5
+ * Added option to create ~/.caprc file. run 'depify -c'
6
+
3
7
  == 2.0.5 (March 17, 2009)
4
8
 
5
9
  * Added recipes and config templates for Integrity ci. http://integrityapp.com/
data/bin/depify CHANGED
@@ -2,33 +2,6 @@
2
2
 
3
3
  require 'optparse'
4
4
 
5
- OptionParser.new do |opts|
6
- opts.banner = "Usage: #{File.basename($0)} [path]"
7
-
8
- opts.on("-h", "--help", "Displays this help info") do
9
- puts opts
10
- exit 0
11
- end
12
-
13
- begin
14
- opts.parse!(ARGV)
15
- rescue OptionParser::ParseError => e
16
- warn e.message
17
- puts opts
18
- exit 1
19
- end
20
- end
21
-
22
- if ARGV.empty?
23
- abort "Please specify the directory to depify, e.g. `#{File.basename($0)} .'"
24
- elsif !File.exists?(ARGV.first)
25
- abort "`#{ARGV.first}' does not exist."
26
- elsif !File.directory?(ARGV.first)
27
- abort "`#{ARGV.first}' is not a directory."
28
- elsif ARGV.length > 1
29
- abort "Too many arguments; please specify only the directory to capify."
30
- end
31
-
32
5
  def unindent(string)
33
6
  indentation = string[/\A\s*/]
34
7
  string.strip.gsub(/^#{indentation}/, "")
@@ -116,6 +89,39 @@ def create_file(file, content)
116
89
  end
117
90
  end
118
91
 
92
+
93
+ OptionParser.new do |opts|
94
+ opts.banner = "Usage: #{File.basename($0)} [path]"
95
+
96
+ opts.on("-c", "Install ~/.caprc file") do
97
+ create_file(File.join(ENV['HOME'], '.caprc'), caprc)
98
+ exit 0
99
+ end
100
+
101
+ opts.on("-h", "--help", "Displays this help info") do
102
+ puts opts
103
+ exit 0
104
+ end
105
+
106
+ begin
107
+ opts.parse!(ARGV)
108
+ rescue OptionParser::ParseError => e
109
+ warn e.message
110
+ puts opts
111
+ exit 1
112
+ end
113
+ end
114
+
115
+ if ARGV.empty?
116
+ abort "Please specify the directory to depify, e.g. `#{File.basename($0)} .'"
117
+ elsif !File.exists?(ARGV.first)
118
+ abort "`#{ARGV.first}' does not exist."
119
+ elsif !File.directory?(ARGV.first)
120
+ abort "`#{ARGV.first}' is not a directory."
121
+ elsif ARGV.length > 1
122
+ abort "Too many arguments; please specify only the directory to capify."
123
+ end
124
+
119
125
  create_file(File.join(ENV['HOME'], '.caprc'), caprc)
120
126
 
121
127
  base = ARGV.shift
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bailey