diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c1d6c4c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: ruby +script: bundle exec rspec \ No newline at end of file diff --git a/Gemfile b/Gemfile index 4cd3ca5..82b691a 100644 --- a/Gemfile +++ b/Gemfile @@ -38,4 +38,5 @@ end group :deployment do gem 'mysql2' + gem 'psd_logger', github: 'sanger/psd_logger' end diff --git a/Gemfile.lock b/Gemfile.lock index f07a520..4c44b77 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,9 @@ +GIT + remote: git://github.com/sanger/psd_logger.git + revision: dd2d634114df75b1d8535715c169a7fc99521389 + specs: + psd_logger (0.1.6) + GEM remote: https://rubygems.org/ specs: @@ -161,6 +167,7 @@ DEPENDENCIES exception_notification factory_girl_rails mysql2 + psd_logger! puma rails (= 4.2.3) rails-api @@ -170,4 +177,4 @@ DEPENDENCIES sqlite3 BUNDLED WITH - 1.12.1 + 1.13.5 diff --git a/app/label_printer/label_printer/print_job.rb b/app/label_printer/label_printer/print_job.rb index 867d1dd..a324874 100644 --- a/app/label_printer/label_printer/print_job.rb +++ b/app/label_printer/label_printer/print_job.rb @@ -6,6 +6,15 @@ module LabelPrinter # TOF is also available to check that the text is correct or to allow you to send a job manually. module PrintJob + # This is neccessary for Travis to pass. + # When the build method is called in tests the subclasses of print job are not loaded + # so we get a constant does not exist method. + # TODO: modify the build method so it doesn't use constantize." + require_relative "print_job/base" + require_relative "print_job/LPD" + require_relative "print_job/IPP" + require_relative "print_job/TOF" + ## # Build a new print job based on the protocol of the printer name that is passed. # e.g. If the printer protocol is IPP it will produce an object of type LabelPrinter::PrintJob::IPP diff --git a/app/views/v1/docs/index.html.erb b/app/views/v1/docs/index.html.erb index 763a481..b3146eb 100644 --- a/app/views/v1/docs/index.html.erb +++ b/app/views/v1/docs/index.html.erb @@ -1,7 +1,7 @@
-