Merge pull request #18 from finnlabs/feature/rails3_adapt_structure

Feature/rails3 adapt structure
pull/6827/head
cratz 11 years ago
commit 8691422bf5
  1. 1
      .gitignore
  2. 2
      .rspec
  3. 0
      CHANGELOG.md
  4. 14
      Gemfile
  5. 400
      Gemfile.lock
  6. 38
      Rakefile
  7. 0
      app/assets/images/meeting/agenda.png
  8. 0
      app/assets/images/meeting/meeting.png
  9. 0
      app/assets/images/meeting/minutes.png
  10. 21
      app/assets/stylesheets/meeting/meeting.css.erb
  11. 1
      app/controllers/meeting_agendas_controller.rb
  12. 1
      app/controllers/meeting_contents_controller.rb
  13. 7
      app/controllers/meeting_minutes_controller.rb
  14. 1
      app/controllers/meetings_controller.rb
  15. 20
      app/helpers/meeting_contents_helper.rb
  16. 1
      app/models/meeting.rb
  17. 1
      app/models/meeting_agenda.rb
  18. 1
      app/models/meeting_content.rb
  19. 1
      app/models/meeting_minutes.rb
  20. 1
      app/models/meeting_participant.rb
  21. 2
      app/views/hooks/_activity_index_head.html.erb
  22. 4
      app/views/meeting_contents/_form.html.erb
  23. 4
      app/views/meeting_contents/_show.html.erb
  24. 4
      app/views/meeting_contents/diff.html.erb
  25. 4
      app/views/meeting_contents/history.html.erb
  26. 4
      app/views/meetings/_form.html.erb
  27. 4
      app/views/meetings/index.html.erb
  28. 4
      app/views/meetings/show.html.erb
  29. 3
      app/views/shared/_meeting_header.html.erb
  30. 8
      config/cucumber.yml
  31. 95
      lib/open_project/meeting/engine.rb
  32. 2
      lib/open_project/meeting/patches/project_patch.rb
  33. 2
      lib/open_project/meeting/version.rb
  34. 7
      openproject-meeting.gemspec

1
.gitignore vendored

@ -1 +0,0 @@
.DS_Store

@ -1,2 +0,0 @@
--color
--format progress

@ -1,14 +0,0 @@
source "http://rubygems.org"
# Declare your gem's dependencies in redmine-meeting.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
if ENV['RAILS_ROOT']
eval(IO.read("#{ENV['RAILS_ROOT']}/Gemfile"), binding)
else
puts "Host application dependencies not loaded. If you plan to run cucumber tests, specify env variable RAILS_ROOT."
end

@ -1,400 +0,0 @@
GIT
remote: git://github.com/awebneck/object_daddy.git
revision: cf5abf001cdbd14b47a3b51421446717a3183f0a
specs:
object-daddy (1.1.0)
GIT
remote: git://github.com/fnando/i18n-js.git
revision: 8801f8d17ef96c48a7a0269e251fcf1648c8f441
branch: rewrite
specs:
i18n-js (3.0.0.rc5)
i18n
GIT
remote: git://github.com/rails/rails.git
revision: 488699166c3558963fa82d4689a35f8c3fd93f47
branch: 3-2-13
specs:
actionmailer (3.2.13.rc2)
actionpack (= 3.2.13.rc2)
mail (~> 2.5.3)
actionpack (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13.rc2)
activesupport (= 3.2.13.rc2)
builder (~> 3.0.0)
activerecord (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
activesupport (3.2.13.rc2)
i18n (= 0.6.1)
multi_json (~> 1.0)
rails (3.2.13.rc2)
actionmailer (= 3.2.13.rc2)
actionpack (= 3.2.13.rc2)
activerecord (= 3.2.13.rc2)
activeresource (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
bundler (~> 1.0)
railties (= 3.2.13.rc2)
railties (3.2.13.rc2)
actionpack (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
GIT
remote: git://github.com/svenfuchs/globalize3.git
revision: ee44def9b244f02a41c3687a73cf7c0165667e3d
specs:
globalize3 (0.3.0)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
paper_trail (~> 2)
GIT
remote: git://github.com/tessi/sprockets.git
revision: f8cf7a6d158f000096a94fb4be74195e8459d0fd
branch: 2_2_1-backport
specs:
sprockets (2.2.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
PATH
remote: .
specs:
openproject_meeting (2.5.0)
rails (~> 3.2.9)
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
addressable (2.3.3)
arel (3.0.2)
awesome_nested_set (2.1.6)
activerecord (>= 3.0.0)
binding_of_caller (0.7.1)
debug_inspector (>= 0.0.1)
bourne (1.4.0)
mocha (~> 0.13.2)
builder (3.0.4)
bullet (4.4.0)
uniform_notifier
capybara (2.0.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
coderay (1.0.9)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.2)
columnize (0.3.6)
cucumber (1.2.3)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.6)
multi_json (~> 1.3)
cucumber-rails (1.3.1)
capybara (>= 1.1.2)
cucumber (>= 1.2.0)
nokogiri (>= 1.5.0)
rails (~> 3.0)
cucumber-rails-training-wheels (1.0.0)
cucumber-rails (>= 1.1.1)
database_cleaner (0.9.1)
debug_inspector (0.0.2)
debugger (1.5.0)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.0)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.0)
delayed_job (3.0.5)
activesupport (~> 3.0)
delayed_job_active_record (0.4.3)
activerecord (>= 2.1.0, < 4)
delayed_job (~> 3.0)
diff-lcs (1.2.1)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (4.2.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.2.1)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
fastercsv (1.5.5)
ffi (1.5.0)
gherkin (2.11.6)
json (>= 1.7.6)
guard (1.6.2)
listen (>= 0.6.0)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
terminal-table (>= 1.4.3)
thor (>= 0.14.6)
guard-cucumber (1.3.2)
cucumber (>= 1.2.0)
guard (>= 1.1.0)
guard-rspec (2.5.1)
guard (>= 1.1)
rspec (~> 2.11)
guard-spork (1.5.0)
childprocess (>= 0.2.3)
guard (>= 1.1)
spork (>= 0.8.4)
guard-test (0.7.0)
guard (>= 1.1)
test-unit (~> 2.2)
hike (1.2.1)
htmldiff (0.0.1)
i18n (0.6.1)
interception (0.3)
journey (1.0.4)
jquery-rails (2.0.3)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
jquery-ui-rails (4.0.2)
jquery-rails
railties (>= 3.1.0)
json (1.7.7)
launchy (2.1.2)
addressable (~> 2.3)
letter_opener (1.0.0)
launchy (>= 2.0.4)
libv8 (3.11.8.13)
listen (0.7.3)
loofah (1.2.1)
nokogiri (>= 1.4.4)
lumberjack (1.0.3)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
method_source (0.8.1)
mime-types (1.21)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.7.1)
mysql (2.9.1)
mysql2 (0.3.11)
nokogiri (1.5.8)
paper_trail (2.7.1)
activerecord (~> 3.0)
railties (~> 3.0)
pg (0.14.1)
polyglot (0.3.3)
prototype-rails (3.2.1)
rails (~> 3.2)
pry (0.9.12)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
pry-doc (0.4.4)
pry (>= 0.9.9.6)
yard (~> 0.8.1)
pry-rails (0.2.2)
pry (>= 0.9.10)
pry-rescue (1.0.0)
interception (>= 0.3)
pry
pry-stack_explorer (0.4.9)
binding_of_caller (>= 0.7)
pry (~> 0.9.11)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-mini-profiler (0.1.23)
rack (>= 1.1.3)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails-dev-tweaks (0.6.1)
actionpack (~> 3.1)
railties (~> 3.1)
rails-footnotes (3.7.9)
rails (>= 3.0.0)
rails_autolink (1.0.9)
rails (~> 3.1)
rake (10.0.3)
rb-fsevent (0.9.3)
rb-readline (0.4.2)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.4)
rmagick (2.13.2)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
rspec-rails (2.13.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
ruby-openid (2.1.8)
ruby-prof (0.13.0)
rubytree (0.8.3)
json (>= 1.7.5)
structured_warnings (>= 0.1.3)
rubyzip (0.9.9)
sass (3.2.7)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.31.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
shoulda (3.1.1)
shoulda-context (~> 1.0)
shoulda-matchers (~> 1.2)
shoulda-context (1.0.2)
shoulda-matchers (1.5.2)
activesupport (>= 3.0.0)
bourne (~> 1.3)
slop (3.4.4)
spork (1.0.0rc3)
spork-rails (3.2.1)
rails (>= 3.0.0, < 3.3.0)
spork (>= 1.0rc0)
spork-testunit (0.0.8)
spork (>= 0.6.0)
sqlite3 (1.3.7)
sqlite3-ruby (1.2.5)
structured_warnings (0.1.3)
terminal-table (1.4.5)
test-unit (2.5.4)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
ref
thor (0.17.0)
tilt (1.3.6)
tinymce-rails (3.5.8.1)
railties (>= 3.1.1)
tinymce-rails-langs (0.1)
tinymce-rails (>= 3.4.9)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
uniform_notifier (1.2.0)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
yard (0.8.5.2)
PLATFORMS
ruby
DEPENDENCIES
activerecord-jdbcmysql-adapter
activerecord-jdbcpostgresql-adapter
activerecord-jdbcsqlite3-adapter
awesome_nested_set
bullet
capybara
coderay (~> 1.0.5)
coffee-rails (~> 3.2.1)
cucumber-rails
cucumber-rails-training-wheels
database_cleaner
delayed_job_active_record
execjs
factory_girl_rails (~> 4.0)
fastercsv (~> 1.5.0)
globalize3!
guard-cucumber
guard-rspec
guard-spork
guard-test
htmldiff
i18n-js!
jquery-rails (~> 2.0.3)
jquery-ui-rails
jruby-openssl
launchy (~> 2.1.0)
letter_opener (~> 1.0.0)
loofah
mocha (~> 0.13.1)
mysql
mysql2 (~> 0.3.11)
object-daddy!
openproject_meeting!
pg
prototype-rails
pry-debugger
pry-doc
pry-rails
pry-rescue
pry-stack_explorer
rack-mini-profiler
rails!
rails-dev-tweaks (~> 0.6.1)
rails-footnotes (>= 3.7.5.rc4)
rails_autolink
rb-fsevent
rb-readline
rdoc (>= 2.4.2)
rmagick (>= 1.15.17)
rspec-rails (~> 2.0)
ruby-openid (~> 2.1.4)
ruby-prof
rubytree (~> 0.8.3)
sass-rails (~> 3.2.3)
shoulda (~> 3.1.1)
spork-rails
spork-testunit
sprockets!
sqlite3
sqlite3-ruby (< 1.3)
therubyracer
tinymce-rails
tinymce-rails-langs
uglifier (>= 1.0.3)

@ -1,38 +0,0 @@
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
begin
require 'rdoc/task'
rescue LoadError
require 'rdoc/rdoc'
require 'rake/rdoctask'
RDoc::Task = Rake::RDocTask
end
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'RedmineMeeting'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Bundler::GemHelper.install_tasks
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
task :default => :test

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 296 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

@ -1,14 +1,3 @@
//-- copyright
// OpenProject is a project management system.
//
// Copyright (C) 2012-2013 the OpenProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
.meetings div.meeting {padding-bottom: 1em;}
div.meeting_content {padding-bottom: 2em;}
div.meetings_by_date {padding: 1em 0 1em 2em;}
@ -22,19 +11,19 @@ div.tabular > div { margin: 0;
clear:left;
}
#meeting_agenda_preview fieldset {margin-top: 1em; background: url(draft.png);}
#meeting_minutes_preview fieldset {margin-top: 1em; background: url(draft.png);}
#meeting_agenda_preview fieldset {margin-top: 1em; background: url(<%= asset_path 'draft.png' %>);}
#meeting_minutes_preview fieldset {margin-top: 1em; background: url(<%= asset_path 'draft.png' %>);}
dt.meeting {
background-image: url(meeting.png);
background-image: url(<%= asset_path 'meeting/meeting.png' %>);
}
dt.meeting-agenda {
background-image: url(agenda.png);
background-image: url(<%= asset_path 'meeting/agenda.png' %>);
}
dt.meeting-minutes {
background-image: url(minutes.png);
background-image: url(<%= asset_path 'meeting/minutes.png' %>);
}
div#activity dl.meetings dt span {
padding-left: 15px;

@ -10,7 +10,6 @@
#++
class MeetingAgendasController < MeetingContentsController
unloadable
menu_item :meetings

@ -10,7 +10,6 @@
#++
class MeetingContentsController < ApplicationController
unloadable
include PaginationHelper

@ -10,12 +10,11 @@
#++
class MeetingMinutesController < MeetingContentsController
unloadable
menu_item :meetings
private
def find_content
@content = @meeting.minutes || @meeting.build_minutes
@content_type = "meeting_minutes"

@ -10,7 +10,6 @@
#++
class MeetingsController < ApplicationController
unloadable
around_filter :set_time_zone
before_filter :find_project, :only => [:index, :new, :create]

@ -13,15 +13,15 @@ module MeetingContentsHelper
def can_edit_meeting_content?(content, content_type)
authorize_for(content_type.pluralize, 'update') && content.editable?
end
def saved_meeting_content_text_present?(content)
!content.new_record? && content.text.present? && !content.text.empty?
end
def show_meeting_content_editor?(content, content_type)
can_edit_meeting_content?(content, content_type) && (!saved_meeting_content_text_present?(content) || content.changed?)
end
def meeting_content_context_menu(content, content_type)
menu = []
menu << meeting_agenda_toggle_status_link(content, content_type)
@ -30,13 +30,13 @@ module MeetingContentsHelper
menu << meeting_content_notify_link(content_type, content.meeting) if saved_meeting_content_text_present?(content)
menu.join(" ")
end
def meeting_agenda_toggle_status_link(content, content_type)
content.meeting.agenda.present? && content.meeting.agenda.locked? ?
open_meeting_agenda_link(content_type, content.meeting) :
open_meeting_agenda_link(content_type, content.meeting) :
close_meeting_agenda_link(content_type, content.meeting)
end
def close_meeting_agenda_link(content_type, meeting)
case content_type
when "meeting_agenda"
@ -45,7 +45,7 @@ module MeetingContentsHelper
link_to_if_authorized l(:label_meeting_agenda_close), {:controller => 'meeting_agendas', :action => 'close', :meeting_id => meeting}, :method => :put, :class => "icon icon-lock show-meeting_minutes"
end
end
def open_meeting_agenda_link(content_type, meeting)
case content_type
when "meeting_agenda"
@ -53,15 +53,15 @@ module MeetingContentsHelper
when "meeting_minutes"
end
end
def meeting_content_edit_link(content_type)
link_to l(:button_edit), "#", :class => "icon icon-edit show-#{content_type}", :accesskey => accesskey(:edit), :onclick => "$$('.edit-#{content_type}').invoke('show'); $$('.show-#{content_type}').invoke('hide'); return false;"
end
def meeting_content_history_link(content_type, meeting)
link_to_if_authorized l(:label_history), {:controller => content_type.pluralize, :action => 'history', :meeting_id => meeting}, :class => "icon icon-history show-#{content_type}"
end
def meeting_content_notify_link(content_type, meeting)
link_to_if_authorized l(:label_notify), {:controller => content_type.pluralize, :action => 'notify', :meeting_id => meeting}, :method => :put, :class => "icon icon-notification show-#{content_type}"
end

@ -10,7 +10,6 @@
#++
class Meeting < ActiveRecord::Base
unloadable
self.table_name = 'meetings'

@ -10,7 +10,6 @@
#++
class MeetingAgenda < MeetingContent
unloadable
acts_as_journalized :activity_type => 'meetings',
:activity_permission => :view_meetings,

@ -10,7 +10,6 @@
#++
class MeetingContent < ActiveRecord::Base
unloadable
belongs_to :meeting
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'

@ -10,7 +10,6 @@
#++
class MeetingMinutes < MeetingContent
unloadable
acts_as_journalized :activity_type => 'meetings',
:activity_permission => :view_meetings,

@ -10,7 +10,6 @@
#++
class MeetingParticipant < ActiveRecord::Base
unloadable
belongs_to :meeting
belongs_to :user

@ -10,4 +10,4 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<%= stylesheet_link_tag 'meeting/meeting.css' %>

@ -30,6 +30,4 @@ See doc/COPYRIGHT.rdoc for more details.
<div id="<%= content_type %>_preview" class="wiki"></div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -37,6 +37,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= javascript_tag(show_meeting_content_editor?(content, content_type) ? "$$('.show-#{content_type}').invoke('hide');" : "$$('.edit-#{content_type}').invoke('hide');") %>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -30,6 +30,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= simple_format_without_paragraph @diff.to_html %>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -46,6 +46,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= pagination_links_full @content_versions %>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -58,6 +58,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= hidden_field_tag "copied_meeting_agenda_text", params[:copied_meeting_agenda_text] if params[:copied_meeting_agenda_text].present? %>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -48,6 +48,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= pagination_links_full @meetings, :container => false %>
</p>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -45,6 +45,4 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'openproject_meeting', :plugin => 'openproject_meeting' %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>

@ -0,0 +1,3 @@
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'meeting/meeting.css' %>
<% end %>

@ -1,8 +0,0 @@
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features -r <%= "#{ENV['RAILS_ROOT']}/features" %> -r features --guess
wip: --tags @wip:3 --wip features -r <%= "#{ENV['RAILS_ROOT']}/features" %> -r features --guess
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

@ -13,12 +13,53 @@ require 'rails/engine'
module OpenProject::Meeting
class Engine < ::Rails::Engine
engine_name :openproject_meeting
config.autoload_paths += Dir["#{config.root}/lib/"]
spec = Bundler.environment.specs['openproject-meeting'][0]
initializer 'meeting.register_plugin' do
Redmine::Plugin.register :openproject_meeting do
name 'OpenProject Meeting'
author ((spec.authors.kind_of? Array) ? spec.authors[0] : spec.authors)
author_url spec.homepage
description spec.description
version spec.version
url 'https://www.openproject.org/projects/plugin-meetings'
requires_openproject ">= 3.0.0pre9"
project_module :meetings do
permission :create_meetings, {:meetings => [:new, :create, :copy]}, :require => :member
permission :edit_meetings, {:meetings => [:edit, :update]}, :require => :member
permission :delete_meetings, {:meetings => [:destroy]}, :require => :member
permission :view_meetings, {:meetings => [:index, :show], :meeting_agendas => [:history, :show, :diff], :meeting_minutes => [:history, :show, :diff]}
permission :create_meeting_agendas, {:meeting_agendas => [:update, :preview]}, :require => :member
permission :close_meeting_agendas, {:meeting_agendas => [:close, :open]}, :require => :member
permission :send_meeting_agendas_notification, {:meeting_agendas => [:notify]}, :require => :member
permission :create_meeting_minutes, {:meeting_minutes => [:update, :preview]}, :require => :member
permission :send_meeting_minutes_notification, {:meeting_minutes => [:notify]}, :require => :member
end
Redmine::Search.map do |search|
search.register :meetings
end
menu :project_menu, :meetings, {:controller => 'meetings', :action => 'index'}, :caption => :project_module_meetings, :param => :project_id, :after => :wiki
menu :project_menu, :new_meeting, {:controller => 'meetings', :action => 'new'}, :param => :project_id, :caption => :label_meeting_new, :parent => :meetings
ActiveSupport::Inflector.inflections do |inflect|
inflect.uncountable "meeting_minutes"
end
end
end
initializer 'openproject_meeting.precompile_assets' do |app|
app.config.assets.precompile += ["openproject_meeting.css"]
initializer 'meeting.precompile_assets' do |app|
app.config.assets.precompile += ["meeting.css"]
end
initializer 'openproject_meeting.register_path_to_rspec' do |app|
initializer 'meeting.register_path_to_rspec' do |app|
app.config.plugins_to_test_paths << self.root
end
@ -37,16 +78,17 @@ module OpenProject::Meeting
end
# adds our factories to factory girl's load path
initializer "meetings.register_factories", :after => "factory_girl.set_factory_paths" do |app|
initializer "meeting.register_factories", :after => "factory_girl.set_factory_paths" do |app|
FactoryGirl.definition_file_paths << File.expand_path(self.root.to_s + '/spec/factories') if defined?(FactoryGirl)
end
initializer "meeting.register_hooks" do
require 'open_project/meeting/hooks'
end
config.to_prepare do
require 'redmine/plugin'
require_dependency 'open_project/meeting/hooks'
require 'open_project/meeting/patches/project_patch'
Project.send(:include, Patches::ProjectPatch)
require_dependency 'open_project/meeting/patches/project_patch'
# load classes so that all User.before_destroy filters are loaded
require_dependency 'meeting'
@ -54,43 +96,6 @@ module OpenProject::Meeting
require_dependency 'meeting_minutes'
require_dependency 'meeting_participant'
spec = Bundler.environment.specs['openproject-meeting'][0]
unless Redmine::Plugin.registered_plugins.include?(:openproject_meeting)
Redmine::Plugin.register :openproject_meeting do
name 'OpenProject Meeting'
author ((spec.authors.kind_of? Array) ? spec.authors[0] : spec.authors)
author_url spec.homepage
description spec.description
version spec.version
url 'https://www.openproject.org/projects/plugin-meetings'
requires_openproject ">= 3.0.0pre9"
project_module :meetings do
permission :create_meetings, {:meetings => [:new, :create, :copy]}, :require => :member
permission :edit_meetings, {:meetings => [:edit, :update]}, :require => :member
permission :delete_meetings, {:meetings => [:destroy]}, :require => :member
permission :view_meetings, {:meetings => [:index, :show], :meeting_agendas => [:history, :show, :diff], :meeting_minutes => [:history, :show, :diff]}
permission :create_meeting_agendas, {:meeting_agendas => [:update, :preview]}, :require => :member
permission :close_meeting_agendas, {:meeting_agendas => [:close, :open]}, :require => :member
permission :send_meeting_agendas_notification, {:meeting_agendas => [:notify]}, :require => :member
permission :create_meeting_minutes, {:meeting_minutes => [:update, :preview]}, :require => :member
permission :send_meeting_minutes_notification, {:meeting_minutes => [:notify]}, :require => :member
end
Redmine::Search.map do |search|
search.register :meetings
end
menu :project_menu, :meetings, {:controller => 'meetings', :action => 'index'}, :caption => :project_module_meetings, :param => :project_id, :after => :wiki
menu :project_menu, :new_meeting, {:controller => 'meetings', :action => 'new'}, :param => :project_id, :caption => :label_meeting_new, :parent => :meetings
ActiveSupport::Inflector.inflections do |inflect|
inflect.uncountable "meeting_minutes"
end
end
end
end
end
end

@ -20,3 +20,5 @@ module OpenProject::Meeting
end
end
end
Project.send(:include, OpenProject::Meeting::Patches::ProjectPatch)

@ -11,6 +11,6 @@
module OpenProject
module Meeting
VERSION = "2.5.1.pre5"
VERSION = "3.0.0.rc1"
end
end

@ -11,14 +11,13 @@ Gem::Specification.new do |s|
s.authors = "Finn GmbH"
s.email = "info@finn.de"
s.homepage = "http://www.finn.de"
s.summary = "This plugin adds a meeting module with functionality to plan an agenda and save the minutes of a meeting."
s.description = "This plugin adds a meeting module with functionality to plan an agenda and save the minutes of a meeting."
s.summary = "This OpenProject plugin adds a meeting module with functionality to plan an agenda and save the minutes of a meeting."
s.description = "This OpenProject plugin adds a meeting module with functionality to plan an agenda and save the minutes of a meeting."
s.files = Dir["{app,config,db,lib}/**/*", "Rakefile", "README.rdoc"]
s.files = Dir["{app,config,db,lib}/**/*", "CHANGELOG.md", "README.rdoc"]
s.test_files = Dir["spec/**/*"]
s.add_dependency "rails", "~> 3.2.9"
s.add_development_dependency "sqlite3"
s.add_development_dependency "factory_girl_rails", "~> 4.0"
end

Loading…
Cancel
Save