Permalink
Browse files

merged master

  • Loading branch information...
haf committed Feb 13, 2012
2 parents fb6ab88 + d00c770 commit b1ec3f2eae2689a140099bd0b6c9553b3ef6b732
Showing with 11 additions and 8 deletions.
  1. +2 −2 .semver
  2. +2 −1 lib/semver.rb
  3. +2 −0 lib/semver/semvermissingerror.rb
  4. +5 −5 semver.gemspec → semver2.gemspec
View
@@ -1,5 +1,5 @@
---
-:major: 1
+:major: 2
:minor: 0
-:patch: 5
+:patch: 0
:special: ""
View
@@ -1,4 +1,5 @@
require 'yaml'
+require 'semver/semvermissingerror'
class SemVer
@@ -19,7 +20,7 @@ def SemVer.find_file dir=nil
Dir.chdir dir do
while !File.exists? path do
- raise "#{dir} is not semantic versioned" if File.dirname(path).match(/(\w:\/|\/)$/i)
+ raise SemVerMissingError, "#{dir} is not semantic versioned", caller if File.dirname(path).match(/(\w:\/|\/)$/i)
path = File.join File.dirname(path), ".."
path = File.expand_path File.join(path, FILE_NAME)
puts "semver: looking at #{path}"
@@ -0,0 +1,2 @@
+class SemVerMissingError < RuntimeError
+end
@@ -2,14 +2,14 @@ $:.push File.expand_path("../lib", __FILE__)
require 'semver'
Gem::Specification.new do |spec|
- spec.name = "semver"
+ spec.name = "semver2"
spec.version = SemVer.find.format '%M.%m.%p'
spec.summary = "Semantic Versioning"
spec.description = "maintain versions as per http://semver.org"
- spec.email = "flazzarino@gmail.com"
- spec.authors = ["Francesco Lazzarino"]
- spec.homepage = 'http://github.com/flazz/semver'
+ spec.email = "henrik@haf.se"
+ spec.authors = ["Francesco Lazzarino", "Henrik Feldt"]
+ spec.homepage = 'https://github.com/haf/semver'
spec.executables << 'semver'
- spec.files = [".semver", "semver.gemspec", "README.md"] + Dir["lib/**/*.rb"] + Dir['bin/*']
+ spec.files = [".semver", "semver2.gemspec", "README.md"] + Dir["lib/**/*.rb"] + Dir['bin/*']
spec.has_rdoc = true
end

0 comments on commit b1ec3f2

Please sign in to comment.