Sha256: 966c3f2dfc2df550967c16352872e97b2730baa5862e7b72a1106b6dc4b87f8f

Contents?: true

Size: 426 Bytes

Versions: 14

Compression:

Stored size: 426 Bytes

Contents

# -*- encoding : utf-8 -*-

class UpdateStylesheets < Card::CoreMigration
  def up
    dir = File.join data_path, '1.12_stylesheets'
    %w{ common traditional }.each do |sheetname|
      card = Card["style: #{sheetname}"]
      if card && card.pristine?
        card.update_attributes! content: File.read("#{dir}/#{sheetname}.scss")
      end
    end

    if (c = Card['*all+*style+file'])
      c.delete!
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
card-1.17.4 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.17.3 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.17.2 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.17.1 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.17.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.15 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.14 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.13 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.12 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.11 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.10 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.9 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.8 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.16.7 db/migrate_core_cards/20130920291703_update_stylesheets.rb