From 7fc42ed7242369969c85e434d9f85703be0984b9 Mon Sep 17 00:00:00 2001 From: David Rice Date: Thu, 11 Apr 2024 09:37:17 +0100 Subject: [PATCH] fix: defined Atco::VERSION to the correct released version and move to separate file --- lib/atco.rb | 3 +-- lib/atco/version.rb | 5 +++++ spec/atco_spec.rb | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 lib/atco/version.rb diff --git a/lib/atco.rb b/lib/atco.rb index cf245d2..c363f53 100644 --- a/lib/atco.rb +++ b/lib/atco.rb @@ -8,10 +8,9 @@ require 'atco/location' require 'atco/journey' require 'atco/stop' +require 'atco/version' module Atco - VERSION = '0.0.1' - class << self @path = nil @@methods = { diff --git a/lib/atco/version.rb b/lib/atco/version.rb new file mode 100644 index 0000000..c8ac9be --- /dev/null +++ b/lib/atco/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module Atco + VERSION = '1.0.0' +end \ No newline at end of file diff --git a/spec/atco_spec.rb b/spec/atco_spec.rb index 0a1dd97..536428d 100644 --- a/spec/atco_spec.rb +++ b/spec/atco_spec.rb @@ -7,6 +7,10 @@ before(:all) do end + it 'has a version number' do + expect(Atco::VERSION).not_to be nil + end + it 'should output file for debugging!' do result = Atco.parse('spec/fixtures/example.cif') File.open('test.output', 'w+') do |f|