Commit ed63d28e authored by user's avatar user

Merge branch 'master' of https://github.com/gitlabhq/gitlabhq into admin-panel-disign

parents c3eac16f c359eadf
...@@ -39,7 +39,7 @@ group :development, :test do ...@@ -39,7 +39,7 @@ group :development, :test do
gem 'capybara' gem 'capybara'
gem 'autotest' gem 'autotest'
gem 'autotest-rails' gem 'autotest-rails'
# gem 'ruby-debug19', :require => 'ruby-debug' gem 'ruby-debug19', :require => 'ruby-debug'
gem 'awesome_print' gem 'awesome_print'
gem 'database_cleaner' gem 'database_cleaner'
gem 'launchy' gem 'launchy'
......
...@@ -50,6 +50,7 @@ GEM ...@@ -50,6 +50,7 @@ GEM
acts_as_list (0.1.4) acts_as_list (0.1.4)
addressable (2.2.6) addressable (2.2.6)
ansi (1.4.1) ansi (1.4.1)
archive-tar-minitar (0.5.2)
arel (2.2.1) arel (2.2.1)
autotest (4.4.6) autotest (4.4.6)
ZenTest (>= 4.4.1) ZenTest (>= 4.4.1)
...@@ -77,6 +78,7 @@ GEM ...@@ -77,6 +78,7 @@ GEM
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.1.3) coffee-script-source (1.1.3)
columnize (0.3.4)
daemons (1.1.4) daemons (1.1.4)
database_cleaner (0.7.0) database_cleaner (0.7.0)
devise (1.5.0) devise (1.5.0)
...@@ -113,6 +115,8 @@ GEM ...@@ -113,6 +115,8 @@ GEM
letter_opener (0.0.2) letter_opener (0.0.2)
launchy launchy
libv8 (3.3.10.4) libv8 (3.3.10.4)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.0) mail (2.3.0)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
...@@ -168,6 +172,16 @@ GEM ...@@ -168,6 +172,16 @@ GEM
activesupport (~> 3.0) activesupport (~> 3.0)
railties (~> 3.0) railties (~> 3.0)
rspec (~> 2.7.0) rspec (~> 2.7.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubypython (0.5.3) rubypython (0.5.3)
blankslate (>= 2.1.2.3) blankslate (>= 2.1.2.3)
ffi (~> 1.0.7) ffi (~> 1.0.7)
...@@ -254,6 +268,7 @@ DEPENDENCIES ...@@ -254,6 +268,7 @@ DEPENDENCIES
rails-footnotes (~> 3.7.5) rails-footnotes (~> 3.7.5)
rdiscount rdiscount
rspec-rails rspec-rails
ruby-debug19
sass-rails (~> 3.1.0) sass-rails (~> 3.1.0)
seed-fu (~> 2.1.0) seed-fu (~> 2.1.0)
shoulda (~> 3.0.0.beta2) shoulda (~> 3.0.0.beta2)
......
...@@ -74,7 +74,6 @@ $blue_link: "#2fa0bb"; ...@@ -74,7 +74,6 @@ $blue_link: "#2fa0bb";
/* eo Vars */ /* eo Vars */
html{ -webkit-font-smoothing:antialiased; } html{ -webkit-font-smoothing:antialiased; }
*{text-shadow: 0 1px 0 white}
body{font-size: 12px; background-color: #eee;} body{font-size: 12px; background-color: #eee;}
a{text-decoration: none; font-weight: bold; color: #666} a{text-decoration: none; font-weight: bold; color: #666}
a:hover{color: #333} a:hover{color: #333}
...@@ -494,13 +493,55 @@ header .account-links a:last-child{ ...@@ -494,13 +493,55 @@ header .account-links a:last-child{
border-bottom: 0; border-bottom: 0;
} }
#no_ssh_key_defined { .big-message{
border:1px solid #ee8801; background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.041, #eccb40), to(#ffee4d));
margin:20px; background-image: -webkit-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
padding:20px; background-image: -moz-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
background:#ffe3f0; background-image: -o-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
h2{margin:0;} text-align: center;
p {margin:10px 0 0;} font-weight: bold;
padding: 10px 20px;
text-shadow: 0 1px 0 rgba(255,255,255,.3);
color: #333;
color: rgba(0,0,0,.7);
font-size: 14px;
box-shadow: 0 1px 2px rgba(0,0,0,.7);
z-index: 100000;
margin-bottom: 2px;
}
.big-message a{color: #000; text-decoration: underline;}
.big-message.error{
background-color: #722523;
background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.04, #722523), to(#ad4846));
background-image: -webkit-linear-gradient(90deg, #9b403f 4%, #c16765);
background-image: -moz-linear-gradient(90deg, #722523 4%, #ad4846);
background-image: -o-linear-gradient(90deg, #722523 4%, #ad4846);
color: #2E0D0C;
}
.big-message.success{
background-color: #7a9339;
background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46));
background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46)
}
.big-message.success{
background-color: #7a9339;
background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46));
background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46)
}
.big-message.notice{
background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.061, #447790), color-stop(0.897, #5da2bf));
background-image: -webkit-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%);
background-image: -moz-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%);
background-image: -o-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%)
} }
/* eo Account Box */ /* eo Account Box */
...@@ -516,12 +557,14 @@ h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px; ...@@ -516,12 +557,14 @@ h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px;
/* Dashboard Page */ /* Dashboard Page */
html, body { height: 100%; } html, body { height: 100%; }
body.dashboard-page h2.icon span{ background-position: 9px -69px; } body.dashboard-page h2.icon span{ background-position: 9px -69px; }
body.dashboard-page header{margin-bottom: 0} body.dashboard-page header{margin-bottom: 0}
body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; margin-left: 1%} body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; min-height: 600px; margin-left: 1%}
body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; } body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; }
body.dashboard-page .news-feed h2{float: left;} body.dashboard-page .news-feed h2{float: left;}
body.dashboard-page aside{ min-height: 700px; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc } body.dashboard-page aside{ min-height: 700px; position: absolute; top: 0; bottom: 0; right: 0; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc }
body.dashboard-page aside h4{margin: 0; border-bottom: 1px solid #ccc; padding: 10px 10px; font-size: 11px; font-weight: bold; text-transform: uppercase;} body.dashboard-page aside h4{margin: 0; border-bottom: 1px solid #ccc; padding: 10px 10px; font-size: 11px; font-weight: bold; text-transform: uppercase;}
body.dashboard-page aside h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;} body.dashboard-page aside h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;}
body.dashboard-page aside .project-list {list-style: none; margin: 0; padding: 0;} body.dashboard-page aside .project-list {list-style: none; margin: 0; padding: 0;}
...@@ -563,7 +606,7 @@ body.project-page .page-title{margin-bottom: 0} ...@@ -563,7 +606,7 @@ body.project-page .page-title{margin-bottom: 0}
body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; } body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }
body.project-page input.text.git-url, body.project-page input.text.git-url,
body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 14px 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px;} body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 176px}
body.projects-page input.text.git-url {margin:10px 0 0 } body.projects-page input.text.git-url {margin:10px 0 0 }
.git_url_wrapper { margin-right:50px } .git_url_wrapper { margin-right:50px }
......
...@@ -27,6 +27,7 @@ class Note < ActiveRecord::Base ...@@ -27,6 +27,7 @@ class Note < ActiveRecord::Base
scope :common, where(:noteable_id => nil) scope :common, where(:noteable_id => nil)
scope :today, where("created_at >= :date", :date => Date.today)
scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days)) scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days))
scope :since, lambda { |day| where("created_at >= :date", :date => (day)) } scope :since, lambda { |day| where("created_at >= :date", :date => (day)) }
scope :fresh, order("created_at DESC") scope :fresh, order("created_at DESC")
......
...@@ -30,7 +30,7 @@ class User < ActiveRecord::Base ...@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) } scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
def identifier def identifier
email.gsub "@", "_" email.gsub /[@.]/, "_"
end end
def is_admin? def is_admin?
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- line_new = 0 - line_new = 0
- lines_arr = diff.diff.lines.to_a - lines_arr = diff.diff.lines.to_a
- lines_arr.each do |line| - lines_arr.each do |line|
- line.force_encoding(Encoding::UTF_8)
- next if line.match(/^--- \/dev\/null/) - next if line.match(/^--- \/dev\/null/)
- next if line.match(/^--- a/) - next if line.match(/^--- a/)
- next if line.match(/^\+\+\+ b/) - next if line.match(/^\+\+\+ b/)
......
...@@ -48,9 +48,7 @@ ...@@ -48,9 +48,7 @@
<% end %> <% end %>
<% if current_user.keys.all.empty? %> <% if current_user.keys.all.empty? %>
<div id="no_ssh_key_defined"> <div id="no_ssh_key_defined" class="big-message error">
<h2>ATTENTION!</h2> <p>No SSH Key is defined. You won't be able to use any Git command!. Click <%=link_to( 'here', keys_path ) %> to add one!
<p>No SSH Key is defined. You won't be able to use any Git command!
<p>Click <%=link_to( 'here', keys_path ) %> to add one!
</div> </div>
<% end %> <% end %>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
= link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
Wall Wall
- if @project.common_notes.count > 0 - if @project.common_notes.count > 0
%span{ :class => "number" }= @project.common_notes.count %span{ :class => "number" }= @project.common_notes.today.count
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
Snippets Snippets
- if @project.snippets.count > 0 - if @project.snippets.count > 0
......
...@@ -3,13 +3,7 @@ module CommitExt ...@@ -3,13 +3,7 @@ module CommitExt
attr_accessor :refs attr_accessor :refs
def safe_message def safe_message
message.encode("UTF-8", message.force_encoding(Encoding::UTF_8)
:invalid => :replace,
:undef => :replace,
:universal_newline => true,
:replace => "")
rescue
"-- invalid encoding for commit message"
end end
def created_at def created_at
......
...@@ -12,6 +12,11 @@ describe Note do ...@@ -12,6 +12,11 @@ describe Note do
it { Factory.create(:note, it { Factory.create(:note,
:project => Factory.create(:project)).should be_valid } :project => Factory.create(:project)).should be_valid }
describe "Scopes" do
it "should have a today named scope that returns ..." do
Note.today.where_values.should == ["created_at >= '#{Date.today}'"]
end
end
describe :authorization do describe :authorization do
before do before do
......
...@@ -16,7 +16,7 @@ describe User do ...@@ -16,7 +16,7 @@ describe User do
it "should return valid identifier" do it "should return valid identifier" do
user = User.new(:email => "test@mail.com") user = User.new(:email => "test@mail.com")
user.identifier.should == "test_mail.com" user.identifier.should == "test_mail_com"
end end
it "should have authentication token" do it "should have authentication token" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment