require 'annoyance/engine' if defined?(Rails)

module Annoyance
end

if defined?(Rails)
  require 'annoyance/engine'
else
  require_relative '../app/models/annoyance/levels'
  require_relative '../app/models/annoyance/meter'
end

module Annoyance
end

Make gem work with and without rails
Make gem work with and without rails