archetype 0.0.1.pre.5 → 0.0.1.pre.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/archetype/version.rb +1 -73
  3. metadata +2 -3
  4. data/VERSION.yml +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbab32be0784e84090c5a0162caecb0e3b912956
4
- data.tar.gz: 12b6bce97bafd067ecc995fe0e427dfc7e2c3cc3
3
+ metadata.gz: 8ab5eee6ed84fbd70c80a9aa39a656a589df8678
4
+ data.tar.gz: 846b9c1adac07be555a9371f5a555324d403f6c8
5
5
  SHA512:
6
- metadata.gz: b49e4406e00d274236782dd36564e797e3fba166f7fa10668e8b91fa07a9fb7ce5abd6b5d8ba37e379f4bc76c573c18f28edbfda277f1abf980460a4cdfe633d
7
- data.tar.gz: c585398cc2078ad5a9cd3b90688afc115416d1aaab7060c4ed56c33c009d1e7cde62e2a1da05cb857824b927a0239ec11c07b8bcd2d12dd4cda414df4fb96916
6
+ metadata.gz: 3cf3d681af277b4522b3108441b62955a185bb7b05031645a305024e7d8c567eb15a990b90c6c948b7e16dc41e548b553b5482fc805712480d480c6b7150820f
7
+ data.tar.gz: ec24cc92f88c2cf272312d88c8f3892a22639a8a34af18760ccb53de7bca4d8cc6ca03d8e9cbaebc98396e6f3638c8360a3f4c57039b081686d03eecdc551c5e
@@ -1,75 +1,3 @@
1
1
  module Archetype
2
- module Version
3
- #
4
- # Returns a string representing the version.
5
- #
6
- # The :major, :minor, and :teeny keys have their respective numbers.
7
- # The :string key contains a human-readable string representation of the version.
8
- # The :rev key will have the current revision hash.
9
- #
10
- # Method borrowed from Compass. All credit goes to Chris Eppstein and other contributors
11
- # https://github.com/chriseppstein/compass/blob/stable/lib/compass/version.rb
12
- # \(This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum\)
13
- #
14
- # *Returns*:
15
- # - {String} the version of Archetype
16
- #
17
- def version
18
- if defined?(@version)
19
- @version
20
- else
21
- read_version
22
- end
23
- end
24
-
25
- protected
26
- def scope(file) # :nodoc:
27
- File.join(File.dirname(__FILE__), '..', '..', file)
28
- end
29
-
30
- def read_version
31
- require 'yaml'
32
- begin
33
- @version = YAML.load(File.read(scope('VERSION.yml')))
34
- @version[:teeny] = @version[:patch]
35
- @version[:string] = "#{@version[:major]}.#{@version[:minor]}"
36
- @version[:string] << ".#{@version[:patch]}" if @version[:patch]
37
- @version[:string] << ".#{@version[:build]}" if @version[:build]
38
- @version[:string] << ".#{@version[:state]}" if @version[:state]
39
- @version[:string] << ".#{@version[:iteration]}" if @version[:iteration]
40
- if !ENV['OFFICIAL'] && r = revision
41
- @version[:string] << ".#{r[0..6]}"
42
- @version[:rev] = r
43
- end
44
- return @version
45
- rescue
46
- # this is a hack, but I'm not fully understanding how to fix this correctly
47
- # see issue #4
48
- # if it failed, try again, for now
49
- return read_version
50
- end
51
- end
52
-
53
- def revision
54
- revision_from_git
55
- end
56
-
57
- def revision_from_git
58
- if File.exists?(scope('.git/HEAD'))
59
- Dir.chdir scope(".") do
60
- `git rev-parse HEAD`
61
- end
62
- end
63
- end
64
- end
65
-
66
- extend Archetype::Version
67
- def self.const_missing(const)
68
- # This avoid reading from disk unless the VERSION is requested.
69
- if const == :VERSION
70
- version[:string]
71
- else
72
- super
73
- end
74
- end
2
+ VERSION = '0.0.1.pre.6'
75
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archetype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.5
4
+ version: 0.0.1.pre.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene ONeill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-07 00:00:00.000000000 Z
12
+ date: 2014-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -78,7 +78,6 @@ files:
78
78
  - CHANGELOG.md
79
79
  - LICENSE
80
80
  - README.md
81
- - VERSION.yml
82
81
  - bin/archetype
83
82
  - lib/README.rdoc
84
83
  - lib/archetype.rb
data/VERSION.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- :major: 0
3
- :minor: 0
4
- :build: 1
5
- :state: pre
6
- :iteration: 5