tng-gtk-utils 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tng/gtk/utils/application_controller.rb +61 -0
- data/lib/tng/gtk/utils/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c61d7c8fa4fb7a90b0df6f3e6cf604e5346a952362f6be3d6987791c3718fcb
|
4
|
+
data.tar.gz: f0d31a1d184940c1400c69220d5910a25db25d167e55bf68b36734779c76509c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b6b5a20a71faeb33c1f91175d6805a8152ddb329a15ddf38a0089bf62c962fee5bf1c45cbcd33afebf2031c9987e4aaf6c796867c7175c91c06479e6c8ab312
|
7
|
+
data.tar.gz: 99897610e10505bc75e4526f55fcc1d6696f40ac0d4cbdb4b67fea2f282bbcdc340a180a7364ac902cf1b9da4b45d7ae354f5371cec0c2a6b4b516c46c31dc2f
|
@@ -0,0 +1,61 @@
|
|
1
|
+
## Copyright (c) 2015 SONATA-NFV, 2017 5GTANGO [, ANY ADDITIONAL AFFILIATION]
|
2
|
+
## ALL RIGHTS RESERVED.
|
3
|
+
##
|
4
|
+
## Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
## you may not use this file except in compliance with the License.
|
6
|
+
## You may obtain a copy of the License at
|
7
|
+
##
|
8
|
+
## http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
##
|
10
|
+
## Unless required by applicable law or agreed to in writing, software
|
11
|
+
## distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
## See the License for the specific language governing permissions and
|
14
|
+
## limitations under the License.
|
15
|
+
##
|
16
|
+
## Neither the name of the SONATA-NFV, 5GTANGO [, ANY ADDITIONAL AFFILIATION]
|
17
|
+
## nor the names of its contributors may be used to endorse or promote
|
18
|
+
## products derived from this software without specific prior written
|
19
|
+
## permission.
|
20
|
+
##
|
21
|
+
## This work has been performed in the framework of the SONATA project,
|
22
|
+
## funded by the European Commission under Grant number 671517 through
|
23
|
+
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
|
24
|
+
## acknowledge the contributions of their colleagues of the SONATA
|
25
|
+
## partner consortium (www.sonata-nfv.eu).
|
26
|
+
##
|
27
|
+
## This work has been performed in the framework of the 5GTANGO project,
|
28
|
+
## funded by the European Commission under Grant number 761493 through
|
29
|
+
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
|
30
|
+
## acknowledge the contributions of their colleagues of the 5GTANGO
|
31
|
+
## partner consortium (www.5gtango.eu).
|
32
|
+
# encoding: utf-8
|
33
|
+
require 'sinatra/base'
|
34
|
+
require 'sinatra/config_file'
|
35
|
+
require 'sinatra/cross_origin'
|
36
|
+
require 'tng/gtk/utils/logger'
|
37
|
+
|
38
|
+
module Tng
|
39
|
+
module Gtk
|
40
|
+
module Utils
|
41
|
+
class ApplicationController < Sinatra::Base
|
42
|
+
LOGGER=Tng::Gtk::Utils::Logger
|
43
|
+
LOGGED_COMPONENT=self.name
|
44
|
+
@@began_at = Time.now.utc
|
45
|
+
LOGGER.info(component:LOGGED_COMPONENT, operation:'initializing', start_stop: 'START', message:"Started at #{@@began_at}")
|
46
|
+
|
47
|
+
register Sinatra::ConfigFile
|
48
|
+
register Sinatra::CrossOrigin
|
49
|
+
enable :cross_origin
|
50
|
+
|
51
|
+
set :bind, '0.0.0.0'
|
52
|
+
set :environments, %w(development pre-int int demo qual staging)
|
53
|
+
set :began_at, Time.now.utc
|
54
|
+
set :environment, ENV.fetch('RACK_ENV', :development)
|
55
|
+
|
56
|
+
before { content_type :json}
|
57
|
+
LOGGER.info(component:LOGGED_COMPONENT, operation:'initializing', start_stop: 'STOP', message:"Ended at #{Time.now.utc}", time_elapsed:"#{Time.now.utc-began_at}")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tng-gtk-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Bonnet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- bin/console
|
118
118
|
- bin/setup
|
119
119
|
- lib/tng/gtk/utils.rb
|
120
|
+
- lib/tng/gtk/utils/application_controller.rb
|
120
121
|
- lib/tng/gtk/utils/cache.rb
|
121
122
|
- lib/tng/gtk/utils/fetch.rb
|
122
123
|
- lib/tng/gtk/utils/logger.rb
|