Skip to content
This repository was archived by the owner on Mar 22, 2019. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq s3cmd
script: bundle exec rake checkout_ember build
after_success: bundle exec rake versions:deploy_edge
env:
global:
- secure: "cDzdsDPvC6YmYzuOsYXcXXRRadXLGIki6WuuaV6IuVTv0V+x+qSFNZ/KLk97\n4HOmklgM+ub0Nwxs+JhL2sh1ElhXi9hdXMFkSqIYutL6iJwJs6XA89Xfw5wu\nAxSeMzRMQHFugpEMC3Z/Q0G41C5N/bFCX3H2cNdmpFc86qQDZEs="
- secure: "BtJpzh/QjoWue6NXg3nJQcPOfJ19V3Xp0o66hyO3YQphQ1xgKTxIlJSANYDV\nEtzIqUhtvEdeT+WP7btcssjSX+xVh/rhU+iHo5jcIAC+i5mHzOK+FFeZ9Wbu\nkItX3qPxwE+82SotO9jyWaECE/QjpmKlhB54nR0TvgVCdWHhSBI="

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ gem "thin"
gem "rack"
gem "listen"
gem "builder"
gem 'website_versions', :github => "mharris717/website_versions", :branch => "master"

group :development do
gem "pry"
Expand Down
15 changes: 15 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ GIT
specs:
coderay (1.1.0.rc1)

GIT
remote: git://github.com/mharris717/website_versions.git
revision: ac6f59d0ca6c726ee8b1ceaa05c8caa683a56be3
branch: master
specs:
website_versions (0.1.0)
grit
rake

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -35,6 +44,10 @@ GEM
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
fssm (0.2.10)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
haml (4.0.3)
tilt
highline (1.6.19)
Expand Down Expand Up @@ -99,6 +112,7 @@ GEM
capybara (~> 2.1.0)
faye-websocket (>= 0.4.4, < 0.5.0)
http_parser.rb (~> 0.5.3)
posix-spawn (0.3.6)
pry (0.9.6)
coderay (>= 0.9.8)
method_source (>= 0.6.5)
Expand Down Expand Up @@ -174,3 +188,4 @@ DEPENDENCIES
redcarpet
rspec
thin
website_versions!
6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "bundler/setup"
require 'yaml'
load 'lib/versions.rb'

def git_initialize(repository)
unless File.exist?(".git")
Expand All @@ -20,6 +21,11 @@ def ember_path
File.expand_path(ENV['EMBER_PATH'] || File.expand_path("../../ember.js", __FILE__))
end

task :checkout_ember do
repo = "git://github.com/emberjs/ember.js.git"
system "git clone #{repo} #{ember_path}"
end

def generate_docs
print "Generating docs data from #{ember_path}... "

Expand Down
2 changes: 2 additions & 0 deletions lib/versions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'website_versions'
WebsiteVersions.tags = %w(v0.9.1 v0.9.5 v1.0.0-pre.4 v1.0.0-pre.2 v1.0.0-rc.2)
1 change: 1 addition & 0 deletions source/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<%= link_to_page "api", "/api" %>
<%= link_to_page "community", "/community" %>
<%= link_to_page "blog", "/blog" %>
<%= link_to_page "Old Docs", "/versioned_docs" %>

<li id="search">
<form>
Expand Down
10 changes: 10 additions & 0 deletions source/versioned_docs/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<br>
<h1>Ember.js Versioned Documentation</h1>

<ul>
<% WebsiteVersions.each_tag do |version,bucket,url| %>
<li>
<a href="<%= url %>">Version <%= version %></a>
</li>
<% end %>
</ul>