Sha256: 83347ab773da390723ac44f3e92a51eec5ccb0172583db49706d2946f20bbde6

Contents?: true

Size: 1022 Bytes

Versions: 1

Compression:

Stored size: 1022 Bytes

Contents

# frozen_string_literal: true

gem 'demingfactor-paper_trail_manager', path: __FILE__ + '/../../../'

unless File.exist?('app/assets/config/manifest.js')
  create_file 'app/assets/config/manifest.js'
  append_to_file 'app/assets/config/manifest.js', "//= link application.css\n"
  append_to_file 'app/assets/config/manifest.js', "//= link application.js\n"
end

generate 'paper_trail:install'
generate 'resource', 'entity name:string status:string --no-controller-specs --no-helper-specs'
generate 'resource', 'platform name:string status:string --no-controller-specs --no-helper-specs'

remove_file 'spec/models/entity_spec.rb'
remove_file 'spec/models/platform_spec.rb'

model_body = <<-MODEL
  has_paper_trail

  validates_presence_of :name
  validates_presence_of :status
MODEL

inject_into_class 'app/models/entity.rb', 'Entity', model_body
inject_into_class 'app/models/platform.rb', 'Platform', model_body

route "resources :changes, :controller => 'paper_trail_manager/changes'"

rake 'db:migrate db:test:prepare'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
demingfactor-paper_trail_manager-0.7.3 spec/app_template.rb