Skip to content

Commit 7e5a386

Browse files
committed
Added version constant till we can rig up VERSION generator
1 parent 3578286 commit 7e5a386

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

lib/nirv.rb

+6-5
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ def add
7070

7171
#totally lifted from UUID gem.
7272
def version
73-
version = Gem::Specification.load(File.expand_path("../nirvanahq.gemspec", File.dirname(__FILE__))).version.to_s.split(".").map { |i| i.to_i }
74-
major = version[0]
75-
minor = version[1]
76-
patch = version[2]
77-
@message = @my_app_name << " - " << "#{major}.#{minor}.#{patch}"
73+
# Issue: Was getting fatal .git errors in built version.
74+
# Okay! Totally boneheaded, but basically, if you using things like `git` in your gemspec, then you can't access the file
75+
# dynamically. I assumed its making a copy of the
76+
# version = Gem::Specification.load(File.expand_path("../nirvanahq.gemspec", File.dirname(__FILE__))).version.to_s.split(".").map { |i| i.to_i }
77+
# @todo move to VERSION txt file
78+
@message = @my_app_name << " - " << NirvanaHQ::VERSION
7879
end
7980

8081
end

lib/nirvanahq.rb

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55

66
require 'nirvanahq/auth'
77
require 'nirvanahq/task'
8+
9+
class NirvanaHQ
10+
VERSION = '0.0.3'
11+
end

nirvanahq.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |s|
44
s.name = "nirvanahq"
5-
s.version = "0.0.2"
5+
s.version = "0.0.3"
66
s.platform = Gem::Platform::RUBY
77
s.authors = ["Mitchell Amihod"]
88
s.email = ["[email protected]"]

0 commit comments

Comments
 (0)