Sha256: 1a1866c8aef61c0fd4242b050bfb9aa0e86e5b9e8b1da425f15f9be2127f11b3

Contents?: true

Size: 677 Bytes

Versions: 16

Compression:

Stored size: 677 Bytes

Contents

require_relative 'abstract_migration_generator'

class Sufia::Models::CachedStatsGenerator < Sufia::Models::AbstractMigrationGenerator
  source_root File.expand_path('../templates', __FILE__)

  desc """
This generator adds the ability to cache usage stats to your application:
 1. Creates several database migrations if they do not exist in /db/migrate
       """

  def banner
    say_status("warning", "ADDING STATS CACHING-RELATED SUFIA MODELS", :yellow)
  end

  # Setup the database migrations
  def copy_migrations
    [
      'create_file_view_stats.rb',
      'create_file_download_stats.rb'
    ].each do |file|
      better_migration_template file
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
sufia-5.0.0 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-5.0.0 lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-6.0.0 lib/generators/sufia/models/cached_stats_generator.rb
sufia-6.0.0 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-6.0.0.rc4 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-6.0.0.rc4 lib/generators/sufia/models/cached_stats_generator.rb
sufia-6.0.0.rc3 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-6.0.0.rc3 lib/generators/sufia/models/cached_stats_generator.rb
sufia-5.0.0.rc1 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-5.0.0.rc1 lib/generators/sufia/models/cached_stats_generator.rb
sufia-6.0.0.rc2 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-6.0.0.rc2 lib/generators/sufia/models/cached_stats_generator.rb
sufia-6.0.0.rc1 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-6.0.0.rc1 lib/generators/sufia/models/cached_stats_generator.rb
sufia-4.3.1 sufia-models/lib/generators/sufia/models/cached_stats_generator.rb
sufia-models-4.3.1 lib/generators/sufia/models/cached_stats_generator.rb