logstash-output-scalyr 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -2
  3. data/lib/scalyr/common/client.rb +3 -1
  4. data/logstash-output-scalyr.gemspec +2 -2
  5. data/vendor/bundle/jruby/2.5.0/bin/jruby_executable_hooks +25 -0
  6. data/vendor/bundle/jruby/2.5.0/cache/connection_pool-2.2.3.gem +0 -0
  7. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Changes.md +130 -0
  8. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Gemfile +5 -0
  9. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/LICENSE +20 -0
  10. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/README.md +121 -0
  11. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Rakefile +7 -0
  12. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/connection_pool.gemspec +20 -0
  13. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool.rb +110 -0
  14. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/timed_stack.rb +170 -0
  15. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/version.rb +3 -0
  16. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/wrapper.rb +43 -0
  17. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/helper.rb +8 -0
  18. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/test_connection_pool.rb +553 -0
  19. data/vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/test_connection_pool_timed_stack.rb +140 -0
  20. data/vendor/bundle/jruby/2.5.0/specifications/connection_pool-2.2.3.gemspec +34 -0
  21. metadata +21 -6
@@ -0,0 +1,140 @@
1
+ require_relative "helper"
2
+
3
+ class TestConnectionPoolTimedStack < Minitest::Test
4
+ def setup
5
+ @stack = ConnectionPool::TimedStack.new { Object.new }
6
+ end
7
+
8
+ def test_empty_eh
9
+ stack = ConnectionPool::TimedStack.new(1) { Object.new }
10
+
11
+ refute_empty stack
12
+
13
+ popped = stack.pop
14
+
15
+ assert_empty stack
16
+
17
+ stack.push popped
18
+
19
+ refute_empty stack
20
+ end
21
+
22
+ def test_length
23
+ stack = ConnectionPool::TimedStack.new(1) { Object.new }
24
+
25
+ assert_equal 1, stack.length
26
+
27
+ popped = stack.pop
28
+
29
+ assert_equal 0, stack.length
30
+
31
+ stack.push popped
32
+
33
+ assert_equal 1, stack.length
34
+ end
35
+
36
+ def test_object_creation_fails
37
+ stack = ConnectionPool::TimedStack.new(2) { raise "failure" }
38
+
39
+ begin
40
+ stack.pop
41
+ rescue => error
42
+ assert_equal "failure", error.message
43
+ end
44
+
45
+ begin
46
+ stack.pop
47
+ rescue => error
48
+ assert_equal "failure", error.message
49
+ end
50
+
51
+ refute_empty stack
52
+ assert_equal 2, stack.length
53
+ end
54
+
55
+ def test_pop
56
+ object = Object.new
57
+ @stack.push object
58
+
59
+ popped = @stack.pop
60
+
61
+ assert_same object, popped
62
+ end
63
+
64
+ def test_pop_empty
65
+ e = assert_raises(ConnectionPool::TimeoutError) { @stack.pop timeout: 0 }
66
+ assert_equal "Waited 0 sec", e.message
67
+ end
68
+
69
+ def test_pop_empty_2_0_compatibility
70
+ e = assert_raises(Timeout::Error) { @stack.pop 0 }
71
+ assert_equal "Waited 0 sec", e.message
72
+ end
73
+
74
+ def test_pop_full
75
+ stack = ConnectionPool::TimedStack.new(1) { Object.new }
76
+
77
+ popped = stack.pop
78
+
79
+ refute_nil popped
80
+ assert_empty stack
81
+ end
82
+
83
+ def test_pop_wait
84
+ thread = Thread.start {
85
+ @stack.pop
86
+ }
87
+
88
+ Thread.pass while thread.status == "run"
89
+
90
+ object = Object.new
91
+
92
+ @stack.push object
93
+
94
+ assert_same object, thread.value
95
+ end
96
+
97
+ def test_pop_shutdown
98
+ @stack.shutdown {}
99
+
100
+ assert_raises ConnectionPool::PoolShuttingDownError do
101
+ @stack.pop
102
+ end
103
+ end
104
+
105
+ def test_push
106
+ stack = ConnectionPool::TimedStack.new(1) { Object.new }
107
+
108
+ conn = stack.pop
109
+
110
+ stack.push conn
111
+
112
+ refute_empty stack
113
+ end
114
+
115
+ def test_push_shutdown
116
+ called = []
117
+
118
+ @stack.shutdown do |object|
119
+ called << object
120
+ end
121
+
122
+ @stack.push Object.new
123
+
124
+ refute_empty called
125
+ assert_empty @stack
126
+ end
127
+
128
+ def test_shutdown
129
+ @stack.push Object.new
130
+
131
+ called = []
132
+
133
+ @stack.shutdown do |object|
134
+ called << object
135
+ end
136
+
137
+ refute_empty called
138
+ assert_empty @stack
139
+ end
140
+ end
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: connection_pool 2.2.3 ruby lib
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "connection_pool".freeze
6
+ s.version = "2.2.3"
7
+
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib".freeze]
10
+ s.authors = ["Mike Perham".freeze, "Damian Janowski".freeze]
11
+ s.date = "2020-06-02"
12
+ s.description = "Generic connection pool for Ruby".freeze
13
+ s.email = ["mperham@gmail.com".freeze, "damian@educabilia.com".freeze]
14
+ s.homepage = "https://github.com/mperham/connection_pool".freeze
15
+ s.licenses = ["MIT".freeze]
16
+ s.rubygems_version = "3.1.3".freeze
17
+ s.summary = "Generic connection pool for Ruby".freeze
18
+
19
+ s.installed_by_version = "3.1.3" if s.respond_to? :installed_by_version
20
+
21
+ if s.respond_to? :specification_version then
22
+ s.specification_version = 4
23
+ end
24
+
25
+ if s.respond_to? :add_runtime_dependency then
26
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
27
+ s.add_development_dependency(%q<minitest>.freeze, [">= 5.0.0"])
28
+ s.add_development_dependency(%q<rake>.freeze, [">= 0"])
29
+ else
30
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
31
+ s.add_dependency(%q<minitest>.freeze, [">= 5.0.0"])
32
+ s.add_dependency(%q<rake>.freeze, [">= 0"])
33
+ end
34
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-scalyr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edward Chee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2020-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 1.9.25
66
+ version: 1.9.18
67
67
  name: ffi
68
68
  prerelease: false
69
69
  type: :runtime
@@ -71,7 +71,7 @@ dependencies:
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 1.9.25
74
+ version: 1.9.18
75
75
  - !ruby/object:Gem::Dependency
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
@@ -121,6 +121,7 @@ files:
121
121
  - spec/scalyr/common/util_spec.rb
122
122
  - vendor/bundle/jruby/2.5.0/bin/coderay
123
123
  - vendor/bundle/jruby/2.5.0/bin/htmldiff
124
+ - vendor/bundle/jruby/2.5.0/bin/jruby_executable_hooks
124
125
  - vendor/bundle/jruby/2.5.0/bin/kramdown
125
126
  - vendor/bundle/jruby/2.5.0/bin/ldiff
126
127
  - vendor/bundle/jruby/2.5.0/bin/minitar
@@ -139,6 +140,7 @@ files:
139
140
  - vendor/bundle/jruby/2.5.0/cache/concurrent-ruby-1.1.5.gem
140
141
  - vendor/bundle/jruby/2.5.0/cache/concurrent-ruby-1.1.6.gem
141
142
  - vendor/bundle/jruby/2.5.0/cache/connection_pool-2.2.2.gem
143
+ - vendor/bundle/jruby/2.5.0/cache/connection_pool-2.2.3.gem
142
144
  - vendor/bundle/jruby/2.5.0/cache/diff-lcs-1.3.gem
143
145
  - vendor/bundle/jruby/2.5.0/cache/elasticsearch-5.0.5.gem
144
146
  - vendor/bundle/jruby/2.5.0/cache/elasticsearch-api-5.0.5.gem
@@ -617,6 +619,19 @@ files:
617
619
  - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.2/test/helper.rb
618
620
  - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.2/test/test_connection_pool.rb
619
621
  - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.2/test/test_connection_pool_timed_stack.rb
622
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Changes.md
623
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Gemfile
624
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/LICENSE
625
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/README.md
626
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/Rakefile
627
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/connection_pool.gemspec
628
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool.rb
629
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/timed_stack.rb
630
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/version.rb
631
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/lib/connection_pool/wrapper.rb
632
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/helper.rb
633
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/test_connection_pool.rb
634
+ - vendor/bundle/jruby/2.5.0/gems/connection_pool-2.2.3/test/test_connection_pool_timed_stack.rb
620
635
  - vendor/bundle/jruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md
621
636
  - vendor/bundle/jruby/2.5.0/gems/diff-lcs-1.3/Contributing.md
622
637
  - vendor/bundle/jruby/2.5.0/gems/diff-lcs-1.3/History.md
@@ -4326,6 +4341,7 @@ files:
4326
4341
  - vendor/bundle/jruby/2.5.0/specifications/concurrent-ruby-1.1.5.gemspec
4327
4342
  - vendor/bundle/jruby/2.5.0/specifications/concurrent-ruby-1.1.6.gemspec
4328
4343
  - vendor/bundle/jruby/2.5.0/specifications/connection_pool-2.2.2.gemspec
4344
+ - vendor/bundle/jruby/2.5.0/specifications/connection_pool-2.2.3.gemspec
4329
4345
  - vendor/bundle/jruby/2.5.0/specifications/diff-lcs-1.3.gemspec
4330
4346
  - vendor/bundle/jruby/2.5.0/specifications/elasticsearch-5.0.5.gemspec
4331
4347
  - vendor/bundle/jruby/2.5.0/specifications/elasticsearch-api-5.0.5.gemspec
@@ -4410,8 +4426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
4410
4426
  - !ruby/object:Gem::Version
4411
4427
  version: '0'
4412
4428
  requirements: []
4413
- rubyforge_project:
4414
- rubygems_version: 2.7.10
4429
+ rubygems_version: 3.1.3
4415
4430
  signing_key:
4416
4431
  specification_version: 4
4417
4432
  summary: Scalyr output plugin for Logstash