commandoes-activemodel 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +19 -28
- data/lib/commandoes_activemodel/plugins/validations_plugin.rb +1 -1
- data/lib/commandoes_activemodel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63615c5c1ce572f463df4932344e5bc1966a76e9
|
4
|
+
data.tar.gz: df11c5707a27512ef02c0231e6f2bd8cbb1ae5a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c31bd5200c148c339434dd9075b7f7f08e26940107795bc349885f62d9b2f10cc3a311374aa9cc8182c9fce88e87d7d6361c535b560cffd5a3762fc6e950d00
|
7
|
+
data.tar.gz: 34f7958086b64e6ed6e863a1cad3a451d0b44993c33d7ce3f2497791fe3a31e731974ea1d6e4b136f9af193a5b58b698d2d9224197c486baa83882421cef69ab
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,41 +1,32 @@
|
|
1
|
-
#
|
1
|
+
# COMMANDOES-ACTIVEMODEL
|
2
2
|
|
3
|
-
|
3
|
+
A plugin for the [commandoes](http://github.com/mdelkins/commandoes) library.
|
4
|
+
This plugin adds ActiveModel to your commandoes commands.
|
4
5
|
|
5
|
-
|
6
|
+
## PREREQUISITES
|
7
|
+
* ruby-2.4.0
|
6
8
|
|
7
|
-
##
|
9
|
+
## INSTALLATION
|
8
10
|
|
9
|
-
|
11
|
+
In your Gemfile
|
10
12
|
|
11
13
|
```ruby
|
12
14
|
gem 'commandoes-activemodel'
|
13
15
|
```
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install commandoes-activemodel
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/Michael Elkins/commandoes-activemodel.
|
17
|
+
### EXAMPLES
|
36
18
|
|
19
|
+
```ruby
|
20
|
+
class FooCommand < Commandoes::IAmACommand
|
21
|
+
use Commandoes::Plugins::ActiveModelValidationsPlugin
|
37
22
|
|
38
|
-
|
23
|
+
attr_reader :name, :value
|
39
24
|
|
40
|
-
|
25
|
+
def initialize(name: nil, value: nil)
|
26
|
+
@name = name
|
27
|
+
@value = value
|
28
|
+
end
|
41
29
|
|
30
|
+
validates_presence_of :name
|
31
|
+
end
|
32
|
+
```
|