act-fluent-logger-rails 0.2.0 → 0.3.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: c3620e98091da97133d63c7988fd39d6fead83c5
4
- data.tar.gz: e5be5d05fbe18db5facccd4cc6273bba08ba6e6e
3
+ metadata.gz: 04d055709961370ec26fc8ab6ee6b3baed0082c7
4
+ data.tar.gz: 5a95cb9fb40bb95be1d78eb97c4793f1609bff00
5
5
  SHA512:
6
- metadata.gz: 00ff02c7cc4536d5b1abd93184a6f632803ba73f71cb837b4aabd98ae4aa98b98c5e1f941c58f5ea66ada2f3a5e550c3131aaab3a60406a635e4c3f7e0692d99
7
- data.tar.gz: 90b97b638e772f40cecfabe7c1de55b5134454b399c8da508a449ec56d8ee6a811d21023b555c3f05270f86c74e7c77a7358b7179195e7a174a2834139d958e2
6
+ metadata.gz: 46a6fa9fc3e7242266a2e73fb6dba526d34d91e4123497dabdcf970b01c62f665765acc9592b90a9593a1e5eca2866627977d91cd6a6d11cd09dcced720d2fdf
7
+ data.tar.gz: 06e933dd15de557d22890c6d0adbdd25260e21278598f6f17d5292f8b7cf96f86e67161114b6e681b0c8e99932628ab7b79274521fac59b92eadbaffc3cbfb17
@@ -1,4 +1,17 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1.2
3
+ - 2.0.0-p648
4
+ - 2.1.10
5
+ - 2.2.5
6
+ - 2.3.1
7
+ gemfile:
8
+ - gemfiles/rails_4.0.gemfile
9
+ - gemfiles/rails_4.1.gemfile
10
+ - gemfiles/rails_4.2.gemfile
11
+ - gemfiles/rails_5.0.gemfile
12
+ matrix:
13
+ exclude:
14
+ - rvm: 2.0.0-p648
15
+ gemfile: gemfiles/rails_5.0.gemfile
16
+ - rvm: 2.1.10
17
+ gemfile: gemfiles/rails_5.0.gemfile
@@ -0,0 +1,15 @@
1
+ appraise 'rails-4.0' do
2
+ gem 'rails', '4.0.13'
3
+ end
4
+
5
+ appraise 'rails-4.1' do
6
+ gem 'rails', '4.1.15'
7
+ end
8
+
9
+ appraise 'rails-4.2' do
10
+ gem 'rails', '4.2.6'
11
+ end
12
+
13
+ appraise 'rails-5.0' do
14
+ gem 'rails', '5.0.0'
15
+ end
@@ -1,3 +1,7 @@
1
+ ## 0.3.0 / July 12 2016
2
+
3
+ * Rails 5
4
+
1
5
  ## 0.2.0 / Mar 20 2016
2
6
 
3
7
  * Add severity_key parameter. Is is The key of severity(DEBUG, INFO, WARN, ERROR).
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'appraisal'
4
+
3
5
  # Specify your gem's dependencies in act-fluent-logger-rails.gemspec
4
6
  gemspec
data/README.md CHANGED
@@ -4,7 +4,7 @@ Fluent logger.
4
4
 
5
5
  ## Supported versions
6
6
 
7
- * Rails 4.1
7
+ * Rails 4 and 5
8
8
 
9
9
  ## Installation
10
10
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_development_dependency "rspec"
21
+ gem.add_development_dependency "rspec", '~> 3.5.0'
22
22
  gem.add_runtime_dependency "fluent-logger"
23
- gem.add_runtime_dependency "rails", ">= 3.2.0", "< 5.0"
23
+ gem.add_runtime_dependency "rails", ">= 4", "< 5.1"
24
24
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "4.0.13"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,106 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ act-fluent-logger-rails (0.3.0)
5
+ fluent-logger
6
+ rails (>= 4, < 5.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.0.13)
12
+ actionpack (= 4.0.13)
13
+ mail (~> 2.5, >= 2.5.4)
14
+ actionpack (4.0.13)
15
+ activesupport (= 4.0.13)
16
+ builder (~> 3.1.0)
17
+ erubis (~> 2.7.0)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ activemodel (4.0.13)
21
+ activesupport (= 4.0.13)
22
+ builder (~> 3.1.0)
23
+ activerecord (4.0.13)
24
+ activemodel (= 4.0.13)
25
+ activerecord-deprecated_finders (~> 1.0.2)
26
+ activesupport (= 4.0.13)
27
+ arel (~> 4.0.0)
28
+ activerecord-deprecated_finders (1.0.4)
29
+ activesupport (4.0.13)
30
+ i18n (~> 0.6, >= 0.6.9)
31
+ minitest (~> 4.2)
32
+ multi_json (~> 1.3)
33
+ thread_safe (~> 0.1)
34
+ tzinfo (~> 0.3.37)
35
+ appraisal (2.1.0)
36
+ bundler
37
+ rake
38
+ thor (>= 0.14.0)
39
+ arel (4.0.2)
40
+ builder (3.1.4)
41
+ concurrent-ruby (1.0.2)
42
+ diff-lcs (1.2.5)
43
+ erubis (2.7.0)
44
+ fluent-logger (0.5.1)
45
+ msgpack (>= 0.4.4, < 0.6.0, != 0.5.3, != 0.5.2, != 0.5.1, != 0.5.0)
46
+ i18n (0.7.0)
47
+ mail (2.6.4)
48
+ mime-types (>= 1.16, < 4)
49
+ mime-types (3.1)
50
+ mime-types-data (~> 3.2015)
51
+ mime-types-data (3.2016.0521)
52
+ minitest (4.7.5)
53
+ msgpack (0.5.12)
54
+ multi_json (1.12.1)
55
+ rack (1.5.5)
56
+ rack-test (0.6.3)
57
+ rack (>= 1.0)
58
+ rails (4.0.13)
59
+ actionmailer (= 4.0.13)
60
+ actionpack (= 4.0.13)
61
+ activerecord (= 4.0.13)
62
+ activesupport (= 4.0.13)
63
+ bundler (>= 1.3.0, < 2.0)
64
+ railties (= 4.0.13)
65
+ sprockets-rails (~> 2.0)
66
+ railties (4.0.13)
67
+ actionpack (= 4.0.13)
68
+ activesupport (= 4.0.13)
69
+ rake (>= 0.8.7)
70
+ thor (>= 0.18.1, < 2.0)
71
+ rake (11.2.2)
72
+ rspec (3.5.0)
73
+ rspec-core (~> 3.5.0)
74
+ rspec-expectations (~> 3.5.0)
75
+ rspec-mocks (~> 3.5.0)
76
+ rspec-core (3.5.0)
77
+ rspec-support (~> 3.5.0)
78
+ rspec-expectations (3.5.0)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.5.0)
81
+ rspec-mocks (3.5.0)
82
+ diff-lcs (>= 1.2.0, < 2.0)
83
+ rspec-support (~> 3.5.0)
84
+ rspec-support (3.5.0)
85
+ sprockets (3.6.3)
86
+ concurrent-ruby (~> 1.0)
87
+ rack (> 1, < 3)
88
+ sprockets-rails (2.3.3)
89
+ actionpack (>= 3.0)
90
+ activesupport (>= 3.0)
91
+ sprockets (>= 2.8, < 4.0)
92
+ thor (0.19.1)
93
+ thread_safe (0.3.5)
94
+ tzinfo (0.3.50)
95
+
96
+ PLATFORMS
97
+ ruby
98
+
99
+ DEPENDENCIES
100
+ act-fluent-logger-rails!
101
+ appraisal
102
+ rails (= 4.0.13)
103
+ rspec (~> 3.5.0)
104
+
105
+ BUNDLED WITH
106
+ 1.12.5
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "4.1.15"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,111 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ act-fluent-logger-rails (0.3.0)
5
+ fluent-logger
6
+ rails (>= 4, < 5.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.1.15)
12
+ actionpack (= 4.1.15)
13
+ actionview (= 4.1.15)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ actionpack (4.1.15)
16
+ actionview (= 4.1.15)
17
+ activesupport (= 4.1.15)
18
+ rack (~> 1.5.2)
19
+ rack-test (~> 0.6.2)
20
+ actionview (4.1.15)
21
+ activesupport (= 4.1.15)
22
+ builder (~> 3.1)
23
+ erubis (~> 2.7.0)
24
+ activemodel (4.1.15)
25
+ activesupport (= 4.1.15)
26
+ builder (~> 3.1)
27
+ activerecord (4.1.15)
28
+ activemodel (= 4.1.15)
29
+ activesupport (= 4.1.15)
30
+ arel (~> 5.0.0)
31
+ activesupport (4.1.15)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ json (~> 1.7, >= 1.7.7)
34
+ minitest (~> 5.1)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 1.1)
37
+ appraisal (2.1.0)
38
+ bundler
39
+ rake
40
+ thor (>= 0.14.0)
41
+ arel (5.0.1.20140414130214)
42
+ builder (3.2.2)
43
+ concurrent-ruby (1.0.2)
44
+ diff-lcs (1.2.5)
45
+ erubis (2.7.0)
46
+ fluent-logger (0.5.1)
47
+ msgpack (>= 0.4.4, < 0.6.0, != 0.5.3, != 0.5.2, != 0.5.1, != 0.5.0)
48
+ i18n (0.7.0)
49
+ json (1.8.3)
50
+ mail (2.6.4)
51
+ mime-types (>= 1.16, < 4)
52
+ mime-types (3.1)
53
+ mime-types-data (~> 3.2015)
54
+ mime-types-data (3.2016.0521)
55
+ minitest (5.9.0)
56
+ msgpack (0.5.12)
57
+ rack (1.5.5)
58
+ rack-test (0.6.3)
59
+ rack (>= 1.0)
60
+ rails (4.1.15)
61
+ actionmailer (= 4.1.15)
62
+ actionpack (= 4.1.15)
63
+ actionview (= 4.1.15)
64
+ activemodel (= 4.1.15)
65
+ activerecord (= 4.1.15)
66
+ activesupport (= 4.1.15)
67
+ bundler (>= 1.3.0, < 2.0)
68
+ railties (= 4.1.15)
69
+ sprockets-rails (~> 2.0)
70
+ railties (4.1.15)
71
+ actionpack (= 4.1.15)
72
+ activesupport (= 4.1.15)
73
+ rake (>= 0.8.7)
74
+ thor (>= 0.18.1, < 2.0)
75
+ rake (11.2.2)
76
+ rspec (3.5.0)
77
+ rspec-core (~> 3.5.0)
78
+ rspec-expectations (~> 3.5.0)
79
+ rspec-mocks (~> 3.5.0)
80
+ rspec-core (3.5.0)
81
+ rspec-support (~> 3.5.0)
82
+ rspec-expectations (3.5.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.5.0)
85
+ rspec-mocks (3.5.0)
86
+ diff-lcs (>= 1.2.0, < 2.0)
87
+ rspec-support (~> 3.5.0)
88
+ rspec-support (3.5.0)
89
+ sprockets (3.6.3)
90
+ concurrent-ruby (~> 1.0)
91
+ rack (> 1, < 3)
92
+ sprockets-rails (2.3.3)
93
+ actionpack (>= 3.0)
94
+ activesupport (>= 3.0)
95
+ sprockets (>= 2.8, < 4.0)
96
+ thor (0.19.1)
97
+ thread_safe (0.3.5)
98
+ tzinfo (1.2.2)
99
+ thread_safe (~> 0.1)
100
+
101
+ PLATFORMS
102
+ ruby
103
+
104
+ DEPENDENCIES
105
+ act-fluent-logger-rails!
106
+ appraisal
107
+ rails (= 4.1.15)
108
+ rspec (~> 3.5.0)
109
+
110
+ BUNDLED WITH
111
+ 1.12.5
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "4.2.6"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,138 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ act-fluent-logger-rails (0.3.0)
5
+ fluent-logger
6
+ rails (>= 4, < 5.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.6)
12
+ actionpack (= 4.2.6)
13
+ actionview (= 4.2.6)
14
+ activejob (= 4.2.6)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.6)
18
+ actionview (= 4.2.6)
19
+ activesupport (= 4.2.6)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.6)
25
+ activesupport (= 4.2.6)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
+ activejob (4.2.6)
31
+ activesupport (= 4.2.6)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.6)
34
+ activesupport (= 4.2.6)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.6)
37
+ activemodel (= 4.2.6)
38
+ activesupport (= 4.2.6)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.6)
41
+ i18n (~> 0.7)
42
+ json (~> 1.7, >= 1.7.7)
43
+ minitest (~> 5.1)
44
+ thread_safe (~> 0.3, >= 0.3.4)
45
+ tzinfo (~> 1.1)
46
+ appraisal (2.1.0)
47
+ bundler
48
+ rake
49
+ thor (>= 0.14.0)
50
+ arel (6.0.3)
51
+ builder (3.2.2)
52
+ concurrent-ruby (1.0.2)
53
+ diff-lcs (1.2.5)
54
+ erubis (2.7.0)
55
+ fluent-logger (0.5.1)
56
+ msgpack (>= 0.4.4, < 0.6.0, != 0.5.3, != 0.5.2, != 0.5.1, != 0.5.0)
57
+ globalid (0.3.6)
58
+ activesupport (>= 4.1.0)
59
+ i18n (0.7.0)
60
+ json (1.8.3)
61
+ loofah (2.0.3)
62
+ nokogiri (>= 1.5.9)
63
+ mail (2.6.4)
64
+ mime-types (>= 1.16, < 4)
65
+ mime-types (3.1)
66
+ mime-types-data (~> 3.2015)
67
+ mime-types-data (3.2016.0521)
68
+ mini_portile2 (2.1.0)
69
+ minitest (5.9.0)
70
+ msgpack (0.5.12)
71
+ nokogiri (1.6.8)
72
+ mini_portile2 (~> 2.1.0)
73
+ pkg-config (~> 1.1.7)
74
+ pkg-config (1.1.7)
75
+ rack (1.6.4)
76
+ rack-test (0.6.3)
77
+ rack (>= 1.0)
78
+ rails (4.2.6)
79
+ actionmailer (= 4.2.6)
80
+ actionpack (= 4.2.6)
81
+ actionview (= 4.2.6)
82
+ activejob (= 4.2.6)
83
+ activemodel (= 4.2.6)
84
+ activerecord (= 4.2.6)
85
+ activesupport (= 4.2.6)
86
+ bundler (>= 1.3.0, < 2.0)
87
+ railties (= 4.2.6)
88
+ sprockets-rails
89
+ rails-deprecated_sanitizer (1.0.3)
90
+ activesupport (>= 4.2.0.alpha)
91
+ rails-dom-testing (1.0.7)
92
+ activesupport (>= 4.2.0.beta, < 5.0)
93
+ nokogiri (~> 1.6.0)
94
+ rails-deprecated_sanitizer (>= 1.0.1)
95
+ rails-html-sanitizer (1.0.3)
96
+ loofah (~> 2.0)
97
+ railties (4.2.6)
98
+ actionpack (= 4.2.6)
99
+ activesupport (= 4.2.6)
100
+ rake (>= 0.8.7)
101
+ thor (>= 0.18.1, < 2.0)
102
+ rake (11.2.2)
103
+ rspec (3.5.0)
104
+ rspec-core (~> 3.5.0)
105
+ rspec-expectations (~> 3.5.0)
106
+ rspec-mocks (~> 3.5.0)
107
+ rspec-core (3.5.0)
108
+ rspec-support (~> 3.5.0)
109
+ rspec-expectations (3.5.0)
110
+ diff-lcs (>= 1.2.0, < 2.0)
111
+ rspec-support (~> 3.5.0)
112
+ rspec-mocks (3.5.0)
113
+ diff-lcs (>= 1.2.0, < 2.0)
114
+ rspec-support (~> 3.5.0)
115
+ rspec-support (3.5.0)
116
+ sprockets (3.6.3)
117
+ concurrent-ruby (~> 1.0)
118
+ rack (> 1, < 3)
119
+ sprockets-rails (3.1.1)
120
+ actionpack (>= 4.0)
121
+ activesupport (>= 4.0)
122
+ sprockets (>= 3.0.0)
123
+ thor (0.19.1)
124
+ thread_safe (0.3.5)
125
+ tzinfo (1.2.2)
126
+ thread_safe (~> 0.1)
127
+
128
+ PLATFORMS
129
+ ruby
130
+
131
+ DEPENDENCIES
132
+ act-fluent-logger-rails!
133
+ appraisal
134
+ rails (= 4.2.6)
135
+ rspec (~> 3.5.0)
136
+
137
+ BUNDLED WITH
138
+ 1.12.5
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "5.0.0"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,143 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ act-fluent-logger-rails (0.3.0)
5
+ fluent-logger
6
+ rails (>= 4, < 5.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.0.0)
12
+ actionpack (= 5.0.0)
13
+ nio4r (~> 1.2)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.0.0)
16
+ actionpack (= 5.0.0)
17
+ actionview (= 5.0.0)
18
+ activejob (= 5.0.0)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.0.0)
22
+ actionview (= 5.0.0)
23
+ activesupport (= 5.0.0)
24
+ rack (~> 2.0)
25
+ rack-test (~> 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.0.0)
29
+ activesupport (= 5.0.0)
30
+ builder (~> 3.1)
31
+ erubis (~> 2.7.0)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
34
+ activejob (5.0.0)
35
+ activesupport (= 5.0.0)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.0.0)
38
+ activesupport (= 5.0.0)
39
+ activerecord (5.0.0)
40
+ activemodel (= 5.0.0)
41
+ activesupport (= 5.0.0)
42
+ arel (~> 7.0)
43
+ activesupport (5.0.0)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (~> 0.7)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ appraisal (2.1.0)
49
+ bundler
50
+ rake
51
+ thor (>= 0.14.0)
52
+ arel (7.0.0)
53
+ builder (3.2.2)
54
+ concurrent-ruby (1.0.2)
55
+ diff-lcs (1.2.5)
56
+ erubis (2.7.0)
57
+ fluent-logger (0.5.1)
58
+ msgpack (>= 0.4.4, < 0.6.0, != 0.5.3, != 0.5.2, != 0.5.1, != 0.5.0)
59
+ globalid (0.3.6)
60
+ activesupport (>= 4.1.0)
61
+ i18n (0.7.0)
62
+ loofah (2.0.3)
63
+ nokogiri (>= 1.5.9)
64
+ mail (2.6.4)
65
+ mime-types (>= 1.16, < 4)
66
+ method_source (0.8.2)
67
+ mime-types (3.1)
68
+ mime-types-data (~> 3.2015)
69
+ mime-types-data (3.2016.0521)
70
+ mini_portile2 (2.1.0)
71
+ minitest (5.9.0)
72
+ msgpack (0.5.12)
73
+ nio4r (1.2.1)
74
+ nokogiri (1.6.8)
75
+ mini_portile2 (~> 2.1.0)
76
+ pkg-config (~> 1.1.7)
77
+ pkg-config (1.1.7)
78
+ rack (2.0.1)
79
+ rack-test (0.6.3)
80
+ rack (>= 1.0)
81
+ rails (5.0.0)
82
+ actioncable (= 5.0.0)
83
+ actionmailer (= 5.0.0)
84
+ actionpack (= 5.0.0)
85
+ actionview (= 5.0.0)
86
+ activejob (= 5.0.0)
87
+ activemodel (= 5.0.0)
88
+ activerecord (= 5.0.0)
89
+ activesupport (= 5.0.0)
90
+ bundler (>= 1.3.0, < 2.0)
91
+ railties (= 5.0.0)
92
+ sprockets-rails (>= 2.0.0)
93
+ rails-dom-testing (2.0.1)
94
+ activesupport (>= 4.2.0, < 6.0)
95
+ nokogiri (~> 1.6.0)
96
+ rails-html-sanitizer (1.0.3)
97
+ loofah (~> 2.0)
98
+ railties (5.0.0)
99
+ actionpack (= 5.0.0)
100
+ activesupport (= 5.0.0)
101
+ method_source
102
+ rake (>= 0.8.7)
103
+ thor (>= 0.18.1, < 2.0)
104
+ rake (11.2.2)
105
+ rspec (3.5.0)
106
+ rspec-core (~> 3.5.0)
107
+ rspec-expectations (~> 3.5.0)
108
+ rspec-mocks (~> 3.5.0)
109
+ rspec-core (3.5.0)
110
+ rspec-support (~> 3.5.0)
111
+ rspec-expectations (3.5.0)
112
+ diff-lcs (>= 1.2.0, < 2.0)
113
+ rspec-support (~> 3.5.0)
114
+ rspec-mocks (3.5.0)
115
+ diff-lcs (>= 1.2.0, < 2.0)
116
+ rspec-support (~> 3.5.0)
117
+ rspec-support (3.5.0)
118
+ sprockets (3.6.3)
119
+ concurrent-ruby (~> 1.0)
120
+ rack (> 1, < 3)
121
+ sprockets-rails (3.1.1)
122
+ actionpack (>= 4.0)
123
+ activesupport (>= 4.0)
124
+ sprockets (>= 3.0.0)
125
+ thor (0.19.1)
126
+ thread_safe (0.3.5)
127
+ tzinfo (1.2.2)
128
+ thread_safe (~> 0.1)
129
+ websocket-driver (0.6.4)
130
+ websocket-extensions (>= 0.1.0)
131
+ websocket-extensions (0.1.2)
132
+
133
+ PLATFORMS
134
+ ruby
135
+
136
+ DEPENDENCIES
137
+ act-fluent-logger-rails!
138
+ appraisal
139
+ rails (= 5.0.0)
140
+ rspec (~> 3.5.0)
141
+
142
+ BUNDLED WITH
143
+ 1.12.5
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  require 'fluent-logger'
3
2
  require 'active_support/core_ext'
4
3
  require 'uri'
@@ -15,7 +14,19 @@ module ActFluentLoggerRails
15
14
  log_tags: {},
16
15
  settings: {},
17
16
  flush_immediately: false)
18
- Rails.application.config.log_tags = [ ->(request) { request } ] unless log_tags.empty?
17
+ Rails.application.config.log_tags = log_tags.values
18
+ if Rails.application.config.respond_to?(:action_cable)
19
+ Rails.application.config.action_cable.log_tags = log_tags.values.map do |x|
20
+ case
21
+ when x.respond_to?(:call)
22
+ x
23
+ when x.is_a?(Symbol)
24
+ -> (request) { request.send(x) }
25
+ else
26
+ -> (request) { x }
27
+ end
28
+ end
29
+ end
19
30
  if (0 == settings.length)
20
31
  fluent_config = if ENV["FLUENTD_URL"]
21
32
  self.parse_url(ENV["FLUENTD_URL"])
@@ -53,7 +64,7 @@ module ActFluentLoggerRails
53
64
  end
54
65
 
55
66
  def tagged(*tags)
56
- @request = tags[0][0]
67
+ @tags = tags.flatten
57
68
  yield self
58
69
  ensure
59
70
  flush
@@ -74,6 +85,7 @@ module ActFluentLoggerRails
74
85
  @messages = []
75
86
  @log_tags = log_tags
76
87
  @map = {}
88
+ after_initialize if respond_to? :after_initialize
77
89
  end
78
90
 
79
91
  def add(severity, message = nil, progname = nil, &block)
@@ -124,19 +136,15 @@ module ActFluentLoggerRails
124
136
  end
125
137
  @map[:messages] = messages
126
138
  @map[@severity_key] = format_severity(@severity)
127
- @log_tags.each do |k, v|
128
- @map[k] = case v
129
- when Proc
130
- v.call(@request)
131
- when Symbol
132
- @request.send(v)
133
- else
134
- v
135
- end rescue :error
139
+ if @tags
140
+ @log_tags.keys.zip(@tags).each do |k, v|
141
+ @map[k] = v
142
+ end
136
143
  end
137
144
  @fluent_logger.post(@tag, @map)
138
145
  @severity = 0
139
146
  @messages.clear
147
+ @tags = nil
140
148
  @map.clear
141
149
  end
142
150
 
@@ -1,3 +1,3 @@
1
1
  module ActFluentLoggerRails
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -4,10 +4,10 @@ require 'tempfile'
4
4
 
5
5
  describe ActFluentLoggerRails::Logger do
6
6
  before do
7
- Rails = double("Rails") unless self.class.const_defined?(:Rails)
8
- Rails.stub(env: "test")
9
- Rails.stub_chain(:application, :config, :log_level).and_return(:debug)
10
- Rails.stub_chain(:application, :config, :log_tags=)
7
+ stub_const('Rails', Class.new) unless defined?(Rails)
8
+ allow(Rails).to receive(:env).and_return('test')
9
+ allow(Rails).to receive_message_chain(:application, :config, :log_level).and_return(:debug)
10
+ allow(Rails).to receive_message_chain(:application, :config, :log_tags=)
11
11
 
12
12
  class MyLogger
13
13
  attr_accessor :log
@@ -22,7 +22,7 @@ describe ActFluentLoggerRails::Logger do
22
22
  end
23
23
  end
24
24
  @my_logger = MyLogger.new
25
- Fluent::Logger::FluentLogger.stub(:new) { @my_logger }
25
+ allow(Fluent::Logger::FluentLogger).to receive(:new).and_return(@my_logger)
26
26
 
27
27
  @config_file = Tempfile.new('fluent-logger-config')
28
28
  @config_file.close(false)
@@ -36,24 +36,38 @@ EOF
36
36
  }
37
37
  end
38
38
 
39
+ let(:log_tags) {
40
+ { uuid: :uuid,
41
+ foo: ->(request) { 'foo_value' }
42
+ }
43
+ }
44
+
39
45
  let(:logger) {
40
46
  ActFluentLoggerRails::Logger.new(config_file: File.new(@config_file.path),
41
- log_tags: {
42
- uuid: :uuid,
43
- foo: ->(request) { request.foo }
44
- })
47
+ log_tags: log_tags)
45
48
  }
46
49
 
47
50
  let(:request) {
48
- double('request', uuid: 'uuid_value', foo: 'foo_value')
51
+ double('request', uuid: 'uuid_value')
49
52
  }
50
53
 
51
54
  describe 'logging' do
52
55
 
53
56
  describe 'basic' do
54
57
  it 'info' do
58
+ # see Rails::Rack::compute_tags
59
+ tags = log_tags.values.collect do |tag|
60
+ case tag
61
+ when Proc
62
+ tag.call(request)
63
+ when Symbol
64
+ request.send(tag)
65
+ else
66
+ tag
67
+ end
68
+ end
55
69
  logger[:abc] = 'xyz'
56
- logger.tagged([request]) { logger.info('hello') }
70
+ logger.tagged(tags) { logger.info('hello') }
57
71
  expect(@my_logger.log).to eq([['foo', {
58
72
  abc: 'xyz',
59
73
  messages: ['hello'],
@@ -62,7 +76,7 @@ EOF
62
76
  foo: 'foo_value'
63
77
  } ]])
64
78
  @my_logger.clear
65
- logger.tagged([request]) { logger.info('world'); logger.info('bye') }
79
+ logger.tagged(tags) { logger.info('world'); logger.info('bye') }
66
80
  expect(@my_logger.log).to eq([['foo', {
67
81
  messages: ['world', 'bye'],
68
82
  severity: 'INFO',
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act-fluent-logger-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAHARA Yoshinori
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-20 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 3.5.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 3.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fluent-logger
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,20 +44,20 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 3.2.0
47
+ version: '4'
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '5.0'
50
+ version: '5.1'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: 3.2.0
57
+ version: '4'
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '5.0'
60
+ version: '5.1'
61
61
  description: Fluent logger
62
62
  email:
63
63
  - read.eval.print@gmail.com
@@ -67,12 +67,21 @@ extra_rdoc_files: []
67
67
  files:
68
68
  - ".gitignore"
69
69
  - ".travis.yml"
70
+ - Appraisals
70
71
  - CHANGELOG.md
71
72
  - Gemfile
72
73
  - LICENSE.txt
73
74
  - README.md
74
75
  - Rakefile
75
76
  - act-fluent-logger-rails.gemspec
77
+ - gemfiles/rails_4.0.gemfile
78
+ - gemfiles/rails_4.0.gemfile.lock
79
+ - gemfiles/rails_4.1.gemfile
80
+ - gemfiles/rails_4.1.gemfile.lock
81
+ - gemfiles/rails_4.2.gemfile
82
+ - gemfiles/rails_4.2.gemfile.lock
83
+ - gemfiles/rails_5.0.gemfile
84
+ - gemfiles/rails_5.0.gemfile.lock
76
85
  - lib/act-fluent-logger-rails.rb
77
86
  - lib/act-fluent-logger-rails/logger.rb
78
87
  - lib/act-fluent-logger-rails/version.rb
@@ -98,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
107
  version: '0'
99
108
  requirements: []
100
109
  rubyforge_project:
101
- rubygems_version: 2.2.1
110
+ rubygems_version: 2.5.1
102
111
  signing_key:
103
112
  specification_version: 4
104
113
  summary: Fluent logger