This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
forked from elastic/apm-agent-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGemfile
123 lines (110 loc) · 3.62 KB
/
Gemfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
# Tools
gem 'cucumber', require: false
gem 'rack-test'
gem 'rspec', '~> 3'
gem 'rspec-its'
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'timecop'
gem 'webmock'
# Integrations
gem 'aws-sdk-dynamodb', require: nil
gem 'aws-sdk-s3', require: nil
gem 'aws-sdk-sqs', require: nil
gem 'aws-sdk-sns', require: nil
gem 'elasticsearch', require: nil
gem 'fakeredis', require: nil
gem 'faraday', require: nil
gem 'graphql', require: nil
if !defined?(JRUBY_VERSION) && RUBY_VERSION < '2.5'
gem 'google-protobuf', '< 3.12'
end
gem 'grpc' if !defined?(JRUBY_VERSION) && RUBY_VERSION < '3.0'
gem 'json'
gem 'json-schema', require: nil
gem 'mongo', require: nil
gem 'opentracing', require: nil
gem 'rake', require: nil
gem 'resque', require: nil
gem 'sequel', require: nil
gem 'shoryuken', require: nil
gem 'sidekiq', require: nil
gem 'simplecov', require: false
gem 'simplecov-cobertura', require: false
gem 'sneakers', '~> 2.12', require: nil
gem 'sucker_punch', '~> 2.0', require: nil
gem 'yard', require: nil
gem 'yarjuf'
# See issue #6547 in the JRuby repo. When that bug is fixed,
# we can use the latest version of the i18n gem.
gem 'i18n', '< 1.8.8'
## Install Framework
GITHUB_REPOS = {
'grape' => 'ruby-grape/grape',
'rails' => 'rails/rails',
'sinatra' => 'sinatra/sinatra'
}.freeze
# new || legacy || default
env_frameworks = ENV['FRAMEWORKS'] || ENV['FRAMEWORK'] || ''
parsed_frameworks = env_frameworks.split(',')
frameworks_versions = parsed_frameworks.inject({}) do |frameworks, str|
framework, *version = str.split('-')
frameworks.merge(framework => version.join('-'))
end
frameworks_versions.each do |framework, version|
case version
when 'master' # sinatra, grape
gem framework, github: GITHUB_REPOS.fetch(framework)
when 'main' # rails
gem framework, github: GITHUB_REPOS.fetch(framework), branch: 'main'
when /.+/
gem framework, "~> #{version}.0"
else
gem framework
end
end
if frameworks_versions.key?('rails')
unless /^(main|6)/.match?(frameworks_versions['rails'])
gem 'delayed_job', require: nil
end
end
if RUBY_PLATFORM == 'java'
case rails = frameworks_versions['rails']
when 'main'
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', glob: 'activerecord-jdbcsqlite3-adapter/*.gemspec'
when ''
gem 'activerecord-jdbcsqlite3-adapter', "~> 61.0"
when nil
gem 'jdbc-sqlite3'
else
gem 'activerecord-jdbcsqlite3-adapter', "~> #{rails.tr('.', '')}.0"
end
elsif frameworks_versions['rails'] =~ /^(4|5)/
gem 'sqlite3', '~> 1.3.6'
else
gem 'sqlite3'
end
group :bench do
gem 'ruby-prof', require: nil, platforms: %i[ruby]
gem 'stackprof', require: nil, platforms: %i[ruby]
end
gemspec