Skip to content

Commit

Permalink
fixed brakeman issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Al Snow committed Mar 17, 2013
1 parent 6259dd0 commit 9757127
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -40,6 +40,7 @@ group :development, :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'faker'
gem 'brakeman'

# Auto testing
gem 'guard-rspec'
Expand Down
26 changes: 25 additions & 1 deletion Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -273,13 +292,17 @@ 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)
hike (~> 1.2)
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)
Expand All @@ -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
Expand Down Expand Up @@ -321,6 +344,7 @@ PLATFORMS
ruby

DEPENDENCIES
brakeman
bugsnag
capybara
capybara-webkit
Expand Down
2 changes: 1 addition & 1 deletion app/models/project.rb
Expand Up @@ -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'
Expand Down

0 comments on commit 9757127

Please sign in to comment.