2014-02-25 06:47:09 +08:00
|
|
|
source 'https://rubygems.org/'
|
2011-02-01 09:57:29 +08:00
|
|
|
|
2013-12-04 02:37:34 +08:00
|
|
|
# this has to use 1.8.7 hash syntax to not raise a parser exception on 1.8.7
|
2013-12-03 05:11:53 +08:00
|
|
|
if RUBY_VERSION == "2.0.0"
|
2013-11-22 07:44:22 +08:00
|
|
|
warn "Ruby 2.0 support is untested"
|
2013-12-04 02:37:34 +08:00
|
|
|
ruby '2.0.0', :engine => 'ruby', :engine_version => '2.0.0'
|
2013-12-27 06:32:08 +08:00
|
|
|
elsif RUBY_VERSION == "2.1.0"
|
|
|
|
warn "Ruby 2.1 support is untested"
|
|
|
|
ruby '2.1.0', :engine => 'ruby', :engine_version => '2.1.0'
|
2013-12-04 02:37:34 +08:00
|
|
|
else
|
|
|
|
ruby '1.9.3', :engine => 'ruby', :engine_version => '1.9.3'
|
2013-11-22 07:44:22 +08:00
|
|
|
end
|
|
|
|
|
2013-12-27 06:32:08 +08:00
|
|
|
# enforce the version of bundler itself, to avoid any surprises
|
2014-02-13 01:15:28 +08:00
|
|
|
required_bundler_version = '1.5.1'..'1.5.3'
|
2014-01-16 00:55:59 +08:00
|
|
|
gem 'bundler', [">=#{required_bundler_version.first}", "<=#{required_bundler_version.last}"]
|
2013-12-27 06:32:08 +08:00
|
|
|
|
2014-01-16 00:55:59 +08:00
|
|
|
unless required_bundler_version.include?(Bundler::VERSION)
|
|
|
|
if Bundler::VERSION < required_bundler_version.first
|
|
|
|
bundle_command = "gem install bundler -v #{required_bundler_version.last}"
|
2013-12-27 06:32:08 +08:00
|
|
|
else
|
|
|
|
require 'shellwords'
|
2014-01-16 00:55:59 +08:00
|
|
|
bundle_command = "bundle _#{required_bundler_version.last}_ #{ARGV.map { |a| Shellwords.escape(a) }.join(' ')}"
|
2013-12-27 06:32:08 +08:00
|
|
|
end
|
|
|
|
|
2014-01-16 00:55:59 +08:00
|
|
|
warn "Bundler version #{required_bundler_version.first} is required; you're currently running #{Bundler::VERSION}. Maybe try `#{bundle_command}`."
|
2014-01-14 07:06:20 +08:00
|
|
|
exit 1
|
2013-12-27 06:32:08 +08:00
|
|
|
end
|
|
|
|
|
2013-03-21 04:30:20 +08:00
|
|
|
require File.expand_path("../config/canvas_rails3", __FILE__)
|
|
|
|
|
2014-03-11 00:48:38 +08:00
|
|
|
# force a different lockfile for rails 3
|
|
|
|
if CANVAS_RAILS3
|
|
|
|
Bundler::SharedHelpers.class_eval do
|
|
|
|
class << self
|
|
|
|
def default_lockfile
|
|
|
|
Pathname.new("#{Bundler.default_gemfile}.lock3")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Bundler::Dsl.class_eval do
|
|
|
|
def to_definition(lockfile, unlock)
|
|
|
|
@sources << @rubygems_source unless @sources.include?(@rubygems_source)
|
|
|
|
Definition.new(Bundler.default_lockfile, @dependencies, @sources, unlock, @ruby_version)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-02-25 06:57:19 +08:00
|
|
|
# patch bundler to do github over https
|
2014-02-26 00:47:28 +08:00
|
|
|
unless Bundler::Dsl.private_instance_methods.include?(:_old_normalize_options)
|
|
|
|
class Bundler::Dsl
|
|
|
|
alias_method :_old_normalize_options, :_normalize_options
|
|
|
|
def _normalize_options(name, version, opts)
|
|
|
|
_old_normalize_options(name, version, opts)
|
|
|
|
opts['git'].sub!('git://', 'https://') if opts['git'] && opts['git'] =~ %r{^git://github.com}
|
|
|
|
end
|
2014-02-25 06:57:19 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-12-27 06:32:08 +08:00
|
|
|
platforms :ruby_20, :ruby_21 do
|
2013-12-03 05:11:53 +08:00
|
|
|
gem 'syck', '1.0.1'
|
|
|
|
gem 'iconv', '1.0.3'
|
|
|
|
end
|
|
|
|
|
2013-10-04 07:17:45 +08:00
|
|
|
if CANVAS_RAILS2
|
2013-06-22 03:59:26 +08:00
|
|
|
# If you have a license to rails lts, you can create a vendor/plugins/*/RAILS_LTS yaml file
|
|
|
|
# with the Gemfile `gem` command to use (pointing to the private repo with your username/password).
|
|
|
|
# Otherwise, the free community version of rails lts will be used.
|
|
|
|
lts_file = Dir.glob(File.expand_path("../vendor/plugins/*/RAILS_LTS", __FILE__)).first
|
|
|
|
if lts_file
|
|
|
|
eval(File.read(lts_file))
|
|
|
|
else
|
2013-12-03 05:11:53 +08:00
|
|
|
gem 'rails', :github => 'makandra/rails', :branch => '2-3-lts', :ref => 'e86daf8ff727d5efc0040c876ba00c9444a5d915'
|
2013-06-22 03:59:26 +08:00
|
|
|
end
|
import ActiveModel::Serializers port and convert quizzes api to it
test plan:
- The quiz api should work like it normally does when you don't pass
an 'Accept: application/vnd.api+json' header.
- The quizzes index page and quiz edit page should work like they
always do.
- Testing the Quizzes API for "jsonapi" style:
- For all requests, you MUST have the "Accept" header set to
"application/vnd.api+json"
- Test all the endpoints (PUT, POST, GET, INDEX, DELETE) like you
normally would, except you'll need to format the data according to
the next few steps:
- For "POST" and "PUT" (create and update) requests, you should send
the data like: { "quizzes": [ { id: 1, title: "blah" } ]
- For all requests (except DELETE), you should get back a response
that looks like: { "quizzes": [ { quiz you requested } ]
- For the "delete" action, you should get a "no content" response
and the request should be successful
Change-Id: Ie91deaeb6772cbe52a0fc46a28ab93a4e3036061
Reviewed-on: https://gerrit.instructure.com/25997
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-12-05 03:06:32 +08:00
|
|
|
# AMS needs to be loaded BEFORE authlogic because it defines the constant
|
|
|
|
# "ActiveModel", and aliases ActiveRecord::Errors to ActiveModel::Errors
|
|
|
|
# so Authlogic will use the right thing when it detects that ActiveModel
|
|
|
|
# is defined.
|
2014-03-01 06:17:24 +08:00
|
|
|
gem 'active_model_serializers_rails_2.3', '0.9.0alpha1', :require => 'active_model_serializers'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'authlogic', '2.1.3'
|
2013-10-04 07:17:45 +08:00
|
|
|
else
|
|
|
|
# just to be clear, Canvas is NOT READY to run under Rails 3 in production
|
2014-02-26 03:34:39 +08:00
|
|
|
gem 'rails', '3.2.17'
|
2014-03-01 06:17:24 +08:00
|
|
|
gem 'active_model_serializers', '0.9.0alpha1',
|
|
|
|
:github => 'rails-api/active_model_serializers', :ref => '61882e1e4127facfe92e49057aec71edbe981829'
|
2014-02-26 01:29:24 +08:00
|
|
|
gem 'authlogic', '3.3.0'
|
2013-03-21 04:30:20 +08:00
|
|
|
end
|
2011-09-27 13:28:33 +08:00
|
|
|
|
integrate the active_model-better_errors gem
refs CNVS-6040
This gem will help us output json error responses in the API using error
codes, since by itself ActiveRecord::Errors just deals in human-readable
i18n'd strings, and doesn't store detailed machine-readable information
on the error.
BetterErrors is mostly compatible, there's a few differences that mean I
had to change some unrelated code:
* errors[field_name] always returns an array, even if there's only one
error on the field. This is an improvement IMO.
* errors is indexed by symbol, not by string
* iterating over the errors object now yields
|attr, error_object| rather than |attr, string_message|
This includes a backport of the gem to rails 2.3.
On rails 3, we just use the vanilla gem.
The error codes aren't yet documented in the API docs, support for doing
that will come in a subsequent commit.
test plan: specs, plus you can hit the one api endpoint i've converted
so far -- account authorization configs. try to create an invalid
config, such as adding both cas and ldap configs to the same account,
and verify the error response formatting
Change-Id: Iaadd843ca9ff3f52c64e0256d82b64595c5559fb
Reviewed-on: https://gerrit.instructure.com/26178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-11-09 07:56:31 +08:00
|
|
|
if CANVAS_RAILS2
|
2014-02-26 06:59:17 +08:00
|
|
|
gem 'instructure-active_model-better_errors', '1.6.5.rails2.3', :require => 'active_model/better_errors'
|
integrate the active_model-better_errors gem
refs CNVS-6040
This gem will help us output json error responses in the API using error
codes, since by itself ActiveRecord::Errors just deals in human-readable
i18n'd strings, and doesn't store detailed machine-readable information
on the error.
BetterErrors is mostly compatible, there's a few differences that mean I
had to change some unrelated code:
* errors[field_name] always returns an array, even if there's only one
error on the field. This is an improvement IMO.
* errors is indexed by symbol, not by string
* iterating over the errors object now yields
|attr, error_object| rather than |attr, string_message|
This includes a backport of the gem to rails 2.3.
On rails 3, we just use the vanilla gem.
The error codes aren't yet documented in the API docs, support for doing
that will come in a subsequent commit.
test plan: specs, plus you can hit the one api endpoint i've converted
so far -- account authorization configs. try to create an invalid
config, such as adding both cas and ldap configs to the same account,
and verify the error response formatting
Change-Id: Iaadd843ca9ff3f52c64e0256d82b64595c5559fb
Reviewed-on: https://gerrit.instructure.com/26178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-11-09 07:56:31 +08:00
|
|
|
else
|
|
|
|
gem 'active_model-better_errors', '1.6.7', :require => 'active_model/better_errors'
|
|
|
|
end
|
2013-10-15 03:28:32 +08:00
|
|
|
gem "aws-sdk", '1.21.0'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'uuidtools', '2.1.4'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'barby', '0.5.0'
|
|
|
|
gem 'bcrypt-ruby', '3.0.1'
|
2013-10-08 04:28:45 +08:00
|
|
|
gem 'builder', '3.0.0'
|
2013-12-20 02:07:32 +08:00
|
|
|
gem 'canvas_connect', '0.3.2'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'adobe_connect', '1.0.0'
|
2014-03-20 00:29:03 +08:00
|
|
|
gem 'canvas_webex', '0.13'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'daemons', '1.1.0'
|
|
|
|
gem 'diff-lcs', '1.1.3', :require => 'diff/lcs'
|
2014-02-12 21:50:25 +08:00
|
|
|
unless CANVAS_RAILS2
|
|
|
|
gem 'dynamic_form', '1.1.4'
|
|
|
|
end
|
2013-10-04 07:17:45 +08:00
|
|
|
if CANVAS_RAILS2
|
2013-12-10 02:46:21 +08:00
|
|
|
gem 'encrypted_cookie_store-instructure', '1.0.5', :require => 'encrypted_cookie_store'
|
2013-11-15 04:48:44 +08:00
|
|
|
else
|
2014-03-21 01:01:39 +08:00
|
|
|
gem 'encrypted_cookie_store-instructure', '1.1.2', :require => 'encrypted_cookie_store'
|
2013-03-21 04:30:20 +08:00
|
|
|
end
|
2014-02-14 03:12:32 +08:00
|
|
|
if CANVAS_RAILS2
|
|
|
|
gem 'erubis', '2.7.0'
|
|
|
|
end
|
2013-10-04 07:17:45 +08:00
|
|
|
if CANVAS_RAILS2
|
2014-02-05 02:26:00 +08:00
|
|
|
gem 'fake_arel', '1.5.0'
|
2013-11-15 04:54:05 +08:00
|
|
|
gem 'fake_rails3_routes', '1.0.4'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'journey', '1.0.4'
|
2013-03-21 04:30:20 +08:00
|
|
|
end
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'ffi', '1.1.5'
|
|
|
|
gem 'hairtrigger', '0.2.3'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'ruby2ruby', '2.0.7'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'sass', '3.2.3'
|
|
|
|
gem 'hashery', '1.3.0', :require => 'hashery/dictionary'
|
|
|
|
gem 'highline', '1.6.1'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'hoe', '3.8.1'
|
2013-12-04 04:44:48 +08:00
|
|
|
gem 'i18n', '0.6.8'
|
2013-12-05 04:35:09 +08:00
|
|
|
gem 'i18nema', '0.0.7'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'icalendar', '1.1.5'
|
|
|
|
gem 'jammit', '0.6.6'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'cssmin', '1.0.3'
|
|
|
|
gem 'jsmin', '1.0.1'
|
2013-11-28 01:32:27 +08:00
|
|
|
gem 'json', '1.8.1'
|
2014-03-12 01:24:04 +08:00
|
|
|
gem 'oj', '2.5.5'
|
2013-10-20 01:14:31 +08:00
|
|
|
unless CANVAS_RAILS2
|
|
|
|
gem 'rails-patch-json-encode', '0.0.1'
|
|
|
|
end
|
2011-02-01 09:57:29 +08:00
|
|
|
# native xml parsing, diigo
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'libxml-ruby', '2.6.0', :require => 'xml/libxml'
|
|
|
|
gem 'macaddr', '1.0.0' # macaddr 1.2.0 tries to require 'systemu' which isn't a dependency
|
2013-10-08 04:28:45 +08:00
|
|
|
gem 'mail', '2.5.4'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'treetop', '1.4.15'
|
|
|
|
gem 'polyglot', '0.3.3'
|
2013-12-03 05:11:53 +08:00
|
|
|
gem 'marginalia', '1.1.3', :require => false
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'mime-types', '1.17.2', :require => 'mime/types'
|
2011-02-01 09:57:29 +08:00
|
|
|
# attachment_fu (even the current technoweenie one on github) does not work
|
|
|
|
# with mini_magick 3.1
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'mini_magick', '1.3.2'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'subexec', '0.0.4'
|
2013-11-16 08:14:12 +08:00
|
|
|
gem 'multi_json', '1.8.2'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'netaddr', '1.5.0'
|
|
|
|
gem 'nokogiri', '1.5.6'
|
2013-03-22 07:32:21 +08:00
|
|
|
# oauth gem, with rails3 fixes rolled in
|
2014-01-09 04:47:34 +08:00
|
|
|
gem 'oauth-instructure', '0.4.10', :require => 'oauth'
|
2013-10-08 04:28:45 +08:00
|
|
|
gem 'rack', CANVAS_RAILS2 ? '1.1.3' : '1.4.5'
|
2014-01-01 01:36:54 +08:00
|
|
|
gem 'rake', '10.1.1'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'rdoc', '3.12'
|
2011-09-30 05:47:49 +08:00
|
|
|
gem 'ratom-instructure', '0.6.9', :require => "atom" # custom gem until necessary changes are merged into mainstream
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'rdiscount', '1.6.8'
|
|
|
|
gem 'ritex', '1.0.1'
|
2013-10-04 07:17:45 +08:00
|
|
|
unless CANVAS_RAILS2
|
2013-06-15 01:09:41 +08:00
|
|
|
gem 'routing_concerns', '0.1.0'
|
|
|
|
end
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'rotp', '1.4.1'
|
|
|
|
gem 'rqrcode', '0.4.2'
|
|
|
|
gem 'rscribd', '1.2.0'
|
|
|
|
gem 'net-ldap', '0.3.1', :require => 'net/ldap'
|
2014-03-13 07:29:29 +08:00
|
|
|
gem 'ruby-saml-mod', '0.1.25'
|
2011-04-08 07:01:32 +08:00
|
|
|
gem 'rubycas-client', '2.2.1'
|
2014-03-01 00:05:57 +08:00
|
|
|
gem 'rubyzip', '1.1.0', :require => 'zip', :github => 'rubyzip/rubyzip', :ref => '2697c7ea4fba6dca66acd4793965501b06ea8df6'
|
2013-10-22 04:09:01 +08:00
|
|
|
gem 'zip-zip', '0.2' # needed until plugins use the new namespace
|
2014-02-03 22:44:01 +08:00
|
|
|
gem 'safe_yaml', '0.9.7', :require => false
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'safe_yaml-instructure', '0.8.0', :require => false
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'hashie', '2.0.5'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'sanitize', '2.0.3'
|
2014-03-25 02:05:28 +08:00
|
|
|
gem 'shackles', '1.0.3'
|
2013-12-18 04:10:30 +08:00
|
|
|
unless CANVAS_RAILS2
|
2014-03-22 05:37:32 +08:00
|
|
|
gem 'switchman', '1.1.0'
|
2013-12-18 04:10:30 +08:00
|
|
|
end
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'tzinfo', '0.3.35'
|
|
|
|
gem 'useragent', '0.4.16'
|
|
|
|
gem 'uuid', '2.3.2'
|
2013-10-28 14:23:26 +08:00
|
|
|
if CANVAS_RAILS2
|
2013-12-18 04:12:34 +08:00
|
|
|
gem 'folio-pagination-legacy', '0.0.3', :require => 'folio/rails'
|
2013-12-04 00:39:40 +08:00
|
|
|
gem 'will_paginate', '2.3.15', :require => false
|
2013-10-28 14:23:26 +08:00
|
|
|
else
|
2014-03-07 05:37:31 +08:00
|
|
|
gem 'folio-pagination', '0.0.7', :require => 'folio/rails'
|
2013-12-04 00:39:40 +08:00
|
|
|
gem 'will_paginate', '3.0.4', :require => false
|
2013-10-28 14:23:26 +08:00
|
|
|
end
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'xml-simple', '1.0.12', :require => 'xmlsimple'
|
|
|
|
gem 'foreigner', '0.9.2'
|
|
|
|
gem 'crocodoc-ruby', '0.0.1', :require => 'crocodoc'
|
2011-02-01 09:57:29 +08:00
|
|
|
|
2014-02-25 01:03:49 +08:00
|
|
|
gem 'activesupport-suspend_callbacks', :path => 'gems/activesupport-suspend_callbacks'
|
2014-02-01 01:47:10 +08:00
|
|
|
gem 'adheres_to_policy', :path => 'gems/adheres_to_policy'
|
|
|
|
gem 'canvas_breach_mitigation', :path => 'gems/canvas_breach_mitigation'
|
2014-02-25 01:34:36 +08:00
|
|
|
gem 'canvas_color', :path => 'gems/canvas_color'
|
2014-02-01 01:47:10 +08:00
|
|
|
gem 'canvas_crummy', :path => 'gems/canvas_crummy'
|
|
|
|
gem 'canvas_mimetype_fu', :path => 'gems/canvas_mimetype_fu'
|
|
|
|
gem 'canvas_sanitize', :path => 'gems/canvas_sanitize'
|
2014-03-05 05:39:04 +08:00
|
|
|
gem 'canvas_statsd', :path => 'gems/canvas_statsd'
|
2014-02-01 01:47:10 +08:00
|
|
|
gem 'canvas_stringex', :path => 'gems/canvas_stringex'
|
2014-02-13 02:55:40 +08:00
|
|
|
gem 'canvas_uuid', :path => 'gems/canvas_uuid'
|
2014-02-05 04:53:04 +08:00
|
|
|
gem 'html_text_helper', :path => 'gems/html_text_helper'
|
2014-02-25 01:03:49 +08:00
|
|
|
gem 'lti_outbound', :path => 'gems/lti_outbound'
|
2014-02-13 04:05:32 +08:00
|
|
|
gem 'multipart', :path => 'gems/multipart'
|
2014-02-07 02:33:47 +08:00
|
|
|
gem 'utf8_cleaner', :path => 'gems/utf8_cleaner'
|
2014-02-25 01:03:49 +08:00
|
|
|
gem 'workflow', :path => 'gems/workflow'
|
2014-01-29 05:29:09 +08:00
|
|
|
|
2012-04-19 00:24:58 +08:00
|
|
|
group :assets do
|
Fully adopt Bootstrap & update css to work with it, closes: #CNVS-1344
this commit does the following:
* upgrade bootstrap-sass gem to most recent version
* switches to using bootstrap's normalize.css and forms.css
which fixes a whole bunch of misformatting of how bootstrap
stuff is supposed to look, but changing those 2 affects
a lot of our old stylesheets.
* gets rid of unified_buttons.sass and just uses bootstraps buttons.
.ui-button @extends these because we still have to support .ui-button
for modals & buttonsets. but .button is no longer supported.
* a lot of css file reorganization (there's no more 'blue' and
'normal canvas', there's just canvas)
* a bunch of files had to be tweaked to look good with these changes.
test plan:
This change touches every page in canvas so, no kidding, we need to make
sure every page looks OK. In order to do that:
1. each sprint team needs to give a +1 after they make sure all the
pages in the features they are over look good.
2. the QA person on each team needs to look at the pages for their
teams features for a QA +1
things to look for specifically when testing:
* buttons: this gets rid of all those red 'cancel' links
that are actually buttons, make sure all the buttons you see
look right. if you see 2 plain gray buttons next to each other
like [Save] [Cancel], we should make the primary one blue (by
adding the .btn-primary class)
* Forms: a lot of this change has to do with how form elements look,
especially <select>s, <input>s and <label>s. look at the diffs
for the ones that have the most changes and make sure those look
good, but also check for the ones I missed and make sure those
look good too.
* and just random style changes, if something looks ugly or broken
(and it didn't before), we should fix that.
Also:
just use a link instead of a drop-menu for adding event from sidebar
we used to have a drop down menu for adding events
to cal2 from the sidebar where you'd hit a cog
and it'd ask you if you wanted to add an event or
an assignment. this just simplifies it to an add
icon.
this: http://cl.ly/image/133a2A3q3q1M
instead of: http://cl.ly/image/46463o2s3W0g
Change-Id: I384fe273934bca96bf28423afb1402c7792d8766
Reviewed-on: https://gerrit.instructure.com/15422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2012-12-21 14:46:28 +08:00
|
|
|
gem 'compass-rails', '1.0.3'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'compass', '0.12.2'
|
|
|
|
gem 'chunky_png', '1.2.9'
|
|
|
|
gem 'fssm', '0.2.10'
|
2013-04-10 23:24:51 +08:00
|
|
|
gem 'dress_code', '1.0.2'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'colored', '1.2'
|
|
|
|
gem 'mustache', '0.99.5'
|
|
|
|
gem 'pygments.rb', '0.5.4'
|
|
|
|
gem 'posix-spawn', '0.3.8'
|
|
|
|
gem 'yajl-ruby', '1.1.0'
|
2012-04-19 00:24:58 +08:00
|
|
|
end
|
|
|
|
|
2011-03-01 08:37:39 +08:00
|
|
|
group :mysql do
|
2014-03-24 23:04:46 +08:00
|
|
|
if CANVAS_RAILS3
|
|
|
|
gem 'mysql2', '0.3.15'
|
|
|
|
else
|
|
|
|
gem 'mysql2', '0.2.18'
|
|
|
|
end
|
2011-03-01 08:37:39 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
group :postgres do
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'pg', '0.15.0'
|
2011-03-01 08:37:39 +08:00
|
|
|
end
|
|
|
|
|
2011-05-21 06:15:29 +08:00
|
|
|
group :sqlite do
|
2014-01-23 03:29:28 +08:00
|
|
|
gem 'sqlite3', '1.3.8'
|
2011-05-21 06:15:29 +08:00
|
|
|
end
|
|
|
|
|
2011-02-01 09:57:29 +08:00
|
|
|
group :test do
|
2013-11-27 04:43:48 +08:00
|
|
|
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'simplecov', '0.8.2', :require => false
|
|
|
|
gem 'docile', '1.1.3'
|
|
|
|
gem 'simplecov-rcov', '0.2.3', :require => false
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'bluecloth', '2.0.10' # for generating api docs
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'redcarpet', '3.0.0'
|
2013-12-31 01:38:28 +08:00
|
|
|
gem 'mocha', '1.0.0.alpha', :require => false
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'metaclass', '0.0.2'
|
2013-05-24 03:18:11 +08:00
|
|
|
gem 'thin', '1.5.1'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'eventmachine', '1.0.3'
|
2013-10-04 07:17:45 +08:00
|
|
|
if CANVAS_RAILS2
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'rspec', '1.3.2'
|
|
|
|
gem 'rspec-rails', '1.3.4'
|
2013-10-04 07:17:45 +08:00
|
|
|
else
|
2014-01-17 02:43:39 +08:00
|
|
|
gem 'rspec', '2.14.1'
|
|
|
|
gem 'rspec-rails', '2.14.1'
|
2013-03-22 07:32:21 +08:00
|
|
|
end
|
2013-12-10 09:35:43 +08:00
|
|
|
gem 'sequel', '4.5.0', :require => false
|
2014-01-11 04:17:48 +08:00
|
|
|
gem 'selenium-webdriver', '2.39.0'
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'childprocess', '0.4.0'
|
|
|
|
gem 'websocket', '1.0.7'
|
2014-01-04 06:09:41 +08:00
|
|
|
gem 'webmock', '1.16.1', :require => false
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'addressable', '2.3.5'
|
|
|
|
gem 'crack', '0.4.1'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'yard', '0.8.0'
|
|
|
|
gem 'yard-appendix', '>=0.1.8'
|
|
|
|
gem 'timecop', '0.6.3'
|
2014-03-12 03:21:37 +08:00
|
|
|
if CANVAS_RAILS2
|
|
|
|
gem 'test-unit', '1.2.3'
|
|
|
|
end
|
2014-01-04 02:25:14 +08:00
|
|
|
gem 'bullet', '4.5.0', :require => false
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'uniform_notifier', '1.4.0'
|
2011-02-01 09:57:29 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
group :development do
|
2013-05-01 03:47:24 +08:00
|
|
|
gem 'guard', '1.8.0'
|
2013-10-07 22:07:15 +08:00
|
|
|
gem 'listen', '~>1.3' # pinned to fix guard error
|
2013-03-14 05:05:14 +08:00
|
|
|
gem 'rb-inotify', '~>0.9.0', :require => false
|
2012-12-27 08:14:06 +08:00
|
|
|
gem 'rb-fsevent', :require => false
|
|
|
|
gem 'rb-fchange', :require => false
|
|
|
|
|
2013-02-08 04:57:04 +08:00
|
|
|
# Option to DISABLE_RUBY_DEBUGGING is helpful IDE-based debugging.
|
|
|
|
# The ruby debug gems conflict with the IDE-based debugger gem.
|
|
|
|
# Set this option in your dev environment to disable.
|
|
|
|
unless ENV['DISABLE_RUBY_DEBUGGING']
|
2013-12-27 06:32:08 +08:00
|
|
|
gem 'byebug', '2.4.1', :platforms => [:ruby_20, :ruby_21]
|
2013-12-04 00:39:40 +08:00
|
|
|
gem 'debugger', '1.5.0', :platforms => :ruby_19
|
2011-09-27 13:28:33 +08:00
|
|
|
end
|
2012-12-27 08:14:06 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
group :development, :test do
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'coffee-script', '2.2.0'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'coffee-script-source', '1.6.2' #pinned so everyone's compiled output matches
|
2013-08-21 21:22:00 +08:00
|
|
|
gem 'execjs', '1.4.0'
|
2013-09-20 05:55:34 +08:00
|
|
|
gem 'parallel', '0.5.16'
|
2012-06-13 06:07:14 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
group :i18n_tools do
|
2013-04-18 03:41:39 +08:00
|
|
|
gem 'ruby_parser', '3.1.3'
|
|
|
|
gem 'sexp_processor', '4.2.1'
|
2011-07-16 00:59:22 +08:00
|
|
|
gem 'ya2yaml', '0.30'
|
2011-02-01 09:57:29 +08:00
|
|
|
end
|
|
|
|
|
2011-03-23 07:02:27 +08:00
|
|
|
group :redis do
|
2012-11-14 04:55:14 +08:00
|
|
|
gem 'instructure-redis-store', '1.0.0.2.instructure1', :require => 'redis-store'
|
2012-06-13 00:17:36 +08:00
|
|
|
gem 'redis', '3.0.1'
|
user request throttling
Define the cost of a request as (user cpu + time spent in db queries),
then store that using a leaky bucket algorithm in redis. The algorithm
is slightly modified from a normal leaky bucket, see the comments in the
code.
The parameters (maximum, hwm, outflow) are configurable Settings.
Because this code path is hit on every request, I've tried to keep the
added latency to a minimum.
Uses lua scripting in redis to avoid the latency of an extra round trip
(two round trips with lua, one at the beginning of the request and one
at the end, vs at least three without lua).
closes CNVS-7008
test plan:
* Given the default params, you're not going to ever hit the throttling
limit without making multiple requests in parallel. Normally local dev
environments won't process parallel requests, so you'll want to tweak
the config params.
* Setting.set('request_throttle.hwm', '2')
* Setting.set('request_throttle.outflow', '0.1')
* Make canvas http requests as a logged in user, and verify that after a
few requests in quick succession, you get a 403 response. After
waiting a second for your bucket to fall back below the threshold, you
can make requests again.
* Do the same using the api and sending your access token in the query
string or http auth header.
* This should work correctly with a clustered redis as well.
* If possible it'd be good to test parallel requests as well. The code
should handle this correctly and combine the cost of the parallel
requests, rather than stomping on the values.
Change-Id: I1fdfd4e009d81bd6525bcf45a93437f4c395f129
Reviewed-on: https://gerrit.instructure.com/24256
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-08-21 23:03:42 +08:00
|
|
|
gem 'redis-scripting', '1.0.1'
|
2011-03-23 07:02:27 +08:00
|
|
|
end
|
|
|
|
|
2012-09-25 04:05:43 +08:00
|
|
|
group :cassandra do
|
2014-01-16 05:03:44 +08:00
|
|
|
gem 'cassandra-cql', '1.2.1', :github => 'kreynolds/cassandra-cql', :ref => 'd100be075b04153cf4116da7512892a1e8c0a7e4' #dependency of canvas_cassandra
|
2014-02-07 22:13:11 +08:00
|
|
|
gem 'simple_uuid', '0.4.0'
|
|
|
|
gem 'thrift', '0.8.0'
|
|
|
|
gem 'thrift_client', '0.8.4'
|
2014-01-16 05:03:44 +08:00
|
|
|
gem "canvas_cassandra", path: "gems/canvas_cassandra"
|
2012-09-25 04:05:43 +08:00
|
|
|
end
|
|
|
|
|
2013-06-22 01:09:05 +08:00
|
|
|
group :icu do
|
|
|
|
gem 'ffi-icu', '0.1.2'
|
|
|
|
end
|
|
|
|
|
2011-02-01 09:57:29 +08:00
|
|
|
# Non-standard Canvas extension to Bundler behavior -- load the Gemfiles from
|
|
|
|
# plugins.
|
2013-09-20 05:55:34 +08:00
|
|
|
Dir[File.join(File.dirname(__FILE__), 'vendor/plugins/*/Gemfile')].each do |g|
|
2011-02-01 09:57:29 +08:00
|
|
|
eval(File.read(g))
|
|
|
|
end
|