fluent-plugin-feedly 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- Fluentd input plugin to fetch RSS/ATOM feed via Feedly Could.
5
+ Fluentd input plugin to fetch RSS/ATOM feed via feedly Cloud API.
6
6
 
7
7
  ## Dependencies
8
8
 
@@ -55,7 +55,7 @@ $ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-feedly
55
55
  # Using sandbox account
56
56
  enable_sandbox false # Optional (default: false)
57
57
 
58
- # Set log level for this plugin. To see debug level, set 'debug' for this value.
58
+ # Set log level for this plugin. To hide info level, set 'warn' for this value.
59
59
  # it can see at stdout as like `$ tail -f /var/log/td-agent/td-agent.log`
60
60
  log_level info        # Optional (default: info)
61
61
  </source>
@@ -88,7 +88,6 @@ $ cat /etc/td-agent/td-agent.conf
88
88
  run_interval 30m
89
89
  fetch_time_range 1h
90
90
  fetch_time_range_on_startup 3h
91
- log_level debug
92
91
  </source>
93
92
 
94
93
  <match input.feedly>
@@ -105,8 +104,8 @@ You can see the behavior about this plugin with this command.
105
104
  ```
106
105
  # to check stdout of this plugin
107
106
  $ tail -f /var/log/td-agent/td-agent.log
108
- 2014-10-16 14:47:01 +0900 [debug]: Feedly: fetched articles. articles=416 request_option={:count=>1000, :continuation=>"148cfb7f516:9371a3c:726280cf", :newerThan=>1412228787000}
109
- 2014-10-16 15:02:02 +0900 [debug]: Feedly: fetched articles. articles=492 request_option={:count=>1000, :continuation=>nil, :newerThan=>1413428521000}
107
+ 2014-10-16 14:47:01 +0900 [info]: Feedly: fetched articles. articles=416 request_option={:count=>1000, :continuation=>"148cfb7f516:9371a3c:726280cf", :newerThan=>1412228787000}
108
+ 2014-10-16 15:02:02 +0900 [info]: Feedly: fetched articles. articles=492 request_option={:count=>1000, :continuation=>nil, :newerThan=>1413428521000}
110
109
  ```
111
110
 
112
111
  ```
@@ -4,12 +4,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-feedly"
7
- #spec.version = Fluent::Plugin::Feedly::VERSION
8
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
9
8
  spec.authors = ["Kentaro Yoshida"]
10
9
  spec.email = ["y.ken.studio@gmail.com"]
11
- spec.summary = %q{Fluentd input plugin to fetch RSS/ATOM feed via Feedly Could.}
12
- #spec.description = %q{TODO: Write a longer description. Optional.}
10
+ spec.summary = %q{Fluentd input plugin to fetch RSS/ATOM feed via feedly Cloud API.}
13
11
  spec.homepage = "https://github.com/y-ken/fluent-plugin-feedly"
14
12
  spec.license = "Apache 2.0"
15
13
 
@@ -18,7 +16,7 @@ Gem::Specification.new do |spec|
18
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
17
  spec.require_paths = ["lib"]
20
18
 
21
- spec.add_runtime_dependency "fluentd"#, "~> 0.10.54"
19
+ spec.add_runtime_dependency "fluentd", ">= 0.10.55"
22
20
  spec.add_runtime_dependency "feedlr"
23
21
 
24
22
  spec.add_development_dependency "bundler", "~> 1.7"
@@ -55,7 +55,7 @@ module Fluent
55
55
  begin
56
56
  fetch
57
57
  rescue => e
58
- log.error "Feedly: unexpected error has occoured.", :error => e.message, :error_class => e.class
58
+ log.error "Feedly: unexpected error has occoured.", error: e.message, error_class: e.class
59
59
  log.error_backtrace e.backtrace
60
60
  sleep @run_interval
61
61
  retry
@@ -71,10 +71,14 @@ module Fluent
71
71
  loop {
72
72
  request_option = { count: @fetch_count, continuation: get_continuation_id, newerThan: fetch_time_range }
73
73
  cursor = @client.stream_entries_contents(category_id, request_option)
74
+ if cursor.items.nil?
75
+ log.error "Feedly: unexpected error has occoured.", cursor: cursor
76
+ break
77
+ end
74
78
  cursor.items.each do |item|
75
79
  Engine.emit(@tag, Engine.now, item)
76
80
  end
77
- log.debug "Feedly: fetched articles.", articles: cursor.items.size, request_option: request_option
81
+ log.info "Feedly: fetched articles.", articles: cursor.items.size, request_option: request_option
78
82
  set_continuation_id(cursor.continuation)
79
83
  break if get_continuation_id.nil?
80
84
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-feedly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-16 00:00:00.000000000 Z
12
+ date: 2014-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 0.10.55
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: 0.10.55
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: feedlr
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -91,7 +91,7 @@ files:
91
91
  - fluent-plugin-feedly.gemspec
92
92
  - lib/fluent/plugin/in_feedly.rb
93
93
  - test/helper.rb
94
- - test/plugin/test_in_mysql.rb
94
+ - test/plugin/test_in_feedly.rb
95
95
  homepage: https://github.com/y-ken/fluent-plugin-feedly
96
96
  licenses:
97
97
  - Apache 2.0
@@ -116,7 +116,7 @@ rubyforge_project:
116
116
  rubygems_version: 1.8.23
117
117
  signing_key:
118
118
  specification_version: 3
119
- summary: Fluentd input plugin to fetch RSS/ATOM feed via Feedly Could.
119
+ summary: Fluentd input plugin to fetch RSS/ATOM feed via feedly Cloud API.
120
120
  test_files:
121
121
  - test/helper.rb
122
- - test/plugin/test_in_mysql.rb
122
+ - test/plugin/test_in_feedly.rb