lti_twitter_engine 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/images/inst_lti_twitter/banner.png +0 -0
  5. data/app/assets/images/inst_lti_twitter/icon.png +0 -0
  6. data/app/assets/images/inst_lti_twitter/icon_large.png +0 -0
  7. data/app/assets/images/inst_lti_twitter/logo.png +0 -0
  8. data/app/assets/javascripts/inst_lti_twitter/angular_extras/eat_click.js +7 -0
  9. data/app/assets/javascripts/inst_lti_twitter/application.js +4 -0
  10. data/app/assets/javascripts/inst_lti_twitter/lti.js +99 -0
  11. data/app/assets/javascripts/inst_lti_twitter/vendor/angular.min.js +163 -0
  12. data/app/assets/javascripts/inst_lti_twitter/vendor/moment.min.js +6 -0
  13. data/app/assets/stylesheets/inst_lti_twitter/application.css +3 -0
  14. data/app/assets/stylesheets/inst_lti_twitter/lti.css.erb +59 -0
  15. data/app/controllers/inst_lti_twitter/api_controller.rb +77 -0
  16. data/app/controllers/inst_lti_twitter/application_controller.rb +9 -0
  17. data/app/controllers/inst_lti_twitter/lti_controller.rb +11 -0
  18. data/app/views/inst_lti_twitter/lti/index.html.erb +125 -0
  19. data/app/views/layouts/inst_lti_twitter/application.html.erb +16 -0
  20. data/config/inst_lti_twitter_config.yml.example +14 -0
  21. data/config/routes.rb +6 -0
  22. data/lib/inst_lti_twitter.rb +17 -0
  23. data/lib/inst_lti_twitter/config.rb +1 -0
  24. data/lib/inst_lti_twitter/engine.rb +15 -0
  25. data/lib/inst_lti_twitter/inst_lti_twitter_config.rb +21 -0
  26. data/lib/inst_lti_twitter/version.rb +3 -0
  27. data/lib/tasks/inst_lti_twitter_tasks.rake +4 -0
  28. data/test/controllers/inst_lti_twitter/api_controller_test.rb +9 -0
  29. data/test/controllers/inst_lti_twitter/lti_controller_test.rb +9 -0
  30. data/test/dummy/README.rdoc +28 -0
  31. data/test/dummy/Rakefile +6 -0
  32. data/test/dummy/app/assets/javascripts/application.js +13 -0
  33. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  34. data/test/dummy/app/controllers/application_controller.rb +5 -0
  35. data/test/dummy/app/helpers/application_helper.rb +2 -0
  36. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  37. data/test/dummy/bin/bundle +3 -0
  38. data/test/dummy/bin/rails +4 -0
  39. data/test/dummy/bin/rake +4 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +23 -0
  42. data/test/dummy/config/boot.rb +5 -0
  43. data/test/dummy/config/database.yml +25 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +29 -0
  46. data/test/dummy/config/environments/production.rb +80 -0
  47. data/test/dummy/config/environments/test.rb +36 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy/config/initializers/secret_token.rb +12 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy/config/locales/en.yml +23 -0
  56. data/test/dummy/config/routes.rb +3 -0
  57. data/test/dummy/db/development.sqlite3 +0 -0
  58. data/test/dummy/db/test.sqlite3 +0 -0
  59. data/test/dummy/log/development.log +401 -0
  60. data/test/dummy/log/test.log +6 -0
  61. data/test/dummy/public/404.html +58 -0
  62. data/test/dummy/public/422.html +58 -0
  63. data/test/dummy/public/500.html +57 -0
  64. data/test/dummy/public/favicon.ico +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/28f0960538590d2f560d268a62b4a37f +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/2a3f277c2fb4541253b0deffe68c7153 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/2ebe5619d6b8770ad2c9b41f1c50db6f +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/32a37f75dd0338f4129d5e0f8d1cee71 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/3ccd1c565936e4d2231e690812a5a03f +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/3da360372da584de62a6445f59f4f95e +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/41a2eb656aadf139c0c7f33b4dd6771e +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/44c89e51593fa1e32a58d590bc6c4013 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/4f68db553c2adac80345271fb9182b53 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/5000f811fc8ec9c39135aefeb7aafe71 +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/64c9e7e740e2e8390269e5ddc2c56833 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/65813860e88b677bb69b9c0edaea8574 +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/6850ef2030d3057ab841a12a28986e6c +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/6d635ae086a391a31eb576c0b27da029 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/6d7cd3e98f9cfde59a42727772861074 +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/6f919560d562bff72fe271f529bff047 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/70b0fcb1eb6531fb0c004456c93d10cf +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/72b43d90db48ee7a456700f199c64bae +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/7b4d8662cc7fd5d6bc523fb0567c0c7c +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/914cfda4ebcc990241b5c5b6920521ba +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/a3faead580690d4b2a473b7bdcf43370 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/a547d652636a8c119b6e4d4d4def5d09 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/a62bc4559c56306b54a2ae62e98b8126 +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/a82f947884cb8399db2660d3d92f9bfb +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/af5b6d626004c38e2f28bf82089f72b3 +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/b0b4f1b0bbe233682a33d8c2a71f4244 +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/b767c1f732e8eeb94c6b0a8ee806260d +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/b9d0edc35ef052731b612f17559d6a7e +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/c06af4d34b031305f63b9223911ea920 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/c142a2169999053d0cb7af6170d7633f +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/c4e4d54345da90bac6a0409d386e1c9e +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/cb4a0efcb18cc1a1cdcfac488974f368 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/d22cbffd1887f47130c37f80414c2272 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/d2f6c16be8601a48bd8b3095940760a4 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/da52dff1b0a16497a8fe2c32d0fb7755 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/e06cb18ee2c2f53da1abe69b5a50abf0 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/e2cf53a30f09dad8da66597575bfb3f8 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/ebc0b45c4800a10392afff2c596840d7 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/f374b5cf5ed62f835f6933b0573c6666 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/f5f0c1eaa6ea89f8ebedf408a83544e5 +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/f888a90061817d96bd73575f968919d0 +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/f92a94546b8d4365902e0a4c369176d2 +0 -0
  107. data/test/inst_lti_twitter_test.rb +7 -0
  108. data/test/integration/navigation_test.rb +10 -0
  109. data/test/test_helper.rb +15 -0
  110. metadata +291 -0
@@ -0,0 +1,9 @@
1
+ module InstLtiTwitter
2
+ class ApplicationController < ActionController::Base
3
+ before_action :set_default_headers
4
+
5
+ def set_default_headers
6
+ response.headers['X-Frame-Options'] = 'ALLOWALL'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ require_dependency "inst_lti_twitter/application_controller"
2
+
3
+ module InstLtiTwitter
4
+ class LtiController < ApplicationController
5
+
6
+ def index
7
+ @launch_params = params.reject!{ |k,v| ['controller','action'].include? k }
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,125 @@
1
+ <div id="wrapper">
2
+ <div id="header">
3
+ <h3>
4
+ {{headerTitle}}
5
+ </h3>
6
+ </div>
7
+
8
+ <!-- Tweet List -->
9
+ <div id="list" ng-show="currentPage == 'list'">
10
+ <div class="row" id="list">
11
+ <div class="col-xs-12">
12
+ <div id="empty-results" ng-show="tweets.length == 0">
13
+ No recent tweets found.
14
+ </div>
15
+ <table class="table" ng-show="tweets.length > 0" style="margin-bottom: 0px;">
16
+ <tr class="tweet-item" ng-repeat="tweet in tweets">
17
+ <td width="64" style="width: 64px;" class="text-center">
18
+ <img class="tweet-avatar"
19
+ alt="{{tweet.user.name}}" src="{{tweet.user.profile_image_url}}" height="64" width="64">
20
+ </td>
21
+ <td>
22
+ <h5 class="tweet-name">
23
+ <span class="time-ago">{{tweet.created_at|timeAgo}}</span>
24
+ {{tweet.user.name}}
25
+ <small>@{{tweet.user.screen_name}}</small>
26
+ </h5>
27
+ <p class="tweet-desc">
28
+ {{tweet.text}}
29
+ </p>
30
+ </td>
31
+ </tr>
32
+ </table>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <div id="footer" ng-show="currentPage == 'list'">
37
+ <div class="row">
38
+ <div class="col-xs-4">
39
+ <a href="#" ng-click="reloadTweets()" class="btn btn-sm btn-primary" eat-click><i class="icon-refresh" eat-click></i> Refresh</a>
40
+ </div>
41
+ <div class="col-xs-8 text-right" ng-hide="launchParams.embedded">
42
+ <a href="#" ng-click="setup()" class="btn btn-sm btn-warning" eat-click><i class="icon-edit text-right"></i> Modify Search</a>
43
+ <a href="#" ng-click="embed()" class="btn btn-sm btn-success" eat-click><i class="icon-download"></i> Embed</a>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <!-- / Tweet List -->
48
+
49
+ <!-- Setup -->
50
+ <div id="list" ng-show="currentPage == 'setup'">
51
+ <form role="form" ng-submit="reloadTweets()">
52
+ <div class="row" id="list">
53
+ <div class="col-xs-12">
54
+ <div class="padded">
55
+ <div class="alert alert-info">Enter either a hashtag or a twitter username below and click <span class="text-success">Preview</span>. Once you are happy with the results, click the <span class="text-success">Embed</span> button.</div>
56
+ <table style="width: 100%;">
57
+ <tr>
58
+ <td style="width: 47%;">
59
+ <div class="form-group">
60
+ <label for="hashtag" class="control-label">Hashtag</label>
61
+ <div class="input-group">
62
+ <span class="input-group-addon">#</span>
63
+ <input type="text" ng-model="hashtag" class="form-control">
64
+ </div>
65
+ </div>
66
+ </td>
67
+ <td style="width: 6%; text-align: center; padding-top: 10px;">
68
+ or
69
+ </td>
70
+ <td style="width: 47%;">
71
+ <div class="form-group">
72
+ <label for="username" class="control-label">Username</label>
73
+ <div class="input-group">
74
+ <span class="input-group-addon">@</span>
75
+ <input type="text" ng-model="username" class="form-control">
76
+ </div>
77
+ </div>
78
+ </td>
79
+ </tr>
80
+ </table>
81
+ <div class="row">
82
+ <div class="col-xs-12">
83
+ <div class="form-group">
84
+ <label for="max" class="control-label">Number of tweets to show</label>
85
+ <select ng-model="max" ng-options="v for v in [5,10,15,20,25]" class="form-control"></select>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </form>
93
+ </div>
94
+ <div id="footer" ng-show="currentPage == 'setup'">
95
+ <div class="row">
96
+ <div class="col-xs-12 text-right">
97
+ <a href="#" ng-click="reloadTweets()" class="btn btn-sm btn-success" eat-click><i class="icon-edit text-right"></i> Preview</a>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <!-- / Setup -->
102
+
103
+ <!-- Embed -->
104
+ <div id="list" ng-show="currentPage == 'embed'">
105
+ <div class="row" id="list">
106
+ <div class="col-xs-12">
107
+ <div class="padded">
108
+ <p>You're not in a system that supports auto-inserting content, so you'll need to copy and past the following code by hand in order to insert it into your content.</p>
109
+
110
+ <textarea class="form-control" rows="6"><iframe src="{{embedData.url}}" title="{{embedData.title}}" width="{{embedData.width}}" height="{{embedData.height}}" /></textarea>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <div id="footer" ng-show="currentPage == 'embed'">
116
+ <div class="row">
117
+ <div class="col-xs-12 text-right">
118
+ <a href="#" ng-click="setup()" class="btn btn-sm btn-warning" eat-click><i class="icon-edit text-right"></i> Modify Search</a>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ <!-- / Embed -->
123
+
124
+ </div>
125
+
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html ng-app="App">
3
+ <head>
4
+ <title>Twitter LTI</title>
5
+ <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
6
+ <%= stylesheet_link_tag "inst_lti_twitter/application", media: "all" %>
7
+ <%= javascript_include_tag "inst_lti_twitter/application" %>
8
+ <script type="text/javascript">
9
+ window.ROOT_URL = '<%= root_url %>';
10
+ window.LAUNCH_PARAMS = <%= raw(@launch_params.to_json) %>;
11
+ </script>
12
+ </head>
13
+ <body ng-controller="Twitter">
14
+ <%= yield %>
15
+ </body>
16
+ </html>
@@ -0,0 +1,14 @@
1
+ default: &default
2
+ inst_lti_twitter_consumer_key: INST_LTI_TWITTER_CONSUMER_KEY
3
+ inst_lti_twitter_consumer_secret: INST_LTI_TWITTER_CONSUMER_SECRET
4
+ inst_lti_twitter_access_token: INST_LTI_TWITTER_ACCESS_TOKEN
5
+ inst_lti_twitter_access_token_secret: INST_LTI_TWITTER_ACCESS_TOKEN_SECRET
6
+
7
+ development:
8
+ <<: *default
9
+
10
+ test:
11
+ <<: *default
12
+
13
+ production:
14
+ <<: *default
@@ -0,0 +1,6 @@
1
+ InstLtiTwitter::Engine.routes.draw do
2
+ root to: "lti#index"
3
+ match "/" => "lti#index", via: [:get, :post]
4
+ get "/api/tweets" => "api#tweets"
5
+ post "/api/embed" => "api#embed"
6
+ end
@@ -0,0 +1,17 @@
1
+ require 'ostruct'
2
+ require 'ims'
3
+ require 'inst_lti_twitter/inst_lti_twitter_config'
4
+
5
+ module InstLtiTwitter
6
+ mattr_accessor :app_root
7
+
8
+ def self.setup
9
+ yield self
10
+ end
11
+
12
+ def self.config
13
+ yield(InstLtiTwitter::Config)
14
+ end
15
+ end
16
+
17
+ require 'inst_lti_twitter/engine'
@@ -0,0 +1 @@
1
+ InstLtiTwitter::Config = OpenStruct.new
@@ -0,0 +1,15 @@
1
+ module InstLtiTwitter
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace InstLtiTwitter
4
+
5
+ initializer "lti_provider.load_app_instance_data" do |app|
6
+ InstLtiTwitter.setup do |config|
7
+ config.app_root = app.root
8
+ end
9
+ end
10
+
11
+ initializer "lti_provider.lti_config" do |app|
12
+ InstLtiTwitter::InstLtiTwitterConfig.setup!
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,21 @@
1
+ module InstLtiTwitter
2
+ module InstLtiTwitterConfig
3
+ def self.load_config
4
+ YAML::load(File.open(config_file))[Rails.env]
5
+ end
6
+
7
+ def self.config_file
8
+ InstLtiTwitter.app_root.join('config/inst_lti_twitter_config.yml')
9
+ end
10
+
11
+ def self.setup!
12
+ if File.exists?(config_file)
13
+ Rails.logger.info "Loading environment variables in #{config_file}"
14
+ config = load_config
15
+ config.map { |k, v| ENV[k.upcase] = v }
16
+ else
17
+ raise "Warning: File does not exist: #{config_file} for #{Rails.env})."
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ module InstLtiTwitter
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :inst_lti_twitter do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module InstLtiTwitter
4
+ class ApiControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ module InstLtiTwitter
4
+ class LtiControllerTest < ActionController::TestCase
5
+ # test "the truth" do
6
+ # assert true
7
+ # end
8
+ end
9
+ end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "inst_lti_twitter"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000