This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
namespace :ember_cli_rails do | |
desc "compile ember and update application.html.erb with ENV vars" | |
task :build => [:ember, :update_env] do | |
end | |
desc 'Build ember app and copies css and js files to rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moment.tz.add({ | |
"zones": { | |
"Africa/Algiers": [ | |
"0:12:12 - LMT 1891_2_15_0_1 0:12:12", | |
"0:9:21 - PMT 1911_2_11 0:9:21", | |
"0 Algeria WE%sT 1940_1_25_2", | |
"1 Algeria CE%sT 1946_9_7 1", | |
"0 - WET 1956_0_29", | |
"1 - CET 1963_3_14 1", | |
"0 Algeria WE%sT 1977_9_21 1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/timezone.rb | |
module TimeZoneHelpers | |
extend ActiveSupport::Concern | |
def self.randomise_timezone! | |
offsets = ActiveSupport::TimeZone.all.group_by(&:formatted_offset) | |
zones = offsets[offsets.keys.sample] # Random offset to better vary the time zone differences | |
Time.zone = zones.sample # Random zone from the offset (can be just 1st, but let's do random) | |
puts "Current rand time zone: #{Time.zone}. Repro: Time.zone = #{Time.zone.name.inspect}" | |
end |