Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
verisoning of X.X.X-SNAPSHOT and or X.X.X added to not interfere with…
Browse files Browse the repository at this point in the history
… release versioned rtsp gems
  • Loading branch information
nmccready committed Jun 20, 2013
1 parent e82f3a7 commit dbc4c6d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
7 changes: 6 additions & 1 deletion lib/rtsp/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module RTSP
# rtsp version
VERSION = "0.4.3"
VERISON_IS_SNAPSHOT = false
VERISON_IS_RELEASE = false
version = "0.4.4"
snap_str = "#{version}-SNAPSHOT"
daily_str = "#{version}-#{Time.now.strftime("%Y%m%d-%H%M%S")}"
VERSION = (VERISON_IS_RELEASE) ? version : ((VERISON_IS_SNAPSHOT) ? snap_str : daily_str )
end
13 changes: 9 additions & 4 deletions spec/unit/rtsp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ def self.get_requires
end

describe RTSP do
it "should have a VERSION constant" do
it "should have a VERSION constant: version is: #{RTSP::VERSION}" do
RTSP.const_defined?('VERSION').should be_true
end

it "has version 0.4.3" do
RTSP::VERSION.should == '0.4.3'
it "version should be set correctly" do
if RTSP::VERISON_IS_RELEASE
RTSP::VERSION.should == '0.4.4'
elsif RTSP::VERISON_IS_SNAPSHOT
RTSP::VERSION.should == '0.4.4-SNAPSHOT'
else
RTSP::VERSION.should == "0.4.4-#{Time.now.strftime("%Y%m%d-%H%M%S")}"
end
end
end

0 comments on commit dbc4c6d

Please sign in to comment.