evernote_utils 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +11 -0
- data/README.md +52 -31
- data/Rakefile +36 -0
- data/evernote_utils.gemspec +4 -2
- data/lib/evernote_utils/filter.rb +31 -12
- data/lib/evernote_utils/note.rb +21 -5
- data/lib/evernote_utils/notebook.rb +18 -3
- data/lib/evernote_utils/{array.rb → notelist.rb} +6 -2
- data/lib/evernote_utils/tag.rb +17 -2
- data/lib/evernote_utils/version.rb +1 -1
- data/lib/evernote_utils.rb +12 -0
- data/spec/evernote_utils/note_spec.rb +8 -0
- data/spec/evernote_utils_spec.rb +8 -8
- data/spec/spec_helper.rb +0 -4
- metadata +55 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49f1ce1d6ba7eb482686b02c7fbab61a5b69544a
|
4
|
+
data.tar.gz: 1a5aab22da6f5dc08498269656cd305e7be44663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80ff2b4f18fd00b09fb64c69c53e1bb21654b5417a93aa00b2e9321eb05ccd6354f6b028aa552683ca7725e5c5bb575f978be600e14f0d307c880ac81d822932
|
7
|
+
data.tar.gz: 68097bc431430a63bd807c6867055498be45f51cc13f05ee5e009cbc67aca396364fbcda5e66857234d327e6077ca2a36b6d9d0dc4f32912cd22c889a7a880ed
|
data/Guardfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
guard :rspec, all_on_start: false, all_after_pass: false, cmd: 'bundle exec rspec --no-drb' do
|
2
|
+
watch(%r{^spec/.+_spec\.rb$})
|
3
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
4
|
+
watch('spec/spec_helper.rb') { "spec" }
|
5
|
+
end
|
6
|
+
|
7
|
+
## notification :gntp, sticky: true, host: '127.0.0.1'
|
8
|
+
notification :tmux,
|
9
|
+
display_message: true, timeout: 10,
|
10
|
+
default_message_format: '[%s] %s', line_separator: ' > ',
|
11
|
+
color_location: 'status-left-bg'
|
data/README.md
CHANGED
@@ -37,60 +37,81 @@ EvenoteUtils don't support authentication feature, because dominant other option
|
|
37
37
|
|
38
38
|
First, initialize ENUtils with an OAuth token credential identifier.
|
39
39
|
|
40
|
-
|
40
|
+
```ruby
|
41
|
+
enutils = ENUtils::Core.new('oauth-token-credential-identifier')
|
41
42
|
|
42
|
-
|
43
|
-
|
43
|
+
# If you want to work on sandbox, pass false to a 2nd argument.
|
44
|
+
enutils = ENUtils::Core.new('oauth-token-credential-identifier', false)
|
45
|
+
```
|
44
46
|
|
45
47
|
OAuth token credential identifier looks something like:
|
46
48
|
|
47
|
-
|
49
|
+
```
|
50
|
+
S=s4:U=a1:E=12bfzzzzzz6:C=12bf8426ab8:P=7:A=en_oauth_test:H=3df9cf6xxxxxxxxx824c802xxxxxdbe1
|
51
|
+
```
|
48
52
|
|
49
53
|
Then you can access Evernote resources.
|
50
54
|
|
51
|
-
|
55
|
+
```ruby
|
56
|
+
enutils.notes # => <ENUtils::NoteList ...>
|
57
|
+
```
|
52
58
|
|
53
|
-
It returns `ENUtils::NoteList`
|
59
|
+
It returns `ENUtils::NoteList` instance. `ENUtils::NoteList` is an enumerable collection of `ENUtils::Note`. `ENUtils::Note` is just a thin wrapper of `Evernote::EDAM::Type::Note`.
|
54
60
|
|
55
|
-
|
56
|
-
|
57
|
-
`ENUtils::NoteList` is a collection of `ENUtils::Note`. `ENUtils::Note` is a thin wrapper of `Evernote::EDAM::Type::Note`.
|
58
|
-
|
59
|
-
|
60
|
-
And here, `ENUtils#notes` accepts following options:
|
61
|
+
Here, `ENUtils#notes` accepts following options to search notes:
|
61
62
|
|
62
63
|
* notebook
|
63
64
|
* tag, tags
|
64
65
|
* words (fulltext search api)
|
65
66
|
* order (`:created, :updated, :relevance, :update_sequence_number, :title`)
|
66
67
|
* asc (true/false)
|
67
|
-
* offset (default
|
68
|
-
* limit (default
|
68
|
+
* offset (default 0)
|
69
|
+
* limit (default 10, max 50 (due to Evernote API restriction))
|
69
70
|
|
70
|
-
`ENUtils#notebooks` and `ENUtils#tags` accept name filtering. You can use String or Regexp.
|
71
71
|
|
72
|
-
|
73
|
-
|
72
|
+
```ruby
|
73
|
+
# Search notes by free words.
|
74
|
+
enutils.notes(words: 'clojure install')
|
74
75
|
|
75
|
-
|
76
|
+
# Search notes by notebook and tag names.
|
77
|
+
result = enutils.notes(notebook: 'inbox', tag: 'mytag')
|
76
78
|
|
77
|
-
|
78
|
-
|
79
|
-
enutils.notes(notebook: notebook, tag: tag)
|
79
|
+
result.count #=> 10 ... 'result' contains 10 notes for now.
|
80
|
+
result.total_count #=> 210 ... How many results EverNote has on your account.
|
80
81
|
|
81
|
-
|
82
|
-
|
82
|
+
# 10 is default search limit. You can overwrite limit by passing option 'limit'.
|
83
|
+
enutils.notes(notebook: 'inbox', tag: 'mytag', limit: 50)
|
83
84
|
|
85
|
+
# Sorting result whould be nice.
|
86
|
+
enutils.notes(tag: 'mytag', order: :updated, asc: false)
|
84
87
|
|
85
|
-
|
88
|
+
# BTW 'tags' option also available to search by multiple tags. Pass an array of tags to it.
|
89
|
+
enutils.notes(tags: ['java', 'clojure'])
|
90
|
+
```
|
86
91
|
|
87
|
-
|
92
|
+
Actually, 'words' option is flexible enough to search notes by names of notebook and tag, same as official Evernote Desctop application.
|
88
93
|
|
94
|
+
```ruby
|
95
|
+
# Just passing notebook/tag(s) names to 'words' option would work.
|
96
|
+
enutils.notes(words: 'oauth notebook:Blog tag:ruby tag:tips')
|
97
|
+
```
|
89
98
|
|
90
|
-
|
99
|
+
`ENUtils#notebooks` and `ENUtils#tags` accept name filtering. You can use String or Regexp.
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
enutils.notebooks(name: 'Twitter') #=> [<ENUtils::Notebook ...>, ...]
|
103
|
+
enutils.tags(name: /ruby/i) #=> [<ENUtils::Tag ...>, ...]
|
104
|
+
```
|
105
|
+
|
106
|
+
These methods return an array of `ENUtils::Notebook` and `ENUtils::Tag`, respectively. By passing them `ENUtils::Core#notes` searches notes as described above.
|
107
|
+
|
108
|
+
```ruby
|
109
|
+
# You can also use instances of ENUtils::Notebook and ENUtils::Tag when searching notes.
|
110
|
+
notebook = enutils.notebooks(name: /Book/).first
|
111
|
+
tag = enutils.tags(name: 'language').first
|
112
|
+
enutils.notes(notebook: notebook, tag: tag, words: 'beginners\' guide')
|
113
|
+
```
|
114
|
+
|
115
|
+
## Planning to do
|
91
116
|
|
92
|
-
|
93
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
94
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
95
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
96
|
-
5. Create new Pull Request
|
117
|
+
* update notes
|
data/Rakefile
CHANGED
@@ -6,3 +6,39 @@ Rake::TestTask.new do |t|
|
|
6
6
|
t.pattern = 'spec/**/*_spec.rb'
|
7
7
|
t.verbose = true
|
8
8
|
end
|
9
|
+
|
10
|
+
# CSV.open('output.csv', 'w') do |w|
|
11
|
+
# CSV.open('words.csv', 'r') do |r|
|
12
|
+
# reader.each do |row|
|
13
|
+
# # extract plain text from ENUtils::Note#content, which is an ENML document.
|
14
|
+
# w << [row[0], row[1], Nokogiri::XML(row[2]).elements.first.text.gsub(/^\n|\n$/,')]
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
# end
|
18
|
+
|
19
|
+
###################################################
|
20
|
+
require 'rubygems'
|
21
|
+
require 'bundler/setup'
|
22
|
+
Bundler.require
|
23
|
+
require 'pry'
|
24
|
+
require 'evernote_utils'
|
25
|
+
|
26
|
+
e = ENUtils::Core.new("xxxxxxxxxxx")
|
27
|
+
|
28
|
+
binding.pry
|
29
|
+
|
30
|
+
# notebook_archive = e.notebooks(name: 'Archive').first
|
31
|
+
# tag_english = e.tags(name: 'english').first
|
32
|
+
# results = []
|
33
|
+
# results << e.notes(notebook: notebook_archive, tag: tag_english, limit: 50, offset: 0)
|
34
|
+
# results << e.notes(notebook: notebook_archive, tag: tag_english, limit: 50, offset: 50)
|
35
|
+
# results << e.notes(notebook: notebook_archive, tag: tag_english, limit: 50, offset: 100)
|
36
|
+
# results.flatten!
|
37
|
+
# results.each{|n| n.set_content! }
|
38
|
+
#
|
39
|
+
# require 'csv'
|
40
|
+
# CSV.open('hoge.csv', 'w') do |csv|
|
41
|
+
# results.each do |n|
|
42
|
+
# csv << [n.created, n.title, n.content]
|
43
|
+
# end
|
44
|
+
# end
|
data/evernote_utils.gemspec
CHANGED
@@ -19,11 +19,13 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'evernote-thrift', '~>1.25.1'
|
22
|
-
spec.add_dependency 'activesupport', '~>
|
22
|
+
spec.add_dependency 'activesupport', '~>3.2.13'
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
25
|
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "pry"
|
27
|
-
spec.add_development_dependency "
|
27
|
+
spec.add_development_dependency "rspec", "~>3.0.0.beta"
|
28
|
+
spec.add_development_dependency "rb-readline"
|
29
|
+
spec.add_development_dependency "guard-rspec"
|
28
30
|
spec.add_development_dependency "mocha"
|
29
31
|
end
|
@@ -6,19 +6,13 @@ module ENUtils
|
|
6
6
|
accum.merge(pair.last.downcase.to_sym => pair.first)
|
7
7
|
}
|
8
8
|
|
9
|
-
def self.build(
|
9
|
+
def self.build(core, o={})
|
10
10
|
filter = Evernote::EDAM::NoteStore::NoteFilter.new
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
tag_guids = (tags || [tag]).map{|t| t.is_a?(ENUtils::Tag) ? t.guid : t }
|
17
|
-
filter.tagGuids = tag_guids
|
18
|
-
end
|
19
|
-
filter.words = options[:words] if options[:words]
|
20
|
-
filter.order = OrderFields[options[:order].to_sym] if available_order?(options[:order])
|
21
|
-
filter.ascending = options[:asc] if options[:asc]
|
11
|
+
filter.notebookGuid = notebook_guid(core, o[:notebook]) if o[:notebook]
|
12
|
+
filter.tagGuids = tag_guids(core, tag: o[:tag], tags: o[:tags]) if o[:tag] || o[:tags]
|
13
|
+
filter.words = o[:words] if o[:words]
|
14
|
+
filter.order = OrderFields[o[:order].to_sym] if available_order?(o[:order])
|
15
|
+
filter.ascending = o[:asc] if o[:asc]
|
22
16
|
filter
|
23
17
|
end
|
24
18
|
|
@@ -27,5 +21,30 @@ module ENUtils
|
|
27
21
|
OrderFields.keys.include?(value.to_sym)
|
28
22
|
end
|
29
23
|
|
24
|
+
private
|
25
|
+
|
26
|
+
def self.notebook_guid(core, notebook)
|
27
|
+
if notebook.is_a?(ENUtils::Notebook)
|
28
|
+
notebook.guid
|
29
|
+
elsif ENUtils::GUID_REGEXP =~ notebook
|
30
|
+
notebook
|
31
|
+
else
|
32
|
+
Notebook.find_by_name(core, notebook).try(:guid)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.tag_guids(core, tag: nil, tags: nil)
|
37
|
+
search_tags = (tags || []) + [tag]
|
38
|
+
search_tags.compact.map do |t|
|
39
|
+
if t.is_a?(ENUtils::Tag)
|
40
|
+
t.guid
|
41
|
+
elsif ENUtils::GUID_REGEXP =~ t
|
42
|
+
t
|
43
|
+
else
|
44
|
+
Tag.find_by_name(core, t).try(:guid)
|
45
|
+
end
|
46
|
+
end.compact
|
47
|
+
end
|
48
|
+
|
30
49
|
end
|
31
50
|
end
|
data/lib/evernote_utils/note.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'active_support/core_ext/object'
|
2
|
-
require "evernote_utils/
|
3
|
-
require "evernote_utils/filter"
|
2
|
+
require "evernote_utils/notelist"
|
4
3
|
|
5
4
|
module ENUtils
|
6
5
|
class Note < Evernote::EDAM::Type::Note
|
@@ -19,9 +18,12 @@ module ENUtils
|
|
19
18
|
# notebookGuid:"4xxxxxda-xxxx-xxxx-xxxx-zzzzzzzzzzzz"
|
20
19
|
# attributes:<Evernote::EDAM::Type::NoteAttributes >
|
21
20
|
|
22
|
-
attr_reader :guid, :title, :contentHash, :contentLength, :created, :updated, :active, :updateSequenceNum, :notebookGuid, :attributes
|
21
|
+
attr_reader :guid, :title, :contentHash, :contentLength, :created, :updated, :active, :updateSequenceNum, :notebookGuid, :tagGuids, :attributes
|
22
|
+
attr_accessor :content
|
23
|
+
|
24
|
+
def initialize(core, edam_note)
|
25
|
+
@core = core
|
23
26
|
|
24
|
-
def initialize(edam_note)
|
25
27
|
@guid = edam_note.guid
|
26
28
|
@title = edam_note.title
|
27
29
|
@contentHash = edam_note.contentHash
|
@@ -31,15 +33,29 @@ module ENUtils
|
|
31
33
|
@active = edam_note.active
|
32
34
|
@updateSequenceNum = edam_note.updateSequenceNum
|
33
35
|
@notebookGuid = edam_note.notebookGuid
|
36
|
+
@tagGuids = edam_note.tagGuids
|
34
37
|
@attributes = edam_note.attributes
|
35
38
|
end
|
36
39
|
|
37
40
|
def self.where(core, options={})
|
38
41
|
offset = options.delete(:offset) || 0
|
39
42
|
limit = options.delete(:limit) || DEFAULT_LIMIT
|
40
|
-
result = core.notestore.findNotes(core.token, NoteFilter.build(options), offset, limit).notes.map{|n| new(n) }
|
43
|
+
result = core.notestore.findNotes(core.token, NoteFilter.build(core, options), offset, limit).notes.map{|n| new(core, n) }
|
41
44
|
NoteList.new(core, result, options)
|
42
45
|
end
|
43
46
|
|
47
|
+
def set_content!
|
48
|
+
# getNote(token, guid, withContent, withResourcesData, withResourcesRecognition, withResourcesAlternateData)
|
49
|
+
@content ||= @core.notestore.getNote(@core.token, guid, true, false, false, false).content
|
50
|
+
end
|
51
|
+
|
52
|
+
def notebook
|
53
|
+
@notebook ||= Notebook.find_by_guid(@core, notebookGuid)
|
54
|
+
end
|
55
|
+
|
56
|
+
def tags
|
57
|
+
return nil unless tagGuids
|
58
|
+
@tags ||= tagGuids.map{|guid| Tag.find_by_guid(@core, guid) }.compact
|
59
|
+
end
|
44
60
|
end
|
45
61
|
end
|
@@ -12,7 +12,8 @@ module ENUtils
|
|
12
12
|
|
13
13
|
attr_reader :guid, :name, :updateSequenceNum, :defaultNotebook, :serviceCreated, :serviceUpdated, :restrictions
|
14
14
|
|
15
|
-
def initialize(edam_notebook)
|
15
|
+
def initialize(core, edam_notebook)
|
16
|
+
@core = core
|
16
17
|
@guid = edam_notebook.guid
|
17
18
|
@name = edam_notebook.name
|
18
19
|
@updateSequenceNum = edam_notebook.updateSequenceNum
|
@@ -22,12 +23,26 @@ module ENUtils
|
|
22
23
|
@restrictions = edam_notebook.restrictions
|
23
24
|
end
|
24
25
|
|
26
|
+
def notes(options={})
|
27
|
+
Note.where(@core, options.merge(notebook: self))
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.find_by_guid(core, guid)
|
31
|
+
notebook = core.notestore.listNotebooks(core.token).find{|nb| nb.guid == guid }
|
32
|
+
notebook.present? ? new(core, notebook) : nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.find_by_name(core, name)
|
36
|
+
notebook = core.notestore.listNotebooks(core.token).find{|nb| nb.name.downcase == name.to_s.downcase }
|
37
|
+
notebook.present? ? new(core, notebook) : nil
|
38
|
+
end
|
39
|
+
|
25
40
|
def self.where(core, options={})
|
26
|
-
notebooks = core.notestore.listNotebooks(core.token).map{|nb| new(nb) }
|
41
|
+
notebooks = core.notestore.listNotebooks(core.token).map{|nb| new(core, nb) }
|
27
42
|
return notebooks if options.empty?
|
28
43
|
case options[:name]
|
29
44
|
when String
|
30
|
-
notebooks.select{|nb| options[:name] == nb.name }
|
45
|
+
notebooks.select{|nb| options[:name].downcase == nb.name.downcase }
|
31
46
|
when Regexp
|
32
47
|
notebooks.select{|nb| options[:name] =~ nb.name }
|
33
48
|
else
|
@@ -11,12 +11,16 @@ module ENUtils
|
|
11
11
|
super(array)
|
12
12
|
end
|
13
13
|
|
14
|
+
def total_count
|
15
|
+
@total_count ||= get_total_count
|
16
|
+
end
|
17
|
+
|
14
18
|
# findNoteCounts returns
|
15
19
|
# Evernote::EDAM::NoteStore::NoteCollectionCounts
|
16
20
|
# notebookCounts:{"xxxxxxxx-...xxx": 10, ...},
|
17
21
|
# tagCounts:{"xxxxxx-...xxxx": 1, ..."}
|
18
|
-
def
|
19
|
-
counts = core.notestore.findNoteCounts(core.token, NoteFilter.build(options), false)
|
22
|
+
def get_total_count
|
23
|
+
counts = core.notestore.findNoteCounts(core.token, NoteFilter.build(core, options), false)
|
20
24
|
counts.notebookCounts.reduce(0){|sum, pair| sum += pair.last }
|
21
25
|
end
|
22
26
|
end
|
data/lib/evernote_utils/tag.rb
CHANGED
@@ -7,14 +7,29 @@ module ENUtils
|
|
7
7
|
# updateSequenceNum:4378
|
8
8
|
attr_reader :guid, :name, :updateSequenceNum
|
9
9
|
|
10
|
-
def initialize(edam_tag)
|
10
|
+
def initialize(core, edam_tag)
|
11
|
+
@core = core
|
11
12
|
@guid = edam_tag.guid
|
12
13
|
@name = edam_tag.name
|
13
14
|
@updateSequenceNum = edam_tag.updateSequenceNum
|
14
15
|
end
|
15
16
|
|
17
|
+
def notes(options={})
|
18
|
+
Note.where(@core, options.merge(tag: self))
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.find_by_guid(core, guid)
|
22
|
+
tag = core.notestore.listTags(core.token).find{|t| t.guid == guid }
|
23
|
+
tag.present? ? new(core, tag) : nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.find_by_name(core, name)
|
27
|
+
tag = core.notestore.listTags(core.token).find{|t| t.name.downcase == name.to_s.downcase }
|
28
|
+
tag.present? ? new(core, tag) : nil
|
29
|
+
end
|
30
|
+
|
16
31
|
def self.where(core, options={})
|
17
|
-
tags = core.notestore.listTags(core.token).map{|t| new(t) }
|
32
|
+
tags = core.notestore.listTags(core.token).map{|t| new(core, t) }
|
18
33
|
return tags if options.empty?
|
19
34
|
case options[:name]
|
20
35
|
when String
|
data/lib/evernote_utils.rb
CHANGED
@@ -8,6 +8,8 @@ require "evernote_utils/tag"
|
|
8
8
|
module ENUtils
|
9
9
|
class InvalidVersion < StandardError; end
|
10
10
|
|
11
|
+
GUID_REGEXP = /\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/
|
12
|
+
|
11
13
|
class Core
|
12
14
|
attr_accessor :token, :notestore
|
13
15
|
|
@@ -36,10 +38,20 @@ module ENUtils
|
|
36
38
|
Note.where(self, options)
|
37
39
|
end
|
38
40
|
|
41
|
+
def notebook(name=nil)
|
42
|
+
return nil unless name
|
43
|
+
Notebook.find_by_name(self, name)
|
44
|
+
end
|
45
|
+
|
39
46
|
def notebooks(options={})
|
40
47
|
Notebook.where(self, options)
|
41
48
|
end
|
42
49
|
|
50
|
+
def tag(name=nil)
|
51
|
+
return nil unless name
|
52
|
+
Tag.find_by_name(self, name)
|
53
|
+
end
|
54
|
+
|
43
55
|
def tags(options={})
|
44
56
|
Tag.where(self, options)
|
45
57
|
end
|
data/spec/evernote_utils_spec.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe ENUtils::Core do
|
4
4
|
before do
|
5
|
-
Thrift::HTTPClientTransport.
|
6
|
-
Thrift::BinaryProtocol.
|
5
|
+
allow(Thrift::HTTPClientTransport).to receive(:new) { nil }
|
6
|
+
allow(Thrift::BinaryProtocol).to receive(:new) { nil }
|
7
7
|
|
8
|
-
us =
|
9
|
-
Evernote::EDAM::UserStore::UserStore::Client.
|
10
|
-
us.
|
11
|
-
|
8
|
+
us = double('Evernote::EDAM::UserStore::UserStore::Client')
|
9
|
+
allow(Evernote::EDAM::UserStore::UserStore::Client).to receive(:new) { us }
|
10
|
+
allow(us).to receive_messages(checkVersion: true,
|
11
|
+
getNoteStoreUrl: 'http://note_store_url/')
|
12
12
|
end
|
13
13
|
it {
|
14
|
-
|
14
|
+
expect(ENUtils::Core.new('dummy_token')).to be_instance_of(ENUtils::Core)
|
15
15
|
}
|
16
16
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,111 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evernote_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- memerelics
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evernote-thrift
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.25.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.25.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.2.13
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.2.13
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pry
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.0.0.beta
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.0.0.beta
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rb-readline
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: guard-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
117
|
version: '0'
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: mocha
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- -
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
131
|
version: '0'
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
|
-
- -
|
136
|
+
- - ">="
|
109
137
|
- !ruby/object:Gem::Version
|
110
138
|
version: '0'
|
111
139
|
description: A thin OOP-friendly wrapper of Evernote Ruby SDK.
|
@@ -115,19 +143,21 @@ executables: []
|
|
115
143
|
extensions: []
|
116
144
|
extra_rdoc_files: []
|
117
145
|
files:
|
118
|
-
- .gitignore
|
146
|
+
- ".gitignore"
|
119
147
|
- Gemfile
|
148
|
+
- Guardfile
|
120
149
|
- LICENSE.txt
|
121
150
|
- README.md
|
122
151
|
- Rakefile
|
123
152
|
- evernote_utils.gemspec
|
124
153
|
- lib/evernote_utils.rb
|
125
|
-
- lib/evernote_utils/array.rb
|
126
154
|
- lib/evernote_utils/filter.rb
|
127
155
|
- lib/evernote_utils/note.rb
|
128
156
|
- lib/evernote_utils/notebook.rb
|
157
|
+
- lib/evernote_utils/notelist.rb
|
129
158
|
- lib/evernote_utils/tag.rb
|
130
159
|
- lib/evernote_utils/version.rb
|
160
|
+
- spec/evernote_utils/note_spec.rb
|
131
161
|
- spec/evernote_utils_spec.rb
|
132
162
|
- spec/spec_helper.rb
|
133
163
|
homepage: ''
|
@@ -140,20 +170,21 @@ require_paths:
|
|
140
170
|
- lib
|
141
171
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
172
|
requirements:
|
143
|
-
- -
|
173
|
+
- - ">="
|
144
174
|
- !ruby/object:Gem::Version
|
145
175
|
version: '0'
|
146
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
177
|
requirements:
|
148
|
-
- -
|
178
|
+
- - ">="
|
149
179
|
- !ruby/object:Gem::Version
|
150
180
|
version: '0'
|
151
181
|
requirements: []
|
152
182
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
183
|
+
rubygems_version: 2.2.2
|
154
184
|
signing_key:
|
155
185
|
specification_version: 4
|
156
186
|
summary: A thin OOP-friendly wrapper of Evernote Ruby SDK.
|
157
187
|
test_files:
|
188
|
+
- spec/evernote_utils/note_spec.rb
|
158
189
|
- spec/evernote_utils_spec.rb
|
159
190
|
- spec/spec_helper.rb
|