Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
1cfc2b6f
Commit
1cfc2b6f
authored
Mar 01, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Undev-team-and-group-descriptions'
parents
a73e58f7
ef646928
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
149 additions
and
48 deletions
+149
-48
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
+2
-0
app/models/group.rb
app/models/group.rb
+8
-7
app/models/namespace.rb
app/models/namespace.rb
+10
-9
app/models/user_team.rb
app/models/user_team.rb
+2
-1
app/views/admin/groups/edit.html.haml
app/views/admin/groups/edit.html.haml
+6
-3
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+3
-1
app/views/admin/groups/new.html.haml
app/views/admin/groups/new.html.haml
+8
-2
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+7
-1
app/views/admin/teams/edit.html.haml
app/views/admin/teams/edit.html.haml
+7
-2
app/views/admin/teams/index.html.haml
app/views/admin/teams/index.html.haml
+3
-1
app/views/admin/teams/new.html.haml
app/views/admin/teams/new.html.haml
+9
-2
app/views/admin/teams/show.html.haml
app/views/admin/teams/show.html.haml
+7
-1
app/views/groups/edit.html.haml
app/views/groups/edit.html.haml
+9
-2
app/views/groups/new.html.haml
app/views/groups/new.html.haml
+10
-3
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+3
-0
app/views/teams/edit.html.haml
app/views/teams/edit.html.haml
+8
-2
app/views/teams/new.html.haml
app/views/teams/new.html.haml
+9
-3
app/views/teams/show.html.haml
app/views/teams/show.html.haml
+3
-0
db/migrate/20130206084024_add_description_to_namsespace.rb
db/migrate/20130206084024_add_description_to_namsespace.rb
+5
-0
db/migrate/20130207104426_add_description_to_teams.rb
db/migrate/20130207104426_add_description_to_teams.rb
+5
-0
db/schema.rb
db/schema.rb
+9
-7
features/steps/admin/admin_groups.rb
features/steps/admin/admin_groups.rb
+2
-0
features/steps/admin/admin_teams.rb
features/steps/admin/admin_teams.rb
+2
-0
features/steps/group/group.rb
features/steps/group/group.rb
+3
-1
features/steps/userteams/userteams.rb
features/steps/userteams/userteams.rb
+7
-0
features/teams/team.feature
features/teams/team.feature
+1
-0
spec/factories/user_teams.rb
spec/factories/user_teams.rb
+1
-0
No files found.
app/assets/stylesheets/gitlab_bootstrap/common.scss
View file @
1cfc2b6f
...
@@ -30,6 +30,8 @@
...
@@ -30,6 +30,8 @@
border-color
:
#DDD
;
border-color
:
#DDD
;
}
}
.well
{
padding
:
15px
;
}
/** HELPERS **/
/** HELPERS **/
.nothing_here_message
{
.nothing_here_message
{
text-align
:
center
;
text-align
:
center
;
...
...
app/models/group.rb
View file @
1cfc2b6f
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# name :string(255) not null
# name :string(255) not null
# description :string(255) not null
# path :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# owner_id :integer not null
# created_at :datetime not null
# created_at :datetime not null
...
...
app/models/namespace.rb
View file @
1cfc2b6f
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# id :integer not null, primary key
# id :integer not null, primary key
# name :string(255) not null
# name :string(255) not null
# description :string(255) not null
# path :string(255) not null
# path :string(255) not null
# owner_id :integer not null
# owner_id :integer not null
# created_at :datetime not null
# created_at :datetime not null
...
@@ -12,7 +13,7 @@
...
@@ -12,7 +13,7 @@
#
#
class
Namespace
<
ActiveRecord
::
Base
class
Namespace
<
ActiveRecord
::
Base
attr_accessible
:name
,
:path
attr_accessible
:name
,
:
description
,
:
path
has_many
:projects
,
dependent: :destroy
has_many
:projects
,
dependent: :destroy
belongs_to
:owner
,
class_name:
"User"
belongs_to
:owner
,
class_name:
"User"
...
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
...
@@ -22,7 +23,7 @@ class Namespace < ActiveRecord::Base
length:
{
within:
0
..
255
},
length:
{
within:
0
..
255
},
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
validates
:description
,
length:
{
within:
0
..
255
}
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
...
...
app/models/user_team.rb
View file @
1cfc2b6f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
class
UserTeam
<
ActiveRecord
::
Base
class
UserTeam
<
ActiveRecord
::
Base
attr_accessible
:name
,
:owner_id
,
:path
attr_accessible
:name
,
:
description
,
:
owner_id
,
:path
belongs_to
:owner
,
class_name:
User
belongs_to
:owner
,
class_name:
User
...
@@ -26,6 +26,7 @@ class UserTeam < ActiveRecord::Base
...
@@ -26,6 +26,7 @@ class UserTeam < ActiveRecord::Base
length:
{
within:
0
..
255
},
length:
{
within:
0
..
255
},
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
format:
{
with:
Gitlab
::
Regex
.
name_regex
,
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
message:
"only letters, digits, spaces & '_' '-' '.' allowed."
}
validates
:description
,
length:
{
within:
0
..
255
}
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
validates
:path
,
uniqueness:
true
,
presence:
true
,
length:
{
within:
1
..
255
},
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
format:
{
with:
Gitlab
::
Regex
.
path_regex
,
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
message:
"only letters, digits & '_' '-' '.' allowed. Letter should be first"
}
...
...
app/views/admin/groups/edit.html.haml
View file @
1cfc2b6f
%h3
.page_title
Rename
Group
%h3
.page_title
Edit
Group
%hr
%hr
=
form_for
[
:admin
,
@group
]
do
|
f
|
=
form_for
[
:admin
,
@group
]
do
|
f
|
-
if
@group
.
errors
.
any?
-
if
@group
.
errors
.
any?
...
@@ -10,7 +10,10 @@
...
@@ -10,7 +10,10 @@
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
.clearfix.group-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.clearfix.group_name_holder
.clearfix.group_name_holder
=
f
.
label
:path
do
=
f
.
label
:path
do
...
@@ -24,5 +27,5 @@
...
@@ -24,5 +27,5 @@
%li
It will change the git path to repositories under this group.
%li
It will change the git path to repositories under this group.
.form-actions
.form-actions
=
f
.
submit
'
Rename
group'
,
class:
"btn btn-remove"
=
f
.
submit
'
Edit
group'
,
class:
"btn btn-remove"
=
link_to
'Cancel'
,
admin_groups_path
,
class:
"btn btn-cancel"
=
link_to
'Cancel'
,
admin_groups_path
,
class:
"btn btn-cancel"
app/views/admin/groups/index.html.haml
View file @
1cfc2b6f
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
Name
Name
%i
.icon-sort-down
%i
.icon-sort-down
%th
Path
%th
Path
%th
Description
%th
Projects
%th
Projects
%th
Owner
%th
Owner
%th
.cred
Danger Zone!
%th
.cred
Danger Zone!
...
@@ -25,11 +26,12 @@
...
@@ -25,11 +26,12 @@
%tr
%tr
%td
%td
%strong
=
link_to
group
.
name
,
[
:admin
,
group
]
%strong
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
=
group
.
description
%td
=
group
.
path
%td
=
group
.
path
%td
=
group
.
projects
.
count
%td
=
group
.
projects
.
count
%td
%td
=
link_to
group
.
owner_name
,
admin_user_path
(
group
.
owner
)
=
link_to
group
.
owner_name
,
admin_user_path
(
group
.
owner
)
%td
.bgred
%td
.bgred
=
link_to
'
Rename
'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn btn-small"
=
link_to
'
Edit
'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn btn-small"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
paginate
@groups
,
theme:
"admin"
=
paginate
@groups
,
theme:
"admin"
app/views/admin/groups/new.html.haml
View file @
1cfc2b6f
...
@@ -9,8 +9,14 @@
...
@@ -9,8 +9,14 @@
Group name is
Group name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
.clearfix.group-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Create group'
,
class:
"btn btn-primary"
=
f
.
submit
'Create group'
,
class:
"btn btn-primary"
%hr
%hr
.padded
.padded
%ul
%ul
...
...
app/views/admin/groups/show.html.haml
View file @
1cfc2b6f
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn btn-small pull-right"
do
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn btn-small pull-right"
do
%i
.icon-edit
%i
.icon-edit
Rename
Edit
%tr
%td
%b
Description:
%td
=
@group
.
description
%tr
%tr
%td
%td
%b
%b
...
...
app/views/admin/teams/edit.html.haml
View file @
1cfc2b6f
%h3
.page_title
Rename
Team
%h3
.page_title
Edit
Team
%hr
%hr
=
form_for
@team
,
url:
admin_team_path
(
@team
),
method: :put
do
|
f
|
=
form_for
@team
,
url:
admin_team_path
(
@team
),
method: :put
do
|
f
|
-
if
@team
.
errors
.
any?
-
if
@team
.
errors
.
any?
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Example Team"
,
class:
"xxlarge"
=
f
.
text_field
:name
,
placeholder:
"Example Team"
,
class:
"xxlarge"
.clearfix.team-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.clearfix.team_name_holder
.clearfix.team_name_holder
=
f
.
label
:path
do
=
f
.
label
:path
do
%span
.cred
Team path is
%span
.cred
Team path is
...
@@ -19,5 +24,5 @@
...
@@ -19,5 +24,5 @@
%li
It will change web url for access team and team projects.
%li
It will change web url for access team and team projects.
.form-actions
.form-actions
=
f
.
submit
'
Rename
team'
,
class:
"btn btn-remove"
=
f
.
submit
'
Edit
team'
,
class:
"btn btn-remove"
=
link_to
'Cancel'
,
admin_teams_path
,
class:
"btn btn-cancel"
=
link_to
'Cancel'
,
admin_teams_path
,
class:
"btn btn-cancel"
app/views/admin/teams/index.html.haml
View file @
1cfc2b6f
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
%th
%th
Name
Name
%i
.icon-sort-down
%i
.icon-sort-down
%th
Description
%th
Path
%th
Path
%th
Projects
%th
Projects
%th
Members
%th
Members
...
@@ -26,13 +27,14 @@
...
@@ -26,13 +27,14 @@
%tr
%tr
%td
%td
%strong
=
link_to
team
.
name
,
admin_team_path
(
team
)
%strong
=
link_to
team
.
name
,
admin_team_path
(
team
)
%td
=
team
.
description
%td
=
team
.
path
%td
=
team
.
path
%td
=
team
.
projects
.
count
%td
=
team
.
projects
.
count
%td
=
team
.
members
.
count
%td
=
team
.
members
.
count
%td
%td
=
link_to
team
.
owner
.
name
,
admin_user_path
(
team
.
owner
)
=
link_to
team
.
owner
.
name
,
admin_user_path
(
team
.
owner
)
%td
.bgred
%td
.bgred
=
link_to
'
Rename
'
,
edit_admin_team_path
(
team
),
id:
"edit_
#{
dom_id
(
team
)
}
"
,
class:
"btn btn-small"
=
link_to
'
Edit
'
,
edit_admin_team_path
(
team
),
id:
"edit_
#{
dom_id
(
team
)
}
"
,
class:
"btn btn-small"
=
link_to
'Destroy'
,
admin_team_path
(
team
),
confirm:
"REMOVE
#{
team
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
link_to
'Destroy'
,
admin_team_path
(
team
),
confirm:
"REMOVE
#{
team
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn btn-small btn-remove"
=
paginate
@teams
,
theme:
"admin"
=
paginate
@teams
,
theme:
"admin"
app/views/admin/teams/new.html.haml
View file @
1cfc2b6f
...
@@ -9,8 +9,15 @@
...
@@ -9,8 +9,15 @@
Team name is
Team name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
.clearfix.team-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Create team'
,
class:
"btn btn-primary"
=
f
.
submit
'Create team'
,
class:
"btn btn-primary"
%hr
%hr
.padded
.padded
%ul
%ul
...
...
app/views/admin/teams/show.html.haml
View file @
1cfc2b6f
...
@@ -16,7 +16,13 @@
...
@@ -16,7 +16,13 @@
=
link_to
edit_admin_team_path
(
@team
),
class:
"btn btn-small pull-right"
do
=
link_to
edit_admin_team_path
(
@team
),
class:
"btn btn-small pull-right"
do
%i
.icon-edit
%i
.icon-edit
Rename
Edit
%tr
%td
%b
Description:
%td
=
@team
.
description
%tr
%tr
%td
%td
%b
%b
...
...
app/views/groups/edit.html.haml
View file @
1cfc2b6f
...
@@ -9,8 +9,15 @@
...
@@ -9,8 +9,15 @@
Group name is
Group name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
.clearfix.group-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Save group'
,
class:
"btn btn-save"
=
f
.
submit
'Save group'
,
class:
"btn btn-save"
%hr
%hr
...
...
app/views/groups/new.html.haml
View file @
1cfc2b6f
...
@@ -9,9 +9,16 @@
...
@@ -9,9 +9,16 @@
Group name is
Group name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xxlarge left"
.clearfix.group-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Create group'
,
class:
"btn btn-create"
=
f
.
submit
'Create group'
,
class:
"btn btn-create"
%hr
.padded
.padded
%ul
%ul
%li
Group is kind of directory for several projects
%li
Group is kind of directory for several projects
...
...
app/views/groups/show.html.haml
View file @
1cfc2b6f
...
@@ -12,6 +12,9 @@
...
@@ -12,6 +12,9 @@
%p
.nothing_here_message
Project activity will be displayed here
%p
.nothing_here_message
Project activity will be displayed here
.loading.hide
.loading.hide
.side.span4
.side.span4
-
if
@group
.
description
.
present?
.description.well.light
=
@group
.
description
=
render
"projects"
,
projects:
@projects
=
render
"projects"
,
projects:
@projects
%div
%div
%span
.rss-icon
%span
.rss-icon
...
...
app/views/teams/edit.html.haml
View file @
1cfc2b6f
...
@@ -12,13 +12,20 @@
...
@@ -12,13 +12,20 @@
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. OpenSource"
,
class:
"xlarge left"
.clearfix.team-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.clearfix
.clearfix
=
f
.
label
:path
do
=
f
.
label
:path
do
Team path is
Team path is
.input
.input
=
f
.
text_field
:path
,
placeholder:
"opensource"
,
class:
"xlarge left"
=
f
.
text_field
:path
,
placeholder:
"opensource"
,
class:
"xlarge left"
.form-actions
.form-actions
=
f
.
submit
'Save team changes'
,
class:
"btn btn-save"
=
f
.
submit
'Save team changes'
,
class:
"btn btn-primary"
=
link_to
'Delete team'
,
team_path
(
@team
),
method: :delete
,
confirm:
"You are shure?"
,
class:
"btn btn-remove pull-right"
.span5
.span5
.ui-box
.ui-box
%h5
.title
Remove team
%h5
.title
Remove team
...
@@ -26,4 +33,3 @@
...
@@ -26,4 +33,3 @@
%p
%p
Removed team can not be restored!
Removed team can not be restored!
=
link_to
'Remove team'
,
team_path
(
@team
),
method: :delete
,
confirm:
"You are sure?"
,
class:
"btn btn-remove btn-small"
=
link_to
'Remove team'
,
team_path
(
@team
),
method: :delete
,
confirm:
"You are sure?"
,
class:
"btn btn-remove btn-small"
app/views/teams/new.html.haml
View file @
1cfc2b6f
...
@@ -9,9 +9,15 @@
...
@@ -9,9 +9,15 @@
Team name is
Team name is
.input
.input
=
f
.
text_field
:name
,
placeholder:
"Ex. Ruby Developers"
,
class:
"xxlarge left"
=
f
.
text_field
:name
,
placeholder:
"Ex. Ruby Developers"
,
class:
"xxlarge left"
.clearfix.team-description-holder
=
f
.
label
:description
,
"Details"
.input
=
f
.
text_area
:description
,
maxlength:
250
,
class:
"xxlarge js-gfm-input"
,
rows:
4
.form-actions
=
f
.
submit
'Create team'
,
class:
"btn btn-create"
=
f
.
submit
'Create team'
,
class:
"btn btn-create"
%hr
.padded
.padded
%ul
%ul
%li
All created teams are public (users can view who enter into team and which project are assigned for this team)
%li
All created teams are public (users can view who enter into team and which project are assigned for this team)
...
...
app/views/teams/show.html.haml
View file @
1cfc2b6f
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
%p
.nothing_here_message
Projects activity will be displayed here
%p
.nothing_here_message
Projects activity will be displayed here
.loading.hide
.loading.hide
.side.span4
.side.span4
-
if
@team
.
description
.
present?
.description.well.light
=
@team
.
description
=
render
"projects"
,
projects:
@projects
=
render
"projects"
,
projects:
@projects
%div
%div
%span
.rss-icon
%span
.rss-icon
...
...
db/migrate/20130206084024_add_description_to_namsespace.rb
0 → 100644
View file @
1cfc2b6f
class
AddDescriptionToNamsespace
<
ActiveRecord
::
Migration
def
change
add_column
:namespaces
,
:description
,
:string
,
default:
''
,
null:
false
end
end
db/migrate/20130207104426_add_description_to_teams.rb
0 → 100644
View file @
1cfc2b6f
class
AddDescriptionToTeams
<
ActiveRecord
::
Migration
def
change
add_column
:user_teams
,
:description
,
:string
,
default:
''
,
null:
false
end
end
db/schema.rb
View file @
1cfc2b6f
...
@@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
...
@@ -112,6 +112,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"type"
t
.
string
"type"
t
.
string
"description"
,
:default
=>
""
,
:null
=>
false
end
end
add_index
"namespaces"
,
[
"name"
],
:name
=>
"index_namespaces_on_name"
add_index
"namespaces"
,
[
"name"
],
:name
=>
"index_namespaces_on_name"
...
@@ -234,6 +235,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
...
@@ -234,6 +235,7 @@ ActiveRecord::Schema.define(:version => 20130220133245) do
t
.
integer
"owner_id"
t
.
integer
"owner_id"
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
datetime
"updated_at"
,
:null
=>
false
t
.
string
"description"
,
:default
=>
""
,
:null
=>
false
end
end
create_table
"users"
,
:force
=>
true
do
|
t
|
create_table
"users"
,
:force
=>
true
do
|
t
|
...
...
features/steps/admin/admin_groups.rb
View file @
1cfc2b6f
...
@@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps
...
@@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps
And
'submit form with new group info'
do
And
'submit form with new group info'
do
fill_in
'group_name'
,
:with
=>
'gitlab'
fill_in
'group_name'
,
:with
=>
'gitlab'
fill_in
'group_description'
,
:with
=>
'Group description'
click_button
"Create group"
click_button
"Create group"
end
end
Then
'I should see newly created group'
do
Then
'I should see newly created group'
do
page
.
should
have_content
"Group: gitlab"
page
.
should
have_content
"Group: gitlab"
page
.
should
have_content
"Group description"
end
end
Then
'I should be redirected to group page'
do
Then
'I should be redirected to group page'
do
...
...
features/steps/admin/admin_teams.rb
View file @
1cfc2b6f
...
@@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps
...
@@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps
And
'submit form with new team info'
do
And
'submit form with new team info'
do
fill_in
'user_team_name'
,
with:
'gitlab'
fill_in
'user_team_name'
,
with:
'gitlab'
fill_in
'user_team_description'
,
with:
'description'
click_button
'Create team'
click_button
'Create team'
end
end
...
@@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps
...
@@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps
And
'I should see newly created team'
do
And
'I should see newly created team'
do
page
.
should
have_content
"Team: gitlab"
page
.
should
have_content
"Team: gitlab"
page
.
should
have_content
"description"
end
end
When
'I visit admin teams page'
do
When
'I visit admin teams page'
do
...
...
features/steps/group/group.rb
View file @
1cfc2b6f
...
@@ -69,12 +69,14 @@ class Groups < Spinach::FeatureSteps
...
@@ -69,12 +69,14 @@ class Groups < Spinach::FeatureSteps
end
end
And
'submit form with new group info'
do
And
'submit form with new group info'
do
fill_in
'group_name'
,
:with
=>
'Samurai'
fill_in
'group_name'
,
with:
'Samurai'
fill_in
'group_description'
,
with:
'Tokugawa Shogunate'
click_button
"Create group"
click_button
"Create group"
end
end
Then
'I should see newly created group'
do
Then
'I should see newly created group'
do
page
.
should
have_content
"Samurai"
page
.
should
have_content
"Samurai"
page
.
should
have_content
"Tokugawa Shogunate"
page
.
should
have_content
"You will only see events from projects in this group"
page
.
should
have_content
"You will only see events from projects in this group"
end
end
...
...
features/steps/userteams/userteams.rb
View file @
1cfc2b6f
...
@@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps
...
@@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps
And
'I submit form with new team info'
do
And
'I submit form with new team info'
do
fill_in
'name'
,
with:
'gitlab'
fill_in
'name'
,
with:
'gitlab'
fill_in
'user_team_description'
,
with:
'team description'
click_button
'Create team'
click_button
'Create team'
end
end
And
'I should see newly created team'
do
page
.
should
have_content
"gitlab"
page
.
should
have_content
"team description"
end
Then
'I should be redirected to new team page'
do
Then
'I should be redirected to new team page'
do
team
=
UserTeam
.
last
team
=
UserTeam
.
last
current_path
.
should
==
team_path
(
team
)
current_path
.
should
==
team_path
(
team
)
...
...
features/teams/team.feature
View file @
1cfc2b6f
...
@@ -20,6 +20,7 @@ Feature: UserTeams
...
@@ -20,6 +20,7 @@ Feature: UserTeams
When
I click to
"New team"
link
When
I click to
"New team"
link
And
I submit form with new team info
And
I submit form with new team info
Then
I should be redirected to new team page
Then
I should be redirected to new team page
Then
I should see newly created team
Scenario
:
I
should see team dashboard list
Scenario
:
I
should see team dashboard list
When
I have teams with projects and members
When
I have teams with projects and members
...
...
spec/factories/user_teams.rb
View file @
1cfc2b6f
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:user_team
do
factory
:user_team
do
sequence
(
:name
)
{
|
n
|
"team
#{
n
}
"
}
sequence
(
:name
)
{
|
n
|
"team
#{
n
}
"
}
sequence
(
:description
)
{
|
n
|
"team_description
#{
n
}
"
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
owner
owner
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment