Commit 2428a0b2dd8e84e285df4b356ee6f1593204cd34

Authored by Dmitriy Zaporozhets
1 parent 86a8796b

Add project_services dir to autoload path

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/models/project.rb
@@ -23,14 +23,6 @@ @@ -23,14 +23,6 @@
23 # visibility_level :integer default(0), not null 23 # visibility_level :integer default(0), not null
24 # 24 #
25 25
26 -require_relative "project_services/assembla_service"  
27 -require_relative "project_services/campfire_service"  
28 -require_relative "project_services/emails_on_push_service"  
29 -require_relative "project_services/flowdock_service"  
30 -require_relative "project_services/gitlab_ci_service"  
31 -require_relative "project_services/hipchat_service"  
32 -require_relative "project_services/pivotaltracker_service"  
33 -  
34 class Project < ActiveRecord::Base 26 class Project < ActiveRecord::Base
35 include Gitlab::ShellAdapter 27 include Gitlab::ShellAdapter
36 include Gitlab::VisibilityLevel 28 include Gitlab::VisibilityLevel
app/models/project_services/emails_on_push_service.rb
@@ -38,7 +38,7 @@ class EmailsOnPushService &lt; Service @@ -38,7 +38,7 @@ class EmailsOnPushService &lt; Service
38 38
39 def fields 39 def fields
40 [ 40 [
41 - { type: 'textarea', name: 'recipients', placeholder: 'Recipients' }, 41 + { type: 'textarea', name: 'recipients', placeholder: 'Emails separated by whitespace' },
42 ] 42 ]
43 end 43 end
44 end 44 end
app/views/projects/services/_form.html.haml
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 - if type == 'text' 34 - if type == 'text'
35 = f.text_field name, class: "input-xlarge", placeholder: placeholder 35 = f.text_field name, class: "input-xlarge", placeholder: placeholder
36 - elsif type == 'textarea' 36 - elsif type == 'textarea'
37 - = f.textarea name, rows: 5 37 + = f.text_area name, rows: 5, class: "input-xlarge", placeholder: placeholder
38 - elsif type == 'checkbox' 38 - elsif type == 'checkbox'
39 = f.check_box name 39 = f.check_box name
40 40
config/application.rb
@@ -12,7 +12,7 @@ module Gitlab @@ -12,7 +12,7 @@ module Gitlab
12 # -- all .rb files in that directory are automatically loaded. 12 # -- all .rb files in that directory are automatically loaded.
13 13
14 # Custom directories with classes and modules you want to be autoloadable. 14 # Custom directories with classes and modules you want to be autoloadable.
15 - config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/models/concerns) 15 + config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/models/concerns #{config.root}/app/models/project_services)
16 16
17 # Only load the plugins named here, in the order given (default is alphabetical). 17 # Only load the plugins named here, in the order given (default is alphabetical).
18 # :all can be used as a placeholder for all plugins not explicitly named. 18 # :all can be used as a placeholder for all plugins not explicitly named.