Skip to content

Commit

Permalink
Use the guides' versions file
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakumar-kailasam authored and chrisrng committed Aug 28, 2018
1 parent a1e430e commit 17b9db7
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 17b9db7

Please sign in to comment.