forked from inertia186/drotto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
67 lines (53 loc) · 1.1 KB
/
Rakefile
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
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'yard'
require 'drotto'
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.test_files = FileList['test/**/*_test.rb']
t.ruby_opts << if ENV['HELL_ENABLED']
'-W2'
else
'-W1'
end
end
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
end
task default: :test
task :console do
exec "irb -r drotto -I ./lib"
end
task :report, :limit do |t, args|
limit = args[:limit]
DrOtto.bounce_once(limit, pretend: true)
end
task :bounce_once, :limit do |t, args|
limit = args[:limit] || '200'
DrOtto.bounce_once(limit)
end
task :bounce, :limit do |t, args|
limit = args[:limit] || '200'
DrOtto.bounce(limit)
end
task :bounce_stream do
DrOtto.bounce_stream
end
task :manual_bounce, :trx_id do |t, args|
DrOtto.manual_bounce(args[:trx_id])
end
task :run do
DrOtto.run
end
task :run_once do
DrOtto.run_once
end
task :state do
DrOtto.state
end
task :usage, :account_name, :days do |t, args|
DrOtto.usage(args)
end