bobross 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bobross.gemspec +1 -1
- data/lib/bobross/version.rb +1 -1
- data/lib/models/account.rb +18 -15
- data/lib/models/assignment.rb +16 -13
- data/lib/models/course.rb +12 -10
- data/lib/models/section.rb +13 -11
- data/lib/models/user.rb +13 -11
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3588f5d7043a236752b70709f37b8989346ca29fbfedac927fd6a13c0295ba9c
|
4
|
+
data.tar.gz: 02fcde7d1672d5f79323994d6b299b13cb9feba7241ba8319aeccdb674ed0cd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b82a793cd349de4a2fc24463e2446c52996bf03b2be4e4f6fb2cf0cad84ae922933898e9b48188fb12ee50bc6b536f7128eddb35632fdab2b6903c5c39eac090
|
7
|
+
data.tar.gz: f8eab3ed1480245bfe5f8c6490b4ccd8ef1fbfdf491fa290404b8d1a3ab8d1204e4a9577d8b8b0c9e37141822dbd4fad26a94e41c1c70818020374ec380b2cee
|
data/bobross.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "bobross"
|
8
8
|
spec.version = Bobross::VERSION
|
9
9
|
spec.authors = ["Jacob Slack", "Trevor Byington"]
|
10
|
-
spec.email = ["jacobs@instructure.com", "tbyington@instructure.com"]
|
10
|
+
spec.email = ["jacobs@instructure.com", "tbyington@instructure.com", "tabyington@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Generates data to put in your canvas instance.}
|
13
13
|
spec.description = %q{Generates data to put in your canvas instance. Data can be exported as CSV for uploading or sent directly via api call}
|
data/lib/bobross/version.rb
CHANGED
data/lib/models/account.rb
CHANGED
@@ -5,25 +5,28 @@ class Account < Forgery
|
|
5
5
|
string = "#{@name}, #{@uid}, #{@parent_id}, #{@root_id}, #{@time_zone}, #{@sis_id}, #{@workflow}"
|
6
6
|
end
|
7
7
|
|
8
|
-
def initialize(
|
9
|
-
@name = name
|
10
|
-
@uid = uid
|
11
|
-
@parent_id = parent
|
12
|
-
@root_id = root
|
13
|
-
@time_zone = time_zone
|
14
|
-
@sis_id = sis
|
15
|
-
@workflow = workflow
|
8
|
+
def initialize(opts = {})
|
9
|
+
@name = opts[:name] if opts[:name]
|
10
|
+
@uid = opts[:uid] if opts[:uid]
|
11
|
+
@parent_id = opts[:parent] if opts[:parent]
|
12
|
+
@root_id = opts[:root] if opts[:root]
|
13
|
+
@time_zone = opts[:time_zone] if opts[:time_zone]
|
14
|
+
@sis_id = opts[:sis] if opts[:sis]
|
15
|
+
@workflow = opts[:workflow] if opts[:workflow]
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.random (parent_id = 1 , root_id = 1)
|
19
19
|
a = Forgery('name').company_name
|
20
20
|
Account.new(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
{
|
22
|
+
name: a,
|
23
|
+
uid: "#{a}-#{rand(10000)}",
|
24
|
+
parent: parent_id,
|
25
|
+
root: root_id,
|
26
|
+
time_zone: Forgery('time').zone,
|
27
|
+
sis_id: (10000+rand(10000000)),
|
28
|
+
workflow: 'active'
|
29
|
+
}
|
30
|
+
)
|
28
31
|
end
|
29
32
|
end
|
data/lib/models/assignment.rb
CHANGED
@@ -2,23 +2,26 @@ class Assignment < Forgery
|
|
2
2
|
attr_reader :name, :description, :due_at, :lock_at, :course_id, :assignment_group
|
3
3
|
attr_writer :due_at, :lock_at
|
4
4
|
|
5
|
-
def initialize(
|
6
|
-
@name = name
|
7
|
-
@description = description
|
8
|
-
@due_at = due_at
|
9
|
-
@lock_at = lock_at
|
10
|
-
@course_id = course_id
|
11
|
-
@assignment_group = assignment_group
|
5
|
+
def initialize(opts = {})
|
6
|
+
@name = opts[:name] if opts[:name]
|
7
|
+
@description = opts[:description] if opts[:description]
|
8
|
+
@due_at = opts[:due_at] if opts[:due_at]
|
9
|
+
@lock_at = opts[:lock_at] if opts[:lock_at]
|
10
|
+
@course_id = opts[:course_id] if opts[:course_id]
|
11
|
+
@assignment_group = opts[:assignment_group] if opts[:assignment_group]
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.random (course = 1, group = 1)
|
15
15
|
d = Forgery('date').date
|
16
16
|
Assignment.new(
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
{
|
18
|
+
name: "What #{Forgery('name').job_title} #{Forgery('name').full_name} said about #{Forgery('name').industry}",
|
19
|
+
description: "#{Forgery('lorem_ipsum').paragraphs}",
|
20
|
+
due_at: d,
|
21
|
+
lock_at: d+10.days,
|
22
|
+
course_id: course,
|
23
|
+
assignment_group: group
|
24
|
+
}
|
25
|
+
)
|
23
26
|
end
|
24
27
|
end
|
data/lib/models/course.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class Course < Forgery
|
2
2
|
attr_reader :name, :uid, :sis_id, :description
|
3
3
|
@@local_dictionaries = File.absolute_path("lib")
|
4
|
-
|
5
|
-
def initialize(
|
6
|
-
@name = name
|
7
|
-
@uid = uid
|
8
|
-
@sis_id = sis
|
9
|
-
@description = desc
|
4
|
+
|
5
|
+
def initialize(opts = {})
|
6
|
+
@name = opts[:name] if opts[:name]
|
7
|
+
@uid = opts[:uid] if opts[:uid]
|
8
|
+
@sis_id = "#{opts[:sis]}" if opts[:sis]
|
9
|
+
@description = opts[:desc] if opts[:desc]
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_s
|
@@ -19,10 +19,12 @@ class Course < Forgery
|
|
19
19
|
|
20
20
|
def self.random
|
21
21
|
Course.new(
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
{
|
23
|
+
name: Course.course_name,
|
24
|
+
uid: Course.course_code,
|
25
|
+
sis: (12000+rand(1000000)).to_s,
|
26
|
+
desc: Course.description
|
27
|
+
}
|
26
28
|
)
|
27
29
|
end
|
28
30
|
|
data/lib/models/section.rb
CHANGED
@@ -2,22 +2,24 @@ class Section < Forgery
|
|
2
2
|
attr_reader :name, :sis_id, :course_id, :course_sis_id, :start_at, :end_at
|
3
3
|
attr_writer :course, :course_sis_id
|
4
4
|
|
5
|
-
def initialize(
|
6
|
-
@name = name
|
7
|
-
@sis_id = sis_id
|
8
|
-
@course_id = course
|
9
|
-
@start_at = start_at
|
10
|
-
@end_at = end_at
|
5
|
+
def initialize(opts = {})
|
6
|
+
@name = opts[:name] if opts[:name]
|
7
|
+
@sis_id = opts[:sis_id] if opts[:sis_id]
|
8
|
+
@course_id = opts[:course] if opts[:course]
|
9
|
+
@start_at = opts[:start_at] if opts[:start_at]
|
10
|
+
@end_at = opts[:end_at] if opts[:end_at]
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.random(course=1)
|
14
14
|
d = Forgery('date').date
|
15
15
|
Section.new(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
{
|
17
|
+
name: "#{Forgery('address').country} #{Forgery('basic').color}",
|
18
|
+
sis_id: (21000+rand(1000000)),
|
19
|
+
course: course,
|
20
|
+
start_at: d,
|
21
|
+
end_at: d+90.days
|
22
|
+
}
|
21
23
|
)
|
22
24
|
end
|
23
25
|
end
|
data/lib/models/user.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class User < Forgery
|
2
2
|
attr_reader :name, :sis_id, :login_id, :email, :time_zone
|
3
3
|
|
4
|
-
def initialize (
|
5
|
-
@name = name
|
6
|
-
@sis_id = sis
|
7
|
-
@login_id = login
|
8
|
-
@email = email
|
9
|
-
@time_zone = time_zone
|
4
|
+
def initialize (opts = {})
|
5
|
+
@name = opts[:name] if opts[:name]
|
6
|
+
@sis_id = opts[:sis] if opts[:sis]
|
7
|
+
@login_id = opts[:login] if opts[:login]
|
8
|
+
@email = opts[:email] if opts[:email]
|
9
|
+
@time_zone = opts[:time_zone] if opts[:time_zone]
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.random
|
@@ -14,11 +14,13 @@ class User < Forgery
|
|
14
14
|
ln = Forgery('name').last_name
|
15
15
|
e = "tbyington+#{fn}.#{ln}@instructure.com"
|
16
16
|
User.new(
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
{
|
18
|
+
name: "#{fn} #{ln}",
|
19
|
+
sis: (3000+rand(1000000)),
|
20
|
+
login: e,
|
21
|
+
email: e,
|
22
|
+
time_zone: Forgery('time').zone
|
23
|
+
}
|
22
24
|
)
|
23
25
|
end
|
24
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobross
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Slack
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-06-
|
12
|
+
date: 2019-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -72,6 +72,7 @@ description: Generates data to put in your canvas instance. Data can be exported
|
|
72
72
|
email:
|
73
73
|
- jacobs@instructure.com
|
74
74
|
- tbyington@instructure.com
|
75
|
+
- tabyington@gmail.com
|
75
76
|
executables: []
|
76
77
|
extensions: []
|
77
78
|
extra_rdoc_files: []
|