This repository was archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
57 lines (44 loc) · 1.49 KB
/
Rakefile
File metadata and controls
57 lines (44 loc) · 1.49 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
exec(*(["bundle", "exec", $PROGRAM_NAME] + ARGV)) if ENV['BUNDLE_GEMFILE'].nil?
task :default => :test
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
spec = Bundler.load_gemspec("cipherstash-client.gemspec")
require "rubygems/package_task"
Gem::PackageTask.new(spec) { |pkg| }
namespace :gem do
desc "Push all freshly-built gems to RubyGems"
task :push do
Rake::Task.tasks.select { |t| t.name =~ %r{^pkg/#{spec.name}-.*\.gem} && t.already_invoked }.each do |pkgtask|
sh "gem", "push", pkgtask.name
end
end
end
task :release do
sh "git release"
end
require "./lib/cipherstash/client/ordered_string_test_generator"
desc "Generate test cases for orderise_string to be used by other CipherStash clients"
task :generate_orderise_string_test_cases do
CipherStash::Client::OrderedStringTestGenerator.new.generate_orderise_string_test_cases
end
desc "Generate test cases for string comparison to be used by other CipherStash clients"
task :generate_string_comparison_test_cases do
CipherStash::Client::OrderedStringTestGenerator.new.generate_string_comparison_test_cases
end
require 'yard'
YARD::Rake::YardocTask.new :doc do |yardoc|
yardoc.files = %w{lib/**/*.rb - README.md}
end
desc "Run guard"
task :guard do
sh "guard --clear"
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new :test do |t|
t.pattern = "spec/**/*_spec.rb"
end