Sha256: fd1e3cb3bbf8515bf3a2c2dda8e3930b8c4f4613c29a1cdd4d7bc8a28d831809
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 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 \ $(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.0.1 | Rakefile |