gitswitch 0.2.1 → 0.2.2
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/VERSION +1 -1
- data/gitswitch.gemspec +1 -1
- data/lib/gitswitch.rb +8 -1
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
data/gitswitch.gemspec
CHANGED
data/lib/gitswitch.rb
CHANGED
|
@@ -6,6 +6,7 @@ require 'shellwords' if !String.new.methods.include?('shellescape')
|
|
|
6
6
|
class GitSwitch
|
|
7
7
|
GITSWITCH_CONFIG_FILE = File.join ENV["HOME"], ".gitswitch"
|
|
8
8
|
GIT_BIN = '/usr/bin/env git'
|
|
9
|
+
VERSION_FILE = File.join File.dirname(__FILE__), "..", "VERSION"
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def self.run args = ARGV
|
|
@@ -223,7 +224,13 @@ class GitSwitch
|
|
|
223
224
|
|
|
224
225
|
# Print version information.
|
|
225
226
|
def print_version
|
|
226
|
-
|
|
227
|
+
if fh = File.open(VERSION_FILE,'r')
|
|
228
|
+
puts "GitSwitch " + fh.gets
|
|
229
|
+
fh.close
|
|
230
|
+
else
|
|
231
|
+
puts "Version information not found"
|
|
232
|
+
end
|
|
233
|
+
# puts "GitSwitch " + GitSwitch::VERSION.to_s
|
|
227
234
|
end
|
|
228
235
|
|
|
229
236
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitswitch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.2.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Joe Alba
|