README.md in cdq-0.1.10 vs README.md in cdq-0.1.11
- old
+ new
@@ -7,46 +7,40 @@
[![Dependency Status](https://gemnasium.com/infinitered/cdq.png)](https://gemnasium.com/infinitered/cdq)
[![Build Status](https://travis-ci.org/infinitered/cdq.png?branch=master)](https://travis-ci.org/infinitered/cdq)
[![Gem Version](https://badge.fury.io/rb/cdq.png)](http://badge.fury.io/rb/cdq)
-## Introduction
+## Get Started
+1. [Introducing CDQ](#introducingCDQ)
+2. [Greenfield Quick Start Tutorial](https://github.com/infinitered/cdq/wiki/Greenfield-Quick-Start)
+3. [Cheat Sheet](https://github.com/infinitered/cdq/wiki/CDQ-Cheat-Sheet)
+4. [API docs](http://rubydoc.info/github/infinitered/cdq)
-CDQ began its life as a fork of
-[MotionData](https://github.com/alloy/MotionData), but it became obvious I
+## Introducing CDQ
+
+CDQ began its life as a fork of [MotionData](https://github.com/alloy/MotionData), but it became obvious I
wanted to take things in a different direction, so I cut loose and ended up
rewriting almost everything. If you pay attention, you can still find the
genetic traces, so thanks to @alloy for sharing his work and letting me learn
so much.
CDQ aims to streamline the process of getting you up and running Core Data, while
avoiding too much abstraction or method pollution on top of the SDK. While it
borrows many ideas from ActiveRecord (especially AREL), it is designed to
harmonize with Core Data's way of doing things first.
-I am actively developing and improving CDQ (updated February 2014) so if you have
+I am actively developing and improving CDQ (updated September 2014) so if you have
trouble or find a bug, please open a ticket!
### Why use a static Data Model?
By using a real data model file that gets compiled and included in your bundle,
you can take advantage of automatic migration, which simplifies managing your
schema as it grows, if you can follow a few [simple rules](https://developer.apple.com/library/ios/documentation/cocoa/conceptual/CoreDataVersioning/Articles/vmLightweightMigration.html#//apple_ref/doc/uid/TP40004399-CH4-SW2).
## Installing
-### Quick Start:
-
-For brand-new apps, or just to try it out, check out the
-[Greenfield Quick Start](https://github.com/infinitered/cdq/wiki/Greenfield-Quick-Start) tutorial.
-There's also a
-[Cheat Sheet](https://github.com/infinitered/cdq/wiki/CDQ-Cheat-Sheet)
-and
-[API docs](http://rubydoc.info/github/infinitered/cdq).
-
-### Even Quicker Start:
-
```bash
$ gem install cdq
$ motion create my_app # if needed
$ cd my_app
$ cdq init
@@ -57,11 +51,11 @@
### Using Bundler:
```ruby
gem 'cdq'
```
-
+<br />
If you want to see bleeding-edge changes, point Bundler at the git repo:
```ruby
gem 'cdq', git: 'git://github.com/infinitered/cdq.git'
```
@@ -172,10 +166,19 @@
Author.create(name: "Shakespeare", publish_count: 400, first_published: 1550)
Author.create(name: "Blake", publish_count: 100, first_published: 1778)
cdq.save
```
+### Reading
+
+```ruby
+ author = Author.create(name: "Le Guin", publish_count: 150, first_published: 1970)
+ author.name # => "Le Guin"
+ author.publish_count # => 150
+ author.attributes # => { "name" => "Le Guin", "publish_count" => 150, "first_published" => 1970 }
+```
+
### Updating
```ruby
author = Author.first
author.name = "Ursula K. Le Guin"
cdq.save
@@ -202,21 +205,20 @@
All of these queries are infinitely daisy-chainable, and almost everything is
possible to do using only chained methods, no need to drop into NSPredicate format
strings unless you want to.
-Here are some examples. See the [cheat
-sheet](https://github.com/infinitered/cdq/wiki/CDQ-Cheat-Sheet) for a complete
-list.
+Here are some examples. **See the [cheat sheet](https://github.com/infinitered/cdq/wiki/CDQ-Cheat-Sheet) for a complete list.**
### Conditions
```ruby
Author.where(:name).eq('Shakespeare')
Author.where(:publish_count).gt(10)
Author.where(name: 'Shakespeare', publish_count: 15)
- Author.where("name LIKE '%@'", '%kesp%')
+ Author.where("name LIKE %@", '*kesp*')
+ Author.where("name LIKE %@", 'Shakespear?')
```
### Sorts, Limits and Offsets
```ruby
@@ -330,10 +332,10 @@
```ruby
cdq.stores.new(iCloud: true, container: "com.your.container.id")
```
-You can also set up iCloud in your cdq.yml file.
+You can also set up iCloud in your cdq.yml file.
## Documentation
* [API](http://rubydoc.info/github/infinitered/cdq)
* [Cheat Sheet](https://github.com/infinitered/cdq/wiki/CDQ-Cheat-Sheet)