parent
1931d03d51
commit
898514102b
@ -0,0 +1,19 @@ |
||||
<!---- copyright |
||||
OpenProject Plugins Plugin |
||||
|
||||
Copyright (C) 2013 - 2014 the OpenProject Foundation (OPF) |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program; if not, write to the Free Software |
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
See doc/COPYRIGHT.md for more details. |
||||
|
||||
++--> |
||||
|
||||
# Changelog |
||||
|
||||
* `#29280` Create module for seeding BIM data |
@ -0,0 +1,7 @@ |
||||
# OpenProject Bim Seeder Plugin |
||||
|
||||
Seeds basic data and demo projects for the OpenProject BIM edition. |
||||
|
||||
## Issue Tracker |
||||
|
||||
https://community.openproject.org/projects/bim-seeder/work_packages |
@ -0,0 +1,13 @@ |
||||
module BimSeeder |
||||
module RootSeeder |
||||
def seed_basic_data |
||||
if OpenProject::Configuration['edition'] == 'bim' |
||||
return ::BimSeeder::BasicDataSeeder.new.seed! |
||||
end |
||||
|
||||
super |
||||
end |
||||
end |
||||
end |
||||
|
||||
RootSeeder.prepend BimSeeder::RootSeeder |
@ -0,0 +1,26 @@ |
||||
#!/usr/bin/env ruby |
||||
# This command will automatically be run when you run "rails" with Rails gems |
||||
# installed from the root of your application. |
||||
|
||||
ENGINE_ROOT = File.expand_path('../..', __FILE__) |
||||
ENGINE_PATH = File.expand_path('../../lib/open_project/bim_seeder/engine', __FILE__) |
||||
|
||||
# Set up gems listed in the Gemfile. |
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) |
||||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) |
||||
|
||||
## |
||||
# This is not ideal but better than nothing. |
||||
if ENV['OPENPROJECT_ROOT'] |
||||
# /Users/mkahl/dev/openproject/release/lib |
||||
path = Pathname(ENV["OPENPROJECT_ROOT"]).join("lib") |
||||
$LOAD_PATH.unshift(path.to_s) |
||||
else |
||||
puts |
||||
puts "Error: please define OPENPROJECT_ROOT pointing to your OpenProject core's root directory" |
||||
puts |
||||
Kernel.exit(1) |
||||
end |
||||
|
||||
require 'rails/all' |
||||
require 'rails/engine/commands' |
@ -0,0 +1,5 @@ |
||||
module OpenProject |
||||
module BimSeeder |
||||
require "open_project/bim_seeder/engine" |
||||
end |
||||
end |
@ -0,0 +1 @@ |
||||
require 'open_project/bim_seeder' |
@ -0,0 +1,18 @@ |
||||
# encoding: UTF-8 |
||||
$:.push File.expand_path("../lib", __FILE__) |
||||
$:.push File.expand_path("../../lib", __dir__) |
||||
|
||||
|
||||
# Describe your gem and declare its dependencies: |
||||
Gem::Specification.new do |s| |
||||
s.name = "openproject-bim_seeder" |
||||
|
||||
s.authors = "OpenProject GmbH" |
||||
s.email = "info@openproject.org" |
||||
s.homepage = "https://community.openproject.org/projects/openproject-bim-seeder" # TODO check this URL |
||||
s.summary = 'OpenProject BIM Seeder' |
||||
s.license = "GPLv3" |
||||
s.version = "1.0.0" |
||||
|
||||
s.files = Dir["{app,lib}/**/*"] + %w(CHANGELOG.md README.md) |
||||
end |
Loading…
Reference in new issue