diff --git a/Gemfile.lock b/Gemfile.lock index b38a76d..887ff90 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,10 +2,12 @@ PATH remote: . specs: locomotivecms_common (0.0.1) + colorize GEM remote: https://rubygems.org/ specs: + colorize (0.7.3) diff-lcs (1.2.5) rake (10.2.2) rspec (2.14.1) diff --git a/Rakefile b/Rakefile index 8dc82cf..94fa90e 100644 --- a/Rakefile +++ b/Rakefile @@ -5,11 +5,11 @@ require 'rake' require 'rspec' require 'rspec/core/rake_task' -require_relative 'lib/common' +require_relative 'lib/locomotive/common' RSpec::Core::RakeTask.new('spec:all') do |spec| spec.pattern = 'spec/**/*_spec.rb' end task spec: ['spec:all'] -task default: :spec \ No newline at end of file +task default: :spec diff --git a/lib/common.rb b/lib/locomotive/common.rb similarity index 56% rename from lib/common.rb rename to lib/locomotive/common.rb index 857d89d..7d2e8ad 100644 --- a/lib/common.rb +++ b/lib/locomotive/common.rb @@ -1,9 +1,8 @@ -require_relative 'locomotive/common/version' -require_relative 'locomotive/common/logger' -require_relative 'locomotive/common/exception' -require_relative 'locomotive/common/notifier' - -require_relative 'locomotive/common/configuration' +require_relative 'common/version' +require_relative 'common/logger' +require_relative 'common/exception' +require_relative 'common/notifier' +require_relative 'common/configuration' module Locomotive module Common @@ -23,4 +22,4 @@ def self.configure yield(configuration) end end -end \ No newline at end of file +end diff --git a/lib/locomotive/common/logger.rb b/lib/locomotive/common/logger.rb index a46fe6f..a8e56dc 100644 --- a/lib/locomotive/common/logger.rb +++ b/lib/locomotive/common/logger.rb @@ -1,3 +1,5 @@ +require 'colorize' + module Locomotive module Common @@ -66,4 +68,4 @@ def log_file_path log_file_full_path end end end -end \ No newline at end of file +end diff --git a/lib/plugins/notifier.rb b/lib/locomotive/common/plugins/notifier.rb similarity index 100% rename from lib/plugins/notifier.rb rename to lib/locomotive/common/plugins/notifier.rb diff --git a/locomotivecms_common.gemspec b/locomotivecms_common.gemspec index 715af21..f7fbfa5 100644 --- a/locomotivecms_common.gemspec +++ b/locomotivecms_common.gemspec @@ -1,4 +1,4 @@ -require_relative 'lib/common' +require_relative 'lib/locomotive/common/version' Gem::Specification.new do |spec| spec.name = 'locomotivecms_common' @@ -20,5 +20,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 10.1' spec.add_development_dependency 'rspec', '~> 2.14' + spec.add_dependency 'colorize' spec.required_ruby_version = '~> 2.0' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 09ba858..486d292 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,9 +1,9 @@ require 'rubygems' require 'bundler/setup' -require_relative '../lib/common' +require_relative '../lib/locomotive/common' RSpec.configure do |config| config.filter_run focused: true config.run_all_when_everything_filtered = true -end \ No newline at end of file +end