ibham 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +6 -0
- data/README.md +9 -16
- data/Rakefile +1 -1
- data/lib/generators/ibham/templates/migration.rb +3 -3
- data/lib/ibham/acts_as_voteable.rb +28 -14
- data/lib/ibham/acts_as_voter.rb +13 -22
- data/lib/ibham/version.rb +1 -1
- data/lib/models/vote.rb +4 -6
- data/spec/models/vote_spec.rb +7 -7
- data/spec/modules/acts_as_voteable_spec.rb +16 -9
- data/spec/modules/acts_as_voter_spec.rb +4 -20
- data/spec/spec_helper.rb +7 -12
- metadata +30 -23
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 22773a5276f0ef750a2db5513314e96e0efe8093
|
4
|
+
data.tar.gz: 5ca1cf25287eb58391af77cec4d79555a98943cf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24045afcc41bec10e7e197f41191f402ae98402f9e2c43523e60104971e23d9325135d0c20b94e780786f836d81e41f2cefeba5916fd74dacb794ce7abf6433b
|
7
|
+
data.tar.gz: ac0b566e3d53016118eab374931e52102e40ad8b9bcd95925d1e65ad2b6b0a791ea09592185a7ed9201f15756b274fa19b52b84d893b59d4ae18a260c63cc8e1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ibham [![Build Status](https://secure.travis-ci.org/bloc40/ibham.png)](http://travis-ci.org/bloc40/ibham) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/bloc40/ibham)
|
1
|
+
# Ibham [![Build Status](https://secure.travis-ci.org/bloc40/ibham.png)](http://travis-ci.org/bloc40/ibham) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/bloc40/ibham) [![Dependency Status](https://gemnasium.com/bloc40/ibham.png)](https://gemnasium.com/bloc40/ibham)
|
2
2
|
|
3
3
|
Ibham is a gem that allows Rails apps to compute and display voting scores for active records models.
|
4
4
|
|
@@ -12,10 +12,6 @@ And then execute:
|
|
12
12
|
|
13
13
|
$ bundle
|
14
14
|
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install ibham
|
18
|
-
|
19
15
|
Generate the migration
|
20
16
|
|
21
17
|
$ rails g ibham:install
|
@@ -49,12 +45,6 @@ The user can cast votes in the following ways:
|
|
49
45
|
user.vote_up(item) # Adds a positive vote
|
50
46
|
user.vote_down(item) # Adds a negative vote
|
51
47
|
|
52
|
-
or
|
53
|
-
|
54
|
-
# The only allowed values are 1 and -1
|
55
|
-
user.cast_vote(item, 1) # Adds a positive vote
|
56
|
-
user.cast_vote(item, -1) # Adds a negative vote
|
57
|
-
|
58
48
|
Since a user can cast only one vote per item, to check if the user can
|
59
49
|
cast vote for an item:
|
60
50
|
|
@@ -64,13 +54,16 @@ cast vote for an item:
|
|
64
54
|
|
65
55
|
To retrieve the votes:
|
66
56
|
|
67
|
-
item.up_votes #
|
68
|
-
item.down_votes #
|
57
|
+
item.up_votes # Returns the total number of positive votes
|
58
|
+
item.down_votes # Returns the total number of negative votes
|
59
|
+
|
60
|
+
item.up_percentage # Returns the percentage of positive votes
|
61
|
+
item.down_percentage # Returns the percentage of negative votes
|
69
62
|
|
70
|
-
item.
|
71
|
-
item.down_percentage # Return the percentage of negative votes
|
63
|
+
item.vote_result # Retuns the result of votes
|
72
64
|
|
73
|
-
For more information visit [
|
65
|
+
For more information visit [the documentation
|
66
|
+
page](http://rubydoc.info/github/bloc40/ibham/master/frames).
|
74
67
|
## Contributing
|
75
68
|
|
76
69
|
1. Fork it
|
data/Rakefile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class IbhamCreateVotes < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :votes do |t|
|
4
|
-
t.references :voter, :
|
5
|
-
t.references :voteable, :
|
4
|
+
t.references :voter, polymorphic: true
|
5
|
+
t.references :voteable, polymorphic: true
|
6
6
|
t.integer :value
|
7
7
|
|
8
|
-
t.timestamps
|
8
|
+
t.timestamps null: false
|
9
9
|
end
|
10
10
|
|
11
11
|
add_index :votes, [:voter_id, :voter_type]
|
@@ -4,7 +4,8 @@ module Ibham
|
|
4
4
|
|
5
5
|
module ClassMethods
|
6
6
|
|
7
|
-
# To turn an abject to a voteable, call <tt>acts_as_voteable</tt> in the
|
7
|
+
# To turn an abject to a voteable, call <tt>acts_as_voteable</tt> in the
|
8
|
+
# Active Record model class.
|
8
9
|
#
|
9
10
|
# class Item < ActiveRecord::Base
|
10
11
|
# acts_as_voteable
|
@@ -20,33 +21,36 @@ module Ibham
|
|
20
21
|
extend ActiveSupport::Concern
|
21
22
|
|
22
23
|
included do
|
23
|
-
has_many :votes, :
|
24
|
+
has_many :votes, as: :voteable, dependent: :destroy
|
24
25
|
end
|
25
26
|
|
26
|
-
# To ruturn the count of positive votes, call <tt>up_votes</tt> on the
|
27
|
+
# To ruturn the count of positive votes, call <tt>up_votes</tt> on the
|
28
|
+
# voteable object.
|
27
29
|
#
|
28
30
|
# item.up_votes
|
29
31
|
def up_votes
|
30
|
-
votes.where(:
|
32
|
+
votes.where(value: ALLOWED_VALUE).count
|
31
33
|
end
|
32
34
|
|
33
|
-
# To ruturn the count of negative votes, call <tt>down_votes</tt> on the
|
35
|
+
# To ruturn the count of negative votes, call <tt>down_votes</tt> on the
|
36
|
+
# voteable object.
|
34
37
|
#
|
35
38
|
# item.down_votes
|
36
39
|
def down_votes
|
37
|
-
votes.where(:
|
40
|
+
votes.where(value: -ALLOWED_VALUE).count
|
38
41
|
end
|
39
42
|
|
40
|
-
# To ruturn the percentage of positive votes, call <tt>up_percentage</tt>
|
41
|
-
# This is ideal to use with sparkbars.
|
43
|
+
# To ruturn the percentage of positive votes, call <tt>up_percentage</tt>
|
44
|
+
# on the voteable object. This is ideal to use with sparkbars.
|
42
45
|
#
|
43
46
|
# item.up_percentage
|
44
47
|
def up_percentage
|
45
48
|
(up_votes * 100 / (votes.count.to_f + DELTA)).round
|
46
49
|
end
|
47
50
|
|
48
|
-
# To ruturn the percentage of positive votes, call
|
49
|
-
# This is ideal to use
|
51
|
+
# To ruturn the percentage of positive votes, call
|
52
|
+
# <tt>down_percentage</tt> on the voteable object. This is ideal to use
|
53
|
+
# with sparkbars.
|
50
54
|
#
|
51
55
|
# item.down_percentage
|
52
56
|
def down_percentage
|
@@ -60,18 +64,28 @@ module Ibham
|
|
60
64
|
votes.map(&:voter)
|
61
65
|
end
|
62
66
|
|
63
|
-
# To get the list of voters who casted positive votes, call
|
67
|
+
# To get the list of voters who casted positive votes, call
|
68
|
+
# <tt>up_voters</tt> on the voteable object.
|
64
69
|
#
|
65
70
|
# item.up_voters
|
66
71
|
def up_voters
|
67
|
-
votes.where(:
|
72
|
+
votes.where(value: ALLOWED_VALUE).map(&:voter)
|
68
73
|
end
|
69
74
|
|
70
|
-
# To get the list of voters who casted negative votes, call
|
75
|
+
# To get the list of voters who casted negative votes, call
|
76
|
+
# <tt>down_voters</tt> on the voteable object.
|
71
77
|
#
|
72
78
|
# item.down_voters
|
73
79
|
def down_voters
|
74
|
-
votes.where(:
|
80
|
+
votes.where(value: -ALLOWED_VALUE).map(&:voter)
|
81
|
+
end
|
82
|
+
|
83
|
+
# To get the result of the votes, call <tt>vote_result</tt> on the
|
84
|
+
# voteable object.
|
85
|
+
#
|
86
|
+
# item.vote_result
|
87
|
+
def vote_result
|
88
|
+
votes.sum(:value)
|
75
89
|
end
|
76
90
|
end
|
77
91
|
end
|
data/lib/ibham/acts_as_voter.rb
CHANGED
@@ -4,11 +4,10 @@ module Ibham
|
|
4
4
|
|
5
5
|
module ClassMethods
|
6
6
|
|
7
|
-
# To turn an abject to a voter, call <tt>acts_as_voter</tt> in the Active
|
7
|
+
# To turn an abject to a voter, call <tt>acts_as_voter</tt> in the Active
|
8
|
+
# Record model class.
|
8
9
|
#
|
9
|
-
# class User < ActiveRecord::Base
|
10
|
-
# acts_as_voter
|
11
|
-
# end
|
10
|
+
# class User < ActiveRecord::Base acts_as_voter end
|
12
11
|
def acts_as_voter
|
13
12
|
class_eval do
|
14
13
|
include Voter
|
@@ -20,7 +19,7 @@ module Ibham
|
|
20
19
|
extend ActiveSupport::Concern
|
21
20
|
|
22
21
|
included do
|
23
|
-
has_many :votes, :
|
22
|
+
has_many :votes, as: :voter, dependent: :destroy
|
24
23
|
end
|
25
24
|
|
26
25
|
# To check if the voter (the user for example) can vote for this item,
|
@@ -30,7 +29,7 @@ module Ibham
|
|
30
29
|
#
|
31
30
|
# This will return either true for false
|
32
31
|
def can_vote_for?(voteable)
|
33
|
-
votes.build(:
|
32
|
+
votes.build(voteable: voteable, value: ALLOWED_VALUE).valid?
|
34
33
|
end
|
35
34
|
|
36
35
|
# To cast a positive vote, the voter (e.g. the use) calls <tt>vote_up</tt>
|
@@ -38,29 +37,21 @@ module Ibham
|
|
38
37
|
#
|
39
38
|
# user.vote_up(item)
|
40
39
|
#
|
41
|
-
# This will add a new record with a positive vote for this item by this
|
40
|
+
# This will add a new record with a positive vote for this item by this
|
41
|
+
# user in the votes table.
|
42
42
|
def vote_up(voteable)
|
43
|
-
votes.create(:
|
43
|
+
votes.create(voteable: voteable, value: ALLOWED_VALUE)
|
44
44
|
end
|
45
45
|
|
46
|
-
# To cast a negative vote, the voter (e.g. the use) can call
|
47
|
-
# with the object to vote for.
|
46
|
+
# To cast a negative vote, the voter (e.g. the use) can call
|
47
|
+
# <tt>vote_up</tt> with the object to vote for.
|
48
48
|
#
|
49
49
|
# user.vote_up(item)
|
50
50
|
#
|
51
|
-
# This will add a new record with a negative vote for this item by this
|
51
|
+
# This will add a new record with a negative vote for this item by this
|
52
|
+
# user in the votes table.
|
52
53
|
def vote_down(voteable)
|
53
|
-
votes.create(:
|
54
|
-
end
|
55
|
-
|
56
|
-
# To allow the user to dynamically cast a vote, call <tt>cast_vote</tt> with the item
|
57
|
-
# to vote for and the value (1 or -1)
|
58
|
-
#
|
59
|
-
# user.cast_vote(item, 1)
|
60
|
-
#
|
61
|
-
# This will add a new record with a positive vote.
|
62
|
-
def cast_vote(voteable, value)
|
63
|
-
votes.create(:voteable => voteable, :value => value)
|
54
|
+
votes.create(voteable: voteable, value: -ALLOWED_VALUE)
|
64
55
|
end
|
65
56
|
end
|
66
57
|
end
|
data/lib/ibham/version.rb
CHANGED
data/lib/models/vote.rb
CHANGED
@@ -2,11 +2,9 @@ class Vote < ActiveRecord::Base
|
|
2
2
|
|
3
3
|
ALLOWED_VALUE = 1
|
4
4
|
|
5
|
-
|
5
|
+
belongs_to :voteable, polymorphic: true
|
6
|
+
belongs_to :voter, polymorphic: true
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
validates_uniqueness_of :voteable_id, :scope => :voter_id
|
11
|
-
validates :value, :inclusion => { :in => [ALLOWED_VALUE, -ALLOWED_VALUE], :message => "should be either #{ALLOWED_VALUE} or -#{ALLOWED_VALUE}" }
|
8
|
+
validates_uniqueness_of :voteable_id, scope: :voter_id
|
9
|
+
validates :value, inclusion: { in: [ALLOWED_VALUE, -ALLOWED_VALUE], message: "should be either #{ALLOWED_VALUE} or -#{ALLOWED_VALUE}" }
|
12
10
|
end
|
data/spec/models/vote_spec.rb
CHANGED
@@ -5,23 +5,23 @@ describe Vote do
|
|
5
5
|
let(:item) { Item.create! }
|
6
6
|
|
7
7
|
describe 'Validations' do
|
8
|
-
it '
|
9
|
-
vote = Vote.new(:
|
8
|
+
it 'is valid if the value is 1' do
|
9
|
+
vote = Vote.new(value: 1)
|
10
10
|
vote.valid?.must_equal true
|
11
11
|
end
|
12
12
|
|
13
|
-
it '
|
14
|
-
vote = Vote.new(:
|
13
|
+
it 'is valid if the value is -1' do
|
14
|
+
vote = Vote.new(value: -1)
|
15
15
|
vote.valid?.must_equal true
|
16
16
|
end
|
17
17
|
|
18
|
-
it '
|
19
|
-
vote = Vote.new(:
|
18
|
+
it 'fails if the value is other than 1 or -1' do
|
19
|
+
vote = Vote.new(value: 2)
|
20
20
|
vote.valid?.must_equal false
|
21
21
|
vote.errors.full_messages.must_include 'Value should be either 1 or -1'
|
22
22
|
end
|
23
23
|
|
24
|
-
it '
|
24
|
+
it 'validates uniqueness of vote for voter and voteable' do
|
25
25
|
user.vote_up(item)
|
26
26
|
Vote.count.must_equal 1
|
27
27
|
user.vote_up(item)
|
@@ -15,55 +15,62 @@ describe 'ActsAsVoteable' do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe '#up_votes' do
|
18
|
-
it '
|
18
|
+
it 'returns the number of positive votes for voteable' do
|
19
19
|
item.up_votes.must_equal 2
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe '#down_votes' do
|
24
|
-
it '
|
24
|
+
it 'returns the number of negative votes for voteable' do
|
25
25
|
item.down_votes.must_equal 1
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
describe '#up_percentage' do
|
30
|
-
it '
|
30
|
+
it 'returns the percentage of positive votes' do
|
31
31
|
item.up_percentage.must_equal 67
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
describe '#down_percentage' do
|
36
|
-
it '
|
36
|
+
it 'returns the percentage of negative votes' do
|
37
37
|
item.down_percentage.must_equal 33
|
38
38
|
end
|
39
39
|
|
40
|
-
it '
|
40
|
+
it 'returns 100% if the item has 1 negative vote' do
|
41
41
|
item2.down_percentage.must_equal 100
|
42
42
|
end
|
43
43
|
|
44
|
-
it '
|
44
|
+
it 'returns 0 if the item has 0 positive vote' do
|
45
45
|
item2.up_percentage.must_equal 0
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
describe '#voters' do
|
50
|
-
it '
|
50
|
+
it 'returns the list of voters' do
|
51
51
|
item.voters.sort.must_equal [user2, user1, user3].sort
|
52
52
|
item2.voters.must_equal [user1]
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
56
|
describe '#up_voters' do
|
57
|
-
it '
|
57
|
+
it 'returns the list of users who casted positive votes' do
|
58
58
|
item.up_voters.sort.must_equal [user1, user3].sort
|
59
59
|
item2.up_voters.must_equal []
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
describe '#down_voters' do
|
64
|
-
it '
|
64
|
+
it 'returns the list of users who casted negative votes' do
|
65
65
|
item.down_voters.sort.must_equal [user2]
|
66
66
|
item2.down_voters.must_equal [user1]
|
67
67
|
end
|
68
68
|
end
|
69
|
+
|
70
|
+
describe '#vote_result' do
|
71
|
+
it 'returns the result of the votes per item' do
|
72
|
+
item.vote_result.must_equal 1
|
73
|
+
item2.vote_result.must_equal -1
|
74
|
+
end
|
75
|
+
end
|
69
76
|
end
|
@@ -5,18 +5,18 @@ describe 'ActsAsVoter' do
|
|
5
5
|
let(:item) { Item.create! }
|
6
6
|
|
7
7
|
describe '#can_vote_for?' do
|
8
|
-
it '
|
8
|
+
it 'returns true if the voter can vote for an item' do
|
9
9
|
user.can_vote_for?(item).must_equal true
|
10
10
|
end
|
11
11
|
|
12
|
-
it '
|
12
|
+
it 'returns false if the voter can not vote for an item' do
|
13
13
|
user.vote_down(item)
|
14
14
|
user.can_vote_for?(item).must_equal false
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
describe '#vote_up' do
|
19
|
-
it '
|
19
|
+
it 'creates a positive vote' do
|
20
20
|
vote_count = Vote.count
|
21
21
|
user.vote_up(item)
|
22
22
|
Vote.count.must_equal vote_count + 1
|
@@ -25,27 +25,11 @@ describe 'ActsAsVoter' do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe '#vote_down' do
|
28
|
-
it '
|
28
|
+
it 'creates a positive vote' do
|
29
29
|
vote_count = Vote.count
|
30
30
|
user.vote_down(item)
|
31
31
|
Vote.count.must_equal vote_count + 1
|
32
32
|
Vote.last.value.must_equal -1
|
33
33
|
end
|
34
34
|
end
|
35
|
-
|
36
|
-
describe '#cast_vote' do
|
37
|
-
it 'should create a positive vote' do
|
38
|
-
vote_count = Vote.count
|
39
|
-
vote = user.cast_vote(item, 1)
|
40
|
-
Vote.count.must_equal vote_count + 1
|
41
|
-
Vote.last.value.must_equal 1
|
42
|
-
end
|
43
|
-
|
44
|
-
it 'should create a negative vote' do
|
45
|
-
vote_count = Vote.count
|
46
|
-
vote = user.cast_vote(item, -1)
|
47
|
-
Vote.count.must_equal vote_count + 1
|
48
|
-
Vote.last.value.must_equal -1
|
49
|
-
end
|
50
|
-
end
|
51
35
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,11 +3,6 @@ require 'sqlite3'
|
|
3
3
|
require 'ibham'
|
4
4
|
require 'minitest/autorun'
|
5
5
|
|
6
|
-
db_config = {
|
7
|
-
:adapter => 'sqlite3',
|
8
|
-
:database => ':memory:'
|
9
|
-
}
|
10
|
-
|
11
6
|
ActiveRecord::Migration.verbose = false
|
12
7
|
|
13
8
|
class MiniTest::Spec
|
@@ -18,8 +13,8 @@ class MiniTest::Spec
|
|
18
13
|
end
|
19
14
|
|
20
15
|
config = {
|
21
|
-
:
|
22
|
-
:
|
16
|
+
adapter: 'sqlite3',
|
17
|
+
database: ':memory:'
|
23
18
|
}
|
24
19
|
|
25
20
|
ActiveRecord::Base.establish_connection(config)
|
@@ -29,11 +24,11 @@ end
|
|
29
24
|
|
30
25
|
ActiveRecord::Schema.define do
|
31
26
|
create_table :votes do |t|
|
32
|
-
t.references :voter, :
|
33
|
-
t.references :voteable, :
|
27
|
+
t.references :voter, polymorphic: true
|
28
|
+
t.references :voteable, polymorphic: true
|
34
29
|
t.integer :value
|
35
30
|
|
36
|
-
t.timestamps
|
31
|
+
t.timestamps null: false
|
37
32
|
end
|
38
33
|
|
39
34
|
add_index :votes, [:voter_id, :voter_type]
|
@@ -41,12 +36,12 @@ ActiveRecord::Schema.define do
|
|
41
36
|
|
42
37
|
create_table :users do |t|
|
43
38
|
t.string :email
|
44
|
-
t.timestamps
|
39
|
+
t.timestamps null: false
|
45
40
|
end
|
46
41
|
|
47
42
|
create_table :items do |t|
|
48
43
|
t.string :name
|
49
|
-
t.timestamps
|
44
|
+
t.timestamps null: false
|
50
45
|
end
|
51
46
|
end
|
52
47
|
|
metadata
CHANGED
@@ -1,49 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibham
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jamal El Milahi
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activerecord
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: sqlite3
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - ">="
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :development
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
description: Voting System for Rails applications
|
48
56
|
email:
|
49
57
|
- jamal@elmilahi.com
|
@@ -51,8 +59,8 @@ executables: []
|
|
51
59
|
extensions: []
|
52
60
|
extra_rdoc_files: []
|
53
61
|
files:
|
54
|
-
- .gitignore
|
55
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
56
64
|
- CHANGELOG.md
|
57
65
|
- Gemfile
|
58
66
|
- LICENSE.txt
|
@@ -72,27 +80,26 @@ files:
|
|
72
80
|
- spec/spec_helper.rb
|
73
81
|
homepage: https://github.com/bloc40/ibham
|
74
82
|
licenses: []
|
83
|
+
metadata: {}
|
75
84
|
post_install_message:
|
76
85
|
rdoc_options: []
|
77
86
|
require_paths:
|
78
87
|
- lib
|
79
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
89
|
requirements:
|
82
|
-
- -
|
90
|
+
- - ">="
|
83
91
|
- !ruby/object:Gem::Version
|
84
92
|
version: '0'
|
85
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
94
|
requirements:
|
88
|
-
- -
|
95
|
+
- - ">="
|
89
96
|
- !ruby/object:Gem::Version
|
90
97
|
version: '0'
|
91
98
|
requirements: []
|
92
99
|
rubyforge_project:
|
93
|
-
rubygems_version:
|
100
|
+
rubygems_version: 2.4.5.1
|
94
101
|
signing_key:
|
95
|
-
specification_version:
|
102
|
+
specification_version: 4
|
96
103
|
summary: Ibham is a gem that allows Rails apps to compute and display voting scores
|
97
104
|
for active records models.
|
98
105
|
test_files:
|