lite-command 1.0.1 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a41145978bc93e2ef52624c2ec0b2f0441d2876067eb18aa49dafad5465e641
4
- data.tar.gz: e10bbff015df2f331a9a0b444e068da9eaca25524ce8b317a3c5e26ed92b9f4b
3
+ metadata.gz: 436bbcd8024e3203b8d1fe3a9baa4d0d634c2668f0c2a479622ee68de4becdfb
4
+ data.tar.gz: 7e1fad943b41eb36ac0a4dfbefe19ec214d2016ddde9d8456878ff7ef6870a81
5
5
  SHA512:
6
- metadata.gz: 62fb9a9ad81c12146615574a310dd8c58c448c29594d4c3f09143462aae7d871eae3aa2e2215608e964e0c3abdee9355a51701e07d40e0e6b43634538baeaab1
7
- data.tar.gz: bd616b739879d5a8edb53a3411e4f8822a1363ab12fdf0591edf6bce7c91e0ebcb3d34033e6bbac034ad31a73e80eef849ee7c1990d55c859aeae9a5dfabd176
6
+ metadata.gz: 56cf37475d6501782938bfcc064b07d2d2357bde6ac99654a854409ac9c422aa031cbcde908e86b9b2185faa405c750d27a4af5f27adead5350023c6638d0fe5
7
+ data.tar.gz: c9f76b43944446aeb56b5be3c4eda67af0f48e088e66e32a85623d9ba791a506819f1867f6a02047240e93c9f0f8bd61613216e9d55f08a7b4071773d00b65e2
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2019-08-12
10
+ ### Changed
11
+ - Renamed command method to execute
12
+ - Renamed run method to execute
13
+
9
14
  ## [1.0.1] - 2019-08-07
10
15
  ### Changed
11
16
  - Pass args to command in call for Simple based commands
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-command (1.0.1)
4
+ lite-command (1.0.2)
5
5
  lite-errors
6
6
  lite-memoize
7
7
 
data/README.md CHANGED
@@ -40,7 +40,7 @@ class SearchMovies < Lite::Command::Simple
40
40
  private
41
41
 
42
42
  # NOTE: This class method is required
43
- def command(*args)
43
+ def execute(*args)
44
44
  { generate_fingerprint => movies_by_name }
45
45
  end
46
46
  end
@@ -68,7 +68,7 @@ class SearchMovies < Lite::Command::Complex
68
68
  end
69
69
 
70
70
  # NOTE: This instance method is required
71
- def command
71
+ def execute
72
72
  { generate_fingerprint => movies_by_name }
73
73
  end
74
74
 
@@ -102,7 +102,8 @@ command.call #=> { 'fingerprint_1' => [ 'Toy Story 1', ... ] }
102
102
  # - or -
103
103
 
104
104
  # Useful when you are not using the Errors mixin as its a one time access call.
105
- SearchMovies.run('Toy Story') #=> { 'fingerprint_1' => [ 'Toy Story 1', ... ] }
105
+ # Very similar to the simple command builder.
106
+ SearchMovies.execute('Toy Story') #=> { 'fingerprint_1' => [ 'Toy Story 1', ... ] }
106
107
  ```
107
108
 
108
109
  **Result**
@@ -144,7 +145,7 @@ class SearchMovies < Lite::Command::Complex
144
145
  end
145
146
  ```
146
147
 
147
- **Caller**
148
+ **Callers**
148
149
 
149
150
  ```ruby
150
151
  # Useful for controllers or actions that depend on states.
@@ -12,7 +12,7 @@ module Lite
12
12
  klass
13
13
  end
14
14
 
15
- def run(*args)
15
+ def execute(*args)
16
16
  klass = call(*args)
17
17
  klass.result
18
18
  end
@@ -26,11 +26,11 @@ module Lite
26
26
  end
27
27
 
28
28
  def call
29
- raise Lite::Command::NotImplementedError unless defined?(command)
29
+ raise Lite::Command::NotImplementedError unless defined?(execute)
30
30
  return @result if called?
31
31
 
32
32
  @called = true
33
- @result = command
33
+ @result = execute
34
34
  end
35
35
 
36
36
  def called?
@@ -7,9 +7,9 @@ module Lite
7
7
  class << self
8
8
 
9
9
  def call(*args)
10
- raise Lite::Command::NotImplementedError unless defined?(command)
10
+ raise Lite::Command::NotImplementedError unless defined?(execute)
11
11
 
12
- command(*args)
12
+ execute(*args)
13
13
  end
14
14
 
15
15
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Command
5
5
 
6
- VERSION ||= '1.0.1'
6
+ VERSION ||= '1.0.2'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-07 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lite-errors