[issue-1274] add VERSION file which contains version for all gems
This commit is contained in:
parent
da144148ee
commit
f546ae6172
21
Rakefile
21
Rakefile
|
@ -9,10 +9,7 @@ task :spec => :test
|
||||||
CLEAN.include "**/*.rbc"
|
CLEAN.include "**/*.rbc"
|
||||||
|
|
||||||
def source_version
|
def source_version
|
||||||
@source_version ||= begin
|
@source_version ||= File.read(File.expand_path("../VERSION", __FILE__)).strip
|
||||||
load './lib/sinatra/version.rb'
|
|
||||||
Sinatra::VERSION
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_feature
|
def prev_feature
|
||||||
|
@ -147,15 +144,8 @@ if defined?(Gem)
|
||||||
"rack-protection" => "./rack-protection"
|
"rack-protection" => "./rack-protection"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load the gemspec using the same limitations as github
|
|
||||||
def spec(gem)
|
|
||||||
require 'rubygems' unless defined? Gem::Specification
|
|
||||||
directory = GEMS_AND_ROOT_DIRECTORIES[gem]
|
|
||||||
eval(File.read("#{directory + "/" + gem}.gemspec"))
|
|
||||||
end
|
|
||||||
|
|
||||||
def package(gem, ext='')
|
def package(gem, ext='')
|
||||||
"pkg/#{gem}-#{spec(gem).version}" + ext
|
"pkg/#{gem}-#{source_version}" + ext
|
||||||
end
|
end
|
||||||
|
|
||||||
directory 'pkg/'
|
directory 'pkg/'
|
||||||
|
@ -212,6 +202,13 @@ if defined?(Gem)
|
||||||
|
|
||||||
desc "Commits the version to github repository"
|
desc "Commits the version to github repository"
|
||||||
task :commit_version do
|
task :commit_version do
|
||||||
|
# TODO: Find a better way later to manage versions between gems
|
||||||
|
sh <<-SH
|
||||||
|
sed -i '' "s/.*VERSION.*/ VERSION = '#{source_version}'/" lib/sinatra/version.rb
|
||||||
|
sed -i '' "s/.*VERSION.*/ VERSION = '#{source_version}'/" sinatra-contrib/lib/sinatra/contrib/version.rb
|
||||||
|
sed -i '' "s/.*VERSION.*/ VERSION = '#{source_version}'/" rack-protection/lib/rack/protection/version.rb
|
||||||
|
SH
|
||||||
|
|
||||||
sh <<-SH
|
sh <<-SH
|
||||||
git commit --allow-empty -a -m '#{source_version} release' &&
|
git commit --allow-empty -a -m '#{source_version} release' &&
|
||||||
git tag -s v#{source_version} -m '#{source_version} release' &&
|
git tag -s v#{source_version} -m '#{source_version} release' &&
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
$:.unshift File.expand_path("../../rack-protection/lib", __FILE__)
|
version = File.read(File.expand_path("../../VERSION", __FILE__)).strip
|
||||||
require "rack/protection/version"
|
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
# general infos
|
# general infos
|
||||||
s.name = "rack-protection"
|
s.name = "rack-protection"
|
||||||
s.version = Rack::Protection::VERSION
|
s.version = version
|
||||||
s.description = "Protect against typical web attacks, works with all Rack apps, including Rails."
|
s.description = "Protect against typical web attacks, works with all Rack apps, including Rails."
|
||||||
s.homepage = "http://github.com/sinatra/sinatra/tree/master/rack-protection"
|
s.homepage = "http://github.com/sinatra/sinatra/tree/master/rack-protection"
|
||||||
s.summary = s.description
|
s.summary = s.description
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module Sinatra
|
module Sinatra
|
||||||
module Contrib
|
module Contrib
|
||||||
VERSION = ::Sinatra::VERSION
|
VERSION = '2.0.0.rc2'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
$:.unshift File.expand_path("../../lib", __FILE__)
|
version = File.read(File.expand_path("../../VERSION", __FILE__)).strip
|
||||||
require "sinatra/version"
|
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "sinatra-contrib"
|
s.name = "sinatra-contrib"
|
||||||
s.version = Sinatra::VERSION
|
s.version = version
|
||||||
s.description = "Collection of useful Sinatra extensions"
|
s.description = "Collection of useful Sinatra extensions"
|
||||||
s.homepage = "http://github.com/sinatra/sinatra/tree/master/sinatra-contrib"
|
s.homepage = "http://github.com/sinatra/sinatra/tree/master/sinatra-contrib"
|
||||||
s.license = "MIT"
|
s.license = "MIT"
|
||||||
|
@ -22,11 +21,11 @@ Gem::Specification.new do |s|
|
||||||
|
|
||||||
s.required_ruby_version = '>= 2.2.0'
|
s.required_ruby_version = '>= 2.2.0'
|
||||||
|
|
||||||
s.add_dependency "sinatra", Sinatra::VERSION
|
s.add_dependency "sinatra", version
|
||||||
s.add_dependency "mustermann", "~> 1.0"
|
s.add_dependency "mustermann", "~> 1.0"
|
||||||
s.add_dependency "backports", ">= 2.0"
|
s.add_dependency "backports", ">= 2.0"
|
||||||
s.add_dependency "tilt", ">= 1.3", "< 3"
|
s.add_dependency "tilt", ">= 1.3", "< 3"
|
||||||
s.add_dependency "rack-protection", Sinatra::VERSION
|
s.add_dependency "rack-protection", version
|
||||||
s.add_dependency "multi_json"
|
s.add_dependency "multi_json"
|
||||||
|
|
||||||
s.add_development_dependency "rspec", "~> 3.4"
|
s.add_development_dependency "rspec", "~> 3.4"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
version = File.read(File.expand_path("../VERSION", __FILE__)).strip
|
||||||
require 'sinatra/version'
|
|
||||||
|
|
||||||
Gem::Specification.new 'sinatra', Sinatra::VERSION do |s|
|
Gem::Specification.new 'sinatra', version do |s|
|
||||||
s.description = "Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort."
|
s.description = "Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort."
|
||||||
s.summary = "Classy web-development dressed in a DSL"
|
s.summary = "Classy web-development dressed in a DSL"
|
||||||
s.authors = ["Blake Mizerany", "Ryan Tomayko", "Simon Rozet", "Konstantin Haase"]
|
s.authors = ["Blake Mizerany", "Ryan Tomayko", "Simon Rozet", "Konstantin Haase"]
|
||||||
|
@ -27,6 +26,6 @@ Gem::Specification.new 'sinatra', Sinatra::VERSION do |s|
|
||||||
|
|
||||||
s.add_dependency 'rack', '~> 2.0'
|
s.add_dependency 'rack', '~> 2.0'
|
||||||
s.add_dependency 'tilt', '~> 2.0'
|
s.add_dependency 'tilt', '~> 2.0'
|
||||||
s.add_dependency 'rack-protection', '2.0.0.rc2'
|
s.add_dependency 'rack-protection', version
|
||||||
s.add_dependency 'mustermann', '~> 1.0'
|
s.add_dependency 'mustermann', '~> 1.0'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue