aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Cherry <patch0@users.noreply.github.com>2018-01-29 15:54:31 +0000
committerGitHub <noreply@github.com>2018-01-29 15:54:31 +0000
commit9bdd63df6f71ea7322f3d65aa88a79cb17d74b9c (patch)
tree3a4074687ccdb17a440049b243229bb30feac7ef
parentb2468a1977d0982e73b64e4cc80ad8120fa16365 (diff)
parentfa9b1e69d7835bce47990648c6d01fc3f67fcded (diff)
Merge pull request #3 from BytemarkHosting/rip-out-locale
rip out the require 'locale'
-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
5 files changed, 15 insertions, 26 deletions
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|