log4ever 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +33 -0
- data/.project +11 -0
- data/README.md +36 -0
- data/config/evernote.auth.test.yml +1 -0
- data/config/log4r.xml +19 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/errors_constants.rb +14 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/errors_types.rb +128 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/limits_constants.rb +240 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/limits_types.rb +13 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store.rb +5487 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_constants.rb +14 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/note_store_types.rb +1012 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/types_constants.rb +20 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/types_types.rb +1792 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store.rb +549 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_constants.rb +18 -0
- data/lib/log4r/evernote/lib/Evernote/EDAM/user_store_types.rb +415 -0
- data/lib/log4r/evernote/lib/thrift/client.rb +62 -0
- data/lib/log4r/evernote/lib/thrift/core_ext/fixnum.rb +29 -0
- data/lib/log4r/evernote/lib/thrift/core_ext.rb +23 -0
- data/lib/log4r/evernote/lib/thrift/exceptions.rb +84 -0
- data/lib/log4r/evernote/lib/thrift/processor.rb +57 -0
- data/lib/log4r/evernote/lib/thrift/protocol/base_protocol.rb +290 -0
- data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol.rb +229 -0
- data/lib/log4r/evernote/lib/thrift/protocol/binary_protocol_accelerated.rb +39 -0
- data/lib/log4r/evernote/lib/thrift/protocol/compact_protocol.rb +426 -0
- data/lib/log4r/evernote/lib/thrift/serializer/deserializer.rb +33 -0
- data/lib/log4r/evernote/lib/thrift/serializer/serializer.rb +34 -0
- data/lib/log4r/evernote/lib/thrift/server/base_server.rb +31 -0
- data/lib/log4r/evernote/lib/thrift/server/mongrel_http_server.rb +58 -0
- data/lib/log4r/evernote/lib/thrift/server/nonblocking_server.rb +305 -0
- data/lib/log4r/evernote/lib/thrift/server/simple_server.rb +43 -0
- data/lib/log4r/evernote/lib/thrift/server/thread_pool_server.rb +75 -0
- data/lib/log4r/evernote/lib/thrift/server/threaded_server.rb +47 -0
- data/lib/log4r/evernote/lib/thrift/struct.rb +237 -0
- data/lib/log4r/evernote/lib/thrift/struct_union.rb +192 -0
- data/lib/log4r/evernote/lib/thrift/thrift_native.rb +24 -0
- data/lib/log4r/evernote/lib/thrift/transport/base_server_transport.rb +37 -0
- data/lib/log4r/evernote/lib/thrift/transport/base_transport.rb +107 -0
- data/lib/log4r/evernote/lib/thrift/transport/buffered_transport.rb +108 -0
- data/lib/log4r/evernote/lib/thrift/transport/framed_transport.rb +116 -0
- data/lib/log4r/evernote/lib/thrift/transport/http_client_transport.rb +53 -0
- data/lib/log4r/evernote/lib/thrift/transport/io_stream_transport.rb +39 -0
- data/lib/log4r/evernote/lib/thrift/transport/memory_buffer_transport.rb +125 -0
- data/lib/log4r/evernote/lib/thrift/transport/server_socket.rb +63 -0
- data/lib/log4r/evernote/lib/thrift/transport/socket.rb +137 -0
- data/lib/log4r/evernote/lib/thrift/transport/unix_server_socket.rb +60 -0
- data/lib/log4r/evernote/lib/thrift/transport/unix_socket.rb +40 -0
- data/lib/log4r/evernote/lib/thrift/types.rb +101 -0
- data/lib/log4r/evernote/lib/thrift/union.rb +179 -0
- data/lib/log4r/evernote/lib/thrift.rb +64 -0
- data/lib/log4r/evernote.rb +206 -0
- data/lib/log4r/outputter/evernoteoutputter.rb +156 -0
- data/spec/log4ever_spec.rb +94 -0
- data/spec/spec_helper.rb +14 -0
- metadata +105 -0
data/.gitignore
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#*
|
2
|
+
*$
|
3
|
+
*.BAK
|
4
|
+
*.Z
|
5
|
+
*.bak
|
6
|
+
*.class
|
7
|
+
*.elc
|
8
|
+
*.ln
|
9
|
+
*.log
|
10
|
+
*.o
|
11
|
+
*.obj
|
12
|
+
*.olb
|
13
|
+
*.old
|
14
|
+
*.orig
|
15
|
+
*.pyc
|
16
|
+
*.pyo
|
17
|
+
*.rej
|
18
|
+
*~
|
19
|
+
,*
|
20
|
+
.#*
|
21
|
+
.DS_Store
|
22
|
+
.del-*
|
23
|
+
.deployables
|
24
|
+
.make.state
|
25
|
+
.nse_depinfo
|
26
|
+
.svn
|
27
|
+
CVS.adm
|
28
|
+
RCS
|
29
|
+
RCSLOG
|
30
|
+
SCCS
|
31
|
+
_$*
|
32
|
+
_svn
|
33
|
+
config/evernote.auth.yml
|
data/.project
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
#log4ever
|
2
|
+
log4ever is simple logger for evernote. It is available as an extension of [log4r](http://log4r.rubyforge.org/).
|
3
|
+
***
|
4
|
+
###Usage
|
5
|
+
|
6
|
+
logger = Logger.new("Evernote")
|
7
|
+
logger.outputters = StdoutOutputter.new('console')
|
8
|
+
formatter = PatternFormatter.new(
|
9
|
+
:pattern => "%d %C[%l]: %M ",
|
10
|
+
:date_format => "%Y/%m/%d %H:%M:%Sm"
|
11
|
+
)
|
12
|
+
stdoutOutputter = StdoutOutputter.new('console', {
|
13
|
+
:formatter => formatter
|
14
|
+
})
|
15
|
+
evernoteOutputter = EvernoteOutputter.new('evernote', {
|
16
|
+
:env => "production", # Execution environment in Evernote (production or sandbox)
|
17
|
+
:auth_token => "xxxxxxxxxxxxxxxxxxxxxxx" # evernote auth token
|
18
|
+
:stack => "Log4ever", # evernote stack name
|
19
|
+
:notebook => "DevelopmentLog", # evernote notebook name
|
20
|
+
:tags => ['Log'], # evernote tag (Can be specified in the list)
|
21
|
+
:maxsize => 500, # Maximum size of the logs to be rotated
|
22
|
+
#:shift_age => Log4ever::ShiftAge::DAILY, # Cycle of the logs to be rotated
|
23
|
+
:formatter => formatter
|
24
|
+
})
|
25
|
+
|
26
|
+
logger.outputters = [stdoutOutputter, evernoteOutputter]
|
27
|
+
logger.info('log output')
|
28
|
+
Output:
|
29
|
+
|
30
|
+
2012-08-06 21:12:31 Evernote[INFO]: log output
|
31
|
+
|
32
|
+
The output results are stored in Evernote.
|
33
|
+
|
34
|
+
##License
|
35
|
+
Licensed under the MIT
|
36
|
+
http://www.opensource.org/licenses/mit-license.php
|
@@ -0,0 +1 @@
|
|
1
|
+
auth_token: your token
|
data/config/log4r.xml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<log4r_config>
|
2
|
+
<pre-config>
|
3
|
+
<global level="DEBUG"/>
|
4
|
+
</pre-config>
|
5
|
+
|
6
|
+
<outputter name="stdout" type="StdoutOutputter">
|
7
|
+
</outputter>
|
8
|
+
<outputter name="Evernote" type="EvernoteOutputter">
|
9
|
+
<env>sandbox</env>
|
10
|
+
<notebook>DevelopmentLog</notebook>
|
11
|
+
<stack>Log4ever</stack>
|
12
|
+
<auth_token>your token</auth_token>
|
13
|
+
<formatter type="PatternFormatter" pattern="%d %C[%l]: %M " date_format="%Y/%m/%d %H:%M:%S"/>
|
14
|
+
</outputter>
|
15
|
+
|
16
|
+
<logger name="Evernote">
|
17
|
+
<outputter>Evernote</outputter>
|
18
|
+
</logger>
|
19
|
+
</log4r_config>
|
@@ -0,0 +1,128 @@
|
|
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
|
@@ -0,0 +1,240 @@
|
|
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 'limits_types'
|
8
|
+
|
9
|
+
module Evernote
|
10
|
+
module EDAM
|
11
|
+
module Limits
|
12
|
+
EDAM_ATTRIBUTE_LEN_MIN = 1
|
13
|
+
|
14
|
+
EDAM_ATTRIBUTE_LEN_MAX = 4096
|
15
|
+
|
16
|
+
EDAM_ATTRIBUTE_REGEX = %q"^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,4096}$"
|
17
|
+
|
18
|
+
EDAM_ATTRIBUTE_LIST_MAX = 100
|
19
|
+
|
20
|
+
EDAM_ATTRIBUTE_MAP_MAX = 100
|
21
|
+
|
22
|
+
EDAM_GUID_LEN_MIN = 36
|
23
|
+
|
24
|
+
EDAM_GUID_LEN_MAX = 36
|
25
|
+
|
26
|
+
EDAM_GUID_REGEX = %q"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
27
|
+
|
28
|
+
EDAM_EMAIL_LEN_MIN = 6
|
29
|
+
|
30
|
+
EDAM_EMAIL_LEN_MAX = 255
|
31
|
+
|
32
|
+
EDAM_EMAIL_LOCAL_REGEX = %q"^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*$"
|
33
|
+
|
34
|
+
EDAM_EMAIL_DOMAIN_REGEX = %q"^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]{2,})$"
|
35
|
+
|
36
|
+
EDAM_EMAIL_REGEX = %q"^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.([A-Za-z]{2,})$"
|
37
|
+
|
38
|
+
EDAM_TIMEZONE_LEN_MIN = 1
|
39
|
+
|
40
|
+
EDAM_TIMEZONE_LEN_MAX = 32
|
41
|
+
|
42
|
+
EDAM_TIMEZONE_REGEX = %q"^([A-Za-z_-]+(/[A-Za-z_-]+)*)|(GMT(-|\\+)[0-9]{1,2}(:[0-9]{2})?)$"
|
43
|
+
|
44
|
+
EDAM_MIME_LEN_MIN = 3
|
45
|
+
|
46
|
+
EDAM_MIME_LEN_MAX = 255
|
47
|
+
|
48
|
+
EDAM_MIME_REGEX = %q"^[A-Za-z]+/[A-Za-z0-9._+-]+$"
|
49
|
+
|
50
|
+
EDAM_MIME_TYPE_GIF = %q"image/gif"
|
51
|
+
|
52
|
+
EDAM_MIME_TYPE_JPEG = %q"image/jpeg"
|
53
|
+
|
54
|
+
EDAM_MIME_TYPE_PNG = %q"image/png"
|
55
|
+
|
56
|
+
EDAM_MIME_TYPE_WAV = %q"audio/wav"
|
57
|
+
|
58
|
+
EDAM_MIME_TYPE_MP3 = %q"audio/mpeg"
|
59
|
+
|
60
|
+
EDAM_MIME_TYPE_AMR = %q"audio/amr"
|
61
|
+
|
62
|
+
EDAM_MIME_TYPE_MP4_VIDEO = %q"video/mp4"
|
63
|
+
|
64
|
+
EDAM_MIME_TYPE_INK = %q"application/vnd.evernote.ink"
|
65
|
+
|
66
|
+
EDAM_MIME_TYPE_PDF = %q"application/pdf"
|
67
|
+
|
68
|
+
EDAM_MIME_TYPE_DEFAULT = %q"application/octet-stream"
|
69
|
+
|
70
|
+
EDAM_MIME_TYPES = Set.new([
|
71
|
+
%q"image/gif",
|
72
|
+
%q"image/jpeg",
|
73
|
+
%q"image/png",
|
74
|
+
%q"audio/wav",
|
75
|
+
%q"audio/mpeg",
|
76
|
+
%q"audio/amr",
|
77
|
+
%q"application/vnd.evernote.ink",
|
78
|
+
%q"application/pdf",
|
79
|
+
%q"video/mp4",
|
80
|
+
])
|
81
|
+
|
82
|
+
EDAM_COMMERCE_SERVICE_GOOGLE = %q"Google"
|
83
|
+
|
84
|
+
EDAM_COMMERCE_SERVICE_PAYPAL = %q"Paypal"
|
85
|
+
|
86
|
+
EDAM_COMMERCE_SERVICE_GIFT = %q"Gift"
|
87
|
+
|
88
|
+
EDAM_COMMERCE_SERVICE_TRIALPAY = %q"TrialPay"
|
89
|
+
|
90
|
+
EDAM_COMMERCE_SERVICE_TRIAL = %q"Trial"
|
91
|
+
|
92
|
+
EDAM_COMMERCE_SERVICE_GROUP = %q"Group"
|
93
|
+
|
94
|
+
EDAM_COMMERCE_SERVICE_CYBERSOURCE = %q"CYBERSRC"
|
95
|
+
|
96
|
+
EDAM_COMMERCE_DEFAULT_CURRENCY_COUNTRY_CODE = %q"USD"
|
97
|
+
|
98
|
+
EDAM_SEARCH_QUERY_LEN_MIN = 0
|
99
|
+
|
100
|
+
EDAM_SEARCH_QUERY_LEN_MAX = 1024
|
101
|
+
|
102
|
+
EDAM_SEARCH_QUERY_REGEX = %q"^[^\\p{Cc}\\p{Zl}\\p{Zp}]{0,1024}$"
|
103
|
+
|
104
|
+
EDAM_HASH_LEN = 16
|
105
|
+
|
106
|
+
EDAM_USER_USERNAME_LEN_MIN = 1
|
107
|
+
|
108
|
+
EDAM_USER_USERNAME_LEN_MAX = 64
|
109
|
+
|
110
|
+
EDAM_USER_USERNAME_REGEX = %q"^[a-z0-9]([a-z0-9_-]{0,62}[a-z0-9])?$"
|
111
|
+
|
112
|
+
EDAM_USER_NAME_LEN_MIN = 1
|
113
|
+
|
114
|
+
EDAM_USER_NAME_LEN_MAX = 255
|
115
|
+
|
116
|
+
EDAM_USER_NAME_REGEX = %q"^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,255}$"
|
117
|
+
|
118
|
+
EDAM_TAG_NAME_LEN_MIN = 1
|
119
|
+
|
120
|
+
EDAM_TAG_NAME_LEN_MAX = 100
|
121
|
+
|
122
|
+
EDAM_TAG_NAME_REGEX = %q"^[^,\\p{Cc}\\p{Z}]([^,\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^,\\p{Cc}\\p{Z}])?$"
|
123
|
+
|
124
|
+
EDAM_NOTE_TITLE_LEN_MIN = 1
|
125
|
+
|
126
|
+
EDAM_NOTE_TITLE_LEN_MAX = 255
|
127
|
+
|
128
|
+
EDAM_NOTE_TITLE_REGEX = %q"^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,253}[^\\p{Cc}\\p{Z}])?$"
|
129
|
+
|
130
|
+
EDAM_NOTE_CONTENT_LEN_MIN = 0
|
131
|
+
|
132
|
+
EDAM_NOTE_CONTENT_LEN_MAX = 5242880
|
133
|
+
|
134
|
+
EDAM_APPLICATIONDATA_NAME_LEN_MIN = 3
|
135
|
+
|
136
|
+
EDAM_APPLICATIONDATA_NAME_LEN_MAX = 32
|
137
|
+
|
138
|
+
EDAM_APPLICATIONDATA_VALUE_LEN_MIN = 0
|
139
|
+
|
140
|
+
EDAM_APPLICATIONDATA_VALUE_LEN_MAX = 4092
|
141
|
+
|
142
|
+
EDAM_APPLICATIONDATA_ENTRY_LEN_MAX = 4095
|
143
|
+
|
144
|
+
EDAM_APPLICATIONDATA_NAME_REGEX = %q"^[A-Za-z0-9_.-]{3,32}$"
|
145
|
+
|
146
|
+
EDAM_APPLICATIONDATA_VALUE_REGEX = %q"^[^\\p{Cc}]{0,4092}$"
|
147
|
+
|
148
|
+
EDAM_NOTEBOOK_NAME_LEN_MIN = 1
|
149
|
+
|
150
|
+
EDAM_NOTEBOOK_NAME_LEN_MAX = 100
|
151
|
+
|
152
|
+
EDAM_NOTEBOOK_NAME_REGEX = %q"^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"
|
153
|
+
|
154
|
+
EDAM_NOTEBOOK_STACK_LEN_MIN = 1
|
155
|
+
|
156
|
+
EDAM_NOTEBOOK_STACK_LEN_MAX = 100
|
157
|
+
|
158
|
+
EDAM_NOTEBOOK_STACK_REGEX = %q"^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"
|
159
|
+
|
160
|
+
EDAM_PUBLISHING_URI_LEN_MIN = 1
|
161
|
+
|
162
|
+
EDAM_PUBLISHING_URI_LEN_MAX = 255
|
163
|
+
|
164
|
+
EDAM_PUBLISHING_URI_REGEX = %q"^[a-zA-Z0-9.~_+-]{1,255}$"
|
165
|
+
|
166
|
+
EDAM_PUBLISHING_URI_PROHIBITED = Set.new([
|
167
|
+
%q"..",
|
168
|
+
])
|
169
|
+
|
170
|
+
EDAM_PUBLISHING_DESCRIPTION_LEN_MIN = 1
|
171
|
+
|
172
|
+
EDAM_PUBLISHING_DESCRIPTION_LEN_MAX = 200
|
173
|
+
|
174
|
+
EDAM_PUBLISHING_DESCRIPTION_REGEX = %q"^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?$"
|
175
|
+
|
176
|
+
EDAM_SAVED_SEARCH_NAME_LEN_MIN = 1
|
177
|
+
|
178
|
+
EDAM_SAVED_SEARCH_NAME_LEN_MAX = 100
|
179
|
+
|
180
|
+
EDAM_SAVED_SEARCH_NAME_REGEX = %q"^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"
|
181
|
+
|
182
|
+
EDAM_USER_PASSWORD_LEN_MIN = 6
|
183
|
+
|
184
|
+
EDAM_USER_PASSWORD_LEN_MAX = 64
|
185
|
+
|
186
|
+
EDAM_USER_PASSWORD_REGEX = %q"^[A-Za-z0-9!#$%&'()*+,./:;<=>?@^_`{|}~\\[\\]\\\\-]{6,64}$"
|
187
|
+
|
188
|
+
EDAM_NOTE_TAGS_MAX = 100
|
189
|
+
|
190
|
+
EDAM_NOTE_RESOURCES_MAX = 1000
|
191
|
+
|
192
|
+
EDAM_USER_TAGS_MAX = 100000
|
193
|
+
|
194
|
+
EDAM_USER_SAVED_SEARCHES_MAX = 100
|
195
|
+
|
196
|
+
EDAM_USER_NOTES_MAX = 100000
|
197
|
+
|
198
|
+
EDAM_USER_NOTEBOOKS_MAX = 250
|
199
|
+
|
200
|
+
EDAM_USER_RECENT_MAILED_ADDRESSES_MAX = 10
|
201
|
+
|
202
|
+
EDAM_USER_MAIL_LIMIT_DAILY_FREE = 50
|
203
|
+
|
204
|
+
EDAM_USER_MAIL_LIMIT_DAILY_PREMIUM = 200
|
205
|
+
|
206
|
+
EDAM_USER_UPLOAD_LIMIT_FREE = 62914560
|
207
|
+
|
208
|
+
EDAM_USER_UPLOAD_LIMIT_PREMIUM = 1073741824
|
209
|
+
|
210
|
+
EDAM_NOTE_SIZE_MAX_FREE = 26214400
|
211
|
+
|
212
|
+
EDAM_NOTE_SIZE_MAX_PREMIUM = 52428800
|
213
|
+
|
214
|
+
EDAM_RESOURCE_SIZE_MAX_FREE = 26214400
|
215
|
+
|
216
|
+
EDAM_RESOURCE_SIZE_MAX_PREMIUM = 52428800
|
217
|
+
|
218
|
+
EDAM_USER_LINKED_NOTEBOOK_MAX = 100
|
219
|
+
|
220
|
+
EDAM_NOTEBOOK_SHARED_NOTEBOOK_MAX = 250
|
221
|
+
|
222
|
+
EDAM_NOTE_CONTENT_CLASS_LEN_MIN = 3
|
223
|
+
|
224
|
+
EDAM_NOTE_CONTENT_CLASS_LEN_MAX = 32
|
225
|
+
|
226
|
+
EDAM_HELLO_APP_CONTENT_CLASS_PREFIX = %q"evernote.hello."
|
227
|
+
|
228
|
+
EDAM_FOOD_APP_CONTENT_CLASS_PREFIX = %q"evernote.food."
|
229
|
+
|
230
|
+
EDAM_NOTE_CONTENT_CLASS_REGEX = %q"^[A-Za-z0-9_.-]{3,32}$"
|
231
|
+
|
232
|
+
EDAM_CONTENT_CLASS_HELLO_ENCOUNTER = %q"evernote.hello.encounter"
|
233
|
+
|
234
|
+
EDAM_CONTENT_CLASS_HELLO_PROFILE = %q"evernote.hello.profile"
|
235
|
+
|
236
|
+
EDAM_CONTENT_CLASS_FOOD_MEAL = %q"evernote.food.meal"
|
237
|
+
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|