repositor 0.3.1 → 0.3.2

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: 3c3833d6329cc6b39385161b5d29bffc8fb434ec
4
- data.tar.gz: 110ff33c7d808f0684de45f132114a3495d48e8c
3
+ metadata.gz: b791fa82cca7c661465fa33f28d853cd66b38b43
4
+ data.tar.gz: 2f287c896d0c1d6dc293bda6fe84972ae9dbdc4d
5
5
  SHA512:
6
- metadata.gz: 401a007577f4c87b4b86dde1f7a3ae677170c3cae3c3783d0232efe7639dd12fdac19d3967eb88560600f1774e469253ec11035e34edfb1ca3e4b29cb8990a48
7
- data.tar.gz: ff238393c27734406b4d3cfde6c74f138f3f21bb60ae099cfa523d9119464488cf441630210c096448ca3bb59c2015b779e356e690d4641b26ad68f12817bb9d
6
+ metadata.gz: c3d1f29f026746bcae34f635c6fc8ff7c809f820f729ac74b04b79d8afccee81e2d80961a0a590649a925e374d75c2622ee58a5191590ddc47c4e580b8a29a75
7
+ data.tar.gz: e6be6fbbd5d5a28dca4c6bc2eb185010ce5649e6f0c6bbc570943779ef1063982f735fea42707c5dcdc59d7e79b13f20cd5bd06e4e276ce826933eaa43631c3d
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Repositor
2
2
 
3
+ [gem]: https://rubygems.org/gems/repositor
4
+
3
5
  ## Installation & Setup
4
6
 
5
7
  In gemfile:
@@ -106,7 +108,7 @@ end
106
108
 
107
109
  Than you need to create `products_repo.rb`:
108
110
  ```ruby
109
- class ProductsRepo < ApplicationRepo;
111
+ class ProductsRepo < ApplicationRepo
110
112
  # here you will have default methods for repo actions
111
113
  end
112
114
  ```
@@ -1,9 +1,10 @@
1
1
  module Repositor
2
2
  module ActiveRecord
3
- attr_reader :model
3
+ attr_reader :model, :options
4
4
 
5
- def initialize(model: nil)
6
- @model = model || self.class.to_s.chomp("Repo").singularize.constantize
5
+ def initialize(model: nil, options = {})
6
+ @model = model || self.class.to_s.chomp("Repo").singularize.constantize
7
+ @options = options
7
8
  end
8
9
 
9
10
  def find(record_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repositor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk