jumpstart 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -51,6 +51,10 @@ namespace :bump do
51
51
 
52
52
  end
53
53
 
54
+ task :version do
55
+ puts "\nJumpStart Version: #{JumpStart::VERSION}"
56
+ end
57
+
54
58
  def git_actions
55
59
  Dir.chdir("#{JumpStart::ROOT_PATH}")
56
60
  system "git add ."
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :jumpstart_version_major: 0
3
3
  :jumpstart_version_minor: 2
4
- :jumpstart_version_patch: 0
4
+ :jumpstart_version_patch: 1
@@ -73,6 +73,11 @@ module JumpStart
73
73
  end
74
74
  end
75
75
 
76
+ # Looks up the current version of JumpStart
77
+ def version
78
+ "#{version_major}.#{version_minor}.#{version_patch}"
79
+ end
80
+
76
81
  # Method for bumping version number types.
77
82
  # Resets @version_minor and @version_patch to 0 if bumping @version_major.
78
83
  # Resets @version_pacth to 0 if bumping @version_minor
@@ -97,11 +102,15 @@ module JumpStart
97
102
  end
98
103
  end
99
104
 
100
- # Looks up the current version of JumpStart
101
- def version
102
- "#{version_major}.#{version_minor}.#{version_patch}"
105
+ # Handles calls to missing constants in the JumpStart module. Calls JumpStart.version if JumpStart::VERSION is recognised.
106
+ def const_missing(name)
107
+ if name.to_s.match(/VERSION/)
108
+ version
109
+ else
110
+ super
111
+ end
103
112
  end
104
-
113
+
105
114
  end
106
115
 
107
116
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ian Alexander Wood (i0n)