Sha256: a939df1f3b6fa9f8e4b727a5ab1fc9c627598b04f0da14032b3a34b136d09fba

Contents?: true

Size: 414 Bytes

Versions: 15

Compression:

Stored size: 414 Bytes

Contents

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

class UpdateStylesheets < Card::Migration::Core
  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! content: File.read("#{dir}/#{sheetname}.scss")
      end
    end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
card-1.100.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.6 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.5 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.4 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.3 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.2 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.1 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.99.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.98.3 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.98.2 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.98.1 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.98.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.97.0.1 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.97.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.96.8 db/migrate_core_cards/20130920291703_update_stylesheets.rb