evertils-common 0.3.12 → 0.3.13

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
  SHA256:
3
- metadata.gz: 36f791af790cc59aaa3b38d4a3950775d0b620fc833c0f6345f457612488ceaf
4
- data.tar.gz: 06d079fa6766f6a6416a38bfb7148974b6f338d6c10aa3705e92ee9b61ca0258
3
+ metadata.gz: c635ba603e98433f759cccfc3f35c518a11beddc1dd79bc9701e3581b672c21e
4
+ data.tar.gz: e6c6c6a5c5453d3b271d864301761f34852fec8fc0a58efff5155967524b813b
5
5
  SHA512:
6
- metadata.gz: 0f55af897f9c16d3f4ad24ea535e2b47fdc900e816e59a21d1d3b5e9ff8f38cadd7b11ec08dc42444c6455ce10bbdbd7ae1833140e55ea65a8e8f1adb6bab492
7
- data.tar.gz: b2700db737cb8be4bd690f8296904629c411c75c5cacd39924f26a2ef23480e2c722353913397361b0ae97224c323a9773a9a392c95cfb5acc5f5645b03764a5
6
+ metadata.gz: e885c36ad14fe3167e26b229c123198326b5f8171936a4715f892a9dc5754ed5007b95e1258f7feeb9271c33a8c41d8b650dd08ab8e35d50dd5ef241de13539e
7
+ data.tar.gz: f5d490d6a5d6739358849209ac9ba7bfad54967352f46f7e2fae0b11e8f5c102558177b8703c2885162d0eeaed1dfadcfe578dedd83efdc14a42945e18648d58
data/.rubocop.yml CHANGED
@@ -285,14 +285,6 @@ Style/SymbolProc:
285
285
  Layout/TrailingBlankLines:
286
286
  Enabled: false
287
287
 
288
- # Offense count: 1
289
- # Cop supports --auto-correct.
290
- # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
291
- # SupportedStyles: comma, consistent_comma, no_comma
292
- Style/TrailingCommaInLiteral:
293
- Exclude:
294
- - 'lib/evertils/common/authentication.rb'
295
-
296
288
  # Offense count: 1
297
289
  # Cop supports --auto-correct.
298
290
  Layout/TrailingWhitespace:
@@ -107,6 +107,30 @@ module Evertils
107
107
  end
108
108
  alias_method :find_by_name, :find
109
109
 
110
+ #
111
+ # @since 0.3.13
112
+ def find_with(conf)
113
+ return unless conf.is_a?(Hash)
114
+
115
+ @entity = nil
116
+
117
+ filter = ::Evernote::EDAM::NoteStore::NoteFilter.new
118
+ filter.words = conf
119
+
120
+ spec = ::Evernote::EDAM::NoteStore::NotesMetadataResultSpec.new
121
+ spec.includeTitle = true
122
+ spec.includeTagGuids = true
123
+ spec.includeContentLength = true
124
+ spec.includeCreated = true
125
+ spec.includeUpdated = true
126
+
127
+ result = @evernote.call(:findNotesMetadata, filter, 0, 10, spec)
128
+
129
+ @entity = result.notes.detect { |note| note.title == name }
130
+
131
+ self if @entity
132
+ end
133
+
110
134
  #
111
135
  # https://stackoverflow.com/questions/46694930/evernoteedamnotestorenoteresultspec-is-not-defined
112
136
  # http://www.rubydoc.info/gems/evernote-thrift/Evernote%2FEDAM%2FNoteStore%2FNoteStore%2FClient%3AgetNote
@@ -22,6 +22,14 @@ module Evertils
22
22
  entity
23
23
  end
24
24
 
25
+ #
26
+ # @since 0.3.13
27
+ def find_with(conf)
28
+ entity = Evertils::Common::Entity::Note.new
29
+ entity.find_with(conf)
30
+ entity
31
+ end
32
+
25
33
  #
26
34
  # @since 0.3.0
27
35
  def find_with_contents(name)
@@ -72,6 +72,13 @@ module Evertils
72
72
  entity.find(name)
73
73
  end
74
74
 
75
+ #
76
+ # @since 0.3.13
77
+ def find_with(conf)
78
+ entity = Manager::Note.instance
79
+ entity.find_with(conf)
80
+ end
81
+
75
82
  #
76
83
  # @since 0.3.4
77
84
  def find_note_contents(name)
@@ -1,5 +1,5 @@
1
1
  module Evertils
2
2
  module Common
3
- VERSION = '0.3.12'.freeze
3
+ VERSION = '0.3.13'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evertils-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-13 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.0.1
157
+ rubygems_version: 3.0.8
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: EN (heart) CLI