Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed brakeman issues

  • Loading branch information...
commit 9757127c8b4ab9d85654ea59acb372f166904f18 1 parent 6259dd0
@sqctest02 sqctest02 authored
Showing with 27 additions and 2 deletions.
  1. +1 −0  Gemfile
  2. +25 −1 Gemfile.lock
  3. +1 −1  app/models/project.rb
View
1  Gemfile
@@ -40,6 +40,7 @@ group :development, :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'faker'
+ gem 'brakeman'
# Auto testing
gem 'guard-rspec'
View
26 Gemfile.lock
@@ -32,6 +32,17 @@ GEM
arel (3.0.2)
bourne (1.2.1)
mocha (= 0.12.7)
+ brakeman (1.9.3)
+ erubis (~> 2.6)
+ fastercsv (~> 1.5)
+ haml (>= 3.0, < 5.0)
+ highline (~> 1.6)
+ multi_json (~> 1.2)
+ ruby2ruby (~> 2.0)
+ ruby_parser (~> 3.1.1)
+ sass (~> 3.0)
+ slim (~> 1.3.6)
+ terminal-table (~> 1.4)
bugsnag (1.2.18)
httparty (>= 0.6, < 1.0)
multi_json (~> 1.0)
@@ -82,6 +93,7 @@ GEM
multipart-post (~> 1.1)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
+ fastercsv (1.5.5)
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
ffi (1.4.0)
@@ -108,6 +120,7 @@ GEM
haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
hashie (1.2.0)
+ highline (1.6.16)
hike (1.2.1)
http_parser.rb (0.5.3)
httparty (0.10.2)
@@ -246,7 +259,12 @@ GEM
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
+ ruby2ruby (2.0.3)
+ ruby_parser (~> 3.1)
+ sexp_processor (~> 4.0)
ruby_gntp (0.3.4)
+ ruby_parser (3.1.1)
+ sexp_processor (~> 4.1)
rubyzip (0.9.9)
sass (3.2.7)
sass-rails (3.2.6)
@@ -258,6 +276,7 @@ GEM
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
+ sexp_processor (4.1.5)
shoulda-matchers (1.5.0)
activesupport (>= 3.0.0)
bourne (~> 1.2.0)
@@ -273,6 +292,9 @@ GEM
railties (>= 3.1)
sinon-rails (1.4.2.1)
railties (>= 3.1)
+ slim (1.3.6)
+ temple (~> 0.5.5)
+ tilt (~> 1.3.3)
slop (3.4.4)
spork (0.9.2)
sprockets (2.2.2)
@@ -280,6 +302,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ temple (0.5.5)
terminal-table (1.4.5)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
@@ -289,7 +312,7 @@ GEM
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.17.0)
- tilt (1.3.5)
+ tilt (1.3.6)
timecop (0.6.1)
treetop (1.4.12)
polyglot
@@ -321,6 +344,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ brakeman
bugsnag
capybara
capybara-webkit
View
2  app/models/project.rb
@@ -7,7 +7,7 @@ class Project < ActiveRecord::Base
"Scala", "Scheme", "Shell", "VimL"]
validates_presence_of :description, :github_url, :name, :main_language
- validates_format_of :github_url, :with => /^https?:\/\/(www\.)?github.com\/[\w-]*\/[\w\.-]*(\/)?$/i, :message => 'Enter the full HTTP URL.'
+ validates_format_of :github_url, :with => /\Ahttps?:\/\/(www\.)?github.com\/[\w-]*\/[\w\.-]*(\/)?\Z/i, :message => 'Enter the full HTTP URL.'
validates_uniqueness_of :github_url, :message => "Project has already been suggested."
validates_length_of :description, :within => 20..200
validates_inclusion_of :main_language, :in => LANGUAGES, :message => 'must be a programming language'
Please sign in to comment.
Something went wrong with that request. Please try again.