evertils-common 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: 8ece5b1508dd87b93750415035bd7aeb57b73b2b
4
- data.tar.gz: b399fec366af5f05baabeb5cb7de6269003cf829
3
+ metadata.gz: 02dd9b8ab4a87dc43530c8f3901a3635167ce8be
4
+ data.tar.gz: c56c21729320d0c0ce03b2c47079476330ba1325
5
5
  SHA512:
6
- metadata.gz: 3b2db29191840e3ff064062c6ddc5008647d6fef9912922315e4ad828911b674a3393ed8cb3b4c44f9df571e3585feaf04b6e097cf83b019274a820753dad4d9
7
- data.tar.gz: a25b1523b621c672bc396ce5af21a449ffa56fe589afe5f3ecbdee72fca8d3275aff4ebc49dfbe4ebba570d7301e97cba18a6dbe5837cb7975cc13c6df446d68
6
+ metadata.gz: 12cbf17aec809a6f401c63d8fdd0a1f7ec0a66b5de8303abed2b08df8c1ee8be1a83d82e460ac49795c7212b456e9b43df2afd39b9081b82249bdad4660ad524
7
+ data.tar.gz: 125c61ce993770a8aba0b9a8e9336c3984fe6ccfe4462251cfd7c767d96d64280aeb65f0bcea136ccc5e19110afdf5967521f0af49681789cb0a378716d7ae00
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << 'test'
6
+ end
7
+
8
+ desc "Run tests"
9
+ task :default => :test
@@ -1,7 +1,7 @@
1
1
  require 'evernote-thrift'
2
2
  require 'notifaction'
3
3
  require 'evertils/common/version'
4
- require 'evertils/common/evernote'
4
+ require 'evertils/common/simplequeries'
5
5
 
6
6
  module Evertils
7
7
  module Common
@@ -123,7 +123,7 @@ module Evertils
123
123
 
124
124
  result = @evernote.findNotesMetadata(Evertils::Common::EVERNOTE_DEVELOPER_TOKEN, filter, 0, 1, result)
125
125
 
126
- if result.totalNotes == 1
126
+ if result.totalNotes > 0
127
127
  result.notes[0]
128
128
  end
129
129
  end
@@ -13,6 +13,7 @@ module Evertils
13
13
  end
14
14
 
15
15
  def find(name)
16
+ @notebook = nil
16
17
  notebooks = Notebooks.new.all
17
18
 
18
19
  notebooks.each do |notebook|
@@ -12,14 +12,16 @@ module Evertils
12
12
  end
13
13
 
14
14
  def find(name)
15
+ @tag = nil
15
16
  tags = Tags.new.all
16
17
 
17
18
  tags.each do |tag|
18
19
  if tag.name == name.to_s
19
- return tag
20
+ @tag = tag
20
21
  end
21
22
  end
22
23
 
24
+ @tag
23
25
  end
24
26
 
25
27
  def create(name)
@@ -1,6 +1,5 @@
1
1
  require 'yaml'
2
2
  require 'evertils/common/enml'
3
- require 'evertils/common/results_helper'
4
3
  require 'evertils/common/entity/notebook'
5
4
  require 'evertils/common/entity/notebooks'
6
5
  require 'evertils/common/entity/notes'
@@ -10,15 +9,14 @@ require 'evertils/common/entity/tags'
10
9
 
11
10
  module Evertils
12
11
  module Common
13
- class Evernote
12
+ class SimpleQueries
14
13
 
15
14
  def notebooks
16
15
  Entity::Notebooks.new.all
17
16
  end
18
17
 
19
18
  def tags
20
- tags = Entity::Tags.new
21
- tags.all
19
+ Entity::Tags.new.all
22
20
  end
23
21
 
24
22
  def notebook_by_name(name)
@@ -42,8 +40,8 @@ module Evertils
42
40
  note.create_from_yml(full_path)
43
41
  end
44
42
 
45
- def create_notebook_from(full_path)
46
- nb = Entity::Notebook.new
43
+ def create_notebooks_from(full_path)
44
+ nb = Entity::Notebooks.new
47
45
  nb.create_from_yml(full_path)
48
46
  end
49
47
 
@@ -1,5 +1,5 @@
1
1
  module Evertils
2
2
  module Common
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
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.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-16 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,8 +93,7 @@ files:
93
93
  - lib/evertils/common/entity/stack.rb
94
94
  - lib/evertils/common/entity/tag.rb
95
95
  - lib/evertils/common/entity/tags.rb
96
- - lib/evertils/common/evernote.rb
97
- - lib/evertils/common/results_helper.rb
96
+ - lib/evertils/common/simplequeries.rb
98
97
  - lib/evertils/common/version.rb
99
98
  homepage: http://rubygems.org/gems/evertils-common
100
99
  licenses:
@@ -1,22 +0,0 @@
1
- module Evertils
2
- module Common
3
- class Results
4
- attr_reader :bucket
5
-
6
- def initialize
7
- @bucket = []
8
- @bucket
9
- end
10
-
11
- # Add a result for processing
12
- def add(result)
13
- @bucket.push(result.to_bool)
14
- result.to_bool
15
- end
16
-
17
- def should_eval_to(pass_value)
18
- @bucket.all? == pass_value
19
- end
20
- end
21
- end
22
- end