aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml11
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock22
-rw-r--r--debian/changelog3
-rw-r--r--debian/control2
-rw-r--r--lib/mauve/sender.rb12
-rw-r--r--mauvesend.gemspec44
7 files changed, 70 insertions, 26 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 07b992b..cf424a4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,6 +38,17 @@ test:stretch:
paths:
- pkg/
+package:gem:
+ stage: package
+ image: $CI_REGISTRY/docker-images/layers:jessie-ruby
+ artifacts:
+ paths:
+ - pkg
+ script:
+ - package
+ variables:
+ GEMFILE: mauvesend.gemspec
+
package:jessie:
<<: *package
variables:
diff --git a/Gemfile b/Gemfile
index 8acb3ba..4fc00ac 100644
--- a/Gemfile
+++ b/Gemfile
@@ -28,9 +28,9 @@ gem "rack-protection", "~> 1.5.2"
gem "rack-flash3", "~> 1.0.5"
gem "tilt", "~> 1.4.1"
gem "sinatra", "~> 1.4.5"
-gem "locale", "~> 2.1.0"
group :test do
+ gem "locale", "~> 2.1.0"
gem "simplecov", :require => false
gem "rack-test", "~> 0.6.3"
gem "webmock", "~> 1.19.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 716949f..21cdb41 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,14 +2,14 @@ GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
- addressable (2.5.1)
- public_suffix (~> 2.0, >= 2.0.2)
+ addressable (2.5.2)
+ public_suffix (>= 2.0.2, < 4.0)
bcrypt (3.1.11)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
- daemons (1.2.4)
+ daemons (1.2.6)
data_objects (0.10.17)
addressable (~> 2.1)
datamapper (1.2.0)
@@ -75,11 +75,11 @@ GEM
json_pure (1.8.6)
locale (2.1.2)
log4r (1.1.10)
- mini_portile2 (2.2.0)
- multi_json (1.12.1)
- nokogiri (1.8.0)
- mini_portile2 (~> 2.2.0)
- public_suffix (2.0.5)
+ mini_portile2 (2.3.0)
+ multi_json (1.13.1)
+ nokogiri (1.8.2)
+ mini_portile2 (~> 2.3.0)
+ public_suffix (3.0.1)
rack (1.5.5)
rack-flash3 (1.0.5)
rack
@@ -92,11 +92,11 @@ GEM
safe_yaml (1.0.4)
sanitize (2.1.0)
nokogiri (>= 1.4.4)
- simplecov (0.14.1)
+ simplecov (0.15.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
- simplecov-html (0.10.1)
+ simplecov-html (0.10.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
@@ -148,4 +148,4 @@ DEPENDENCIES
webmock (~> 1.19.0)
BUNDLED WITH
- 1.13.6
+ 1.16.0
diff --git a/debian/changelog b/debian/changelog
index e4d42d3..b436c88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ mauvealert (3.16.0) UNRELEASED; urgency=medium
* Make authentication work for AJAX requests (#22, !3)
* Change 'Events' nav item to load day list instead of calendar (#18, !3)
+ [ Telyn Roat]
+ * Removed need for locale gem outside of tests. (github pr #3)
+
-- Patrick J Cherry <patrick@bytemark.co.uk> Mon, 01 Aug 2017 14:37:32 +0100
mauvealert (3.15.15-1) stable; urgency=medium
diff --git a/debian/control b/debian/control
index 5e913b3..41864f8 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,6 @@ Architecture: any
Pre-Depends: libjs-jquery
Depends: adduser, lsb-base, ruby | ruby-interpreter, ruby-bundler, ${shlibs:Depends}, ${misc:Depends}
Suggests: mauvealert-client
-Recommends: ruby-locale | liblocale-ruby1.8
Description: Mauve network alert system -- server
Mauve is a network alert system for system and network administrators. You can
use it to quickly set up ad-hoc monitoring for a variety of services, and to
@@ -25,7 +24,6 @@ Description: Mauve network alert system -- server
Package: mauvealert-client
Architecture: all
Depends: ruby | ruby-interpreter, ruby-protobuf, ${misc:Depends}
-Recommends: liblocale-ruby1.8 | ruby-locale
Replaces: mauvealert-common
Conflicts: mauvealert-common
Provides: mauvealert-common
diff --git a/lib/mauve/sender.rb b/lib/mauve/sender.rb
index e6cc4dd..7a965ab 100644
--- a/lib/mauve/sender.rb
+++ b/lib/mauve/sender.rb
@@ -1,11 +1,6 @@
# encoding: UTF-8
require 'ipaddr'
require 'socket'
-begin
- require 'locale'
-rescue LoadError
- # Do nothing -- these are bonus libraries :)
-end
require 'mauve/mauve_resolv'
require 'mauve/mauve_time'
@@ -153,13 +148,6 @@ module Mauve
update.replace ||= false
#
- # Check the locale charset. This is to maximise the amout of information
- # mauve receives, rather than provide proper sanitized data for the server.
- #
- from_charset = (Locale.current.charset || Locale.charset) if defined?(Locale)
- from_charset ||= "UTF-8"
-
- #
#
#
update.each_field do |field, value|
diff --git a/mauvesend.gemspec b/mauvesend.gemspec
new file mode 100644
index 0000000..d6312e4
--- /dev/null
+++ b/mauvesend.gemspec
@@ -0,0 +1,44 @@
+
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'mauve/version'
+
+Gem::Specification.new do |spec|
+ spec.name = 'mauvesend'
+ spec.version = Mauve::VERSION
+ spec.authors = ['Patrick Cherry', 'Telyn Roat']
+ spec.email = ['telyn@bytemark.co.uk']
+
+ spec.summary = 'an alert system for system and network administrators to help you sleep better, and be attentive to your computers.'
+ spec.homepage = 'https://github.com/BytemarkHosting/mauvealert'
+
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
+ if spec.respond_to?(:metadata)
+ spec.metadata['allowed_push_host'] = 'http://src.bytemark.co.uk'
+ else
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
+ 'public gem pushes.'
+ end
+
+ spec.files = %w[
+ lib/mauve/sender.rb
+ lib/mauve/mauve_resolv.rb
+ lib/mauve/mauve_time.rb
+ lib/mauve/version.rb
+ lib/mauve/proto.rb
+ mauve.proto
+ ]
+
+ spec.bindir = 'bin'
+ spec.executables = 'mauvesend'
+ spec.require_paths = ['lib']
+
+ spec.add_development_dependency 'bundler', '~> 1.16'
+ spec.add_development_dependency 'rake', '~> 10.0'
+
+ spec.add_runtime_dependency 'ruby_protobuf', '~> 0.4.11'
+
+ #
+ # The versions here are to match Jessie
+end