coalescing_panda 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/coalescing_panda/lti_controller.rb +1 -0
  3. data/app/models/coalescing_panda/assignment.rb +8 -0
  4. data/app/models/coalescing_panda/canvas_api_auth.rb +0 -2
  5. data/app/models/coalescing_panda/course.rb +11 -0
  6. data/app/models/coalescing_panda/enrollment.rb +8 -0
  7. data/app/models/coalescing_panda/lti_account.rb +10 -6
  8. data/app/models/coalescing_panda/lti_nonce.rb +0 -2
  9. data/app/models/coalescing_panda/section.rb +9 -0
  10. data/app/models/coalescing_panda/session.rb +0 -1
  11. data/app/models/coalescing_panda/submission.rb +8 -0
  12. data/app/models/coalescing_panda/term.rb +6 -0
  13. data/app/models/coalescing_panda/user.rb +9 -0
  14. data/app/models/coalescing_panda/workers/course_miner.rb +91 -0
  15. data/db/migrate/20131118211442_create_coalescing_panda_lti_accounts.rb +0 -1
  16. data/db/migrate/20141119225319_create_coalescing_panda_terms.rb +19 -0
  17. data/db/migrate/20141119225721_create_coalescing_panda_courses.rb +22 -0
  18. data/db/migrate/20141120151432_create_coalescing_panda_sections.rb +19 -0
  19. data/db/migrate/20141120151940_create_coalescing_panda_assignments.rb +22 -0
  20. data/db/migrate/20141120152458_create_coalescing_panda_users.rb +19 -0
  21. data/db/migrate/20141120152546_create_coalescing_panda_submissions.rb +19 -0
  22. data/db/migrate/20141120153135_create_coalescing_panda_enrollments.rb +19 -0
  23. data/db/migrate/20141120205729_add_canvas_account_id_to_lti_account.rb +5 -0
  24. data/lib/coalescing_panda/engine.rb +5 -0
  25. data/lib/coalescing_panda/version.rb +1 -1
  26. data/spec/controllers/coalescing_panda/lti_controller_spec.rb +1 -6
  27. data/spec/controllers/coalescing_panda/oauth2_controller_spec.rb +1 -1
  28. data/spec/dummy/config/application.rb +3 -0
  29. data/spec/dummy/db/schema.rb +120 -1
  30. data/spec/factories/accounts.rb +19 -0
  31. data/spec/factories/assignments.rb +9 -0
  32. data/spec/factories/courses.rb +7 -0
  33. data/spec/factories/enrollments.rb +7 -0
  34. data/spec/factories/submissions.rb +8 -0
  35. data/spec/factories/users.rb +29 -0
  36. data/spec/models/coalescing_panda/assignment_spec.rb +18 -0
  37. data/spec/models/coalescing_panda/course_spec.rb +37 -0
  38. data/spec/models/coalescing_panda/enrollment_spec.rb +17 -0
  39. data/spec/models/coalescing_panda/lti_account_spec.rb +17 -0
  40. data/spec/models/coalescing_panda/lti_nonce_spec.rb +5 -0
  41. data/spec/models/coalescing_panda/section_spec.rb +22 -0
  42. data/spec/models/coalescing_panda/submission_spec.rb +18 -0
  43. data/spec/models/coalescing_panda/term_spec.rb +17 -0
  44. data/spec/models/coalescing_panda/user_spec.rb +27 -0
  45. data/spec/rails_helper.rb +45 -0
  46. data/spec/spec_helper.rb +82 -29
  47. metadata +59 -11
@@ -0,0 +1,45 @@
1
+ # Add additional requires below this line. Rails is not loaded until this point!
2
+
3
+ # Requires supporting ruby files with custom matchers and macros, etc, in
4
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
5
+ # run as spec files by default. This means that files in spec/support that end
6
+ # in _spec.rb will both be required and run as specs, causing the specs to be
7
+ # run twice. It is recommended that you do not name files matching this glob to
8
+ # end with _spec.rb. You can configure this pattern with the --pattern
9
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
10
+ #
11
+ # The following line is provided for convenience purposes. It has the downside
12
+ # of increasing the boot-up time by auto-requiring all files in the support
13
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
14
+ # require only the support files necessary.
15
+ #
16
+ # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
17
+
18
+ # Checks for pending migrations before tests are run.
19
+ # If you are not using ActiveRecord, you can remove this line.
20
+ ActiveRecord::Migration.check_pending!
21
+
22
+ RSpec.configure do |config|
23
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
24
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
25
+
26
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
27
+ # examples within a transaction, remove the following line or assign false
28
+ # instead of true.
29
+ config.use_transactional_fixtures = true
30
+
31
+ # RSpec Rails can automatically mix in different behaviours to your tests
32
+ # based on their file location, for example enabling you to call `get` and
33
+ # `post` in specs under `spec/controllers`.
34
+ #
35
+ # You can disable this behaviour by removing the line below, and instead
36
+ # explicitly tag your specs with their type, e.g.:
37
+ #
38
+ # RSpec.describe UsersController, :type => :controller do
39
+ # # ...
40
+ # end
41
+ #
42
+ # The different available types are documented in the features, such as in
43
+ # https://relishapp.com/rspec/rspec-rails/docs
44
+ config.infer_spec_type_from_file_location!
45
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,49 +2,102 @@ ENV["RAILS_ENV"] ||= 'test'
2
2
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
3
3
  require 'rspec/rails'
4
4
  require 'rspec/autorun'
5
- require 'shoulda/matchers/integrations/rspec'
5
+ require 'shoulda/matchers'
6
6
  require 'nokogiri'
7
7
  require 'haml'
8
8
  require 'simplecov'
9
9
 
10
10
  SimpleCov.start
11
11
 
12
- ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
12
+ # ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
13
+ # # Requires supporting ruby files with custom matchers and macros, etc,
14
+ # # in spec/support/ and its subdirectories.
15
+ # Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
13
16
 
14
- # Requires supporting ruby files with custom matchers and macros, etc,
15
- # in spec/support/ and its subdirectories.
16
- Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
17
-
18
- # Checks for pending migrations before tests are run.
19
- # If you are not using ActiveRecord, you can remove this line.
20
17
  ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
21
18
 
19
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
20
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
21
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
22
+ # file to always be loaded, without a need to explicitly require it in any files.
23
+ #
24
+ # Given that it is always loaded, you are encouraged to keep this file as
25
+ # light-weight as possible. Requiring heavyweight dependencies from this file
26
+ # will add to the boot time of your test suite on EVERY test run, even for an
27
+ # individual file that may not need all of that loaded. Instead, consider making
28
+ # a separate helper file that requires the additional dependencies and performs
29
+ # the additional setup, and require it from the spec files that actually need it.
30
+ #
31
+ # The `.rspec` file also contains a few flags that are not defaults but that
32
+ # users commonly want.
33
+ #
34
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
22
35
  RSpec.configure do |config|
23
- # ## Mock Framework
24
- #
25
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
26
- #
27
- # config.mock_with :mocha
28
- # config.mock_with :flexmock
29
- # config.mock_with :rr
30
-
31
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
32
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
33
-
34
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
35
- # examples within a transaction, remove the following line or assign false
36
- # instead of true.
37
- config.use_transactional_fixtures = true
38
-
39
- # If true, the base class of anonymous controllers will be inferred
40
- # automatically. This will be the default behavior in future versions of
41
- # rspec-rails.
42
- config.infer_base_class_for_anonymous_controllers = true
36
+ # rspec-expectations config goes here. You can use an alternate
37
+ # assertion/expectation library such as wrong or the stdlib/minitest
38
+ # assertions if you prefer.
39
+ config.expect_with :rspec do |expectations|
40
+ # This option will default to `true` in RSpec 4. It makes the `description`
41
+ # and `failure_message` of custom matchers include text for helper methods
42
+ # defined using `chain`, e.g.:
43
+ # be_bigger_than(2).and_smaller_than(4).description
44
+ # # => "be bigger than 2 and smaller than 4"
45
+ # ...rather than:
46
+ # # => "be bigger than 2"
47
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
48
+ end
49
+
50
+ # rspec-mocks config goes here. You can use an alternate test double
51
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
52
+ config.mock_with :rspec do |mocks|
53
+ # Prevents you from mocking or stubbing a method that does not exist on
54
+ # a real object. This is generally recommended, and will default to
55
+ # `true` in RSpec 4.
56
+ mocks.verify_partial_doubles = true
57
+ end
58
+
59
+ # The settings below are suggested to provide a good initial experience
60
+ # with RSpec, but feel free to customize to your heart's content.
61
+ =begin
62
+ # These two settings work together to allow you to limit a spec run
63
+ # to individual examples or groups you care about by tagging them with
64
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
65
+ # get run.
66
+ config.filter_run :focus
67
+ config.run_all_when_everything_filtered = true
68
+
69
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
70
+ # For more details, see:
71
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
72
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
73
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
74
+ config.disable_monkey_patching!
75
+
76
+ # Many RSpec users commonly either run the entire suite or an individual
77
+ # file, and it's useful to allow more verbose output when running an
78
+ # individual spec file.
79
+ if config.files_to_run.one?
80
+ # Use the documentation formatter for detailed output,
81
+ # unless a formatter has already been configured
82
+ # (e.g. via a command-line flag).
83
+ config.default_formatter = 'doc'
84
+ end
85
+
86
+ # Print the 10 slowest examples and example groups at the
87
+ # end of the spec run, to help surface which specs are running
88
+ # particularly slow.
89
+ config.profile_examples = 10
43
90
 
44
91
  # Run specs in random order to surface order dependencies. If you find an
45
92
  # order dependency and want to debug it, you can fix the order by providing
46
93
  # the seed, which is printed after each run.
47
94
  # --seed 1234
48
- config.order = "random"
95
+ config.order = :random
49
96
 
97
+ # Seed global randomization in this process using the `--seed` CLI option.
98
+ # Setting this allows you to use `--seed` to deterministically reproduce
99
+ # test failures related to randomization by passing the same `--seed` value
100
+ # as the one that triggered the failure.
101
+ Kernel.srand config.seed
102
+ =end
50
103
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coalescing_panda
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-20 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.3
33
+ version: 1.0.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.3
40
+ version: 1.0.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: macaddr
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: 4.0.0
125
125
  - !ruby/object:Gem::Dependency
126
- name: protected_attributes
126
+ name: p3p
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '>='
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: p3p
140
+ name: useragent
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '>='
@@ -151,13 +151,13 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: useragent
154
+ name: sqlite3
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
- type: :runtime
160
+ type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
@@ -165,7 +165,7 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: sqlite3
168
+ name: rspec-rails
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '>='
@@ -179,7 +179,7 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: rspec-rails
182
+ name: factory_girl_rails
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - '>='
@@ -235,7 +235,7 @@ dependencies:
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
- name: debugger
238
+ name: byebug
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - '>='
@@ -285,10 +285,18 @@ files:
285
285
  - app/controllers/coalescing_panda/application_controller.rb
286
286
  - app/controllers/coalescing_panda/lti_controller.rb
287
287
  - app/controllers/coalescing_panda/oauth2_controller.rb
288
+ - app/models/coalescing_panda/assignment.rb
288
289
  - app/models/coalescing_panda/canvas_api_auth.rb
290
+ - app/models/coalescing_panda/course.rb
291
+ - app/models/coalescing_panda/enrollment.rb
289
292
  - app/models/coalescing_panda/lti_account.rb
290
293
  - app/models/coalescing_panda/lti_nonce.rb
294
+ - app/models/coalescing_panda/section.rb
291
295
  - app/models/coalescing_panda/session.rb
296
+ - app/models/coalescing_panda/submission.rb
297
+ - app/models/coalescing_panda/term.rb
298
+ - app/models/coalescing_panda/user.rb
299
+ - app/models/coalescing_panda/workers/course_miner.rb
292
300
  - app/views/coalescing_panda/launch.html.haml
293
301
  - app/views/coalescing_panda/oauth2/oauth2.html.haml
294
302
  - app/views/coalescing_panda/oauth2/redirect.html.haml
@@ -301,6 +309,14 @@ files:
301
309
  - db/migrate/20131119165343_create_coalescing_panda_lti_nonces.rb
302
310
  - db/migrate/20140722210735_add_settings_to_coalescing_panda_lti_account.rb
303
311
  - db/migrate/20140904223159_create_coalescing_panda_sessions.rb
312
+ - db/migrate/20141119225319_create_coalescing_panda_terms.rb
313
+ - db/migrate/20141119225721_create_coalescing_panda_courses.rb
314
+ - db/migrate/20141120151432_create_coalescing_panda_sections.rb
315
+ - db/migrate/20141120151940_create_coalescing_panda_assignments.rb
316
+ - db/migrate/20141120152458_create_coalescing_panda_users.rb
317
+ - db/migrate/20141120152546_create_coalescing_panda_submissions.rb
318
+ - db/migrate/20141120153135_create_coalescing_panda_enrollments.rb
319
+ - db/migrate/20141120205729_add_canvas_account_id_to_lti_account.rb
304
320
  - lib/coalescing_panda/controller_helpers.rb
305
321
  - lib/coalescing_panda/engine.rb
306
322
  - lib/coalescing_panda/route_helpers.rb
@@ -344,7 +360,23 @@ files:
344
360
  - spec/dummy/public/favicon.ico
345
361
  - spec/dummy/Rakefile
346
362
  - spec/dummy/README.rdoc
363
+ - spec/factories/accounts.rb
364
+ - spec/factories/assignments.rb
365
+ - spec/factories/courses.rb
366
+ - spec/factories/enrollments.rb
367
+ - spec/factories/submissions.rb
368
+ - spec/factories/users.rb
369
+ - spec/models/coalescing_panda/assignment_spec.rb
347
370
  - spec/models/coalescing_panda/canvas_api_auth_spec.rb
371
+ - spec/models/coalescing_panda/course_spec.rb
372
+ - spec/models/coalescing_panda/enrollment_spec.rb
373
+ - spec/models/coalescing_panda/lti_account_spec.rb
374
+ - spec/models/coalescing_panda/lti_nonce_spec.rb
375
+ - spec/models/coalescing_panda/section_spec.rb
376
+ - spec/models/coalescing_panda/submission_spec.rb
377
+ - spec/models/coalescing_panda/term_spec.rb
378
+ - spec/models/coalescing_panda/user_spec.rb
379
+ - spec/rails_helper.rb
348
380
  - spec/spec_helper.rb
349
381
  homepage: http://www.instructure.com
350
382
  licenses: []
@@ -406,6 +438,22 @@ test_files:
406
438
  - spec/dummy/public/favicon.ico
407
439
  - spec/dummy/Rakefile
408
440
  - spec/dummy/README.rdoc
441
+ - spec/factories/accounts.rb
442
+ - spec/factories/assignments.rb
443
+ - spec/factories/courses.rb
444
+ - spec/factories/enrollments.rb
445
+ - spec/factories/submissions.rb
446
+ - spec/factories/users.rb
447
+ - spec/models/coalescing_panda/assignment_spec.rb
409
448
  - spec/models/coalescing_panda/canvas_api_auth_spec.rb
449
+ - spec/models/coalescing_panda/course_spec.rb
450
+ - spec/models/coalescing_panda/enrollment_spec.rb
451
+ - spec/models/coalescing_panda/lti_account_spec.rb
452
+ - spec/models/coalescing_panda/lti_nonce_spec.rb
453
+ - spec/models/coalescing_panda/section_spec.rb
454
+ - spec/models/coalescing_panda/submission_spec.rb
455
+ - spec/models/coalescing_panda/term_spec.rb
456
+ - spec/models/coalescing_panda/user_spec.rb
457
+ - spec/rails_helper.rb
410
458
  - spec/spec_helper.rb
411
459
  has_rdoc: