timber 2.1.8 → 2.1.9

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: d9baae24f054e5e2aff9bac79436dc128f7a0271
4
- data.tar.gz: e016adb0073b58d572a88b80378dbd0d1cd17ed6
3
+ metadata.gz: 44f09308d7bdbfa11aec261d744e1f7f6079a42a
4
+ data.tar.gz: 10865ebbb111847407a005bf74ff5984674bbc31
5
5
  SHA512:
6
- metadata.gz: dce0d9a456788d2445110922175fb5a2168df1317e8c3c3149beb3054354f5e76d4b5e8b5c26eed067397383eb1ae89accefcb2823ff42038803edd8a9c6f1c9
7
- data.tar.gz: 380d55181c8b8e30407624788e7fbebb3998c97ac00033afa3b709a562ba7a94c25a315ac7625d43f99e21456f31787383511512974df2fc8dad779ac77dc5aa
6
+ metadata.gz: a4a0ebcf64ab5dfe47073507f5fa5cebebb341266d4bcc848ff534ae9d0655ff50a3f245211ad9a437b46cc1fc8facf9ca5a7237a5db33a81da9d7d364333b88
7
+ data.tar.gz: d3bfdd5c5cd102b1bf257f4860c610c43b10a2885412b74fa502afa03300295dd0337de5fc14bdbc4e019699479ef7e2dc205b6d8873ee766796808431c6effa
data/.travis.yml CHANGED
@@ -38,6 +38,8 @@ matrix:
38
38
  gemfile: "gemfiles/rails-3.2.gemfile"
39
39
  allow_failures:
40
40
  - rvm: 2.4.1
41
+ - rvm: jruby
42
+ gemfile: gemfiles/rails-3.0.gemfile
41
43
  - rvm: jruby
42
44
  gemfile: gemfiles/rails-5.0.gemfile
43
45
  - rvm: jruby
data/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  [![Build Status](https://travis-ci.org/timberio/timber-ruby.svg?branch=master)](https://travis-ci.org/timberio/timber-ruby)
6
6
  [![Code Climate](https://codeclimate.com/github/timberio/timber-ruby/badges/gpa.svg)](https://codeclimate.com/github/timberio/timber-ruby)
7
7
 
8
- [Timber](https://timber.io) is a cloud-based logging system that integrates directly with your
9
- Ruby app to capture context and metadata without parsing. This produces rich, clean, readable logs
10
- that are easier to search and use:
8
+ [Timber](https://timber.io) is a cloud-based logging system that integrates directly with your Ruby
9
+ app through this library, capturing context and metadata without parsing. This produces rich, clean,
10
+ readable logs that are easier to search and use:
11
11
 
12
12
  1. [**Installation** - One command: `bundle exec timber install`](#installation)
13
13
  2. [**Usage** - Simple yet powerful API](#usage)
@@ -308,14 +308,18 @@ couldn't otherwise. This automatically upgrades logs produced by these libraries
308
308
  [easier to search and use](#do-amazing-things-with-your-logs). Below is a list of libraries we
309
309
  support:
310
310
 
311
- 1. [**Rails**](https://timber.io/docs/languages/ruby/integrations/rails)
312
- 2. [**Rack**](https://timber.io/docs/languages/ruby/integrations/rack)
313
- 3. [**Heroku**](https://timber.io/docs/languages/ruby/integrations/heroku)
314
- 4. [**Devise**](https://timber.io/docs/languages/ruby/integrations/devise)
315
- 5. [**Clearance**](https://timber.io/docs/languages/ruby/integrations/clearnace)
316
- 6. [**Omniauth**](https://timber.io/docs/languages/ruby/integrations/omniauth)
317
- 7. [**Warden**](https://timber.io/docs/languages/ruby/integrations/devise)
318
- 8. ...more coming soon! Make a request by [opening an issue](https://github.com/timberio/timber-ruby/issues/new)
311
+ * Frameworks & Libraries
312
+ * [**Rails**](https://timber.io/docs/languages/ruby/integrations/rails)
313
+ * [**Rack**](https://timber.io/docs/languages/ruby/integrations/rack)
314
+ * [**Devise**](https://timber.io/docs/languages/ruby/integrations/devise)
315
+ * [**Clearance**](https://timber.io/docs/languages/ruby/integrations/clearnace)
316
+ * [**Omniauth**](https://timber.io/docs/languages/ruby/integrations/omniauth)
317
+ * [**Warden**](https://timber.io/docs/languages/ruby/integrations/devise)
318
+ * Platforms
319
+ * [**Heroku**](https://timber.io/docs/languages/ruby/integrations/heroku)
320
+ * [**System / Server**](https://timber.io/docs/languages/ruby/integrations/system)
321
+
322
+ ...more coming soon! Make a request by [opening an issue](https://github.com/timberio/timber-ruby/issues/new)
319
323
 
320
324
 
321
325
  ## Get things done with your logs
@@ -100,8 +100,6 @@ module Timber
100
100
  end
101
101
 
102
102
  case iteration
103
- when 0
104
- event(:waiting_for_logs)
105
103
  when 20
106
104
  event(:excessive_log_waiting)
107
105
  when 60
@@ -55,9 +55,9 @@ module Timber
55
55
  io.task(task_message) do
56
56
  http_device = LogDevices::HTTP.new(api.api_key)
57
57
  logger = Logger.new(http_device)
58
- logger.info("Welcome to Timber!")
59
- logger.info("This is a test log to ensure the pipes are working")
60
- logger.info("Be sure to commit and deploy your app to start seeing real logs")
58
+ logger.debug("Welcome to Timber!")
59
+ logger.debug("This is a test log to ensure the pipes are working")
60
+ logger.debug("Be sure to commit and deploy your app to start seeing real logs")
61
61
  # Close flushes and waits
62
62
  http_device.close
63
63
  end
@@ -68,8 +68,8 @@ module Timber
68
68
 
69
69
  io.task(task_message) do
70
70
  api.wait_for_logs do |iteration|
71
- io.write IO::Messages.task_start(task_message), :blue
72
- io.write IO::Messages.spinner(iteration), :blue
71
+ io.write(IO::Messages.task_start(task_message), :blue)
72
+ io.write(IO::Messages.spinner(iteration), :blue)
73
73
  end
74
74
  end
75
75
  end
@@ -149,7 +149,7 @@ module Timber
149
149
 
150
150
  # Runtime context
151
151
  thread_object_id = Thread.current.object_id
152
- runtime_context = Contexts::System.new(vm_pid: thread_object_id)
152
+ runtime_context = Contexts::Runtime.new(vm_pid: thread_object_id)
153
153
  add_to!(new_hash, runtime_context)
154
154
 
155
155
  new_hash
@@ -1,3 +1,3 @@
1
1
  module Timber
2
- VERSION = "2.1.8"
2
+ VERSION = "2.1.9"
3
3
  end
@@ -7,6 +7,18 @@ describe Timber::CurrentContext, :rails_23 => true do
7
7
  expect(context.send(:hash)[:release]).to be_nil
8
8
  end
9
9
 
10
+ it "should set the system context" do
11
+ context = described_class.send(:new)
12
+ system_content = context.fetch(:system)
13
+ expect(system_content[:hostname]).to be_present
14
+ end
15
+
16
+ it "should set the runtime context" do
17
+ context = described_class.send(:new)
18
+ runtime_context = context.fetch(:runtime)
19
+ expect(runtime_context[:vm_pid]).to be_present
20
+ end
21
+
10
22
  context "with Heroku dyno metadata" do
11
23
  around(:each) do |example|
12
24
  ENV['HEROKU_SLUG_COMMIT'] = "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timber
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.8
4
+ version: 2.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timber Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-25 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack