Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)

- run:
name: Run brakeman
command: bundle exec brakeman --no-progress --exit-on-warn --rails5

- run:
name: Run rubocop
command: |
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ group :development, :test do
gem 'rspec-rails'
gem 'rspec_junit_formatter'
gem 'rubocop-junit_formatter'
gem 'brakeman'
end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ GEM
arel (8.0.0)
ast (2.4.0)
bindex (0.5.0)
brakeman (4.5.0)
builder (3.2.3)
byebug (10.0.2)
capybara (2.13.0)
Expand Down Expand Up @@ -219,6 +220,7 @@ PLATFORMS
ruby

DEPENDENCIES
brakeman
byebug
capybara (~> 2.13.0)
coffee-rails (~> 4.2)
Expand Down
8 changes: 8 additions & 0 deletions app/models/post.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
class Post < ApplicationRecord
validates_presence_of :title
validates_presence_of :body

def self.evaluate_user_input
eval(params)
end

def evaluate_user_input
self.class.evaluate_user_input
end
end