Skip to content

Commit

Permalink
Added travis support
Browse files Browse the repository at this point in the history
  • Loading branch information
clbustos committed Jul 25, 2014
1 parent ddff154 commit 193e7ec
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--color
-f s
--color
-b
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language:
ruby

rvm:
- '1.8.7'
- '1.9.2'
- '1.9.3'
- '2.0.0'
- '2.1.1'

script:
bundle exec rake spec

before_install:
- sudo apt-get update -qq
- sudo apt-get install -y r-base r-base-dev
- sudo Rscript -e "install.packages(c('Rserve'),,'http://cran.us.r-project.org')"
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'
gem 'hoe'
gem 'rspec'
gem 'rake'
27 changes: 27 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
hoe (3.12.0)
rake (>= 0.8, < 11.0)
rake (10.3.2)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
rspec-mocks (~> 3.0.0)
rspec-core (3.0.3)
rspec-support (~> 3.0.0)
rspec-expectations (3.0.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.0.0)
rspec-mocks (3.0.3)
rspec-support (~> 3.0.0)
rspec-support (3.0.3)

PLATFORMS
ruby

DEPENDENCIES
hoe
rake
rspec
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ $:.unshift(File.dirname(__FILE__)+"/lib")
require 'rubygems'
require 'hoe'
require 'rserve'
require 'rubyforge'
#require 'rubyforge'
Hoe.plugin :git
Hoe.plugin :rubyforge
#Hoe.plugin :rubyforge

require 'rspec'
require 'rspec/core/rake_task'
Expand All @@ -15,7 +15,7 @@ Hoe.spec 'rserve-client' do
self.testlib=:rspec
self.test_globs="spec/*_spec.rb"
self.version=Rserve::VERSION
self.rubyforge_name = 'ruby-statsample' # if different than 'rserve'
# self.rubyforge_name = 'ruby-statsample' # if different than 'rserve'
self.remote_rdoc_dir = "rserve-client"
self.developer('Claudio Bustos', 'clbustos_AT_gmail.com')
self.extra_dev_deps << ["rspec","~>2.0"]
Expand Down
25 changes: 25 additions & 0 deletions spec/rserve_bug_1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require File.expand_path(File.dirname(__FILE__)+"/spec_helper.rb")
describe "Bug #1 on statsample" do
before do
@r=Rserve::Connection.new()
end
after do
@r.close if @r.connected?
end
it "should return a correct irr object" do

@r.void_eval("library(irr);
ds<-data.frame(a=rnorm(100),b=rnorm(100),c=rnorm(100),d=rnorm(100));
iccs=list(
icc_1=icc(ds,'o','c','s'),
icc_k=icc(ds,'o','c','a'),
icc_c_1=icc(ds,'t','c','s'),
icc_c_k=icc(ds,'t','c','a'),
icc_a_1=icc(ds,'t','a','s'),
icc_a_k=icc(ds,'t','a','a'))
")

@iccs=@r.eval('iccs').to_ruby
@iccs.should be_instance_of(Array)
end
end

0 comments on commit 193e7ec

Please sign in to comment.