Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Use the guides' versions file
Browse files Browse the repository at this point in the history
Fixes #3528
  • Loading branch information
sivakumar-kailasam authored Aug 28, 2018
1 parent 6dfbe39 commit e24968c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ module Helpers

def current_version
require 'open-uri'
versions = JSON.parse(open('https://raw.githubusercontent.com/emberjs/guides.emberjs.com/master/snapshots/versions.json').read)
versions.sort_by! { |version| Gem::Version.new(version[1..-1]) }
@current_version = versions.last
versions = JSON.parse(open('https://guides.emberjs.com/content/versions.json').read)
@current_version = versions['data']['attributes']['current-version']
end

def replace_current_version(input)
Expand Down

0 comments on commit e24968c

Please sign in to comment.