logutils-activerecord 0.1.1 → 0.2.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: 36689361f0d0638f7a51bb6c289acb9cc8693549
4
- data.tar.gz: 57e7a25c121d6ec7375a98042c947c8d07c6be26
3
+ metadata.gz: 6620f036f516361bdd7a2747ad24c5494774a39f
4
+ data.tar.gz: b9f94ef2567698a06d426c3ea117c7adc9fa7aeb
5
5
  SHA512:
6
- metadata.gz: 1c25fd0c0dea6d9dd7accc203630e440fad453bd6c14dc67d93218dd7b57f16a03badb019abd68691be2e4ab7f8c76686193a2ce700acb479b9410fc5b4609e7
7
- data.tar.gz: c1e203868530815040c2d6d24b3f73effbff8489e2b4bd0646d0cd89bd8a72ac532227ddb69cc5511273ce20779c8f40bb34205a886be706ec74e528bd33de44
6
+ metadata.gz: 0369fe85305134a2783086dc0d66385336493ca22403f2cdfa063255c083f90050a9564fa148a66ffc25a3e67e2f356bdfacc0c99d359d9ea5cfd68724de4134
7
+ data.tar.gz: b0c7d755d56b9e6d0145c323904e88431491ae908ae8db09d80e94cb48236d217ece9030c7dbb557d2e6c98c92180bdfbe07006ee6c5e91551866162a5d926c0
data/HISTORY.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 0.0.1 / 2014-12-03
1
+ ### 0.1.0 / 2014-12-03
2
2
 
3
3
  * Everything is new. First release
4
4
 
data/Manifest.txt CHANGED
@@ -6,10 +6,5 @@ lib/logutils/activerecord.rb
6
6
  lib/logutils/activerecord/models.rb
7
7
  lib/logutils/activerecord/schema.rb
8
8
  lib/logutils/activerecord/version.rb
9
- lib/logutils/server.rb
10
- lib/logutils/server/public/style.css
11
- lib/logutils/server/views/_version.erb
12
- lib/logutils/server/views/index.erb
13
- lib/logutils/server/views/layout.erb
14
9
  test/helper.rb
15
10
  test/test_logger.rb
@@ -3,8 +3,8 @@
3
3
  module LogDb
4
4
 
5
5
  MAJOR = 0 ## todo: namespace inside version or something - why? why not??
6
- MINOR = 1
7
- PATCH = 1
6
+ MINOR = 2
7
+ PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logutils-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
@@ -84,11 +84,6 @@ files:
84
84
  - lib/logutils/activerecord/models.rb
85
85
  - lib/logutils/activerecord/schema.rb
86
86
  - lib/logutils/activerecord/version.rb
87
- - lib/logutils/server.rb
88
- - lib/logutils/server/public/style.css
89
- - lib/logutils/server/views/_version.erb
90
- - lib/logutils/server/views/index.erb
91
- - lib/logutils/server/views/layout.erb
92
87
  - test/helper.rb
93
88
  - test/test_logger.rb
94
89
  homepage: https://github.com/rubylibs/logutils-activerecord
@@ -1,58 +0,0 @@
1
- ######
2
- # NB: use rackup to startup Sinatra service (see config.ru)
3
- #
4
- # e.g. config.ru:
5
- # require './boot'
6
- # run LogDb::Server
7
-
8
-
9
- # 3rd party libs/gems - include/require in ./boot
10
- ### require 'sinatra/base'
11
-
12
-
13
- # NOTE: it's an addon for logutils
14
- # assume logutils and logutils/activerecord already required
15
- # require 'logutils'
16
- # require 'logutils/db'
17
-
18
-
19
- # our own code
20
-
21
- module LogDb
22
-
23
- class Server < Sinatra::Base
24
-
25
- def self.banner
26
- "logdb-service/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] on Sinatra/#{Sinatra::VERSION} (#{ENV['RACK_ENV']})"
27
- end
28
-
29
- PUBLIC_FOLDER = "#{LogDb.root}/lib/logutils/server/public"
30
- VIEWS_FOLDER = "#{LogDb.root}/lib/logutils/server/views"
31
-
32
- puts "[boot] logdb-service - setting public folder to: #{PUBLIC_FOLDER}"
33
- puts "[boot] logdb-service - setting views folder to: #{VIEWS_FOLDER}"
34
-
35
- set :public_folder, PUBLIC_FOLDER # set up the static dir (with images/js/css inside)
36
- set :views, VIEWS_FOLDER # set up the views dir
37
-
38
- set :static, true # set up static file routing
39
-
40
- #####################
41
- # Models
42
-
43
- include Models
44
-
45
- ##############################################
46
- # Controllers / Routing / Request Handlers
47
-
48
- get '/' do
49
- erb :index
50
- end
51
-
52
- end # class Server
53
- end # module LogDb
54
-
55
-
56
- # say hello
57
- puts LogDb::Server.banner
58
-
@@ -1,49 +0,0 @@
1
-
2
-
3
- body { font-family: arial,verdana,helvetica; }
4
-
5
- .log-id,
6
- .log-pid,
7
- .log-created-at { font-size: 60%; color: grey; }
8
-
9
- .log-id { text-align: right; }
10
-
11
- .log-level,
12
- .log-msg { font-size: 80%; }
13
-
14
- .log-created-at,
15
- .log-pid,
16
- .log-msg { white-space: nowrap; }
17
-
18
- .log-level { font-weight: bold; }
19
-
20
- .log-msg.warn { font-weight: bold; }
21
-
22
-
23
- /****
24
- * links
25
- */
26
-
27
- a {
28
- color: black;
29
- text-decoration: none; }
30
- a:hover {
31
- color: black;
32
- background-color: aqua;
33
- text-decoration: underline; }
34
- a:visited {
35
- color: black; }
36
-
37
-
38
-
39
- /**********
40
- * version / powered by
41
- */
42
-
43
- .version {
44
- text-align: center;
45
- margin-top: 10px;
46
- color: grey; }
47
- .version a, .version span {
48
- font-size: 12px;
49
- color: grey; }
@@ -1,5 +0,0 @@
1
- <div class='version'>
2
- <a href="https://github.com/rubylibs/logutils">log.db/<%= LogDb::VERSION %></a> -
3
- <span>Ruby/<%= "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}/#{RUBY_PLATFORM})" %> on</span>
4
- <span>Sinatra/<%= Sinatra::VERSION %> (<%= ENV['RACK_ENV'] %>)</span>
5
- </div>
@@ -1,26 +0,0 @@
1
-
2
- <h3><%= Log.count %> Logs</h3>
3
-
4
- <!-- todo:
5
- add filter for FATAL,ERROR,WARN,etc.
6
- add log count per kind? (e.g. 20 errors, 5 warns, etc.)
7
-
8
- css: use colors
9
-
10
- - error/fatal - red?
11
- - warn - // bold or organge?
12
- - info - normal
13
- - debug - light grey??
14
- -->
15
-
16
- <table>
17
- <% Log.all.each do |log| %>
18
- <tr>
19
- <td class='log-id'><%= log.id %>.</td>
20
- <td class='log-level <%= log.level %>'>[<%= log.level %>]</td>
21
- <td class='log-msg <%= log.level %>'><%= log.msg %></td>
22
- <td class='log-pid'><%= "#{log.pid}.#{log.tid}" %></td>
23
- <td class='log-created-at' <%= log.level %>'><%= log.created_at %></td>
24
- </tr>
25
- <% end %>
26
- </table>
@@ -1,15 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset='UTF-8'>
5
- <title>Logs</title>
6
- <link href="<%= url('/style.css') %>" rel='stylesheet'>
7
- </head>
8
- <body>
9
-
10
- <%= yield %>
11
-
12
- <%= erb :'_version' %>
13
-
14
- </body>
15
- </html>