1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
6 git_root = "#{__dir__}/../.."
7 git_timestamp, git_hash = IO.popen(
8 ["git", "-C", git_root,
9 "log", "-n1", "--first-parent", "--format=%ct:%H",
10 "--", "build/version-at-commit.sh", "sdk/ruby"],
12 git_log.readline.chomp.split(":")
15 $stderr.puts("failed to get version information: 'git' not found")
16 exit 69 # EX_UNAVAILABLE
20 $stderr.puts("failed to get version information: 'git log' exited #{$?}")
23 git_timestamp = Time.at(git_timestamp.to_i).utc
24 version = ENV["ARVADOS_BUILDING_VERSION"] || IO.popen(
25 ["#{git_root}/build/version-at-commit.sh", git_hash],
27 ver_out.readline.chomp.encode("utf-8")
29 version = version.sub("~dev", ".dev").sub("~rc", ".rc")
31 Gem::Specification.new do |s|
34 s.date = git_timestamp.strftime("%Y-%m-%d")
35 s.summary = "Arvados client library"
36 s.description = "Arvados client library, git commit #{git_hash}"
37 s.authors = ["Arvados Authors"]
38 s.email = 'packaging@arvados.org'
39 s.licenses = ['Apache-2.0']
40 s.files = ["lib/arvados.rb", "lib/arvados/google_api_client.rb",
41 "lib/arvados/collection.rb", "lib/arvados/keep.rb",
42 "README", "LICENSE-2.0.txt"]
43 s.required_ruby_version = '>= 2.7.0'
44 s.add_dependency('activesupport', '>= 3')
45 s.add_dependency('andand', '~> 1.3', '>= 1.3.3')
46 # arvados fork of google-api-client gem with old API and new
47 # compatibility fixes, built from ../ruby-google-api-client/
48 s.add_dependency('arvados-google-api-client', '>= 0.8.7.5', '< 0.8.8')
49 # work around undeclared dependency on i18n in some activesupport 3.x.x:
50 s.add_dependency('i18n')
51 s.add_dependency('json', '>= 1.7.7', '<3')
52 s.add_runtime_dependency('jwt', '<2', '>= 0.1.5')