Sha256: 16917520a8664b3910dc479607366e9cfd35da44345684fdfa8bba7780424276

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

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

class UpdateStylesheets < Cardio::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

5 entries across 5 versions & 1 rubygems

Version Path
card-1.101.4 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.101.3 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.101.2 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.101.1 db/migrate_core_cards/20130920291703_update_stylesheets.rb
card-1.101.0 db/migrate_core_cards/20130920291703_update_stylesheets.rb