evertils 2.3.3 → 2.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a8c43b45ba92b95e7d46149f013fa969b0cd9bb95084b4990c88a0ab631a20c
4
- data.tar.gz: 819ddea29d5cad0a1a4d0f738ae1befbc26a04e46b2e3f49ac7765cdccaa53f3
3
+ metadata.gz: 0524e47cfd8ebc7a6a23a96aedc8a51db105d5c8069861e5d0b93210d422436b
4
+ data.tar.gz: b7e5b4f6ae11ffc9927a6aa8400296bcd7526e33050cb6f15b01ca28d4e681e3
5
5
  SHA512:
6
- metadata.gz: 92ffeb0ade85ff0b135892eabddb15f5b0f6cf13a54e01a2d45d14e92e31b0af400d5b0659680e3d03d9275613b986badab3cabf715fef9e3e90297875e233b9
7
- data.tar.gz: 1351585137a82c04dc09b4e67cf53898140bf3a237657451ba640cde2a192dc3d590a0680934080250c887f73e1aec8dcbd27d517cfa203b3884229af52500d8
6
+ metadata.gz: 55b1e6260cae3ac702a597ffd3525baef12025ad4a9ae9eaef1931480aa93124cf85f684fd25cf491a400d07674d42d84cdd95bbce9402f9d0aee20fabcf4a8d
7
+ data.tar.gz: f456baacfcf127453673234a562adc42f413502100723c5d2697a27cedd9ebca46dddb862e9e3af1c0d068087f51bed30b7a48d52a1f18265b1db2ed26ba1664
@@ -2,7 +2,12 @@
2
2
 
3
3
  module Evertils
4
4
  module Controller
5
+ # Used to format output
5
6
  Formatting = Evertils::Helper::Formatting
7
+ # Data structure for grep action options
8
+ GrepParams = Struct.new(:term, :action, :notebook)
9
+ # Data structure for group action options
10
+ GroupParams = Struct.new(:action, :notebook)
6
11
 
7
12
  class Log < Controller::Base
8
13
  WORDS_PER_LINE = 20
@@ -24,7 +29,7 @@ module Evertils
24
29
  w.join(' ')
25
30
  end
26
31
 
27
- return Notify.error('Note not found') if @note.entity.nil?
32
+ return Notify.error("Note not found for grammar '#{grammar}'") if @note.entity.nil?
28
33
 
29
34
  modify_with(text_groups)
30
35
  end
@@ -32,20 +37,16 @@ module Evertils
32
37
  #
33
38
  # @since 2.2.0
34
39
  def grep(text = nil)
35
- params = OpenStruct.new(term: text, action: 'search', notebook: 'Daily')
36
-
37
40
  runner = ActionRunner.new
38
- runner.params = params
41
+ runner.params = GrepParams.new(text, 'search', 'Daily')
39
42
  runner.execute
40
43
  end
41
44
 
42
45
  #
43
46
  # @since 2.2.0
44
47
  def group
45
- params = OpenStruct.new(action: 'group', notebook: 'Daily')
46
-
47
48
  runner = ActionRunner.new
48
- runner.params = params
49
+ runner.params = GroupParams.new('group', 'Daily')
49
50
  runner.execute
50
51
  end
51
52
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Evertils
4
- VERSION = '2.3.3'
4
+ VERSION = '2.3.4'
5
5
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evertils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-10-10 00:00:00.000000000 Z
@@ -160,7 +160,7 @@ homepage: http://rubygems.org/gems/evertils
160
160
  licenses:
161
161
  - MIT
162
162
  metadata: {}
163
- post_install_message:
163
+ post_install_message:
164
164
  rdoc_options: []
165
165
  require_paths:
166
166
  - lib
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubygems_version: 3.0.8
179
- signing_key:
179
+ signing_key:
180
180
  specification_version: 4
181
181
  summary: EN (heart) CLI
182
182
  test_files: []