commandoes 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: 01232f3d19184508a987df015c4dc04c22dae0c7
4
- data.tar.gz: c8a05f7e1aa4349255e4376619d3763e82ac5640
3
+ metadata.gz: 0ce4baa962b7c64576f85043b0375e3a6e7f73d3
4
+ data.tar.gz: 7c0024b52b1ea47bf827e56081a967d42f8edd0c
5
5
  SHA512:
6
- metadata.gz: 71d40f8d35e901e9b1aca4525390b3e6b1c2db31158f81c3d79191215283625823ed66a1e7eecd92ac198215ff88b0281e4681e7a506b9de9fe68152b29a01dc
7
- data.tar.gz: 6b631a98bc261237835acd06628163d1c9a43db0f955df21fbe7638ea431ce3c0f3e55e6b36cf19424229c13e57775e545b488ed1799e6777121fd0987729ccb
6
+ metadata.gz: 6e3a2ac346beb5b7fec187b552c71815c97efd7ba2b0033ec490ab4de8394909bea36b7c97513a515239ee6298ecd666b7a9f58d19171c19966e4d2d44d7d30b
7
+ data.tar.gz: ea294a808aa744fb458db4efcf9662d0a249a83168913ed11206917daf5a4c372b7ec62d0304f7a01247a316f284e229c738ece8358804832bda082dd5e7eb20
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # COMMANDO
1
+ # COMMANDOES
2
2
 
3
3
  Commandoes is a project designed to help any ruby app use the command pattern to
4
4
  change state.
@@ -7,7 +7,6 @@ change state.
7
7
  * ruby-2.3.1
8
8
 
9
9
  ## DEPENDENCIES
10
- * Virtus (https://github.com/solnic/virtus)
11
10
  * ActiveModel::Validations
12
11
 
13
12
  ## INSTALLATION
@@ -15,7 +14,7 @@ change state.
15
14
  In your Gemfile
16
15
 
17
16
  ```
18
- gem 'commando', github: 'mdelkins/commando'
17
+ gem 'commandoes'
19
18
  ```
20
19
 
21
20
  ## EXAMPLES
@@ -28,16 +27,28 @@ gem 'commando', github: 'mdelkins/commando'
28
27
  Commandoes uses a plugin system similar to
29
28
  [sequel](https://github.com/jeremyevans/sequel) or
30
29
  [roda](https://github.com/jeremyevans/roda) to extend the behavior of your
31
- command objects. Currently their are two dependent plugins:
32
-
33
- * Commandoes::Plugins::VirtusPlugin
34
- * Commandoes::Plugins::ActiveModelPlugin
30
+ command objects.
31
+
32
+ ### EXAMPLE OF A CUSTOM PLUGIN
33
+
34
+ ```ruby
35
+ module Commandoes
36
+ module Plugins
37
+ module ExamplePlugin
38
+ module ClassMethods
39
+ end
40
+
41
+ module InstanceMethods
42
+ end
43
+ end
44
+ end
45
+ end
46
+ ```
35
47
 
36
- ### Commandoes::Plugins::VirtusPlugin
48
+ Any method in the `ClassMethods` module will be injected into the `IAmACommand`
49
+ class. Any method in the `InstanceMethods` module will be injected into
50
+ instances of `IAmACommand` objects.
37
51
 
38
- This plugin injects the `Virtus.value_object` behavior into
39
- `Commandoes::IAmACommand` as well as a few helper methods for easily defining
40
- typed attributes.
41
52
 
42
53
  ### Commandoes::Plugins::ActiveModelPlugin
43
54
 
data/commandoes.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_dependency "virtus", "~> 1.0"
24
23
  spec.add_dependency "activemodel", "~> 5.0"
25
24
 
26
25
  spec.add_development_dependency "bump", "~> 0.5"
@@ -22,8 +22,6 @@ module Commandoes
22
22
  extend ClassMethods
23
23
 
24
24
  use self
25
- use Plugins::VirtusPlugin
26
25
  use Plugins::ActiveModelPlugin
27
-
28
26
  end
29
27
  end
@@ -1,3 +1,3 @@
1
1
  module Commandoes
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/commandoes.rb CHANGED
@@ -1,8 +1,6 @@
1
1
 
2
2
  require 'active_model'
3
- require 'virtus'
4
3
 
5
- require "commandoes/plugins/virtus_plugin"
6
4
  require "commandoes/plugins/activemodel_plugin"
7
5
 
8
6
  require "commandoes/command"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commandoes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Elkins
@@ -10,20 +10,6 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2017-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: virtus
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: activemodel
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +119,6 @@ files:
133
119
  - lib/commandoes/command.rb
134
120
  - lib/commandoes/dispatcher.rb
135
121
  - lib/commandoes/plugins/activemodel_plugin.rb
136
- - lib/commandoes/plugins/virtus_plugin.rb
137
122
  - lib/commandoes/registry.rb
138
123
  - lib/commandoes/version.rb
139
124
  homepage: https://github.com/mdelkins/commando
@@ -1,47 +0,0 @@
1
- module Commandoes
2
- module Plugins
3
- module VirtusPlugin
4
-
5
- module ClassMethods
6
- def self.extended(object)
7
- object.send(:include, Virtus.value_object)
8
- end
9
-
10
- def bool(value, options={})
11
- attribute value, Axiom::Types::Boolean, options
12
- end
13
-
14
- def date(value, options={})
15
- attribute value, Date, options
16
- end
17
-
18
- def datetime(value, options={})
19
- attribute value, DateTime, options
20
- end
21
-
22
- def decimal(value, options={})
23
- attribute value, BigDecimal, options
24
- end
25
-
26
- def float(value, options={})
27
- attribute value, Float, options
28
- end
29
-
30
- def integer(value, options={})
31
- attribute value, Integer, options
32
- end
33
-
34
- def string(value, options={})
35
- attribute value, String, options
36
- end
37
-
38
- def time(value, options={})
39
- attribute value, Time, options
40
- end
41
- end
42
-
43
- module InstanceMethods
44
- end
45
- end
46
- end
47
- end