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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b62da269
Commit
b62da269
authored
May 26, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move models to Geo namespace
parent
846106a0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
19 deletions
+38
-19
app/models/concerns/geo/model.rb
app/models/concerns/geo/model.rb
+11
-0
app/models/geo/event_log.rb
app/models/geo/event_log.rb
+7
-0
app/models/geo/push_event.rb
app/models/geo/push_event.rb
+11
-0
app/models/geo_event_log.rb
app/models/geo_event_log.rb
+0
-3
app/models/geo_push_event.rb
app/models/geo_push_event.rb
+0
-7
config/initializers/0_inflections.rb
config/initializers/0_inflections.rb
+1
-1
spec/models/geo/event_log_spec.rb
spec/models/geo/event_log_spec.rb
+7
-0
spec/models/geo/push_event_spec.rb
spec/models/geo/push_event_spec.rb
+1
-1
spec/models/geo_event_log_spec.rb
spec/models/geo_event_log_spec.rb
+0
-7
No files found.
app/models/concerns/geo/model.rb
0 → 100644
View file @
b62da269
module
Geo
module
Model
extend
ActiveSupport
::
Concern
included
do
def
self
.
table_name_prefix
"geo_"
end
end
end
end
app/models/geo/event_log.rb
0 → 100644
View file @
b62da269
module
Geo
class
EventLog
<
ActiveRecord
::
Base
include
Geo
::
Model
belongs_to
:push_event
,
class_name:
'Geo::PushEvent'
,
foreign_key:
'push_event_id'
end
end
app/models/geo/push_event.rb
0 → 100644
View file @
b62da269
module
Geo
class
PushEvent
<
ActiveRecord
::
Base
include
Geo
::
Model
belongs_to
:project
validates
:project
,
presence:
true
enum
event_type:
{
repository_updated:
0
,
wiki_updated:
1
}
end
end
app/models/geo_event_log.rb
deleted
100644 → 0
View file @
846106a0
class
GeoEventLog
<
ActiveRecord
::
Base
belongs_to
:push_event
,
class_name:
'GeoPushEvent'
,
foreign_key:
'push_event_id'
end
app/models/geo_push_event.rb
deleted
100644 → 0
View file @
846106a0
class
GeoPushEvent
<
ActiveRecord
::
Base
belongs_to
:project
validates
:project
,
presence:
true
enum
event_type:
{
repository_updated:
0
,
wiki_updated:
1
}
end
config/initializers/0_inflections.rb
View file @
b62da269
...
...
@@ -10,6 +10,6 @@
# end
#
ActiveSupport
::
Inflector
.
inflections
do
|
inflect
|
inflect
.
uncountable
%w(award_emoji project_statistics system_note_metadata
geo_
event_log project_registry file_registry)
inflect
.
uncountable
%w(award_emoji project_statistics system_note_metadata event_log project_registry file_registry)
inflect
.
acronym
'EE'
end
spec/models/geo/event_log_spec.rb
0 → 100644
View file @
b62da269
require
'rails_helper'
RSpec
.
describe
Geo
::
EventLog
,
type: :model
do
describe
'relationships'
do
it
{
is_expected
.
to
belong_to
(
:push_event
).
class_name
(
'Geo::PushEvent'
).
with_foreign_key
(
'push_event_id'
)
}
end
end
spec/models/geo
_
push_event_spec.rb
→
spec/models/geo
/
push_event_spec.rb
View file @
b62da269
require
'rails_helper'
RSpec
.
describe
GeoPushEvent
,
type: :model
do
RSpec
.
describe
Geo
::
PushEvent
,
type: :model
do
describe
'relationships'
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
end
...
...
spec/models/geo_event_log_spec.rb
deleted
100644 → 0
View file @
846106a0
require
'rails_helper'
RSpec
.
describe
GeoEventLog
,
type: :model
do
describe
'relationships'
do
it
{
is_expected
.
to
belong_to
(
:push_event
).
class_name
(
'GeoPushEvent'
).
with_foreign_key
(
'push_event_id'
)
}
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