Skip to content

Commit cc007ee

Browse files
committed
Move Minimization::VERSION to its own file
1 parent 2d1193a commit cc007ee

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Rakefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require 'rake'
2+
require 'bundler'
23
require 'bundler/gem_tasks'
34
require "rspec/core/rake_task"
45
require 'rdoc/task'
56

67
# Setup the necessary gems, specified in the gemspec.
7-
require 'bundler'
88
begin
99
Bundler.setup(:default, :development)
1010
rescue Bundler::BundlerError => e
@@ -23,5 +23,3 @@ task :console do
2323
end
2424

2525
task :default => [:spec]
26-
27-
# vim: syntax=ruby

lib/minimization.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#
1919
# Algorithms for unidimensional minimization
2020
require 'text-table'
21+
2122
module Minimization
22-
VERSION="0.2.1"
2323
FailedIteration=Class.new(Exception)
2424
# Base class for unidimensional minimizers
2525
class Unidimensional

lib/minimization/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Minimization
2+
VERSION = '0.2.1'
3+
end

minimization.gemspec

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# -*- encoding: utf-8 -*-
2-
lib = File.expand_path('../lib/', __FILE__)
3-
$:.unshift lib unless $:.include?(lib)
1+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
42

3+
require 'date'
4+
require 'minimization/version'
55

66
Gem::Specification.new do |s|
77
s.name = "minimization"
8-
s.version = "0.2.1"
8+
s.version = Minimization::VERSION
9+
s.date = Date.today.to_s
10+
911
s.authors = ["Claudio Bustos", "Rajat Kapoor"]
1012
s.email = ["clbustos@gmail.com", "rajat100493@gmail.com"]
1113

0 commit comments

Comments
 (0)