evertils 0.3.16 → 0.3.17

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: d3afe7d04363e2a574532b02692730d30fa97a93
4
- data.tar.gz: e8b9a05c293134a34e82556a7d9009fb2f99cd26
3
+ metadata.gz: 561c28824de0f475fed905f3ad995a484f363533
4
+ data.tar.gz: e8ffe5ac1387992629396c333bb9c0096e41fe46
5
5
  SHA512:
6
- metadata.gz: 1e52e81669085dbca37684d4de50b09a43a42fe723624f7e8dc9181ccca095daaf10594fa46febee298156dc60a70f924eeacd25b7e846a84c549555d95cd338
7
- data.tar.gz: 4a5a51fff526d626a5046166c9c3acd840b2d36428a5f1b37a9d7c5729d1e551be591e339fdc12d860caf8b04b0a9c028110ffaa42a3a1d483fc6f7a468df2d0
6
+ metadata.gz: f096438ac57c7500fb97c5c0ec24f4cebd33d7a0cb5ee394edd6c7b42efed535ded0c1d9021161d80dee4b3a98da0e22ae7d72bcbe3a02f1384984d75b3b9151
7
+ data.tar.gz: 9bf09c2ded96a58e8fc60636ae5cada0604edfc88213bc7c991bb92cd992bfe484b64be398972eb256acc54cd1a1287c2bb3b85586465edc73b77712277d80a9
@@ -23,7 +23,7 @@ module Evertils
23
23
  def create
24
24
  data = {
25
25
  title: @title,
26
- body: @content.delete!("\n"),
26
+ body: @content.to_s.delete!("\n"),
27
27
  parent_notebook: self.class::NOTEBOOK,
28
28
  tags: tags || [],
29
29
  colour: self.class::COLOUR
@@ -41,7 +41,7 @@ module Evertils
41
41
  def should_create?
42
42
  @note = find_note(self.class::NOTEBOOK)
43
43
  @entity = @note.entity
44
- result = @note.nil?
44
+ result = @entity.nil?
45
45
 
46
46
  Notify.warning "#{self.class.name} skipped, note already exists" unless result
47
47
 
@@ -65,10 +65,8 @@ module Evertils
65
65
  (1..MAX_SEARCH_SIZE).each do |iter|
66
66
  Notify.info(" (#{iter}) #{notebook}")
67
67
  note = find_note(notebook, true)
68
- break unless note.entity.nil?
68
+ break unless note.entity.nil? || iter == MAX_SEARCH_SIZE
69
69
  end
70
-
71
- Notify.info("#{iter} attempts to find #{notebook} note") unless iter.zero?
72
70
  end
73
71
 
74
72
  note
@@ -26,7 +26,7 @@ module Evertils
26
26
 
27
27
  @note = find_note(NOTEBOOK)
28
28
  @entity = @note.entity
29
- result = @note.nil? && today_is_first_of_month
29
+ result = @entity.nil? && today_is_first_of_month
30
30
 
31
31
  Notify.warning "#{self.class.name} skipped, note already exists" unless result
32
32
 
@@ -41,7 +41,7 @@ module Evertils
41
41
  # include the XML element builder
42
42
  xml_helper = Evertils::Helper.load('Xml', xml)
43
43
  # find the note entity we want to link
44
- linked_note = find_note(:Weekly).entity
44
+ linked_note = wait_for(:Weekly).entity
45
45
 
46
46
  # don't add the note link if it is already there
47
47
  unless xml.search("a[href='#{internal_url_for(linked_note)}']").size.zero?
@@ -27,7 +27,7 @@ module Evertils
27
27
  # include the XML element builder
28
28
  xml_helper = Evertils::Helper.load('Xml', xml)
29
29
  # find the note entity we want to link
30
- linked_note = find_note(:Daily).entity
30
+ linked_note = wait_for(:Daily).entity
31
31
 
32
32
  # don't add the note link if it is already there
33
33
  unless xml.search("a[href='#{internal_url_for(linked_note)}']").size.zero?
@@ -1,3 +1,3 @@
1
1
  module Evertils
2
- VERSION = '0.3.16'.freeze
2
+ VERSION = '0.3.17'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evertils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe