gleborator 0.1.1.11 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -9
  3. data/lib/gleborator/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40316b092651ac819a0ccd4a0ec535745aa2c627
4
- data.tar.gz: f006a1be4de61665f9b6dcb5f5ce2ab464d43cc3
3
+ metadata.gz: cdc1ef979bbd95e9651ceab840c341b143e4d130
4
+ data.tar.gz: 3f2291dddb4f6de4f1bdcbd4eea05d3197444d01
5
5
  SHA512:
6
- metadata.gz: a334ac11c90a94c7555e00a17ef84061e2c3093ba78900f4ab6b4af89f85cae56647f5cfac1470dad7af169b035f1edd8df23786c19763e26bbc96e1548a6a4d
7
- data.tar.gz: 607c0fd9e3221048cf5fed9a94cc7dc730f6d514190a82f4e82bbd79807de5058e655ae785e997890f7eeb4414428a9a5ed35f5a626a3c6853b525ad1bbc4de9
6
+ metadata.gz: 3fdc8eabe778740a2c740043ec23f68d0835cbcf6b6b8fc56c2caba06ec1b4f3c0d437c9fb98aa055ab4e018141b11cad164d2d4851b9cd3ef3d91af5a08ccbb
7
+ data.tar.gz: d2fa971dcd83fcfbe68956269600e66be0c72fe53bdcdc45863264b65a785388458e186a4784c7093c977d42f9d27105279a4036939b6c4f60556284d0bbd70e
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Gleborator
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/gleborator`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ It is velosiped of draper gem created by Gleb Vishnevsky.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,31 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
23
+ You have to call decorate method on what you want to decorate
24
+ ```ruby
25
+ # app/controllers/posts_controller.rb
26
+ def show
27
+ @post = Post.find(params[:id]).decorate
28
+ end
29
+ ```
28
30
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
31
+ It will search for PostDecorator and create instance of it. There you can create your own methods to keep your views cleaner.
30
32
 
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).
33
+ ```ruby
34
+ # app/decorators/post_decorator.rb
35
+ class PostDecorator < ApplicationDecorator
36
+ delegate :id, :title, :body
37
+ delegate :name, to: :author, prefix: true
38
+
39
+ def title_with_author_name
40
+ "#{object.title} (#{object.author_name)})"
41
+ end
42
+ end
43
+ ```
32
44
 
33
45
  ## Contributing
34
46
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gleborator.
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kaikash/gleborator.
36
48
 
37
49
 
38
50
  ## License
@@ -1,3 +1,3 @@
1
1
  module Gleborator
2
- VERSION = "0.1.1.11"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gleborator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.11
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Vishnevsky