madvertise-ext 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54d75e02cff3fffa88c7ff3da45c896a0db8dacf
4
- data.tar.gz: 85c3e6f18d155920a0f653b6f2db3f807ea1c65a
3
+ metadata.gz: c22a14c34804ca0d3519bf051f1e8af0ea56285e
4
+ data.tar.gz: 351d160f7165e2eea5c8ebb2673e2eb4b1869395
5
5
  SHA512:
6
- metadata.gz: 9ecd0506ca44966ac1b3ba47554e5bf4fe1fef559e43a700a1529d55809afc46f1175a5678529e7dbeb9c821ab45a2a940ea38b9cbc75b5aff4bd71a45f71887
7
- data.tar.gz: f9ab272c63075bc471faa9655fa004e4883e9598687ada28e468bf77bf7d6ebf9ab0da9d95f6fc0903caabe5a12370d72906c3c678be77546db30017fdddde58
6
+ metadata.gz: cfa07391525dd1c68c111c4aed85092399ada684eb6952bba4d232818078126e6458c389038a0937c0dae8f3e2980f8257ee9553189795be09ac81b8715cff11
7
+ data.tar.gz: e03d25ab1dee356860d9d0dd06b49b565d6f67e308200f199880f5fd25bef0e5a869dd8bc25be63cfc96ce8aeac670ace910e1c1a0ade660acef575655e04f5c
@@ -2,48 +2,10 @@
2
2
 
3
3
  $:.unshift(ROOT) if defined?(ROOT)
4
4
 
5
- if RUBY_PLATFORM == 'java'
6
- begin
7
- require 'jbundler'
8
- rescue LoadError
9
- # do nothing
10
- end
11
-
12
- # some java libraries cannot be found on maven central, so we load all bundled
13
- # jar files here for convenience
14
- if defined?(ROOT)
15
- Dir[File.join(ROOT, 'jars', '*.jar')].each do |f|
16
- require f
17
- end
18
- end
19
- end
20
-
21
- # load a bunch of common classes here, so we don't have to track and repeat it
22
- # everywhere
23
- require 'active_support/all'
24
- require 'cgi'
25
- require 'date'
26
- require 'json'
27
- require 'socket'
5
+ # load default configuration
28
6
  require 'madvertise-logging'
7
+ require 'madvertise/configuration'
29
8
 
30
- # load all madvertise extensions
31
- Dir[File.join(File.dirname(__FILE__), 'ext', '*.rb')].each do |f|
32
- require f
33
- end
34
-
35
- blacklist = [
36
- 'tasks.rb',
37
- 'gc_stats.rb',
38
- 'sysconf.rb',
39
- 'proc_stat.rb',
40
- ]
41
-
42
- Dir[File.join(File.dirname(__FILE__), '*.rb')].each do |f|
43
- require f unless blacklist.include?(File.basename(f))
44
- end
45
-
46
- # load default configuration
47
9
  $conf = Configuration.new
48
10
 
49
11
  # configuration-reloading callbacks
@@ -78,3 +40,39 @@ $conf.callback(&reload_mixins)
78
40
  $conf.callback(&reload_logger)
79
41
 
80
42
  $conf.reload!
43
+
44
+ # load java dependencies
45
+ if RUBY_PLATFORM == 'java'
46
+ begin
47
+ require 'jbundler'
48
+ rescue LoadError
49
+ # do nothing
50
+ end
51
+
52
+ # some java libraries cannot be found on maven central, so we load all bundled
53
+ # jar files here for convenience
54
+ if defined?(ROOT)
55
+ Dir[File.join(ROOT, 'jars', '*.jar')].each do |f|
56
+ require f
57
+ end
58
+ end
59
+ end
60
+
61
+ # load a bunch of common classes here, so we don't have to track and repeat it
62
+ # everywhere
63
+ require 'active_support/all'
64
+ require 'cgi'
65
+ require 'date'
66
+ require 'json'
67
+ require 'socket'
68
+
69
+ # load all madvertise extensions
70
+ Dir[File.join(File.dirname(__FILE__), 'ext', '*.rb')].each do |f|
71
+ require f
72
+ end
73
+
74
+ require 'madvertise/cli'
75
+ require 'madvertise/environment'
76
+ require 'madvertise/from_file'
77
+ require 'madvertise/hash_helper'
78
+ require 'madvertise/transaction_id'
@@ -0,0 +1,11 @@
1
+ require 'singleton'
2
+ require 'metriks'
3
+ require 'metriks/reporter/logger'
4
+
5
+ class Statistics
6
+ include Singleton
7
+
8
+ def initialize
9
+ Metriks::Reporter::Logger.new(:logger => $log, :interval => 300).start
10
+ end
11
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "madvertise-ext"
5
- spec.version = "0.8.0"
5
+ spec.version = "0.9.0"
6
6
  spec.authors = ["madvertise Mobile Advertising GmbH"]
7
7
  spec.email = ["tech@madvertise.com"]
8
8
  spec.description = %q{Ruby core extensions and helper libraries}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madvertise-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - madvertise Mobile Advertising GmbH
@@ -111,6 +111,7 @@ files:
111
111
  - lib/madvertise/gc_stats.rb
112
112
  - lib/madvertise/hash_helper.rb
113
113
  - lib/madvertise/proc_stat.rb
114
+ - lib/madvertise/statistics.rb
114
115
  - lib/madvertise/sysconf.rb
115
116
  - lib/madvertise/tasks.rb
116
117
  - lib/madvertise/tasks/protoc.rake