forked from Sage/class_kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass_kit.gemspec
50 lines (43 loc) · 1.62 KB
/
class_kit.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
####################
#### Set GEM Version based on GIT Release TAG when built with Travis
####################
version = ''
if ENV['TRAVIS_TAG'] != nil
puts "CI Branch - '#{ENV['TRAVIS_TAG']}'"
version = ENV['TRAVIS_TAG']
end
#if the tag version starts with v (e.g. vx.x.x)
if version.downcase.match /^v/
#trim the v and set the version to x.x.x
version = version.dup
version.slice!(0)
elsif ENV['TRAVIS_TAG'] != nil && ENV['TRAVIS_TAG'] != ''
#allow none release tags to build alpha, beta, dev versions of the gem.
version = "0.0.0.#{ENV['TRAVIS_TAG']}"
else
#otherwise it is not a valid release tag so set the version 0.0.0 as it not being released.
version = '0.0.0'
end
Gem::Specification.new do |spec|
spec.name = "class_kit"
spec.version = version
spec.authors = ["Sage One"]
spec.email = ["[email protected]"]
spec.summary = 'Toolkit for working with classes'
spec.description = 'Toolkit for working with classes'
spec.homepage = "https://github.com/sage/class_kit"
spec.license = "MIT"
spec.files = Dir.glob("{bin,lib}/**/**/**")
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_development_dependency "bundler", "~> 1.11"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "pry"
spec.add_dependency('json')
spec.add_dependency('hash_kit')
end