cyrax 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yjc1NmExZWEyMjNhOWJhNzQ0Nzc2ZjU2Njg2NTE4YjYwNWFhNTI0Nw==
4
+ NzIwOTAzYWY3MDAzOGIzMzgxYTNkNTAzNWQxYmIzZmVkZDZkYWVjYQ==
5
5
  data.tar.gz: !binary |-
6
- ODA0NjA2MGE1NjFkYjZkNzMzZGI4OTFjNzRiMDQ0NzFlYTM0MTRkNQ==
6
+ ZGE0ZDNhZjAxYmU4MDIwNzhhOThiOWU1MzgwMmZhNmU2ZGRhYjI4NA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTEyMzA0M2Y2NGJlMzIwOWM0NDZiMTYxNmU2MTg5OGE3OGUxMzc2OWVlMTZl
10
- N2FlMTM0ZGRiYjVjYmRlY2NmNjM5ZGRmZDJlZjEzMjdhYjhlMTkzZTc1ZGEw
11
- MGNhMmQyMzE5ZGZjMjIxNzM2MzE2NWZhOTkyMmFlNjNlYTBiN2Y=
9
+ NDcyNDVjNzA1ZTQxNTExMTk3NTA4ZWViMGYyZDk1MTc2N2MzYTc3OTM0MWIy
10
+ YmM5MzQ1MGQ4ZjRjYTQyNmQyNmNkOGZjODhmNDQ3Y2JiM2Q0OGJkZmQxMWU4
11
+ NDkzYTk1ZTQyMGU1NWQzODA4OWQwZGJlNTdmODQ0ZmMxOWFjYTU=
12
12
  data.tar.gz: !binary |-
13
- Y2NkMmNjMWNlOGQ2N2QzYjdhOWMwZmU2NmUyOWZhZjJhM2ZkM2RkZjk1OWE2
14
- MTVjOGY5YjBmMWYzZTcwMTZlNGMxZWFhODQ4ZTYyMDlhOGUxMWViN2ZlOGIz
15
- NzExNzMzMjU2OWI3OTYyMDc2NTk0YjgzNmQ1YjdkNWVkYWUzZTI=
13
+ M2IxOTZkMWZhNjQ2M2EzNDEwMTFhNGY5NGMwY2NlZmFiNTI5ZThjZDc1MTU4
14
+ ZTAyNmY3MDg3OWQ1NTg4YThjMTE5ZjEzYTI1NWYyYTU3MzgzNGE0YThmZjQy
15
+ ZmZhNmIxN2E2NDJiNWQxNzRiNmNmYzg3ZTkwZTcwMzZhOGVmYTU=
data/README.md CHANGED
@@ -10,7 +10,7 @@ Add this line to your Gemfile.
10
10
 
11
11
  Rails 4:
12
12
 
13
- gem 'cyrax', '~> 0.4.0'
13
+ gem 'cyrax', '~> 0.6.1'
14
14
 
15
15
  Rails 3:
16
16
 
@@ -39,7 +39,7 @@ module Cyrax::Extensions
39
39
  end
40
40
 
41
41
  self._repository_options ||= {}
42
- self._repository_options[:finders] = {}
42
+ self._repository_options[:finders] ||= {}
43
43
  self._repository_options[:finders][finder_name || :scope] = block
44
44
  end
45
45
  end
@@ -108,23 +108,23 @@ module Cyrax::Extensions
108
108
  # DEPRECATED METHODS
109
109
  def resource_scope
110
110
  ActiveSupport::Deprecation.warn "#resource_scope inside Resource deprecated. Use repository.scope instead."
111
- respository.scope
111
+ repository.scope
112
112
  end
113
113
  def build_collection
114
114
  ActiveSupport::Deprecation.warn "#build_collection inside Resource deprecated. Use repository.find_all instead."
115
- respository.find_all
115
+ repository.find_all
116
116
  end
117
117
  def find_resource(id)
118
118
  ActiveSupport::Deprecation.warn "#find_resource inside Resource deprecated. Use repository.find instead."
119
- respository.find(id)
119
+ repository.find(id)
120
120
  end
121
121
  def save_resource(resource)
122
122
  ActiveSupport::Deprecation.warn "#save_resource inside Resource deprecated. Use repository.save instead."
123
- respository.save(resource)
123
+ repository.save(resource)
124
124
  end
125
125
  def delete_resource(resource)
126
126
  ActiveSupport::Deprecation.warn "#delete_resource inside Resource deprecated. Use repository.delete instead."
127
- respository.delete(resource)
127
+ repository.delete(resource)
128
128
  end
129
129
  end
130
130
  end
@@ -105,4 +105,9 @@ class Cyrax::Repository
105
105
  def default_attributes!
106
106
  {}
107
107
  end
108
+
109
+ def method_missing(method, *args, &block)
110
+ return super unless finder?(method)
111
+ finder(method, *args)
112
+ end
108
113
  end
data/lib/cyrax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cyrax
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droidlabs