pelt 0.0.1
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/README +0 -0
- data/VERSION.yml +3 -0
- data/lib/pelt/pelt.rb +4 -0
- data/lib/pelt/version.rb +55 -0
- metadata +86 -0
data/README
ADDED
|
File without changes
|
data/VERSION.yml
ADDED
data/lib/pelt/pelt.rb
ADDED
data/lib/pelt/version.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module Pelt
|
|
2
|
+
module Version
|
|
3
|
+
# Returns a hash representing the version.
|
|
4
|
+
# The :major, :minor, and :teeny keys have their respective numbers.
|
|
5
|
+
# The :string key contains a human-readable string representation of the version.
|
|
6
|
+
# The :rev key will have the current revision hash.
|
|
7
|
+
#
|
|
8
|
+
# This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum
|
|
9
|
+
# Swiped from Compass, props to Chris Eppstein
|
|
10
|
+
def version
|
|
11
|
+
if defined?(@version)
|
|
12
|
+
@version
|
|
13
|
+
else
|
|
14
|
+
read_version
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
protected
|
|
19
|
+
def scope(file) # :nodoc:
|
|
20
|
+
File.join(File.dirname(__FILE__), '..', '..', file)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def read_version
|
|
24
|
+
require 'yaml'
|
|
25
|
+
@version = YAML::load(File.read(scope('VERSION.yml')))
|
|
26
|
+
@version[:teeny] = @version[:patch]
|
|
27
|
+
@version[:string] = "#{@version[:major]}.#{@version[:minor]}.#{@version[:patch]}"
|
|
28
|
+
@version[:string] << ".#{@version[:build]}" if @version[:build]
|
|
29
|
+
@version
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def revision
|
|
33
|
+
revision_from_git
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def revision_from_git
|
|
37
|
+
if File.exists?(scope('.git/HEAD'))
|
|
38
|
+
rev = File.read(scope('.git/HEAD')).strip
|
|
39
|
+
if rev =~ /^ref: (.*)$/
|
|
40
|
+
rev = File.read(scope(".git/#{$1}")).strip
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
extend Pelt::Version
|
|
47
|
+
def self.const_missing(const)
|
|
48
|
+
# This avoid reading from disk unless the VERSION is requested.
|
|
49
|
+
if const == :VERSION
|
|
50
|
+
version[:string]
|
|
51
|
+
else
|
|
52
|
+
super
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pelt
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 29
|
|
5
|
+
prerelease: false
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 0
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.0.1
|
|
11
|
+
platform: ruby
|
|
12
|
+
authors:
|
|
13
|
+
- Russ Bradberry
|
|
14
|
+
- Matthew Jording
|
|
15
|
+
autorequire:
|
|
16
|
+
bindir: bin
|
|
17
|
+
cert_chain: []
|
|
18
|
+
|
|
19
|
+
date: 2010-11-12 00:00:00 -05:00
|
|
20
|
+
default_executable:
|
|
21
|
+
dependencies:
|
|
22
|
+
- !ruby/object:Gem::Dependency
|
|
23
|
+
name: haml
|
|
24
|
+
prerelease: false
|
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
27
|
+
requirements:
|
|
28
|
+
- - ">="
|
|
29
|
+
- !ruby/object:Gem::Version
|
|
30
|
+
hash: 41
|
|
31
|
+
segments:
|
|
32
|
+
- 3
|
|
33
|
+
- 0
|
|
34
|
+
- 23
|
|
35
|
+
version: 3.0.23
|
|
36
|
+
type: :runtime
|
|
37
|
+
version_requirements: *id001
|
|
38
|
+
description: A SASS/SCSS jQuery UI Port for Theme Management and Extensibility
|
|
39
|
+
email: rbradberry@gmail.com
|
|
40
|
+
executables: []
|
|
41
|
+
|
|
42
|
+
extensions: []
|
|
43
|
+
|
|
44
|
+
extra_rdoc_files: []
|
|
45
|
+
|
|
46
|
+
files:
|
|
47
|
+
- README
|
|
48
|
+
- VERSION.yml
|
|
49
|
+
- lib/pelt/pelt.rb
|
|
50
|
+
- lib/pelt/version.rb
|
|
51
|
+
has_rdoc: true
|
|
52
|
+
homepage:
|
|
53
|
+
licenses: []
|
|
54
|
+
|
|
55
|
+
post_install_message:
|
|
56
|
+
rdoc_options: []
|
|
57
|
+
|
|
58
|
+
require_paths:
|
|
59
|
+
- lib
|
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
|
+
none: false
|
|
62
|
+
requirements:
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
hash: 3
|
|
66
|
+
segments:
|
|
67
|
+
- 0
|
|
68
|
+
version: "0"
|
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
|
+
none: false
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
hash: 3
|
|
75
|
+
segments:
|
|
76
|
+
- 0
|
|
77
|
+
version: "0"
|
|
78
|
+
requirements: []
|
|
79
|
+
|
|
80
|
+
rubyforge_project:
|
|
81
|
+
rubygems_version: 1.3.7
|
|
82
|
+
signing_key:
|
|
83
|
+
specification_version: 3
|
|
84
|
+
summary: ""
|
|
85
|
+
test_files: []
|
|
86
|
+
|