forked from github/github-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
27 lines (24 loc) · 658 Bytes
/
Rakefile
File metadata and controls
27 lines (24 loc) · 658 Bytes
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
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
task :default => :test
task :console do
sh "irb -r ./config/load"
end
namespace :services do
task :config do
file = ENV["FILE"] || File.expand_path("../config/services.json", __FILE__)
require File.expand_path("../config/load", __FILE__)
services = Service.services.inject({}) do |memo, svc|
memo.update svc.title => {
:short_name => svc.hook_name,
:schema => svc.schema}
end
File.open file, 'w' do |io|
io << services.to_json
end
end
end