comandor 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/comandor.gemspec +1 -2
- data/lib/comandor.rb +8 -0
- data/lib/comandor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1a9b95cb03bfabc30c1b129dbbd599081a42f22
|
4
|
+
data.tar.gz: 9be6713941da916d71aea0fc52184e3591b62c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30e07511edbde805c5691f37c12f6a7a94512fb6f3b19b038624f0d0cc668eaeda32583860692c819157d0c8d220e7f57340f1d993d410a4ba49dd4f50024e22
|
7
|
+
data.tar.gz: e300aa36c40273a92f35d8d5c0ea4b1746e0295b51c791777622a04fd79289b5760b0249feed9a5470edacdc9186b6cf7a0c27854f8f133c73af1476ee7e679c
|
data/README.md
CHANGED
@@ -70,6 +70,12 @@ class DepositsController < ApplicationController
|
|
70
70
|
end
|
71
71
|
```
|
72
72
|
|
73
|
+
or just
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
deposit_create = DepositCreate.perform(current_user, 100)
|
77
|
+
```
|
78
|
+
|
73
79
|
Another option to call #perform with any arguments
|
74
80
|
|
75
81
|
```ruby
|
@@ -102,6 +108,10 @@ else
|
|
102
108
|
puts deliver.errors.inspect
|
103
109
|
end
|
104
110
|
```
|
111
|
+
or
|
112
|
+
```ruby
|
113
|
+
delivery = InvoiceSend.perform('renat@aomega.co', 100)
|
114
|
+
```
|
105
115
|
|
106
116
|
state methods:
|
107
117
|
```ruby
|
data/comandor.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
3
|
lib = File.expand_path('../lib', __FILE__)
|
@@ -8,7 +7,7 @@ require 'comandor/version'
|
|
8
7
|
Gem::Specification.new do |spec|
|
9
8
|
spec.name = 'comandor'
|
10
9
|
spec.version = Comandor::VERSION
|
11
|
-
spec.authors = ['Renat Ibragimov']
|
10
|
+
spec.authors = ['Renat "MpaK" Ibragimov']
|
12
11
|
spec.email = ['mrak69@gmail.com']
|
13
12
|
|
14
13
|
spec.summary = 'Comandor - simple service objects in Ruby'
|
data/lib/comandor.rb
CHANGED
@@ -9,6 +9,14 @@ module Comandor
|
|
9
9
|
# Callback on `extend Comandor`
|
10
10
|
def self.extended(base)
|
11
11
|
base.prepend(self)
|
12
|
+
base.extend(ClassMethods)
|
13
|
+
end
|
14
|
+
|
15
|
+
# ClassName.perform
|
16
|
+
module ClassMethods
|
17
|
+
def perform(*args, &block)
|
18
|
+
new.perform(*args, &block)
|
19
|
+
end
|
12
20
|
end
|
13
21
|
|
14
22
|
# @return [self]
|
data/lib/comandor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comandor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Renat Ibragimov
|
7
|
+
- Renat "MpaK" Ibragimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|