Repository navigation
Expand file tree
/
Copy pathRakefile
More file actions
71 lines (58 loc) · 2.05 KB
/
Copy pathRakefile
File metadata and controls
71 lines (58 loc) · 2.05 KB
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
# frozen_string_literal: true
require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn 'Run `bundle install` to install missing gems'
exit e.status_code
end
require 'rake'
require 'juwelier'
require_relative 'lib/version'
Juwelier::Tasks.new do |gem|
gem.name = 'deepl-rb'
gem.homepage = 'https://github.com/DeepLcom/deepl-rb'
gem.license = 'MIT'
gem.summary = 'Official Ruby library for the DeepL language translation API.'
gem.description =
'Official Ruby library for the DeepL language translation API (v2). ' \
'For more information, check this: https://www.deepl.com/docs/api-reference.html'
gem.version = DeepL::VERSION
gem.email = 'open-source@deepl.com'
gem.authors = ['DeepL SE']
gem.metadata = {
'bug_tracker_uri' => 'https://github.com/DeepLcom/deepl-rb/issues',
'changelog_uri' => 'https://github.com/DeepLcom/deepl-rb/blob/main/CHANGELOG.md',
'documentation_uri' => 'https://github.com/DeepLcom/deepl-rb/blob/main/README.md',
'homepage_uri' => 'https://github.com/DeepLcom/deepl-rb'
}
gem.files.exclude '.bumpversion.toml'
gem.files.exclude '.github/**/*'
gem.files.exclude '.circleci/**/*'
gem.files.exclude 'catalog-info.yaml'
gem.files.exclude '.auto-approve.yaml'
gem.files.exclude '.gitar/**/*'
gem.files.exclude '.releaserc.mjs'
gem.files.exclude 'renovate.json5'
end
Juwelier::RubygemsDotOrgTasks.new
# Tests
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
namespace :spec do
desc 'Run the offline specs: no network, no key.'
RSpec::Core::RakeTask.new(:offline) { |task| task.pattern = 'spec/offline/**/*_spec.rb' }
desc 'Run the real-API specs: needs DEEPL_AUTH_KEY, sends real requests.'
RSpec::Core::RakeTask.new(:real_api) { |task| task.pattern = 'spec/real_api/**/*_spec.rb' }
end
desc 'Run the offline specs.'
task spec: 'spec:offline'
desc 'Run the offline specs and rubocop.'
task :test do
Rake::Task['spec'].invoke
Rake::Task['rubocop'].invoke
end
task default: :test