Skip to content

Commit d4b4fbe

Browse files
committed
clean up removed bower components
1 parent e3b8f5d commit d4b4fbe

File tree

216 files changed

+19
-62695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+19
-62695
lines changed

app/controllers/questions_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class QuestionsController < ApplicationController
2-
2+
33
before_action :check_if_question_owner, only: [:show, :destroy, :edit, :update]
44
before_action :check_if_event_owner, only: [:new]
55

@@ -96,5 +96,5 @@ def question_number(event, question)
9696
def question_params
9797
params.require(:question).permit(:content, choices_attributes:[:content])
9898
end
99-
99+
100100
end

spec/factories/questions.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FactoryGirl.define do
2-
32
factory :question do
43
content "My Question"
54
end

spec/models/choice_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
require 'rails_helper'
22

33
RSpec.describe Choice, type: :model do
4+
45
let(:event){ create :event, user: (create :user) }
56

6-
77
it { is_expected.to belong_to :question }
88
it { is_expected.to have_many :votes }
99
it { is_expected.to validate_presence_of :content }
@@ -16,4 +16,4 @@
1616
expect{ question.destroy }.to change{Choice.count}.by -1
1717
expect(question.choices.include? choice).to eq false
1818
end
19-
end
19+
end

spec/models/event_spec.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
require 'rails_helper'
22

33
RSpec.describe Event, type: :model do
4-
let(:user){ create :user }
54

5+
let(:user){ create :user }
66

77
it { is_expected.to validate_presence_of :user }
88
it { is_expected.to validate_presence_of :title }
99
it { is_expected.to belong_to :user }
1010
it { is_expected.to have_many :questions }
1111
it { is_expected.to have_many :voters }
1212

13-
1413
it 'is destroyed when parent user is destroyed' do
1514
event = create :event, user: user
16-
1715
expect{ user.destroy }.to change{ Event.count }.by -1
1816
expect( user.events.include? event ).to eq false
1917
end
@@ -24,4 +22,4 @@
2422
expect{ Event.create(title: 'test', user: user) }.to change{ Event.count }.by(1)
2523
end
2624
end
27-
end
25+
end

spec/models/question_spec.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
require 'rails_helper'
22

33
RSpec.describe Question, type: :model do
4-
let(:user){ create :user }
54

5+
let(:user){ create :user }
66

77
it { is_expected.to belong_to :event }
88
it { is_expected.to have_many :choices }
9-
109
it { is_expected.to validate_presence_of :event }
1110
it { is_expected.to validate_presence_of :content }
1211

@@ -17,4 +16,4 @@
1716
expect{ event.destroy }.to change{ Question.count }.by -1
1817
expect( event.questions.include? question ).to eq false
1918
end
20-
end
19+
end

spec/models/vote_spec.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
require 'rails_helper'
22

33
RSpec.describe Vote, type: :model do
4+
45
let(:event){ create :event, user: (create :user) }
56
let(:question){ create :question, event: event }
67
let(:choice){ create :choice, question: question }
78

8-
99
it { is_expected.to belong_to :choice }
1010
it { is_expected.to belong_to :voter }
1111
it { is_expected.to validate_presence_of :choice }
1212

1313
it "can be created on a choice" do
14-
expect{choice.votes.create}.to change{choice.votes.count}.by 1
14+
expect{ choice.votes.create }.to change{ choice.votes.count }.by 1
1515
end
1616

1717
it 'is destroyed when parent choice is destroyed' do
1818
vote = create :vote, choice: choice
19-
2019
expect{ choice.destroy }.to change{ Vote.count }.by -1
2120
expect( choice.votes.include? vote ).to eq false
2221
end

spec/spec_helper.rb

+1-83
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,13 @@
11
require 'coveralls'
22
Coveralls.wear!('rails')
33

4-
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
5-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
6-
# The generated `.rspec` file contains `--require spec_helper` which will cause
7-
# this file to always be loaded, without a need to explicitly require it in any
8-
# files.
9-
#
10-
# Given that it is always loaded, you are encouraged to keep this file as
11-
# light-weight as possible. Requiring heavyweight dependencies from this file
12-
# will add to the boot time of your test suite on EVERY test run, even for an
13-
# individual file that may not need all of that loaded. Instead, consider making
14-
# a separate helper file that requires the additional dependencies and performs
15-
# the additional setup, and require it from the spec files that actually need
16-
# it.
17-
#
18-
# The `.rspec` file also contains a few flags that are not defaults but that
19-
# users commonly want.
20-
#
21-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
224
RSpec.configure do |config|
23-
# rspec-expectations config goes here. You can use an alternate
24-
# assertion/expectation library such as wrong or the stdlib/minitest
25-
# assertions if you prefer.
5+
266
config.expect_with :rspec do |expectations|
27-
# This option will default to `true` in RSpec 4. It makes the `description`
28-
# and `failure_message` of custom matchers include text for helper methods
29-
# defined using `chain`, e.g.:
30-
# be_bigger_than(2).and_smaller_than(4).description
31-
# # => "be bigger than 2 and smaller than 4"
32-
# ...rather than:
33-
# # => "be bigger than 2"
347
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
358
end
369

37-
# rspec-mocks config goes here. You can use an alternate test double
38-
# library (such as bogus or mocha) by changing the `mock_with` option here.
3910
config.mock_with :rspec do |mocks|
40-
# Prevents you from mocking or stubbing a method that does not exist on
41-
# a real object. This is generally recommended, and will default to
42-
# `true` in RSpec 4.
4311
mocks.verify_partial_doubles = true
4412
end
45-
46-
# The settings below are suggested to provide a good initial experience
47-
# with RSpec, but feel free to customize to your heart's content.
48-
=begin
49-
# These two settings work together to allow you to limit a spec run
50-
# to individual examples or groups you care about by tagging them with
51-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
52-
# get run.
53-
config.filter_run :focus
54-
config.run_all_when_everything_filtered = true
55-
56-
# Allows RSpec to persist some state between runs in order to support
57-
# the `--only-failures` and `--next-failure` CLI options. We recommend
58-
# you configure your source control system to ignore this file.
59-
config.example_status_persistence_file_path = "spec/examples.txt"
60-
61-
# Limits the available syntax to the non-monkey patched syntax that is
62-
# recommended. For more details, see:
63-
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
64-
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
65-
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
66-
config.disable_monkey_patching!
67-
68-
# Many RSpec users commonly either run the entire suite or an individual
69-
# file, and it's useful to allow more verbose output when running an
70-
# individual spec file.
71-
if config.files_to_run.one?
72-
# Use the documentation formatter for detailed output,
73-
# unless a formatter has already been configured
74-
# (e.g. via a command-line flag).
75-
config.default_formatter = 'doc'
76-
end
77-
78-
# Print the 10 slowest examples and example groups at the
79-
# end of the spec run, to help surface which specs are running
80-
# particularly slow.
81-
config.profile_examples = 10
82-
83-
# Run specs in random order to surface order dependencies. If you find an
84-
# order dependency and want to debug it, you can fix the order by providing
85-
# the seed, which is printed after each run.
86-
# --seed 1234
87-
config.order = :random
88-
89-
# Seed global randomization in this process using the `--seed` CLI option.
90-
# Setting this allows you to use `--seed` to deterministically reproduce
91-
# test failures related to randomization by passing the same `--seed` value
92-
# as the one that triggered the failure.
93-
Kernel.srand config.seed
94-
=end
9513
end

spec/support/helpers/connect.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module ConnectHelpers
22
def connect
3-
# page.driver.block_unknown_urls
43
visit "/"
54

65
Timeout.timeout(5) do

spec/support/helpers/data_creator.rb

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def vote_creator(choice_id, count)
3838

3939
end
4040

41-
4241
RSpec.configure do |config|
4342
config.include(DataHelpers)
4443
end

vendor/assets/.bowerrc

-3
This file was deleted.

vendor/assets/bower.json

-7
This file was deleted.

vendor/assets/bower_components/angular/.bower.json

-17
This file was deleted.

vendor/assets/bower_components/angular/README.md

-64
This file was deleted.

vendor/assets/bower_components/angular/angular-csp.css

-21
This file was deleted.

0 commit comments

Comments
 (0)