This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from enum import Enum | |
class ElementTypes(Enum): | |
PHONE = "PHONE" | |
CAR = "CAR" | |
class Registry: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
Mongoid::Matchers::Validations::HaveValidationMatcher implements a legacy RSpec matcher | |
protocol. For the current protocol you should expose the failure messages | |
via the `failure_message` and `failure_message_when_negated` methods. | |
(Used from /vagrant/kaybus/spec/services/courses/destroy_course_spec.rb:4:in `block (2 levels) in <top (required)>') | |
-------------------------------------------------------------------------------- | |
-------------------------------------------------------------------------------- | |
Mongoid::Matchers::Associations::HaveAssociationMatcher implements a legacy RSpec matcher | |
protocol. For the current protocol you should expose the failure messages | |
via the `failure_message` and `failure_message_when_negated` methods. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake db:list_public_kayps | |
options: {:range=>1..5, :default_rater=>"owner"} | |
No public KayPs found | |
$ rake db:list_public_kayps | |
options: {:range=>1..5, :default_rater=>"owner"} | |
******************************************************************** | |
0) Setting Up Wireless Gateway (52f9ccd85cdd21e9b300008c) - Status: active - Publisher: Ken Thompson ([email protected]) | |
1) Setting Up Wireless Gateway 2 (52f9ccda5cdd21e9b300009f) - Status: active - Publisher: Ken Thompson ([email protected]) | |
2) Cisco ISE - MDM Partner Integration (52f9ccdb5cdd21e9b30000b2) - Status: active - Publisher: Ken Thompson ([email protected]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Courses | |
POST /courses | |
when authorized | |
when publisher | |
does not set updated_by during creation | |
when ghost publisher | |
does not set updated_by during creation | |
PUT /courses/:id | |
when authorized | |
sets updated_by to publisher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Api::V1::SearchController | |
Search for courses | |
returns the accessible courses to learner 3 | |
returns the accessible courses to publisher 1 | |
returns the accessible courses to learner 2 | |
iknowrecommendations returns recommended courses | |
returns the accessible courses to publisher 2 | |
returns the accessible courses to learner 1 | |
correctly counts new courses for a user (PENDING: Temporarily disabled with xit) | |
returns courses that were updated after learner viewed them (PENDING: Temporarily disabled with xit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Api::V1::AssetsController | |
GET /assets/:id/kayps_for_update | |
when called | |
return the Kps that use an asset | |
should only return a Kp once even if it uses the asset many times | |
should flag the KPs that use old versions of the asset | |
access restrictions | |
for a learner returns 403 | |
for a publisher returns 200 | |
for an admin returns 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Courses | |
GET /courses/:id | |
when accessing an archived course | |
as a superadmin | |
responds with 403 | |
as a publisher | |
responds with 403 | |
as an admin | |
responds with 403 | |
as a learner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :token_authenticatable, :confirmable, | |
# :lockable, :timeoutable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable, | |
:omniauthable | |
def full_name | |
([first_name, last_name] - ['']).compact.join(' ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" | |
(0.2ms) BEGIN | |
Started GET "/users/sign_in" for 127.0.0.1 at 2013-06-19 13:23:51 +0530 | |
Processing by Devise::SessionsController#new as HTML | |
Rendered devise/sessions/new.html.slim within layouts/application (69.6ms) | |
Rendered layouts/_header.html.slim (5.8ms) | |
Rendered layouts/_footer.html.slim (4.4ms) | |
Completed 200 OK in 235ms (Views: 177.0ms | ActiveRecord: 1.5ms) | |
Started POST "/users/sign_in" for 127.0.0.1 at 2013-06-19 13:23:51 +0530 | |
Processing by Devise::SessionsController#create as HTML |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person | |
attr_accessor :firstname | |
attr_accessor :age | |
end | |
class Object | |
def metaclass | |
class << self; self; end | |
end | |
end |