Skip to content

Commit

Permalink
update to: ruby-2.0.0-p247
Browse files Browse the repository at this point in the history
Also:

- Gemfile updates:
  rake, librarian, shutterbug, guard-sass. guard-livereload,
  thor, capistrano, rvm-capistrano

- Gemfile new gems:
  rack-livereload

- Gemfile removed gems:
  rack-rewrite

- new :environment variable in config.yml

:environment can be 'development' or 'production'

production:
 - delivers minimized javascript resources
 - sets JavaScript variable: Lab.config.environment = 'production'

development:
 - delivers un-minimized javascript resources
 - sets JavaScript variable: Lab.config.environment = 'development'
 - enables rack-livereload (no-longer need to install extension in browser)

Fixed Guardfile for watching top-level markdown files.
  • Loading branch information
stepheneb committed Jul 9, 2013
1 parent 615fd4a commit 6e2bbfe
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
ruby-1.9.3-p392
ruby-2.0.0-p247
22 changes: 12 additions & 10 deletions Gemfile
@@ -1,12 +1,11 @@
source "http://rubygems.org"

gem "rack", "~> 1.5.2"
gem 'rack-rewrite', "~> 1.3.3"

gem "rake", "~> 10.0.4"
gem "rake", "~> 10.1.0"

gem "fog", "~> 1.12.1"
gem "librarian", "~> 0.0.26"
gem "librarian", "~> 0.1.0"

gem "haml", "~> 4.0.0"
gem "sass", "~> 3.2.5"
Expand All @@ -16,12 +15,15 @@ gem 'kramdown', "~> 0.13.8"

# Adds Hash.from_xml method used in Energy2D importer
gem 'active_support', "~> 3"
gem 'i18n', "~> 0.6.4"

gem "grit", "~> 2.5.0"
gem "gitlab-grit", "~> 2.6.0"

gem "mustache", "~> 0.99.4"

gem "shutterbug", :github => 'concord-consortium/shutterbug', :tag => 'v0.0.4'
gem "shutterbug", "~> 0.0.7"

gem "rack-livereload", "~> 0.3.15"

def darwin_only(require_as)
RbConfig::CONFIG['host_os'] =~ /darwin/ && require_as
Expand All @@ -40,9 +42,9 @@ group :development do
# guard related ...
gem "guard", "~> 1.8.1"
gem "guard-haml", "~> 0.4"
gem "guard-sass", "~> 1.3.1"
gem "guard-sass", "~> 1.3.2"
gem "guard-shell", "~> 0.5.1"
gem "guard-livereload", "~> 1.1.3"
gem "guard-livereload", "~> 1.4.0"
gem 'guard-coffeescript', "~> 1.3.2"
gem 'guard-markdown', "~> 0.2.0"
# FS Notification libraries for guard (non-polling)
Expand All @@ -53,9 +55,9 @@ group :development do
gem 'ruby_gntp', "~> 0.3.4"

# deployment related ...
gem "thor", "~> 0.17.0"
gem "capistrano", "~> 2.14.2"
gem "rvm-capistrano", "~> 1.2.6"
gem "thor", "~> 0.18.1"
gem "capistrano", "~> 2.15.5"
gem "rvm-capistrano", "~> 1.4.0"

# debuggers
gem "pry"
Expand Down
108 changes: 33 additions & 75 deletions Gemfile.lock
@@ -1,55 +1,32 @@
GIT
remote: git://github.com/concord-consortium/shutterbug.git
revision: 7c645f2a707c7891778c461aee0096e890e55d00
tag: v0.0.4
specs:
shutterbug (0.0.4)
rack

GEM
remote: http://rubygems.org/
specs:
active_support (3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
archive-tar-minitar (0.5.2)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bourbon (3.1.8)
sass (>= 3.2.0)
thor
builder (3.2.2)
capistrano (2.14.2)
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
chef (11.4.4)
erubis
highline (>= 1.6.9)
json (>= 1.4.4, <= 1.7.7)
mixlib-authentication (>= 1.3.0)
mixlib-cli (~> 1.3.0)
mixlib-config (>= 1.1.2)
mixlib-log (>= 1.3.0)
mixlib-shellout
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1.0)
ohai (>= 0.6.0)
rest-client (>= 1.0.4, < 1.7.0)
yajl-ruby (~> 1.1)
charlock_holmes (0.6.9.4)
coderay (1.0.9)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.2)
coffee-script-source (1.6.3)
debug_inspector (0.0.2)
diff-lcs (1.2.4)
em-websocket (0.5.0)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.5.3)
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.23.0)
execjs (1.4.0)
Expand All @@ -66,7 +43,8 @@ GEM
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.4)
grit (2.5.0)
gitlab-grit (2.6.0)
charlock_holmes (~> 0.6.9)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
Expand All @@ -82,14 +60,14 @@ GEM
guard-haml (0.5)
guard (>= 1.1)
haml (>= 3.0)
guard-livereload (1.1.3)
em-websocket (>= 0.2.0)
guard (>= 1.5.0)
multi_json (~> 1.0)
guard-livereload (1.4.0)
em-websocket (>= 0.5.0)
guard (>= 1.8.0)
multi_json (~> 1.7)
guard-markdown (0.2.0)
guard (>= 0.2.2)
kramdown (~> 0.13.3)
guard-sass (1.3.1)
guard-sass (1.3.2)
guard (>= 1.1.0)
sass (>= 3.1)
guard-shell (0.5.1)
Expand All @@ -98,51 +76,31 @@ GEM
tilt
highline (1.6.19)
http_parser.rb (0.5.3)
ipaddress (0.8.0)
json (1.7.7)
i18n (0.6.4)
kramdown (0.13.8)
librarian (0.0.26)
archive-tar-minitar (>= 0.5.2)
chef (>= 0.10)
librarian (0.1.0)
highline
thor (~> 0.15)
listen (1.2.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
lumberjack (1.0.3)
lumberjack (1.0.4)
method_source (0.8.1)
mime-types (1.23)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.3.0)
mixlib-config (1.1.2)
mixlib-log (1.6.0)
mixlib-shellout (1.1.0)
multi_json (1.7.7)
mustache (0.99.4)
neat (1.2.1)
bourbon (>= 2.1)
sass (>= 3.2)
net-scp (1.1.1)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.6.7)
net-ssh (2.6.8)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.1)
net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0)
nokogiri (1.5.10)
ohai (6.16.0)
ipaddress
mixlib-cli
mixlib-config
mixlib-log
mixlib-shellout
systemu
yajl-ruby
posix-spawn (0.3.6)
pry (0.9.12.2)
coderay (~> 1.0.5)
Expand All @@ -154,59 +112,59 @@ GEM
binding_of_caller (>= 0.7)
pry (~> 0.9.11)
rack (1.5.2)
rack-rewrite (1.3.3)
rake (10.0.4)
rack-livereload (0.3.15)
rack
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
rest-client (1.6.7)
mime-types (>= 1.16)
ruby-hmac (0.4.0)
ruby_gntp (0.3.4)
rvm-capistrano (1.2.7)
rvm-capistrano (1.4.0)
capistrano (>= 2.0.0)
sass (3.2.9)
shutterbug (0.0.7)
rack
slop (3.4.5)
systemu (2.5.2)
thor (0.17.0)
thor (0.18.1)
tilt (1.4.1)
wdm (0.1.0)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
active_support (~> 3)
bourbon (~> 3.1.1)
capistrano (~> 2.14.2)
capistrano (~> 2.15.5)
fog (~> 1.12.1)
grit (~> 2.5.0)
gitlab-grit (~> 2.6.0)
guard (~> 1.8.1)
guard-coffeescript (~> 1.3.2)
guard-haml (~> 0.4)
guard-livereload (~> 1.1.3)
guard-livereload (~> 1.4.0)
guard-markdown (~> 0.2.0)
guard-sass (~> 1.3.1)
guard-sass (~> 1.3.2)
guard-shell (~> 0.5.1)
haml (~> 4.0.0)
i18n (~> 0.6.4)
kramdown (~> 0.13.8)
librarian (~> 0.0.26)
librarian (~> 0.1.0)
mustache (~> 0.99.4)
neat (~> 1.2.0)
pry
pry-nav
pry-stack_explorer
rack (~> 1.5.2)
rack-rewrite (~> 1.3.3)
rake (~> 10.0.4)
rack-livereload (~> 0.3.15)
rake (~> 10.1.0)
rb-fsevent (~> 0.9.3)
rb-inotify (~> 0.9.0)
ruby_gntp (~> 0.3.4)
rvm-capistrano (~> 1.2.6)
rvm-capistrano (~> 1.4.0)
sass (~> 3.2.5)
shutterbug!
thor (~> 0.17.0)
shutterbug (~> 0.0.7)
thor (~> 0.18.1)
wdm (~> 0.1.0)
2 changes: 1 addition & 1 deletion Guardfile
Expand Up @@ -144,7 +144,7 @@ group :build do

# , :api_version => '1.6', :port => '35728'
guard 'livereload' do
watch(/^(server\/public\/).+\.(css|js|html)/)
watch(/^(public\/).+\.(css|js|html)/)
end

guard 'markdown', :kram_ops => { :toc_levels => [2,3,4,5] } do
Expand Down
17 changes: 7 additions & 10 deletions config.ru
@@ -1,10 +1,8 @@
gem 'rack-rewrite', '~> 1.3.3'
require 'rack/rewrite'
require 'rack-livereload'
require 'shutterbug'

PUBLIC_PATH = File.join(Dir.pwd, 'public')
require "./script/setup"
JNLP_APP_PATH = PUBLIC_PATH

require './lib/rack/jnlp.rb'

use Rack::Jnlp
Expand All @@ -15,19 +13,18 @@ use Rack::ContentLength
# shutterbug/shutterbug.js shutterbug/get_png/SHA1
use Shutterbug::Rackapp

# see: https://github.com/johnbintz/rack-livereload
if CONFIG[:environment] == 'development'
use Rack::LiveReload, :min_delay => 200
end

Rack::Mime::MIME_TYPES.merge!({
".ttf" => "font/ttf",
".mml" => "application/xml",
".cml" => "application/xml",
".e2d" => "application/xml"
})

# use Rack::Rewrite do
# r301 '/examples/interactives/interactives.html', '/interactives.html'
# r301 '/examples/interactives/embeddable.html', '/embeddable.html'
# r301 '/examples/interactives/interactives.json', '/interactives.json'
# end

app = Rack::Directory.new PUBLIC_PATH

run app
9 changes: 9 additions & 0 deletions config/config.sample.yml
@@ -1,4 +1,13 @@
---
# environment can be 'development' or 'production'
# production:
# - delivers minimized javascript resources
# - sets JavaScript variable: Lab.config.environment = 'production'
# development:
# - delivers un-minimized javascript resources
# - sets JavaScript variable: Lab.config.environment = 'development'
# - enables rack-livereload
:environment: development
:server:
development:
:hostname: localhost:9292
Expand Down
4 changes: 2 additions & 2 deletions script/check-development-dependencies.rb
Expand Up @@ -2,8 +2,8 @@

require 'json'

@required_ruby_version = "1.9.3"
@required_ruby_patchlevel = 392
@required_ruby_version = "2.0.0"
@required_ruby_patchlevel = 247
@minimum_node_version = "v0.10.0"

def macosx
Expand Down
1 change: 1 addition & 0 deletions script/generate-js-config.rb
Expand Up @@ -29,6 +29,7 @@
CONFIG[:jsconfig][:actualRoot] = "" if CONFIG[:jsconfig][:actualRoot] == nil
CONFIG[:jsconfig][:fontface] = "Open Sans" if CONFIG[:jsconfig][:fontface] == nil
CONFIG[:jsconfig][:dataGamesProxyPrefix] = "DataGames/Games/concord/lab/" if CONFIG[:jsconfig][:dataGamesProxyPrefix] == nil
CONFIG[:jsconfig][:environment] = CONFIG[:environment]

jsconfig = <<HEREDOC
// this file is generated during build process by: ./script/generate-js-config.rb
Expand Down

0 comments on commit 6e2bbfe

Please sign in to comment.