From 475d9f487f7050fcf8e52b319cd938c0949ed515 Mon Sep 17 00:00:00 2001
From: Nihad Abbasov <narkoz.2008@gmail.com>
Date: Tue, 29 May 2012 17:35:34 +0500
Subject: [PATCH] use ffaker gem

---
 Gemfile                     | 2 +-
 Gemfile.lock                | 5 ++---
 spec/factories.rb           | 2 +-
 spec/requests/hooks_spec.rb | 6 +++---
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Gemfile b/Gemfile
index 5e528d4540b5..97903b78a0ad 100644
--- a/Gemfile
+++ b/Gemfile
@@ -13,7 +13,7 @@ gem "grit", :git => "https://github.com/gitlabhq/grit.git", :ref => "810e3c11787
 gem "gitolite", :git => "https://github.com/gitlabhq/gitolite-client.git", :ref => "9b715ca8bab6529f6c92204a25f84d12f25a6eb0"
 gem "carrierwave"
 gem "six"
-gem "faker"
+gem "ffaker"
 gem "seed-fu"
 gem "linguist", "~> 1.0.0", :git => "https://github.com/gitlabhq/linguist.git"
 gem "pygments.rb", "0.2.12", :git => "https://github.com/gitlabhq/pygments.rb.git"
diff --git a/Gemfile.lock b/Gemfile.lock
index ef1fc0bd11f4..cf9b84910cd9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -131,8 +131,7 @@ GEM
     eventmachine (0.12.10)
     execjs (1.3.2)
       multi_json (~> 1.0)
-    faker (1.0.1)
-      i18n (~> 0.4)
+    ffaker (1.14.0)
     ffi (1.0.11)
     foreman (0.46.0)
       thor (>= 0.13.6)
@@ -337,7 +336,7 @@ DEPENDENCIES
   devise (~> 1.5)
   drapper
   email_spec
-  faker
+  ffaker
   foreman
   git
   gitolite!
diff --git a/spec/factories.rb b/spec/factories.rb
index 4e11a48bfe97..ea8c7aef0e27 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -61,7 +61,7 @@
 end
 
 Factory.add(:web_hook, WebHook) do |obj|
-  obj.url = Faker::Internet.url
+  obj.url = Faker::Internet.uri("http")
 end
 
 Factory.add(:wiki, Wiki) do |obj|
diff --git a/spec/requests/hooks_spec.rb b/spec/requests/hooks_spec.rb
index a6d18e4c5038..a508e5ea517e 100644
--- a/spec/requests/hooks_spec.rb
+++ b/spec/requests/hooks_spec.rb
@@ -18,7 +18,7 @@
 
   describe "New Hook" do
     before do
-      @url = Faker::Internet.url
+      @url = Faker::Internet.uri("http")
       visit project_hooks_path(@project)
       fill_in "hook_url", :with => @url
       expect { click_button "Add Web Hook" }.to change(WebHook, :count).by(1)
@@ -30,8 +30,8 @@
     end
   end
 
-  describe "Test" do 
-    before do 
+  describe "Test" do
+    before do
       @hook = Factory :web_hook, :project => @project
       visit project_hooks_path(@project)
       click_link "Test Hook"
-- 
GitLab