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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f73634fd1aeeb21a85a804b5088929cc1205c7d7
4
- data.tar.gz: 80cecd858f0f3815b432bd31fc047faf873ff8f0
3
+ metadata.gz: 63615c5c1ce572f463df4932344e5bc1966a76e9
4
+ data.tar.gz: df11c5707a27512ef02c0231e6f2bd8cbb1ae5a8
5
5
  SHA512:
6
- metadata.gz: 9cda20cb35ab01d49e9f23437d7cc77cdce44b35fed260f0c52aea76844aeb6a313de9d606bdec06d5d9363bf3ab9eaa172e370e3ed8036330b284ca3bb4e5c4
7
- data.tar.gz: 558b6623d30fd34e90952d49b7a5b7747cc4b1d24ea02ec8455eed57060c07980967ccac4209d1d94828cc6f2f652ba36eec961ef3e70a5481bd80ba4ed242a7
6
+ metadata.gz: 8c31bd5200c148c339434dd9075b7f7f08e26940107795bc349885f62d9b2f10cc3a311374aa9cc8182c9fce88e87d7d6361c535b560cffd5a3762fc6e950d00
7
+ data.tar.gz: 34f7958086b64e6ed6e863a1cad3a451d0b44993c33d7ce3f2497791fe3a31e731974ea1d6e4b136f9af193a5b58b698d2d9224197c486baa83882421cef69ab
@@ -1,5 +1,5 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.2
4
+ - 2.4.0
5
5
  before_install: gem install bundler -v 1.14.4
data/README.md CHANGED
@@ -1,41 +1,32 @@
1
- # Commandoes::Activemodel
1
+ # COMMANDOES-ACTIVEMODEL
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/commandoes/activemodel`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A plugin for the [commandoes](http://github.com/mdelkins/commandoes) library.
4
+ This plugin adds ActiveModel to your commandoes commands.
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ ## PREREQUISITES
7
+ * ruby-2.4.0
6
8
 
7
- ## Installation
9
+ ## INSTALLATION
8
10
 
9
- Add this line to your application's Gemfile:
11
+ In your Gemfile
10
12
 
11
13
  ```ruby
12
14
  gem 'commandoes-activemodel'
13
15
  ```
14
16
 
15
- And then execute:
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
- ## License
23
+ attr_reader :name, :value
39
24
 
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
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
+ ```
@@ -1,6 +1,6 @@
1
1
  module Commandoes
2
2
  module Plugins
3
- module ActiveModelValidationsPlugin
3
+ module ActiveModelPlugin
4
4
  module ClassMethods
5
5
  def self.extended(object)
6
6
  object.send(:include, ActiveModel::Validations)
@@ -1,7 +1,7 @@
1
1
  module Commandoes
2
2
  module Plugins
3
3
  module ActiveModelPlugin
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commandoes-activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Elkins