Skip to content

Commit

Permalink
Merge pull request #33 from sanger/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
stevieing authored Dec 21, 2016
2 parents 21ccabd + 0615d8e commit ca006f3
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: ruby
script: bundle exec rspec
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ end

group :deployment do
gem 'mysql2'
gem 'psd_logger', github: 'sanger/psd_logger'
end
9 changes: 8 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -161,6 +167,7 @@ DEPENDENCIES
exception_notification
factory_girl_rails
mysql2
psd_logger!
puma
rails (= 4.2.3)
rails-api
Expand All @@ -170,4 +177,4 @@ DEPENDENCIES
sqlite3

BUNDLED WITH
1.12.1
1.13.5
9 changes: 9 additions & 0 deletions app/label_printer/label_printer/print_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/views/v1/docs/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Print My Barcode 1.0</title>
<title>Print My Barcode <%= Deployed::VERSION_ID %></title>
<style type="text/css">
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
Expand Down Expand Up @@ -336,7 +336,7 @@
</head>
<main>
<h1 class="title">
Print My Barcode 1.0
Print My Barcode <%= Deployed::VERSION_ID %>
</h1>
<section>
<div class="properties">
Expand Down
2 changes: 1 addition & 1 deletion config/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
title: Print My Barcode
baseUri: http://localhost
version: 1.0
version: <%= Deployed::VERSION_ID %>

/label_types:
post:
Expand Down
7 changes: 7 additions & 0 deletions config/initializers/versionstring.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
begin
require 'deployed_version'
rescue LoadError
module Deployed
VERSION_ID = 'LOCAL'
end
end

0 comments on commit ca006f3

Please sign in to comment.