likeable 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -34,6 +34,10 @@ Likeable is the easiest way to allow your models to be liked by users, just drop
34
34
  comment.liked_by?(current_user) # => true
35
35
 
36
36
  current_user.all_liked(Comment) # => [#<Comment ...>, ...]
37
+
38
+ liked_comment = Likeable.find_by_resource_id("Comment", 15)
39
+ liked_comment == comment # => true
40
+
37
41
  ```
38
42
 
39
43
 
@@ -41,7 +45,7 @@ Setup
41
45
  =======
42
46
  Gemfile:
43
47
 
44
- gem 'Likeable'
48
+ gem 'likeable'
45
49
 
46
50
  Next set up your Redis connection in initializers/likeable.rb:
47
51
 
@@ -96,6 +100,10 @@ Thats about it.
96
100
  RedisR
97
101
  Redi
98
102
  Re
103
+ Authors
104
+ =======
105
+ [Richard Schneeman](http://schneems.com) for [Gowalla](http://gowalla.com) <3
106
+
99
107
 
100
108
  Contribution
101
109
  ============
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -75,7 +75,7 @@ module Likeable
75
75
 
76
76
 
77
77
  def find_one(klass, id)
78
- @find_one ||= lambda {|klass, ids| klass.where(:id => id)}
78
+ @find_one ||= lambda {|klass, ids| klass.where(:id => id).first}
79
79
  @find_one.call(klass, id)
80
80
  end
81
81
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "likeable"
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Schneems"]
12
- s.date = "2011-10-14"
12
+ s.date = "2011-10-31"
13
13
  s.description = "\n Likeable allows you to make your models...well...likeable using redis.\n "
14
14
  s.email = "richard.schneeman@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.files = [
19
19
  ".autotest",
20
20
  ".rspec",
21
- ".rvmrc",
22
21
  "Gemfile",
23
22
  "README.md",
24
23
  "Rakefile",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: likeable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Schneems
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-14 00:00:00 Z
18
+ date: 2011-10-31 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -162,7 +162,6 @@ extra_rdoc_files:
162
162
  files:
163
163
  - .autotest
164
164
  - .rspec
165
- - .rvmrc
166
165
  - Gemfile
167
166
  - README.md
168
167
  - Rakefile
data/.rvmrc DELETED
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- ruby_string="ree"
4
- gemset_name="likeable"
5
-
6
- if rvm list strings | grep -q "${ruby_string}" ; then
7
-
8
- rvm use "${ruby_string}@${gemset_name}" --create
9
-
10
- # Complain if bundler isn't installed
11
- if [[ -z "`gem which bundler 2>&1 | grep -v ERROR`" ]]; then
12
- echo "You need bundler:"
13
- echo ""
14
- echo " gem install bundler"
15
- echo ""
16
- fi
17
- else
18
- echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
19
- fi