file_db 0.5.0 → 0.6.0
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 +4 -4
- data/README.md +16 -1
- data/lib/file_db/query.rb +5 -1
- data/lib/file_db/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6c33fd0d57a8c8bf520982e9914dc83bb8a9619
|
4
|
+
data.tar.gz: 9d93792d4e0f210e6f17520bf4b37686ffb9f758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec98935114be896a730a553c94d330bdc93aa6132c9ad7705155b9164abbce87ba33bc9d9e1376c993e6bcbc6d35c5129bc849ef730eaeac781716ce79ad0b86
|
7
|
+
data.tar.gz: b952c883bc1883ceb249e272d161aa81c88b413bac3976b6b795503637ffa3bb2d4ebb31f54ee5f9acfe38bbd44bcb6dd42c8d6d561b71d288723d18074a62b6
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ You need to store data into a small type of database, like CSV and want a better
|
|
7
7
|
hm, yeah. just add this to your Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
gem 'file_db', '~> 0.
|
10
|
+
gem 'file_db', '~> 0.6.0'
|
11
11
|
```
|
12
12
|
|
13
13
|
And then execute:
|
@@ -100,6 +100,21 @@ User.where(name: 'rob', email: nil)
|
|
100
100
|
-> [#<User:0x00000004651798 @name="rob", @id="1", @email=nil>]
|
101
101
|
```
|
102
102
|
|
103
|
+
For the first User with name rob you can use:
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
User.where(name: 'rob', email: nil).first
|
107
|
+
-> #<User:0x00000004651798 @name="rob", @id="1", @email=nil>
|
108
|
+
```
|
109
|
+
|
110
|
+
or
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
User.find_by(:name, 'rob')
|
114
|
+
-> [#<User:0x00000004651798 @name="rob", @id="1", @email=nil>]
|
115
|
+
```
|
116
|
+
|
117
|
+
|
103
118
|
You can also use `first` and `last` to get the first and last user
|
104
119
|
```ruby
|
105
120
|
User.first
|
data/lib/file_db/query.rb
CHANGED
data/lib/file_db/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Starke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|