Support ruby through a combination of rbenv, ruby-build, and GEM_HOME

This commit is contained in:
Anthony Sottile 2014-05-03 23:24:28 -07:00
parent 390af24c44
commit b381bb68b7
10 changed files with 124 additions and 24 deletions

View file

@ -0,0 +1 @@
*.gem

View file

@ -0,0 +1,3 @@
#!/usr/bin/env ruby
puts 'Hello world from a ruby hook'

View file

@ -0,0 +1,4 @@
- id: ruby_hook
name: Ruby Hook
entry: ruby_hook
language: ruby

View file

@ -0,0 +1,9 @@
Gem::Specification.new do |s|
s.name = 'ruby_hook'
s.version = '0.1.0'
s.authors = ['Anthony Sottile']
s.summary = 'A ruby hook!'
s.description = 'A ruby hook!'
s.files = ['bin/ruby_hook']
s.executables = ['ruby_hook']
end

View file

@ -1,6 +1,7 @@
import jsonschema
import os
import os.path
import pytest
import shutil
from plumbum import local
@ -41,3 +42,10 @@ def is_valid_according_to_schema(obj, schema):
return True
except jsonschema.exceptions.ValidationError:
return False
def skipif_slowtests_false(func):
return pytest.mark.skipif(
os.environ.get('slowtests') == 'false',
reason='slowtests=false',
)(func)