Sha256: eaef5dfe5d03528c2a50d3c4d25a4f35066ff5ae4c16d45edfee6a9a5684c4e8

Contents?: true

Size: 454 Bytes

Versions: 57

Compression:

Stored size: 454 Bytes

Contents

module LocaleappSynchronizationData
  def self.file(dir)
    File.join(dir, 'test_sync.yml')
  end

  def self.setup(polled_at=nil, updated_at=nil)
    polled_at  ||= Time.now.to_i
    updated_at ||= Time.now.to_i

    @dir  = Dir.mktmpdir
    @file = file(@dir)
    File.open(@file, 'w+') do |f|
      f.write({ :polled_at  => polled_at, :updated_at => updated_at }.to_yaml)
    end
    @file
  end

  def self.destroy
    FileUtils.rm_rf @dir
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
localeapp-3.3.0 spec/support/localeapp_synchronization_data.rb
localeapp-3.2.0 spec/support/localeapp_synchronization_data.rb
localeapp-3.1.3 spec/support/localeapp_synchronization_data.rb
localeapp-3.1.2 spec/support/localeapp_synchronization_data.rb
localeapp-3.1.1 spec/support/localeapp_synchronization_data.rb
localeapp-3.1.0 spec/support/localeapp_synchronization_data.rb
localeapp-3.0.1 spec/support/localeapp_synchronization_data.rb
localeapp-3.0.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.5.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.4.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.3.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.2.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.1.1 spec/support/localeapp_synchronization_data.rb
localeapp-2.1.0 spec/support/localeapp_synchronization_data.rb
localeapp-2.0.0 spec/support/localeapp_synchronization_data.rb
localeapp-1.0.2 spec/support/localeapp_synchronization_data.rb
localeapp-1.0.1 spec/support/localeapp_synchronization_data.rb
localeapp-1.0.0 spec/support/localeapp_synchronization_data.rb
localeapp-0.9.3 spec/support/localeapp_synchronization_data.rb
localeapp-0.9.2 spec/support/localeapp_synchronization_data.rb