Skip to content

Commit

Permalink
Don't use version file.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Apr 19, 2014
1 parent 08139d1 commit 7c8aaa3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
5 changes: 0 additions & 5 deletions VERSION.yml

This file was deleted.

2 changes: 1 addition & 1 deletion compass.gemspec
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |gemspec|
gemspec.add_dependency 'chunky_png', '~> 1.2'
gemspec.add_dependency 'fssm', '>= 0.2.7'

gemspec.files = %w(README.markdown LICENSE.markdown VERSION.yml Rakefile)
gemspec.files = %w(README.markdown LICENSE.markdown Rakefile)
gemspec.files += Dir.glob("bin/*")
gemspec.files += Dir.glob("examples/**/*.*")
gemspec.files -= Dir.glob("examples/**/*.css")
Expand Down
2 changes: 1 addition & 1 deletion doc-src/content/help/tutorials/contributing.markdown
Expand Up @@ -254,7 +254,7 @@ Getting recent changes from the main repo:
command line that uses the local changes you have made. You can add `/path/to/compass/bin`
to your `$PATH`, or refer to it directly.
2. Build and install a gem:
1. Edit VERSION.yml and add a build indicator like so (**Do not commit this change**):
1. Edit `lib/compass/version.rb` and add a build indicator like so (**Do not commit this change**):

---
:major: 0
Expand Down
12 changes: 10 additions & 2 deletions lib/compass/version.rb
@@ -1,5 +1,12 @@
module Compass
module Version
VERSION_DETAILS = {
:major => 0,
:minor => 12,
:build => 6,
:name => "Alnilam"
}

# Returns a hash representing the version.
# The :major, :minor, and :teeny keys have their respective numbers.
# The :string key contains a human-readable string representation of the version.
Expand All @@ -21,8 +28,7 @@ def scope(file) # :nodoc:
end

def read_version
require 'yaml'
@version = YAML::load(File.read(scope('VERSION.yml')))
@version = VERSION_DETAILS.dup
@version[:teeny] = @version[:patch]
@version[:string] = "#{@version[:major]}.#{@version[:minor]}"
@version[:string] << ".#{@version[:patch]}" if @version[:patch]
Expand All @@ -45,6 +51,8 @@ def revision_from_git
`git rev-parse HEAD`
end
end
rescue
nil
end

end
Expand Down

0 comments on commit 7c8aaa3

Please sign in to comment.