From 05b67b44f79a7812204d942a82951df153504fdd Mon Sep 17 00:00:00 2001 From: stevieing Date: Fri, 25 Nov 2016 10:22:25 +0000 Subject: [PATCH 1/5] Added travis.yml file. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8ac3a71 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: ruby +before_script: + - bundle exec rake db:reset + - bundle exec rake db:setup +script: bundle exec rspec \ No newline at end of file From a128ad4df9e1a118cfc71b3eaaa87d01c3fdce8f Mon Sep 17 00:00:00 2001 From: stevieing Date: Fri, 25 Nov 2016 11:08:47 +0000 Subject: [PATCH 2/5] Modified travis.yml. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ac3a71..c1d6c4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,2 @@ language: ruby -before_script: - - bundle exec rake db:reset - - bundle exec rake db:setup script: bundle exec rspec \ No newline at end of file From 08682cb3761be857e6c0db4f0ba92ef560897196 Mon Sep 17 00:00:00 2001 From: stevieing Date: Fri, 25 Nov 2016 11:20:44 +0000 Subject: [PATCH 3/5] Added require for print job subclasses. --- app/label_printer/label_printer/print_job.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/label_printer/label_printer/print_job.rb b/app/label_printer/label_printer/print_job.rb index 867d1dd..4d88a2b 100644 --- a/app/label_printer/label_printer/print_job.rb +++ b/app/label_printer/label_printer/print_job.rb @@ -6,6 +6,11 @@ module LabelPrinter # TOF is also available to check that the text is correct or to allow you to send a job manually. module PrintJob + 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 From fb5b15c12c870e8fc640d1f124f5b1d8472d6aec Mon Sep 17 00:00:00 2001 From: stevieing Date: Fri, 25 Nov 2016 11:29:09 +0000 Subject: [PATCH 4/5] Added comments for Travis fixes. --- app/label_printer/label_printer/print_job.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/label_printer/label_printer/print_job.rb b/app/label_printer/label_printer/print_job.rb index 4d88a2b..a324874 100644 --- a/app/label_printer/label_printer/print_job.rb +++ b/app/label_printer/label_printer/print_job.rb @@ -6,6 +6,10 @@ 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" From 0c381be3812bcaca9197fd9e871f6d02b19fa3eb Mon Sep 17 00:00:00 2001 From: stevieing Date: Tue, 20 Dec 2016 13:46:43 +0000 Subject: [PATCH 5/5] Added psd logger. Added versioning. --- Gemfile | 1 + Gemfile.lock | 9 ++++++++- app/views/v1/docs/index.html.erb | 4 ++-- config/api.raml | 2 +- config/initializers/versionstring.rb | 7 +++++++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 config/initializers/versionstring.rb 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/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 @@ - Print My Barcode 1.0 + Print My Barcode <%= Deployed::VERSION_ID %>