evertils 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/evertils/controllers/render.rb +0 -15
- data/lib/evertils/version.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f61daa7a1057463617eae0fd57e4fdf99157dd5e4665ff6870ed9a2ddb6b9b7c
|
|
4
|
+
data.tar.gz: 51a484f7c0657572b0bce55e3910e29aa46969e8d46180a0e1af8c1d3bb5e505
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85f6cded362a7cbff82f283c603a2eafc82727c606d4b5a9c1a19baff597f3dd8dbec50f7b6a41a1e73656c0e0a12e51c337077d9b8a3351c7dab4b58cef834f
|
|
7
|
+
data.tar.gz: 65d3aa2ad8d01361ebc6c1791004c239bf3c35c682a835b97a6c74af792797b8e7f6993e10530bcaedacd472d398a5dcbf9b30e573f70960c867df6dd03180d6
|
|
@@ -6,24 +6,9 @@ module Evertils
|
|
|
6
6
|
def from_file
|
|
7
7
|
set_allowed_fields
|
|
8
8
|
|
|
9
|
-
if @allowed_fields[:action] == 'create'
|
|
10
|
-
return Notify.warning("Note already exists\n- #{@link}") if note_exists?
|
|
11
|
-
|
|
12
|
-
Notify.info 'Note not found, creating a new one'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
9
|
execute_action(@allowed_fields[:action])
|
|
16
10
|
end
|
|
17
11
|
|
|
18
|
-
def note_exists?
|
|
19
|
-
helper = Evertils::Helper::Note.instance
|
|
20
|
-
note = helper.wait_for_with_grammar(grammar)
|
|
21
|
-
|
|
22
|
-
@link = helper.external_url_for(note.entity) unless note.entity.nil?
|
|
23
|
-
|
|
24
|
-
note.exists?
|
|
25
|
-
end
|
|
26
|
-
|
|
27
12
|
def execute_action(action)
|
|
28
13
|
case action
|
|
29
14
|
when nil
|
data/lib/evertils/version.rb
CHANGED