rrepo 0.1.3 → 0.2.0

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: fc10c332d0e42bc3c2d60801059d18d49c8339cb
4
- data.tar.gz: 3d1efe5dadb49a8f8e6d06f071d6543bb478a94e
3
+ metadata.gz: ff361af802468448993a0b22de79589a65bcff42
4
+ data.tar.gz: 99d3e60ba23ec6b137e16703cdb2cea124352bd1
5
5
  SHA512:
6
- metadata.gz: 6dc0374e0b4ff0a0dfacb664d606053aaf5ce9344858c26192c50ec1cb53d4265d11aa6230676ecd6397800c1a6ceebc59cc45dc27bf195c04868eff17238c80
7
- data.tar.gz: 0a9ef6aabe611fd9ce3443a6a70c7099e22ac62cfa53a888c3628f9b746bc61ae680acdb3e0e6bd6e7528a0cd6aacc9aa9afe11f97a26fbfcac0de103eaf9ce9
6
+ metadata.gz: b3bbf3021c62a0b89e1448c1cd51d44cfcb6cc4fa483fd93b692d45e433aeccae6d0af9ae920a7e42e7329b85c1af95577e5c2c95447850fc158a006495f7d7e
7
+ data.tar.gz: 5dd73f48357535ccfb055e6b7a3ab502f5f03d03b097732ac5a2c0c3e6aec066afeb98e3c8b2dac1b7cbec8e2b079b1040415d99333a6e6f2da40ba95efe358c
@@ -13,10 +13,9 @@ module RRepo
13
13
  def initialize(adapter)
14
14
  @adapter = adapter
15
15
  class_name = self.class.name.demodulize
16
- model_class_name = class_name[/.*(?=Repository)/]
17
- @collection = model_class_name.underscore.pluralize.to_sym
16
+ @collection = class_name.underscore.to_sym
18
17
  return if class_name == 'Repository'
19
- @model_class = model_class_name.constantize
18
+ @model_class = class_name.singularize.constantize
20
19
  end
21
20
 
22
21
  def create(model)
data/lib/rrepo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RRepo
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Reinert