init
This commit is contained in:
commit
135b14c868
35 changed files with 1363 additions and 0 deletions
6
lib/hitobito_lit.rb
Normal file
6
lib/hitobito_lit.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require 'wagons'
|
||||
# require 'your_wagon_dependencies'
|
||||
require 'hitobito_lit/wagon'
|
||||
|
||||
module HitobitoLit
|
||||
end
|
||||
3
lib/hitobito_lit/version.rb
Normal file
3
lib/hitobito_lit/version.rb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module HitobitoLit
|
||||
VERSION = '0.0.1'
|
||||
end
|
||||
41
lib/hitobito_lit/wagon.rb
Normal file
41
lib/hitobito_lit/wagon.rb
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module HitobitoLit
|
||||
class Wagon < Rails::Engine
|
||||
include Wagons::Wagon
|
||||
|
||||
# Set the required application version.
|
||||
app_requirement '>= 0'
|
||||
|
||||
# Add a load path for this specific wagon
|
||||
config.autoload_paths += %W[
|
||||
#{config.root}/app/abilities
|
||||
#{config.root}/app/domain
|
||||
#{config.root}/app/jobs
|
||||
]
|
||||
|
||||
config.to_prepare do
|
||||
# extend application classes here
|
||||
Group.include Lit::Group
|
||||
end
|
||||
|
||||
initializer 'lit.add_settings' do |_app|
|
||||
Settings.add_source!(File.join(paths['config'].existent, 'settings.yml'))
|
||||
Settings.reload!
|
||||
end
|
||||
|
||||
initializer 'lit.add_inflections' do |_app|
|
||||
ActiveSupport::Inflector.inflections do |inflect|
|
||||
# inflect.irregular 'census', 'censuses'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def seed_fixtures
|
||||
fixtures = root.join('db', 'seeds')
|
||||
ENV['NO_ENV'] ? [fixtures] : [fixtures, File.join(fixtures, Rails.env)]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
11
lib/tasks/license.rake
Normal file
11
lib/tasks/license.rake
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# encoding: utf-8
|
||||
|
||||
namespace :app do
|
||||
namespace :license do
|
||||
task :config do # rubocop:disable Rails/RakeEnvironment
|
||||
@licenser = Licenser.new('hitobito_lit',
|
||||
'TODO: Customer Name',
|
||||
'https://github.com/hitobito/hitobito_lit')
|
||||
end
|
||||
end
|
||||
end
|
||||
20
lib/tasks/spec.rake
Normal file
20
lib/tasks/spec.rake
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# encoding: utf-8
|
||||
|
||||
if Rake::Task.task_defined?('spec:features')
|
||||
# we DO have feature specs in this wagon.
|
||||
Rake::Task['spec:features'].actions.clear
|
||||
namespace :spec do
|
||||
RSpec::Core::RakeTask.new(:features) do |t|
|
||||
t.pattern = './spec/features/**/*_spec.rb'
|
||||
t.rspec_opts = '--tag type:feature'
|
||||
end
|
||||
|
||||
task all: ['spec:features', 'spec']
|
||||
end
|
||||
|
||||
else
|
||||
# we do NOT have feature specs in this wagon.
|
||||
namespace :spec do
|
||||
task all: 'spec'
|
||||
end
|
||||
end
|
||||
9
lib/tasks/tarantula.rake
Normal file
9
lib/tasks/tarantula.rake
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
desc 'Crawl app with tarantula'
|
||||
task :tarantula do # rubocop:disable Rails/RakeEnvironment
|
||||
sh 'rm -rf ../../../tmp/tarantula'
|
||||
sh 'rm -rf ../hitobito/tmp/tarantula'
|
||||
sh "bash -c \"RAILS_ENV=test #{ENV['APP_ROOT']}/bin/with_mysql " \
|
||||
'rake app:tarantula:test"'
|
||||
end
|
||||
Reference in a new issue