Skip to content

Commit

Permalink
Update README and rename seed task
Browse files Browse the repository at this point in the history
  • Loading branch information
i2bskn committed Jul 5, 2015
1 parent 8f860ba commit 074d727
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Findable

[![Gem Version](https://badge.fury.io/rb/findable.svg)](http://badge.fury.io/rb/findable)
[![Build Status](https://travis-ci.org/i2bskn/findable.svg)](https://travis-ci.org/i2bskn/findable)
[![Coverage Status](https://img.shields.io/coveralls/i2bskn/findable.svg)](https://coveralls.io/r/i2bskn/findable)
[![Build Status](https://travis-ci.org/i2bskn/findable.svg?branch=master)](https://travis-ci.org/i2bskn/findable)
[![Coverage Status](https://coveralls.io/repos/i2bskn/findable/badge.svg?branch=master)](https://coveralls.io/r/i2bskn/findable?branch=master)
[![Code Climate](https://codeclimate.com/github/i2bskn/findable/badges/gpa.svg)](https://codeclimate.com/github/i2bskn/findable)

Redis wrapper with API like ActiveRecord.

## Requirements

- Redis
- Redis 2.8 or later

## Installation

Expand Down Expand Up @@ -64,21 +64,21 @@ end
Execute seed script if you create seed files.

```
$ rake findable:seeds
$ rake findable:seed
```

Manipulate data with API like ActiveRecord.

```
$ rails console
pry(main)> Tag.find(1)
=> #<Tag:0x00000108068430 @_attributes={:id=>1, :name=>"Ruby"}>
=> #<Tag id: 1, name: "Ruby">
pry(main)> golang = Tag.create(name: "Go")
=> #<Tag:0x00000107ff6420 @_attributes={:name=>"Go", :id=>2}>
=> #<Tag id: 2, name: "Go">
pry(main)> Tag.all.each {|tag| p tag.name }
"Ruby"
"Go"
=> [#<Tag:0x00000107f49568 @_attributes={:id=>1, :name=>"Ruby"}>, #<Tag:0x00000107f492e8 @_attributes={:name=>"Go", :id=>2}>]
=> [#<Tag id: 1, name: "Ruby">, #<Tag id: 2, name: "Go">]
```

## Associations
Expand Down
5 changes: 0 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

desc "Console with library"
task :console do
sh "pry -I lib -r bundler/setup -r findable"
end
2 changes: 1 addition & 1 deletion lib/tasks/findable.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :findable do
desc "Load seed file of findable."
task :seeds => :environment do
task :seed => :environment do
if Findable.config.seed_file
load Findable.config.seed_file
end
Expand Down

0 comments on commit 074d727

Please sign in to comment.