log4ever 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.gitignore +2 -1
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +7 -1
  4. data/README.md +3 -1
  5. data/lib/log4r/evernote.rb +10 -24
  6. data/lib/log4r/outputter/evernoteoutputter.rb +3 -11
  7. data/log4ever.gemspec +2 -1
  8. data/spec/log4ever_spec.rb +24 -17
  9. metadata +40 -58
  10. data/.project +0 -11
  11. data/lib/log4r/evernote/lib/Evernote/EDAM/errors_constants.rb +0 -14
  12. data/lib/log4r/evernote/lib/Evernote/EDAM/errors_types.rb +0 -128
  13. data/lib/log4r/evernote/lib/Evernote/EDAM/limits_constants.rb +0 -240
  14. data/lib/log4r/evernote/lib/Evernote/EDAM/limits_types.rb +0 -13
  15. data/lib/log4r/evernote/lib/Evernote/EDAM/note_store.rb +0 -5487
  16. data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_constants.rb +0 -14
  17. data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_types.rb +0 -1012
  18. data/lib/log4r/evernote/lib/Evernote/EDAM/types_constants.rb +0 -20
  19. data/lib/log4r/evernote/lib/Evernote/EDAM/types_types.rb +0 -1792
  20. data/lib/log4r/evernote/lib/Evernote/EDAM/user_store.rb +0 -549
  21. data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_constants.rb +0 -18
  22. data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_types.rb +0 -415
  23. data/lib/log4r/evernote/lib/thrift/client.rb +0 -62
  24. data/lib/log4r/evernote/lib/thrift/core_ext/fixnum.rb +0 -29
  25. data/lib/log4r/evernote/lib/thrift/core_ext.rb +0 -23
  26. data/lib/log4r/evernote/lib/thrift/exceptions.rb +0 -84
  27. data/lib/log4r/evernote/lib/thrift/processor.rb +0 -57
  28. data/lib/log4r/evernote/lib/thrift/protocol/base_protocol.rb +0 -290
  29. data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol.rb +0 -229
  30. data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol_accelerated.rb +0 -39
  31. data/lib/log4r/evernote/lib/thrift/protocol/compact_protocol.rb +0 -426
  32. data/lib/log4r/evernote/lib/thrift/serializer/deserializer.rb +0 -33
  33. data/lib/log4r/evernote/lib/thrift/serializer/serializer.rb +0 -34
  34. data/lib/log4r/evernote/lib/thrift/server/base_server.rb +0 -31
  35. data/lib/log4r/evernote/lib/thrift/server/mongrel_http_server.rb +0 -58
  36. data/lib/log4r/evernote/lib/thrift/server/nonblocking_server.rb +0 -305
  37. data/lib/log4r/evernote/lib/thrift/server/simple_server.rb +0 -43
  38. data/lib/log4r/evernote/lib/thrift/server/thread_pool_server.rb +0 -75
  39. data/lib/log4r/evernote/lib/thrift/server/threaded_server.rb +0 -47
  40. data/lib/log4r/evernote/lib/thrift/struct.rb +0 -237
  41. data/lib/log4r/evernote/lib/thrift/struct_union.rb +0 -192
  42. data/lib/log4r/evernote/lib/thrift/thrift_native.rb +0 -24
  43. data/lib/log4r/evernote/lib/thrift/transport/base_server_transport.rb +0 -37
  44. data/lib/log4r/evernote/lib/thrift/transport/base_transport.rb +0 -107
  45. data/lib/log4r/evernote/lib/thrift/transport/buffered_transport.rb +0 -108
  46. data/lib/log4r/evernote/lib/thrift/transport/framed_transport.rb +0 -116
  47. data/lib/log4r/evernote/lib/thrift/transport/http_client_transport.rb +0 -53
  48. data/lib/log4r/evernote/lib/thrift/transport/io_stream_transport.rb +0 -39
  49. data/lib/log4r/evernote/lib/thrift/transport/memory_buffer_transport.rb +0 -125
  50. data/lib/log4r/evernote/lib/thrift/transport/server_socket.rb +0 -63
  51. data/lib/log4r/evernote/lib/thrift/transport/socket.rb +0 -137
  52. data/lib/log4r/evernote/lib/thrift/transport/unix_server_socket.rb +0 -60
  53. data/lib/log4r/evernote/lib/thrift/transport/unix_socket.rb +0 -40
  54. data/lib/log4r/evernote/lib/thrift/types.rb +0 -101
  55. data/lib/log4r/evernote/lib/thrift/union.rb +0 -179
  56. data/lib/log4r/evernote/lib/thrift.rb +0 -64
data/.gitignore CHANGED
@@ -30,4 +30,5 @@ RCSLOG
30
30
  SCCS
31
31
  _$*
32
32
  _svn
33
- config/evernote.auth.yml
33
+ config/evernote.auth.yml
34
+ .project
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gem 'log4r'
3
3
  gem 'active_support'
4
4
  gem 'i18n'
5
5
  gem 'nokogiri'
6
+ gem 'evernote_oauth'
data/Gemfile.lock CHANGED
@@ -1,18 +1,24 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
4
  active_support (3.0.0)
5
5
  activesupport (= 3.0.0)
6
6
  activesupport (3.0.0)
7
+ evernote-thrift (1.25.0)
8
+ evernote_oauth (0.2.1)
9
+ evernote-thrift
10
+ oauth (>= 0.4.1)
7
11
  i18n (0.6.0)
8
12
  log4r (1.1.10)
9
13
  nokogiri (1.5.5)
14
+ oauth (0.4.7)
10
15
 
11
16
  PLATFORMS
12
17
  ruby
13
18
 
14
19
  DEPENDENCIES
15
20
  active_support
21
+ evernote_oauth
16
22
  i18n
17
23
  log4r
18
24
  nokogiri
data/README.md CHANGED
@@ -19,7 +19,7 @@ log4ever is simple logger for evernote. It is available as an extension of [log4
19
19
  :formatter => formatter
20
20
  })
21
21
  evernoteOutputter = Log4r::EvernoteOutputter.new('evernote', {
22
- :env => "production", # Execution environment in Evernote (production or sandbox)
22
+ :sandbox => false, # Execution environment in Evernote (true: sandbox, false: production, default: production)
23
23
  :auth_token => "xxxxxxxxxxxxxxxxxxxxxxx", # evernote auth token
24
24
  :stack => "Log4ever", # evernote stack name
25
25
  :notebook => "DevelopmentLog", # evernote notebook name
@@ -56,6 +56,8 @@ Bug fix.
56
56
  Add dependency library.
57
57
  * 0.0.9
58
58
  Add dependency library.
59
+ * 0.1.0
60
+ Change the parameter of EvetnoteOutputter class, use evernote_oauth.
59
61
 
60
62
  ##License
61
63
  Licensed under the MIT
@@ -1,21 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
- $: << File.dirname(__FILE__) + "/evernote/lib"
3
- $: << File.dirname(__FILE__) + "/evernote/lib/thrift"
4
- $: << File.dirname(__FILE__) + "/evernote/lib/Evernote/EDAM"
5
2
  require 'log4r/outputter/evernoteoutputter'
6
- require "thrift/types"
7
- require "thrift/struct"
8
- require "thrift/protocol/base_protocol"
9
- require "thrift/protocol/binary_protocol"
10
- require "thrift/transport/base_transport"
11
- require "thrift/transport/http_client_transport"
12
- require "Evernote/EDAM/user_store"
13
- require "Evernote/EDAM/user_store_constants.rb"
14
- require "Evernote/EDAM/note_store"
15
- require "Evernote/EDAM/limits_constants.rb"
3
+ require 'evernote_oauth'
16
4
 
17
5
  module Log4ever
18
- VERSION = '0.0.7'
6
+ VERSION = '0.1.0'
19
7
  class TypeError < StandardError; end
20
8
  module ShiftAge
21
9
  DAILY = 1
@@ -29,17 +17,13 @@ module Log4r
29
17
  class MyEvernote
30
18
  @@note_store = nil
31
19
 
32
- def initialize(env, auth_token)
20
+ def initialize(is_sandbox, auth_token)
33
21
  if @@note_store.nil?
34
- @env = env
35
22
  @@auth_token = auth_token
36
- userStoreTransport = Thrift::HTTPClientTransport.new(@env)
37
- userStoreProtocol = Thrift::BinaryProtocol.new(userStoreTransport)
38
- user_store = Evernote::EDAM::UserStore::UserStore::Client.new(userStoreProtocol)
39
- noteStoreUrl = user_store.getNoteStoreUrl(@@auth_token)
40
- noteStoreTransport = Thrift::HTTPClientTransport.new(noteStoreUrl)
41
- noteStoreProtocol = Thrift::BinaryProtocol.new(noteStoreTransport)
42
- @@note_store = Evernote::EDAM::NoteStore::NoteStore::Client.new(noteStoreProtocol)
23
+ @@note_store = EvernoteOAuth::Client.new({
24
+ :token => auth_token,
25
+ :sandbox => is_sandbox
26
+ }).note_store
43
27
  end
44
28
  end
45
29
 
@@ -91,6 +75,8 @@ module Log4r
91
75
  class Notebook < MyEvernote
92
76
  def initialize(notebook_name, stack_name)
93
77
  return unless @notebook.nil?
78
+ @notebook_name = notebook_name
79
+ @stack_name = stack_name
94
80
  get(notebook_name, stack_name) || create(notebook_name, stack_name)
95
81
  end
96
82
 
@@ -127,7 +113,7 @@ module Log4r
127
113
  # clear notebook object
128
114
  def clear
129
115
  @notebook = nil
130
- initialize(@env, @@auth_token)
116
+ initialize(@notebook_name, @stack_name)
131
117
  end
132
118
  end
133
119
 
@@ -8,8 +8,6 @@ require 'active_support/core_ext'
8
8
 
9
9
  module Log4r
10
10
  class EvernoteOutputter < Outputter
11
- SANDBOX_HOST = 'sandbox.evernote.com'
12
- PRODUCTION_HOST = 'www.evernote.com'
13
11
 
14
12
  def initialize(_name, hash = {})
15
13
  super(_name, hash)
@@ -25,20 +23,14 @@ module Log4r
25
23
 
26
24
  # validation of evernote parameters
27
25
  def validate(hash)
28
- env = hash[:env] || hash['env'] || 'sandbox'
29
- if env == 'sandbox'
30
- @env = "https://#{SANDBOX_HOST}/edam/user"
31
- elsif env == 'production'
32
- @env = "https://#{PRODUCTION_HOST}/edam/user"
33
- else
34
- raise ArgumentError, "Must specify from env 'sandbox' or 'production'"
35
- end
26
+ is_sandbox = hash[:sandbox] || hash['sandbox'] || false
27
+ raise ArgumentError, "Sandbox must be type of boolean" unless is_sandbox == false || is_sandbox == true
36
28
  @auth_token = hash[:auth_token] || hash['auth_token'] || ""
37
29
  raise ArgumentError, "Must specify from auth token" if @auth_token.empty?
38
30
  notebook_name = hash[:notebook] || hash['notebook'] || ""
39
31
  raise ArgumentError, "Must specify from notebook" if notebook_name.empty?
40
32
  stack_name = hash[:stack] || hash['stack']
41
- @evernote = MyEvernote.new(@env, @auth_token)
33
+ @evernote = MyEvernote.new(is_sandbox, @auth_token)
42
34
  tags = @evernote.get_tags(hash[:tags] || hash['tags'] || [])
43
35
  @tags = tags.map{|tag_obj| tag_obj.guid}
44
36
  @notebook = @evernote.get_notebook(notebook_name, stack_name)
data/log4ever.gemspec CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.add_dependency('log4r', '>= 1.1.10')
14
14
  gem.add_dependency('active_support', '>= 3.0.0')
15
15
  gem.add_dependency('i18n', '>= 0.6.0')
16
- gem.version = '0.0.9'
16
+ gem.add_dependency('evernote_oauth', '>= 0.2.1')
17
+ gem.version = '0.1.0'
17
18
  end
18
19
 
@@ -6,16 +6,15 @@ require 'log4r/configurator'
6
6
  require File.expand_path(File.dirname(__FILE__) + '/../spec/spec_helper')
7
7
 
8
8
  describe Log4ever, 'が実行する処理' do
9
- include Log4r
10
9
  LOGGER_NAME = 'Log4ever'
11
10
 
12
11
  before do
13
- @formatter = PatternFormatter.new(
12
+ @formatter = Log4r::PatternFormatter.new(
14
13
  :pattern => "%d %C[%l]: %M ",
15
14
  :date_format => "%Y/%m/%d %H:%M:%Sm"
16
15
  )
17
16
  @params = {
18
- :env => "production",
17
+ :sandbox => false,
19
18
  :auth_token => Log4ever::evernote_auth,
20
19
  :stack => "Log4ever",
21
20
  :notebook => "DevelopmentLog",
@@ -26,9 +25,9 @@ describe Log4ever, 'が実行する処理' do
26
25
  }
27
26
  end
28
27
 
29
- let(:logger) {Logger.new(LOGGER_NAME)}
28
+ let(:logger) {Log4r::Logger.new(LOGGER_NAME)}
30
29
  let(:evernoteOutputter) {
31
- EvernoteOutputter.new('evernote', @params)
30
+ Log4r::EvernoteOutputter.new('evernote', @params)
32
31
  }
33
32
 
34
33
  before do
@@ -40,9 +39,9 @@ describe Log4ever, 'が実行する処理' do
40
39
  log_content = "aaa"
41
40
  formatter_content = "\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s.*?\[.*?\]:\s(.*)\\n"
42
41
  @params[:maxsize] = 1
43
- logger.outputters = EvernoteOutputter.new('evernote', @params)
42
+ logger.outputters = evernoteOutputter
44
43
  logger.debug(log_content)
45
- @evernote = MyEvernote.new(@params[:env], @params[:auth_token])
44
+ @evernote = Log4r::MyEvernote.new(@params[:env], @params[:auth_token])
46
45
  @notebook = @evernote.get_notebook(@params[:notebook], @params[:stack])
47
46
  @note = @evernote.get_note(@notebook)
48
47
  write_log = @note.content_xml.children[1].children.reverse[0].text
@@ -56,27 +55,27 @@ describe Log4ever, 'が実行する処理' do
56
55
 
57
56
  describe 'Log4rの初期化処理(正常系)' do
58
57
  it 'パラメータのチェックでエラーが出ないこと' do
59
- logger.outputters = EvernoteOutputter.new(LOGGER_NAME, @params)
58
+ logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params)
60
59
  logger.name.should == LOGGER_NAME
61
60
  end
62
61
 
63
62
  it 'XMLから読み込んだパラメータのチェックでエラーが出ないこと' do
64
- Configurator.load_xml_file(@config_xml).should_not be_nil
63
+ Log4r::Configurator.load_xml_file(@config_xml).should_not be_nil
65
64
  end
66
65
  end
67
66
 
68
67
  describe 'Log4rの初期化処理(異常系)' do
69
68
  it "envパラメータのチェックでエラーが出ること" do
70
69
  proc {
71
- logger.outputters = EvernoteOutputter.new(LOGGER_NAME, @params.merge(
72
- :env => "aaa"
70
+ logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params.merge(
71
+ :sandbox => "aaa"
73
72
  ))
74
73
  }.should raise_error(ArgumentError)
75
74
  end
76
75
 
77
76
  it "auth_token必須パラメータのチェックでエラーが出ること" do
78
77
  proc {
79
- logger.outputters = EvernoteOutputter.new(LOGGER_NAME, @params.merge(
78
+ logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params.merge(
80
79
  :auth_token => nil
81
80
  ))
82
81
  }.should raise_error(ArgumentError)
@@ -84,7 +83,7 @@ describe Log4ever, 'が実行する処理' do
84
83
 
85
84
  it "notebook必須パラメータのチェックでエラーが出ること" do
86
85
  proc {
87
- logger.outputters = EvernoteOutputter.new(LOGGER_NAME, @params.merge(
86
+ logger.outputters = Log4r::EvernoteOutputter.new(LOGGER_NAME, @params.merge(
88
87
  :notebook => nil
89
88
  ))
90
89
  }.should raise_error(ArgumentError)
@@ -92,22 +91,30 @@ describe Log4ever, 'が実行する処理' do
92
91
  end
93
92
 
94
93
  describe 'Log4everの処理' do
95
- it 'ノートブックが存在しない場合、新規作成されること' do
94
+ it 'ノートブックが存在しない場合、ノートブックが新規作成されること' do
96
95
  logger.outputters = evernoteOutputter
97
- @evernote = MyEvernote.new(@params[:env], @params[:auth_token])
96
+ @evernote = Log4r::MyEvernote.new(@params[:env], @params[:auth_token])
98
97
  notebook_name = Time.now.to_i.to_s
99
98
  notebook = @evernote.get_notebook(notebook_name, @params[:stack])
100
99
  obj = notebook.get(notebook_name, @params[:stack])
101
100
  obj.name.should == notebook_name
101
+ end
102
+
103
+ it 'ノートブックが存在しない場合、スタックが新規作成されること' do
104
+ logger.outputters = evernoteOutputter
105
+ @evernote = Log4r::MyEvernote.new(@params[:env], @params[:auth_token])
106
+ notebook_name = Time.now.to_i.to_s
107
+ notebook = @evernote.get_notebook(notebook_name, @params[:stack])
108
+ obj = notebook.get(notebook_name, @params[:stack])
102
109
  obj.stack.should == @params[:stack]
103
110
  end
104
111
 
105
112
  it 'タグが存在しない場合、新規作成されること' do
106
113
  @params[:tags] = [Time.now.to_i.to_s]
107
114
  @params[:maxsize] = 1
108
- logger.outputters = EvernoteOutputter.new('evernote', @params)
115
+ logger.outputters = Log4r::EvernoteOutputter.new('evernote', @params)
109
116
  logger.debug("test")
110
- evernote = MyEvernote.new(@params[:env], @params[:auth_token])
117
+ evernote = Log4r::MyEvernote.new(@params[:env], @params[:auth_token])
111
118
  notebook = evernote.get_notebook(@params[:notebook], @params[:stack])
112
119
  note = evernote.get_note(notebook)
113
120
  note.getNoteObject.tagGuids[0].should_not be_empty
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log4ever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-26 00:00:00.000000000 +09:00
13
- default_executable:
12
+ date: 2013-07-18 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: log4r
17
- requirement: &2156937280 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
@@ -22,10 +21,15 @@ dependencies:
22
21
  version: 1.1.10
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2156937280
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.1.10
26
30
  - !ruby/object:Gem::Dependency
27
31
  name: active_support
28
- requirement: &2156936680 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
34
  requirements:
31
35
  - - ! '>='
@@ -33,18 +37,44 @@ dependencies:
33
37
  version: 3.0.0
34
38
  type: :runtime
35
39
  prerelease: false
36
- version_requirements: *2156936680
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 3.0.0
37
46
  - !ruby/object:Gem::Dependency
38
47
  name: i18n
39
- requirement: &2156936100 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.6.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
40
57
  none: false
41
58
  requirements:
42
59
  - - ! '>='
43
60
  - !ruby/object:Gem::Version
44
61
  version: 0.6.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: evernote_oauth
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.2.1
45
70
  type: :runtime
46
71
  prerelease: false
47
- version_requirements: *2156936100
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.2.1
48
78
  description: log4ever is simple logger for evernote. It is available as an extension
49
79
  of log4r.
50
80
  email:
@@ -54,7 +84,6 @@ extensions: []
54
84
  extra_rdoc_files: []
55
85
  files:
56
86
  - .gitignore
57
- - .project
58
87
  - Gemfile
59
88
  - Gemfile.lock
60
89
  - README.md
@@ -62,57 +91,10 @@ files:
62
91
  - config/evernote.auth.test.yml
63
92
  - config/log4r.xml
64
93
  - lib/log4r/evernote.rb
65
- - lib/log4r/evernote/lib/Evernote/EDAM/errors_constants.rb
66
- - lib/log4r/evernote/lib/Evernote/EDAM/errors_types.rb
67
- - lib/log4r/evernote/lib/Evernote/EDAM/limits_constants.rb
68
- - lib/log4r/evernote/lib/Evernote/EDAM/limits_types.rb
69
- - lib/log4r/evernote/lib/Evernote/EDAM/note_store.rb
70
- - lib/log4r/evernote/lib/Evernote/EDAM/note_store_constants.rb
71
- - lib/log4r/evernote/lib/Evernote/EDAM/note_store_types.rb
72
- - lib/log4r/evernote/lib/Evernote/EDAM/types_constants.rb
73
- - lib/log4r/evernote/lib/Evernote/EDAM/types_types.rb
74
- - lib/log4r/evernote/lib/Evernote/EDAM/user_store.rb
75
- - lib/log4r/evernote/lib/Evernote/EDAM/user_store_constants.rb
76
- - lib/log4r/evernote/lib/Evernote/EDAM/user_store_types.rb
77
- - lib/log4r/evernote/lib/thrift.rb
78
- - lib/log4r/evernote/lib/thrift/client.rb
79
- - lib/log4r/evernote/lib/thrift/core_ext.rb
80
- - lib/log4r/evernote/lib/thrift/core_ext/fixnum.rb
81
- - lib/log4r/evernote/lib/thrift/exceptions.rb
82
- - lib/log4r/evernote/lib/thrift/processor.rb
83
- - lib/log4r/evernote/lib/thrift/protocol/base_protocol.rb
84
- - lib/log4r/evernote/lib/thrift/protocol/binary_protocol.rb
85
- - lib/log4r/evernote/lib/thrift/protocol/binary_protocol_accelerated.rb
86
- - lib/log4r/evernote/lib/thrift/protocol/compact_protocol.rb
87
- - lib/log4r/evernote/lib/thrift/serializer/deserializer.rb
88
- - lib/log4r/evernote/lib/thrift/serializer/serializer.rb
89
- - lib/log4r/evernote/lib/thrift/server/base_server.rb
90
- - lib/log4r/evernote/lib/thrift/server/mongrel_http_server.rb
91
- - lib/log4r/evernote/lib/thrift/server/nonblocking_server.rb
92
- - lib/log4r/evernote/lib/thrift/server/simple_server.rb
93
- - lib/log4r/evernote/lib/thrift/server/thread_pool_server.rb
94
- - lib/log4r/evernote/lib/thrift/server/threaded_server.rb
95
- - lib/log4r/evernote/lib/thrift/struct.rb
96
- - lib/log4r/evernote/lib/thrift/struct_union.rb
97
- - lib/log4r/evernote/lib/thrift/thrift_native.rb
98
- - lib/log4r/evernote/lib/thrift/transport/base_server_transport.rb
99
- - lib/log4r/evernote/lib/thrift/transport/base_transport.rb
100
- - lib/log4r/evernote/lib/thrift/transport/buffered_transport.rb
101
- - lib/log4r/evernote/lib/thrift/transport/framed_transport.rb
102
- - lib/log4r/evernote/lib/thrift/transport/http_client_transport.rb
103
- - lib/log4r/evernote/lib/thrift/transport/io_stream_transport.rb
104
- - lib/log4r/evernote/lib/thrift/transport/memory_buffer_transport.rb
105
- - lib/log4r/evernote/lib/thrift/transport/server_socket.rb
106
- - lib/log4r/evernote/lib/thrift/transport/socket.rb
107
- - lib/log4r/evernote/lib/thrift/transport/unix_server_socket.rb
108
- - lib/log4r/evernote/lib/thrift/transport/unix_socket.rb
109
- - lib/log4r/evernote/lib/thrift/types.rb
110
- - lib/log4r/evernote/lib/thrift/union.rb
111
94
  - lib/log4r/outputter/evernoteoutputter.rb
112
95
  - log4ever.gemspec
113
96
  - spec/log4ever_spec.rb
114
97
  - spec/spec_helper.rb
115
- has_rdoc: true
116
98
  homepage: https://github.com/mapserver2007/log4ever
117
99
  licenses: []
118
100
  post_install_message:
@@ -133,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
115
  version: '0'
134
116
  requirements: []
135
117
  rubyforge_project:
136
- rubygems_version: 1.6.2
118
+ rubygems_version: 1.8.25
137
119
  signing_key:
138
120
  specification_version: 3
139
121
  summary: log4ever is simple logger for evernote.
data/.project DELETED
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>log4ever</name>
4
- <comment></comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- </buildSpec>
9
- <natures>
10
- </natures>
11
- </projectDescription>
@@ -1,14 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.8.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
- require 'errors_types'
8
-
9
- module Evernote
10
- module EDAM
11
- module Error
12
- end
13
- end
14
- end
@@ -1,128 +0,0 @@
1
- #
2
- # Autogenerated by Thrift Compiler (0.8.0)
3
- #
4
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
- #
6
-
7
-
8
- module Evernote
9
- module EDAM
10
- module Error
11
- module EDAMErrorCode
12
- UNKNOWN = 1
13
- BAD_DATA_FORMAT = 2
14
- PERMISSION_DENIED = 3
15
- INTERNAL_ERROR = 4
16
- DATA_REQUIRED = 5
17
- LIMIT_REACHED = 6
18
- QUOTA_REACHED = 7
19
- INVALID_AUTH = 8
20
- AUTH_EXPIRED = 9
21
- DATA_CONFLICT = 10
22
- ENML_VALIDATION = 11
23
- SHARD_UNAVAILABLE = 12
24
- LEN_TOO_SHORT = 13
25
- LEN_TOO_LONG = 14
26
- TOO_FEW = 15
27
- TOO_MANY = 16
28
- UNSUPPORTED_OPERATION = 17
29
- VALUE_MAP = {1 => "UNKNOWN", 2 => "BAD_DATA_FORMAT", 3 => "PERMISSION_DENIED", 4 => "INTERNAL_ERROR", 5 => "DATA_REQUIRED", 6 => "LIMIT_REACHED", 7 => "QUOTA_REACHED", 8 => "INVALID_AUTH", 9 => "AUTH_EXPIRED", 10 => "DATA_CONFLICT", 11 => "ENML_VALIDATION", 12 => "SHARD_UNAVAILABLE", 13 => "LEN_TOO_SHORT", 14 => "LEN_TOO_LONG", 15 => "TOO_FEW", 16 => "TOO_MANY", 17 => "UNSUPPORTED_OPERATION"}
30
- VALID_VALUES = Set.new([UNKNOWN, BAD_DATA_FORMAT, PERMISSION_DENIED, INTERNAL_ERROR, DATA_REQUIRED, LIMIT_REACHED, QUOTA_REACHED, INVALID_AUTH, AUTH_EXPIRED, DATA_CONFLICT, ENML_VALIDATION, SHARD_UNAVAILABLE, LEN_TOO_SHORT, LEN_TOO_LONG, TOO_FEW, TOO_MANY, UNSUPPORTED_OPERATION]).freeze
31
- end
32
-
33
- # This exception is thrown by EDAM procedures when a call fails as a result of
34
- # a problem that a user may be able to resolve. For example, if the user
35
- # attempts to add a note to their account which would exceed their storage
36
- # quota, this type of exception may be thrown to indicate the source of the
37
- # error so that they can choose an alternate action.
38
- #
39
- # This exception would not be used for internal system errors that do not
40
- # reflect user actions, but rather reflect a problem within the service that
41
- # the user cannot resolve.
42
- #
43
- # errorCode: The numeric code indicating the type of error that occurred.
44
- # must be one of the values of EDAMErrorCode.
45
- #
46
- # parameter: If the error applied to a particular input parameter, this will
47
- # indicate which parameter.
48
- class EDAMUserException < ::Thrift::Exception
49
- include ::Thrift::Struct, ::Thrift::Struct_Union
50
- ERRORCODE = 1
51
- PARAMETER = 2
52
-
53
- FIELDS = {
54
- ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :enum_class => Evernote::EDAM::Error::EDAMErrorCode},
55
- PARAMETER => {:type => ::Thrift::Types::STRING, :name => 'parameter', :optional => true}
56
- }
57
-
58
- def struct_fields; FIELDS; end
59
-
60
- def validate
61
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field errorCode is unset!') unless @errorCode
62
- unless @errorCode.nil? || Evernote::EDAM::Error::EDAMErrorCode::VALID_VALUES.include?(@errorCode)
63
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field errorCode!')
64
- end
65
- end
66
-
67
- ::Thrift::Struct.generate_accessors self
68
- end
69
-
70
- # This exception is thrown by EDAM procedures when a call fails as a result of
71
- # an a problem in the service that could not be changed through user action.
72
- #
73
- # errorCode: The numeric code indicating the type of error that occurred.
74
- # must be one of the values of EDAMErrorCode.
75
- #
76
- # message: This may contain additional information about the error
77
- class EDAMSystemException < ::Thrift::Exception
78
- include ::Thrift::Struct, ::Thrift::Struct_Union
79
- ERRORCODE = 1
80
- MESSAGE = 2
81
-
82
- FIELDS = {
83
- ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode', :enum_class => Evernote::EDAM::Error::EDAMErrorCode},
84
- MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message', :optional => true}
85
- }
86
-
87
- def struct_fields; FIELDS; end
88
-
89
- def validate
90
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field errorCode is unset!') unless @errorCode
91
- unless @errorCode.nil? || Evernote::EDAM::Error::EDAMErrorCode::VALID_VALUES.include?(@errorCode)
92
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field errorCode!')
93
- end
94
- end
95
-
96
- ::Thrift::Struct.generate_accessors self
97
- end
98
-
99
- # This exception is thrown by EDAM procedures when a caller asks to perform
100
- # an operation that does not exist. This may be thrown based on an invalid
101
- # primary identifier (e.g. a bad GUID), or when the caller refers to an object
102
- # by another unique identifier (e.g. a User's email address).
103
- #
104
- # identifier: the object identifier that was not found on the server.
105
- #
106
- # key: the value passed from the client in the identifier, which was not
107
- # found. E.g. the GUID of an object that was not found.
108
- class EDAMNotFoundException < ::Thrift::Exception
109
- include ::Thrift::Struct, ::Thrift::Struct_Union
110
- IDENTIFIER = 1
111
- KEY = 2
112
-
113
- FIELDS = {
114
- IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'identifier', :optional => true},
115
- KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :optional => true}
116
- }
117
-
118
- def struct_fields; FIELDS; end
119
-
120
- def validate
121
- end
122
-
123
- ::Thrift::Struct.generate_accessors self
124
- end
125
-
126
- end
127
- end
128
- end