lti_skydrive 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +20 -0
- data/app/assets/fonts/skydrive/font/FontAwesome.otf +0 -0
- data/app/assets/fonts/skydrive/font/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/skydrive/font/fontawesome-webfont.svg +399 -0
- data/app/assets/fonts/skydrive/font/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/skydrive/font/fontawesome-webfont.woff +0 -0
- data/app/assets/images/skydrive/banner.png +0 -0
- data/app/assets/images/skydrive/icon-file.png +0 -0
- data/app/assets/images/skydrive/icon-folder-back.png +0 -0
- data/app/assets/images/skydrive/icon-folder.png +0 -0
- data/app/assets/images/skydrive/icon-jpg.png +0 -0
- data/app/assets/images/skydrive/icon-pdf.png +0 -0
- data/app/assets/images/skydrive/icon-png.png +0 -0
- data/app/assets/images/skydrive/icon-word.png +0 -0
- data/app/assets/images/skydrive/logo.png +0 -0
- data/app/assets/images/skydrive/office_365.jpg +0 -0
- data/app/assets/images/skydrive/skydrive_icon.png +0 -0
- data/app/assets/javascripts/skydrive/application.js +16 -0
- data/app/assets/javascripts/skydrive/vendor/ember.js +23 -0
- data/app/assets/javascripts/skydrive/vendor/handlebars.js +362 -0
- data/app/assets/javascripts/skydrive/vendor/jquery.js +9597 -0
- data/app/assets/stylesheets/skydrive/app.css +5617 -0
- data/app/assets/stylesheets/skydrive/font-awesome/font-awesome.min.css +403 -0
- data/app/assets/stylesheets/skydrive/normalize.css +405 -0
- data/app/assets/stylesheets/skydrive/style.css +27 -0
- data/app/controllers/skydrive/api_keys_controller.rb +13 -0
- data/app/controllers/skydrive/application_controller.rb +40 -0
- data/app/controllers/skydrive/ember_controller.rb +23 -0
- data/app/controllers/skydrive/files_controller.rb +62 -0
- data/app/controllers/skydrive/launch_controller.rb +152 -0
- data/app/controllers/skydrive/session_controller.rb +12 -0
- data/app/controllers/skydrive/users_controller.rb +34 -0
- data/app/helpers/skydrive/application_helper.rb +4 -0
- data/app/helpers/skydrive/ember_helper.rb +4 -0
- data/app/models/skydrive/api_key.rb +47 -0
- data/app/models/skydrive/lti_key.rb +10 -0
- data/app/models/skydrive/token.rb +14 -0
- data/app/models/skydrive/user.rb +28 -0
- data/app/serializers/api_key_serializer.rb +5 -0
- data/app/serializers/user_serializer.rb +5 -0
- data/app/views/layouts/skydrive/application.html.erb +21 -0
- data/app/views/skydrive/ember/index.html.erb +20 -0
- data/config/initializers/sharepoint.rb +1 -0
- data/config/routes.rb +24 -0
- data/config/sharepoint.yml.example +17 -0
- data/db/migrate/20130710195807_create_users.rb +11 -0
- data/db/migrate/20130710195819_create_api_keys.rb +15 -0
- data/db/migrate/20130722173006_add_skydrive_token_storage.rb +15 -0
- data/db/migrate/20130725183724_add_client_domain_to_skydrive_tokens.rb +5 -0
- data/db/migrate/20130726170108_add_personal_url_to_skydrive_token.rb +5 -0
- data/db/migrate/20130730164700_add_init_params_to_api_key.rb +5 -0
- data/db/migrate/20130801181008_create_lti_keys.rb +9 -0
- data/db/migrate/20130802231147_change_skydrive_token_length.rb +6 -0
- data/db/migrate/20140103221052_skydrive_namespace.rb +13 -0
- data/lib/skydrive/client.rb +161 -0
- data/lib/skydrive/engine.rb +16 -0
- data/lib/skydrive/file.rb +49 -0
- data/lib/skydrive/folder.rb +13 -0
- data/lib/skydrive/version.rb +3 -0
- data/lib/skydrive.rb +4 -0
- data/lib/skydrive_proxy.rb +33 -0
- data/lib/tasks/ember.rake +48 -0
- data/lib/tasks/lti_key.rake +8 -0
- data/test/controllers/skydrive/ember_controller_test.rb +11 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +25 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/sharepoint.yml +15 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +60 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +6484 -0
- data/test/dummy/log/test.log +2958 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/00546f7f6da41f471084ed2589ca4442 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/049dac97744466d4435aa8de57cc6099 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0c92f67702b0dbd50edf7e6be63359ca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0d26053221de21901f734bd6ba75bb28 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0e383306a92ebd12d003a9e49ef6d508 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/16fa9bed5ef4abda841d3ef00e727580 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/17588b92c903e02837946f638eca86db +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/21900b90dba7acf710178f3cd9dad43b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/25efc08f115a66b9c241a48e80a207ca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3064fc29e24c9e97f7aad24f7e899cf6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/311d9a5a43eb3fee9bba76971680620f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/35a147c1af5b608250e82ccb2f569d4b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3dd0eb5a85d766c8d9fe5b29014edee4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/63616bfc6c3f0267d5951cbbc83308cd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/65aa42ce50eac6f72e31861670f94518 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/66a8e9d3d86505dece06e6dd0edd18e1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/78c4cbc0498be843f50ebdd02e2ead2f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7caeca69c3c375c50a3c8cad8584be79 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7d2b5e5332f464f65bf745d12ed9cbaa +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e229ef6d57ba0e9f562cc129a3e4dfc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/87149d8992d83d7a95023dbfa4b53907 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8bf6a6b96f5c827206f1fd42babe6c5e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8c2066f7cc911ab8803cab8fea4e8bd6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9157ff048f219d7abc8b0f0fda771c92 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a17c28776c4a2887f0fff4893854ef1d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a29fed21bbc3985a31325c84a77e5f26 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a3119da5b51c1a0a3c5cb7414ec920f5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a674526f54bc8458ebe36912ef85f003 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aa904c0cc06f37bb0df493db59f18d70 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/adfa454123f4741a4b3919023b570d82 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/af6eedeceb4b732776dca83f456b2b93 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b40cb2ddb88705f771e77d872feacf6a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/bf64c92410e28e00afb6139c5d4c61b9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc6268ee4fa18069ce7c21888ea1932e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/df9900b8557146382d16cc592306b17f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e3caec07cb46343e49b4f060e2d3392a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e6ebfb0e93a47d0164d0fc4637054c38 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ecb48e7374f399434aedbf30716e489a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eeb495bc326785d2a6a14cf6d97024e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef91e47e51f204a8373f160f13a05a30 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f48290aae486ea863a9f456ba96443e9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fa078ac6abaaee94445294c5a7c6d793 +0 -0
- data/test/helpers/skydrive/ember_helper_test.rb +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/skydrive_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +375 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
Dummy::Application.config.secret_key_base = 'e5b3ea908abce0f8f00e313de72ff94345b074e30b4120a06bba04bcb0d48029db73ca838c7bddacb8c6a1f2fc2048f5fc50ab3d4c4c71c7cc50a5d369bf5d73'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
defaults: &defaults
|
2
|
+
guid: 00000003-0000-0ff1-ce00-000000000000
|
3
|
+
|
4
|
+
development:
|
5
|
+
<<: *defaults
|
6
|
+
client_id: 85a3090e-e825-421d-8ac2-3b59225993b2
|
7
|
+
client_secret: 3t61a9B3K3kv2jaULkd3/rmUxtWZL7ieQcQc6+9eHXE=
|
8
|
+
|
9
|
+
test:
|
10
|
+
<<: *defaults
|
11
|
+
client_id: 85a3090e-e825-421d-8ac2-3b59225993b2
|
12
|
+
client_secret: 3t61a9B3K3kv2jaULkd3/rmUxtWZL7ieQcQc6+9eHXE=
|
13
|
+
|
14
|
+
production:
|
15
|
+
<<: *defaults
|
Binary file
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20140103221052) do
|
15
|
+
|
16
|
+
create_table "skydrive_api_keys", force: true do |t|
|
17
|
+
t.integer "user_id"
|
18
|
+
t.string "access_token"
|
19
|
+
t.string "scope"
|
20
|
+
t.string "oauth_code"
|
21
|
+
t.datetime "expired_at"
|
22
|
+
t.datetime "created_at"
|
23
|
+
t.text "init_params"
|
24
|
+
end
|
25
|
+
|
26
|
+
add_index "skydrive_api_keys", ["access_token"], name: "index_skydrive_api_keys_on_access_token"
|
27
|
+
add_index "skydrive_api_keys", ["oauth_code"], name: "index_skydrive_api_keys_on_oauth_code"
|
28
|
+
add_index "skydrive_api_keys", ["user_id"], name: "index_skydrive_api_keys_on_user_id"
|
29
|
+
|
30
|
+
create_table "skydrive_lti_keys", force: true do |t|
|
31
|
+
t.string "key"
|
32
|
+
t.string "secret"
|
33
|
+
end
|
34
|
+
|
35
|
+
add_index "skydrive_lti_keys", ["key"], name: "index_skydrive_lti_keys_on_key"
|
36
|
+
|
37
|
+
create_table "skydrive_tokens", force: true do |t|
|
38
|
+
t.integer "user_id"
|
39
|
+
t.string "token_type"
|
40
|
+
t.text "access_token", limit: 255
|
41
|
+
t.integer "expires_in"
|
42
|
+
t.text "refresh_token", limit: 255
|
43
|
+
t.datetime "not_before"
|
44
|
+
t.datetime "expires_on"
|
45
|
+
t.string "resource"
|
46
|
+
t.string "client_domain"
|
47
|
+
t.string "personal_url"
|
48
|
+
end
|
49
|
+
|
50
|
+
add_index "skydrive_tokens", ["user_id"], name: "index_skydrive_tokens_on_user_id"
|
51
|
+
|
52
|
+
create_table "skydrive_users", force: true do |t|
|
53
|
+
t.string "name"
|
54
|
+
t.string "username"
|
55
|
+
t.string "email"
|
56
|
+
t.datetime "created_at"
|
57
|
+
t.datetime "updated_at"
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
Binary file
|