neutral 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/neutral/votes_controller.rb +2 -2
  3. data/config/locales/{impartial.yml → neutral.yml} +0 -0
  4. data/lib/generators/neutral/install/install_generator.rb +3 -0
  5. data/lib/generators/neutral/install/templates/index_votes.rb +11 -0
  6. data/lib/generators/neutral/install/templates/index_votings.rb +9 -0
  7. data/lib/generators/neutral/install/templates/votes.rb +3 -4
  8. data/lib/generators/neutral/install/templates/votings.rb +1 -2
  9. data/lib/generators/neutral/uninstall/uninstall_generator.rb +2 -3
  10. data/lib/neutral/version.rb +1 -1
  11. data/neutral.gemspec +1 -2
  12. data/spec/controllers/votes_controller_spec.rb +14 -7
  13. data/spec/dummy/db/migrate/{20140118172808881589_create_neutral_votes.rb → 20170101120000_create_neutral_votes.rb} +0 -0
  14. data/spec/dummy/db/migrate/{20140118172808882161_create_neutral_votings.rb → 20170101120001_create_neutral_votings.rb} +0 -0
  15. data/spec/dummy/db/migrate/20170101120002_add_index_to_neutral_votes.rb +11 -0
  16. data/spec/dummy/db/migrate/20170101120003_add_index_to_neutral_votings.rb +9 -0
  17. data/spec/dummy/db/migrate/{20140111225442_create_users.rb → 20170101120004_create_users.rb} +0 -0
  18. data/spec/dummy/db/migrate/{20140110214145_create_posts.rb → 20170101120005_create_posts.rb} +0 -0
  19. data/spec/dummy/db/schema.rb +6 -1
  20. data/spec/factories.rb +1 -1
  21. data/spec/icons/collection_spec.rb +1 -1
  22. data/spec/models/vote_spec.rb +9 -7
  23. data/spec/models/voting_spec.rb +3 -3
  24. data/spec/spec_helper.rb +3 -2
  25. data/spec/support/shared_examples/controller_examples.rb +3 -1
  26. data/spec/voting_builder/router_spec.rb +9 -9
  27. metadata +50 -58
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62cad0fc71cc53a90d8037c259d4d3af2677e771
4
- data.tar.gz: 1fd5e6ea610762526086e5342883f730dca130aa
3
+ metadata.gz: 6ae964e05b407a391e5ccb56cce71efc6e93f43d
4
+ data.tar.gz: 6da32596b78f0cb0bec2886fec95120ce893806c
5
5
  SHA512:
6
- metadata.gz: b080fac53186c5773e25ddd2111f827408be0989e198ae483322f767d16006cc5c36cb43a3757a0639b3b6cda31002c4368e1ff2a249316ff9af4188648be2b4
7
- data.tar.gz: 8d41e6b480ee0f550b26bcc0055a5c8dd69433aa2b44dc0abe0fb8b05429693d841d6ba7b1a75f58185c2f7e1409c9a4304fa6da34c670777eb6fc0c080f024c
6
+ metadata.gz: fc484cd0a17966e79ad2bdc0c78bd3e2ae8f6edd9a7762ab09799f634ba563669c6bc753cfe36933b0149ed238ea89e3a274822da44b34270c9455e5441ccee3
7
+ data.tar.gz: 2fda53cf7cd75635ce76e7a2f26559961ac449310b8aca4e3a521318d05f2409797b0aadc6af88a639eeb4d38a4c9e78e99b676105e89fe0a6aef37b58cdd94f
@@ -34,14 +34,14 @@ module Neutral
34
34
  end
35
35
 
36
36
  def can_change?
37
- raise Errors::CannotChange unless Neutral.config.can_change && authorized?
37
+ raise Errors::CannotChange unless Neutral.config.can_change && owner?
38
38
  end
39
39
 
40
40
  def vote_params
41
41
  params.require(:vote).permit(:voteable_type, :voteable_id, :value).merge voter_id: current_voter.try(:id)
42
42
  end
43
43
 
44
- def authorized?
44
+ def owner?
45
45
  current_voter == vote.voter
46
46
  end
47
47
  end
File without changes
@@ -12,6 +12,9 @@ module Neutral
12
12
  def migrations
13
13
  migration_template "votes.rb", "db/migrate/create_neutral_votes"
14
14
  migration_template "votings.rb", "db/migrate/create_neutral_votings"
15
+
16
+ migration_template "index_votes.rb", "db/migrate/add_index_to_neutral_votes"
17
+ migration_template "index_votings.rb", "db/migrate/add_index_to_neutral_votings"
15
18
  end
16
19
 
17
20
  def routes
@@ -0,0 +1,11 @@
1
+ class AddIndexToNeutralVotes < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :neutral_votes, :voter_id
4
+ add_index :neutral_votes, [:voteable_type, :voteable_id]
5
+ end
6
+
7
+ def self.down
8
+ remove_index :neutral_votes, :voter_id
9
+ remove_index :neutral_votes, [:voteable_type, :voteable_id]
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class AddIndexToNeutralVotings < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :neutral_votings, [:votingable_type, :votingable_id]
4
+ end
5
+
6
+ def self.down
7
+ remove_index :neutral_votings, [:votingable_type, :votingable_id]
8
+ end
9
+ end
@@ -1,10 +1,9 @@
1
1
  class CreateNeutralVotes < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :neutral_votes do |t|
4
- t.string :voteable_type
5
- t.integer :voteable_id
6
- t.integer :voter_id
7
- t.integer :value
4
+ t.belongs_to :voter
5
+ t.belongs_to :voteable, polymorphic: true
6
+ t.integer :value, null: false
8
7
 
9
8
  t.timestamps
10
9
  end
@@ -1,8 +1,7 @@
1
1
  class CreateNeutralVotings < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :neutral_votings do |t|
4
- t.string :votingable_type
5
- t.integer :votingable_id
4
+ t.belongs_to :votingable, polymorphic: true
6
5
  t.integer :positive, default: 0
7
6
  t.integer :negative, default: 0
8
7
 
@@ -25,7 +25,7 @@ module Neutral
25
25
  end
26
26
 
27
27
  def remove_database_entities
28
- -> {
28
+ if yes?("Remove database entities?('neutral_votes' and 'neutral_votings' tables)")
29
29
  migration_template "drop_neutral_votes_table.rb", "db/migrate/drop_neutral_votes_table"
30
30
  migration_template "drop_neutral_votings_table.rb", "db/migrate/drop_neutral_votings_table"
31
31
 
@@ -34,8 +34,7 @@ module Neutral
34
34
  Dir.glob("db/migrate/*").keep_if { |f| f.include?("neutral") }.each do |file|
35
35
  remove_file(file)
36
36
  end if yes?("Remove also remaining migration files?")
37
-
38
- }.call if yes?("Remove database entities?('neutral_votes' and 'neutral_votings' tables)")
37
+ end
39
38
  end
40
39
 
41
40
  def remove_initializer
@@ -1,3 +1,3 @@
1
1
  module Neutral
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/neutral.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "neutral"
7
7
  s.version = Neutral::VERSION
8
8
  s.authors = ["Peter Tóth"]
9
- s.email = ["proximin@gmail.com"]
9
+ s.email = ["peter@petertoth.me"]
10
10
  s.homepage = "https://github.com/petertoth/neutral"
11
11
  s.summary = "Rails engine providing positive/negative ajaxful voting solution with FontAwesome integration and handful of additional features."
12
12
  s.description = "Rails engine providing positive/negative ajaxful voting solution with FontAwesome integration and handful of additional features."
@@ -29,5 +29,4 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency "database_cleaner"
30
30
  s.add_development_dependency "remarkable_activerecord"
31
31
  s.add_development_dependency "shoulda-matchers"
32
- s.add_development_dependency "debugger"
33
32
  end
@@ -1,14 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Neutral::VotesController do
3
+ describe Neutral::VotesController, type: :controller do
4
4
  routes { Neutral::Engine.routes }
5
5
 
6
6
  include VotesControllerHelpers
7
7
  include VotesControllerBaseClass
8
8
 
9
- let(:voteable) { FactoryGirl.create(:post) }
10
- let(:voter) { FactoryGirl.create(:user) }
11
- let(:vote) { FactoryGirl.create(:vote) }
9
+ let!(:voteable) { FactoryGirl.create(:post) }
10
+ let!(:voter) { FactoryGirl.create(:user) }
11
+ let!(:vote) { FactoryGirl.create(:vote) }
12
12
 
13
13
  describe "POST #create" do
14
14
  context "when valid" do
@@ -18,7 +18,9 @@ describe Neutral::VotesController do
18
18
  end
19
19
 
20
20
  it "creates a new vote" do
21
- expect { create(voteable) }.to change(Neutral::Vote, :count).by(1)
21
+ initial_count = Neutral::Vote.count
22
+ create(voteable)
23
+ expect(Neutral::Vote.count).to eq(initial_count + 1)
22
24
  end
23
25
 
24
26
  it "assigns a newly created vote as @vote" do
@@ -62,8 +64,13 @@ describe Neutral::VotesController do
62
64
  context "when login required" do
63
65
  subject { -> { create(voteable) } }
64
66
 
65
- it { should_not change(Neutral::Vote, :count).by(1) }
66
- its(:call) { should render_template('errors/require_login') }
67
+ it "does not create a vote" do
68
+ initial_count = Neutral::Vote.count
69
+ subject.call
70
+ expect(Neutral::Vote.count).to eq(initial_count)
71
+ end
72
+
73
+ it { expect(subject.call).to render_template('errors/require_login') }
67
74
  end
68
75
  end
69
76
  end
@@ -0,0 +1,11 @@
1
+ class AddIndexToNeutralVotes < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :neutral_votes, :voter_id
4
+ add_index :neutral_votes, [:voteable_type, :voteable_id]
5
+ end
6
+
7
+ def self.down
8
+ remove_index :neutral_votes, :voter_id
9
+ remove_index :neutral_votes, [:voteable_type, :voteable_id]
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class AddIndexToNeutralVotings < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :neutral_votings, [:votingable_type, :votingable_id]
4
+ end
5
+
6
+ def self.down
7
+ remove_index :neutral_votings, [:votingable_type, :votingable_id]
8
+ end
9
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140118172808882161) do
14
+ ActiveRecord::Schema.define(version: 20170101120005) do
15
15
 
16
16
  create_table "neutral_votes", force: true do |t|
17
17
  t.string "voteable_type"
@@ -22,6 +22,9 @@ ActiveRecord::Schema.define(version: 20140118172808882161) do
22
22
  t.datetime "updated_at"
23
23
  end
24
24
 
25
+ add_index "neutral_votes", ["voteable_type", "voteable_id"], name: "index_neutral_votes_on_voteable_type_and_voteable_id"
26
+ add_index "neutral_votes", ["voter_id"], name: "index_neutral_votes_on_voter_id"
27
+
25
28
  create_table "neutral_votings", force: true do |t|
26
29
  t.string "votingable_type"
27
30
  t.integer "votingable_id"
@@ -31,6 +34,8 @@ ActiveRecord::Schema.define(version: 20140118172808882161) do
31
34
  t.datetime "updated_at"
32
35
  end
33
36
 
37
+ add_index "neutral_votings", ["votingable_type", "votingable_id"], name: "index_neutral_votings_on_votingable_type_and_votingable_id"
38
+
34
39
  create_table "posts", force: true do |t|
35
40
  t.string "title"
36
41
  t.datetime "created_at"
data/spec/factories.rb CHANGED
@@ -11,7 +11,7 @@ FactoryGirl.define do
11
11
 
12
12
  factory :user do
13
13
  sequence :username do
14
- Faker::Name.name
14
+ FFaker::Name.name
15
15
  end
16
16
  password 'secret'
17
17
  end
@@ -31,7 +31,7 @@ describe Neutral::Icons::Collection do
31
31
  it { should be_a(Neutral::Icons::Collection::Definitions) }
32
32
 
33
33
  [:positive, :negative, :remove].each do |definition|
34
- its(definition) { should == set.definitions[definition] }
34
+ it { expect(subject.send(definition)).to eq set.definitions[definition] }
35
35
  end
36
36
  end
37
37
  end
@@ -1,12 +1,12 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Neutral::Vote do
3
+ describe Neutral::Vote, type: :model do
4
4
  it { should belong_to :voteable }
5
5
  it { should belong_to :voter }
6
- it { validate_presence_of :voteable_type }
7
- it { validate_presence_of :voteable_id }
8
- it { validate_presence_of :value }
9
- it { should ensure_inclusion_of(:value).in_range(0..1) }
6
+ it { should validate_presence_of :voteable_type }
7
+ it { should validate_presence_of :voteable_id }
8
+ it { should validate_presence_of :value }
9
+ it { should validate_inclusion_of(:value).in_range(0..1) }
10
10
 
11
11
  let!(:vote) { FactoryGirl.create(:vote) }
12
12
 
@@ -19,7 +19,8 @@ describe Neutral::Vote do
19
19
  describe "after_create" do
20
20
  context "when vote's voting does not exist yet" do
21
21
  it "adds vote to voting" do
22
- Neutral::Voting.should_receive(:init).with(FactoryGirl.create(:vote))
22
+ Neutral::Voting.should_receive(:init)
23
+ FactoryGirl.create(:vote)
23
24
  end
24
25
  end
25
26
 
@@ -27,7 +28,8 @@ describe Neutral::Vote do
27
28
  let(:another_vote) { FactoryGirl.create(:vote, voteable: vote.voteable) }
28
29
 
29
30
  it "adds vote to an existing voting" do
30
- vote.voting.should_receive(:add_to_existing).with(another_vote.nature)
31
+ vote.voting.should_receive(:add_to_existing)
32
+ another_vote
31
33
  end
32
34
  end
33
35
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Neutral::Voting do
3
+ describe Neutral::Voting, type: :model do
4
4
  it { should belong_to(:votingable) }
5
5
 
6
6
  let(:voting) { Neutral::Voting.create }
@@ -21,8 +21,8 @@ describe Neutral::Voting do
21
21
 
22
22
  it { should be_a(Neutral::Voting) }
23
23
  it { should be_persisted }
24
- its(:votingable_type) { should == vote.voteable_type }
25
- its(:votingable_id) { should == vote.voteable_id }
24
+ it { expect(subject.votingable_type).to eq vote.voteable_type }
25
+ it { expect(subject.votingable_id).to eq vote.voteable_id }
26
26
  it { subject.send(vote.nature).should == 1 }
27
27
  end
28
28
 
data/spec/spec_helper.rb CHANGED
@@ -11,7 +11,6 @@ require 'capybara/rspec'
11
11
  require 'remarkable_activerecord'
12
12
  require 'shoulda-matchers'
13
13
  require 'database_cleaner'
14
- require 'debugger'
15
14
  require 'pry-rails'
16
15
 
17
16
  Rails.backtrace_cleaner.remove_silencers!
@@ -20,7 +19,6 @@ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
20
19
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
21
20
 
22
21
  RSpec.configure do |config|
23
- config.color_enabled = true
24
22
  config.mock_with :rspec
25
23
  config.use_transactional_fixtures = false
26
24
  config.infer_base_class_for_anonymous_controllers = true
@@ -44,4 +42,7 @@ RSpec.configure do |config|
44
42
  config.after(:each) do
45
43
  DatabaseCleaner.clean
46
44
  end
45
+
46
+ config.include(Shoulda::Matchers::ActiveModel, type: :model)
47
+ config.include(Shoulda::Matchers::ActiveRecord, type: :model)
47
48
  end
@@ -36,7 +36,9 @@ end
36
36
 
37
37
  shared_examples "not performing destroy" do
38
38
  it "does not destroy the vote" do
39
- expect { destroy(vote) }.to_not change(Neutral::Vote, :count).by(-1)
39
+ initial_count = Neutral::Vote.count
40
+ destroy(vote)
41
+ expect(Neutral::Vote.count).to eq(initial_count)
40
42
  end
41
43
 
42
44
  it "renders cannot_change template" do
@@ -11,21 +11,21 @@ describe Neutral::VotingBuilder::Router do
11
11
  describe "#positive" do
12
12
  subject { super().positive }
13
13
 
14
- its([:path]) { should eq(vote_path(vote, value: 1)) }
15
- its([:method]) { should eq('patch') }
14
+ it { expect(subject[:path]).to eq(vote_path(vote, value: 1)) }
15
+ it { expect(subject[:method]).to eq('patch') }
16
16
  end
17
17
 
18
18
  describe "#negative" do
19
19
  subject { super().negative }
20
20
 
21
- its([:path]) { should eq(vote_path(vote, value: 0)) }
22
- its([:method]) { should eq('patch') }
21
+ it { expect(subject[:path]).to eq(vote_path(vote, value: 0)) }
22
+ it { expect(subject[:method]).to eq('patch') }
23
23
  end
24
24
 
25
25
  describe "#remove" do
26
26
  subject { super().remove }
27
27
 
28
- its([:path]) { should eq(vote_path(vote)) }
28
+ it { expect(subject[:path]).to eq(vote_path(vote)) }
29
29
  end
30
30
  end
31
31
 
@@ -37,15 +37,15 @@ describe Neutral::VotingBuilder::Router do
37
37
  describe "#positive" do
38
38
  subject { super().positive }
39
39
 
40
- its([:path]) { should eq(votes_path(vote: vote.main_attributes.merge(value: 1))) }
41
- its([:method]) { should eq('post') }
40
+ it { expect(subject[:path]).to eq(votes_path(vote: vote.main_attributes.merge(value: 1))) }
41
+ it { expect(subject[:method]).to eq('post') }
42
42
  end
43
43
 
44
44
  describe "#negative" do
45
45
  subject { super().negative }
46
46
 
47
- its([:path]) { should eq(votes_path(vote: vote.main_attributes.merge(value: 0))) }
48
- its([:method]) { should eq('post') }
47
+ it { expect(subject[:path]).to eq(votes_path(vote: vote.main_attributes.merge(value: 0))) }
48
+ it { expect(subject[:method]).to eq('post') }
49
49
  end
50
50
 
51
51
  describe "#remove" do
metadata CHANGED
@@ -1,234 +1,220 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neutral
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Tóth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-24 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: font-awesome-rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 4.0.3.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.0.3.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: ffaker
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: therubyracer
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec-rails
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: capybara
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: factory_girl_rails
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 4.2.1
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: 4.2.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: database_cleaner
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: remarkable_activerecord
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - '>='
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: shoulda-matchers
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '>='
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '>='
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: debugger
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - '>='
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - '>='
206
+ - - ">="
221
207
  - !ruby/object:Gem::Version
222
208
  version: '0'
223
209
  description: Rails engine providing positive/negative ajaxful voting solution with
224
210
  FontAwesome integration and handful of additional features.
225
211
  email:
226
- - proximin@gmail.com
212
+ - peter@petertoth.me
227
213
  executables: []
228
214
  extensions: []
229
215
  extra_rdoc_files: []
230
216
  files:
231
- - .gitignore
217
+ - ".gitignore"
232
218
  - Gemfile
233
219
  - MIT-LICENSE
234
220
  - README.md
@@ -246,10 +232,12 @@ files:
246
232
  - app/views/neutral/votes/errors/require_login.js.erb
247
233
  - app/views/neutral/votes/update.js.erb
248
234
  - bin/rails
249
- - config/locales/impartial.yml
235
+ - config/locales/neutral.yml
250
236
  - config/routes.rb
251
237
  - lib/generators/neutral/formats.rb
252
238
  - lib/generators/neutral/install/install_generator.rb
239
+ - lib/generators/neutral/install/templates/index_votes.rb
240
+ - lib/generators/neutral/install/templates/index_votings.rb
253
241
  - lib/generators/neutral/install/templates/initializer.rb
254
242
  - lib/generators/neutral/install/templates/locale.yml
255
243
  - lib/generators/neutral/install/templates/votes.rb
@@ -316,10 +304,12 @@ files:
316
304
  - spec/dummy/config/locales/en.yml
317
305
  - spec/dummy/config/locales/neutral.yml
318
306
  - spec/dummy/config/routes.rb
319
- - spec/dummy/db/migrate/20140110214145_create_posts.rb
320
- - spec/dummy/db/migrate/20140111225442_create_users.rb
321
- - spec/dummy/db/migrate/20140118172808881589_create_neutral_votes.rb
322
- - spec/dummy/db/migrate/20140118172808882161_create_neutral_votings.rb
307
+ - spec/dummy/db/migrate/20170101120000_create_neutral_votes.rb
308
+ - spec/dummy/db/migrate/20170101120001_create_neutral_votings.rb
309
+ - spec/dummy/db/migrate/20170101120002_add_index_to_neutral_votes.rb
310
+ - spec/dummy/db/migrate/20170101120003_add_index_to_neutral_votings.rb
311
+ - spec/dummy/db/migrate/20170101120004_create_users.rb
312
+ - spec/dummy/db/migrate/20170101120005_create_posts.rb
323
313
  - spec/dummy/db/schema.rb
324
314
  - spec/dummy/lib/assets/.keep
325
315
  - spec/dummy/log/.keep
@@ -352,17 +342,17 @@ require_paths:
352
342
  - lib
353
343
  required_ruby_version: !ruby/object:Gem::Requirement
354
344
  requirements:
355
- - - '>='
345
+ - - ">="
356
346
  - !ruby/object:Gem::Version
357
347
  version: '0'
358
348
  required_rubygems_version: !ruby/object:Gem::Requirement
359
349
  requirements:
360
- - - '>='
350
+ - - ">="
361
351
  - !ruby/object:Gem::Version
362
352
  version: '0'
363
353
  requirements: []
364
354
  rubyforge_project:
365
- rubygems_version: 2.1.11
355
+ rubygems_version: 2.6.8
366
356
  signing_key:
367
357
  specification_version: 4
368
358
  summary: Rails engine providing positive/negative ajaxful voting solution with FontAwesome
@@ -408,10 +398,12 @@ test_files:
408
398
  - spec/dummy/config/locales/en.yml
409
399
  - spec/dummy/config/locales/neutral.yml
410
400
  - spec/dummy/config/routes.rb
411
- - spec/dummy/db/migrate/20140110214145_create_posts.rb
412
- - spec/dummy/db/migrate/20140111225442_create_users.rb
413
- - spec/dummy/db/migrate/20140118172808881589_create_neutral_votes.rb
414
- - spec/dummy/db/migrate/20140118172808882161_create_neutral_votings.rb
401
+ - spec/dummy/db/migrate/20170101120000_create_neutral_votes.rb
402
+ - spec/dummy/db/migrate/20170101120001_create_neutral_votings.rb
403
+ - spec/dummy/db/migrate/20170101120002_add_index_to_neutral_votes.rb
404
+ - spec/dummy/db/migrate/20170101120003_add_index_to_neutral_votings.rb
405
+ - spec/dummy/db/migrate/20170101120004_create_users.rb
406
+ - spec/dummy/db/migrate/20170101120005_create_posts.rb
415
407
  - spec/dummy/db/schema.rb
416
408
  - spec/dummy/lib/assets/.keep
417
409
  - spec/dummy/log/.keep