Sha256: 3ad80fefec1a927df749a96981991f1b669bc1b1c80fa5fa7b1a1ef07c92de1f
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'bundler/gem_tasks' require 'rake/testtask' require 'rake/clean' require 'rake/extensiontask' task default: :test Rake::TestTask.new(:test) do |t| t.libs << 'test' t.libs << 'lib' t.test_files = FileList['test/**/*_test.rb'] end # Gem Spec gem_spec = Gem::Specification.load('graphql-idl-parser.gemspec') Rake::ExtensionTask.new('graphql-idl-parser', gem_spec) do |ext| ext.name = 'graphqlidlparser' ext.lib_dir = File.join('lib', 'graphql-idl-parser') end desc 'Pretty format C code' task :format do puts `astyle --indent=spaces=2 --style=1tbs --keep-one-line-blocks -n \ $(ack -n -f --type=cpp --type=cc ext/graphql-idl-parser/)` end desc 'Benchmark loading an IDL file' task :benchmark do require 'benchmark' require 'graphql' require 'graphql-idl-parser' schema = File.read(File.join('ext', 'graphql-idl-parser', 'graphql-idl-parser', 'test', 'github.graphql')) Benchmark.bm(10) do |x| x.report('this-gem: ') { parser = GraphQL::IDLParser.new(schema: schema); parser.process } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graphql-idl-parser-0.1.0 | Rakefile |