cdq 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzEwODIzMjYzYjBlY2YzYzVjODMzOGFmYjgzZTdhNDA4ZjQzZjJlMw==
4
+ ZTI5YzdjODkzN2VkZTA0Y2I2Mzk0YTkwMjRlMTY2M2M3ODVkNjgzMg==
5
5
  data.tar.gz: !binary |-
6
- NzM1MDIxYmMzZDIxNzY4ZWFmOGQzYjZhOWQ2MjM0NjA3NDQ1Njg4MQ==
6
+ OTQ2YjViOTcxNzJlNzY5MTE4ZWZhMGJkZDZjM2YyNTVhZTMxMWMzYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2JhZGRhYjRiYzRmNTlhZTJmZjA1ZmViNzdjOTU1YWI2OTgxNDY1MjNlNDg1
10
- NTIzYWE3NGU2MTBmZmY1NWI2OTA2MDllNGZiNzQwMzlkMjE0MTcxYTRmZmUz
11
- NTEwOGUxODdjMTM3NGFiZmU5YzcxNDRlYjVmMzJlYzUwZGZmYmY=
9
+ MDU5ZWQ3M2UyY2UzM2Q1MGI1YWIyMTdiN2JkMzBiYzMxYTdmYzc1YTk4YjYz
10
+ YjcxY2RkMzE0MzEyMmMzY2RhZTUxMDk1MzM2ZjBlYmU1NzY3MTc2Nzc0Mjc4
11
+ ZjBhZjI3MTEzNmIxNzZiNDA3ODE4ZjRhOTFiMmYzYjYwMzQ1ZDU=
12
12
  data.tar.gz: !binary |-
13
- ZDI1M2Y3M2RmNzNiY2Q2NjQwYjY1OGU5OGJkMTUxZTI5MmE3YjRjMTIwOTU4
14
- YzBiYzBkY2I2Zjc2MWJiNTdkYWI4MzY1ZjJlMmE4ODk2YjQ3ZDAxYzkyZmYy
15
- MzY4ZGVkYmM5ZGQzZmE1NTE4OWI0YTFhZDg0OGI2ZTIzYWNjY2I=
13
+ M2M3OWFiOGI4OWRmYzE0ZGNjZWVlMjQ3NmRkNGJkNjA4YTRkMjRkMmM5MjZk
14
+ NDFjMzBhY2FjNTNhNDgzNDRjOTgxYzU5YjAzNTc4MTA2NjAwZjg5ZjE2OWU4
15
+ MzFhYWYwZGQ5OGI4N2JjZjMxN2Y5YWZlODFlODdiZWIxZDYwYmI=
data/README.md CHANGED
@@ -255,7 +255,7 @@ dedicated model classes for your entities.
255
255
  familiar-looking and natural syntax for queries and scopes:
256
256
 
257
257
  ```ruby
258
- class Author < CDQManagedOjbect
258
+ class Author < CDQManagedObject
259
259
  end
260
260
  ```
261
261
 
@@ -265,7 +265,7 @@ You can save up partially-constructed queries for later use using named scopes,
265
265
  combining them seamlessly with other queries or other named scopes:
266
266
 
267
267
  ```ruby
268
- class Author < CDQManagedOjbect
268
+ class Author < CDQManagedObject
269
269
  scope :a_authors, where(:name).begins_with('A')
270
270
  scope :prolific, where(:publish_count).gt(99)
271
271
  end
@@ -1,4 +1,4 @@
1
1
 
2
2
  module CDQ
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
@@ -66,6 +66,10 @@ module CDQ
66
66
  raise "Cannot find an entity named #{obj}"
67
67
  end
68
68
  CDQTargetedQuery.new(entity_description, target_class)
69
+ when NSEntityDescription
70
+ entity_description = obj
71
+ target_class = NSClassFromString(entity_description.managedObjectClassName)
72
+ CDQTargetedQuery.new(entity_description, target_class)
69
73
  when Symbol
70
74
  CDQPartialPredicate.new(obj, CDQQuery.new)
71
75
  when CDQObject
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - infinitered
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-05 00:00:00.000000000 Z
12
+ date: 2014-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-xcdm
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '0.0'
21
21
  - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
- version: 0.0.5
23
+ version: 0.0.6
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '0.0'
31
31
  - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.5
33
+ version: 0.0.6
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: motion-yaml
36
36
  requirement: !ruby/object:Gem::Requirement