lite-command 1.0.9 → 1.0.10

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
  SHA256:
3
- metadata.gz: 59aa483892600a5737272d96178552d5fbf8951342b51fd0eb1d1f225867e09b
4
- data.tar.gz: 728d34a9dc57f868e8912f118105b7ec91cb79c6da5d8ff754651f817cfb6383
3
+ metadata.gz: 6feebc5e78cac74077531519297ff22b363fb2222b25f81e7a9b8c19c2762ac7
4
+ data.tar.gz: 21cd5b42655e169af48f0081c7cf63196c4779f9a0d07b74be8d9cc77eb3f8d8
5
5
  SHA512:
6
- metadata.gz: 1c9fe0d278b521e64aaa8ddc3bc537c5aef4f95610f9e96d2672ee5aac1e2d3f68d361c7149e7dc03363466ab5a720a193f31761a69db9c50800c7ebb4e6560a
7
- data.tar.gz: 26bd6d480a5d9f39a9c73fafee13925495e085dcd997b74f65bc39e5933d101baa948f2a7f255adf1c9f18db14f2b08d3ae5ffd70d8d2c3b360c075550d935d7
6
+ metadata.gz: 5cb3f7fa8726bea8569e565a4c567f08a696b72d53bd85fe4a68dd0f4869be90cc60ef22e3968ab7cff314f97797d76ff0efc254112000282d0581b37eed634b
7
+ data.tar.gz: 4bf282682cf120881ea8d30fabf3b1f87e9f612cc2ed7f1c0d16d397d4f82e881c86198f6e18b8452a12b7ffd706ed5eb12f133c5dad9038ca6bce943ed3dcb5
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.10] - 2019-12-21
10
+ ### Removed
11
+ - Removed generator empty directory check
12
+
9
13
  ## [1.0.9] - 2019-12-20
10
14
  ### Removed
11
15
  - Removed lite-command generator
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-command (1.0.9)
4
+ lite-command (1.0.10)
5
5
  lite-errors
6
6
  lite-memoize
7
7
 
data/README.md CHANGED
@@ -37,6 +37,10 @@ Or install it yourself as:
37
37
  app/commands/[NAME]_command.rb
38
38
  ```
39
39
 
40
+ If a `ApplicationCommand` file in the `app/commands` directory is available, the
41
+ generator will create file that inherit from `ApplicationCommand` if not it will
42
+ fallback to `Lite::Command::Complex`.
43
+
40
44
  ## Simple
41
45
 
42
46
  Simple commands build quick class based calls but cannot be extended.
@@ -65,9 +69,6 @@ command.call
65
69
  Complex commands can be used in instance and class based calls and
66
70
  extended with access to errors and memoization.
67
71
 
68
- Use `rails g decorator NAME` will generate the following file:
69
- `../app/decorators/[name]_decorator.rb`
70
-
71
72
  You will then need to fill this class with the required `execute` method as shown below:
72
73
 
73
74
  ```ruby
@@ -10,7 +10,6 @@ module Rails
10
10
 
11
11
  def copy_files
12
12
  path = File.join('app', 'commands', class_path, "#{file_name}_command.rb")
13
- empty_directory('app/commands')
14
13
  template('command.rb.tt', path)
15
14
  end
16
15
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  <% module_namespacing do -%>
4
- class <%= class_name %>Command < ApplicationCommand
4
+ class <%= class_name %>Command < <%= ApplicationCommand.to_s rescue 'Lite::Command::Complex' %>
5
5
  end
6
6
  <% end -%>
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Command
5
5
 
6
- VERSION ||= '1.0.9'
6
+ VERSION ||= '1.0.10'
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.9
4
+ version: 1.0.10
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-12-20 00:00:00.000000000 Z
11
+ date: 2019-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lite-errors