bobross 0.1.6

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.
@@ -0,0 +1,29 @@
1
+ class Account < Forgery
2
+ attr_reader :name, :uid, :parent_id, :root_id, :time_zone, :sis_id, :workflow
3
+
4
+ def to_s
5
+ string = "#{@name}, #{@uid}, #{@parent_id}, #{@root_id}, #{@time_zone}, #{@sis_id}, #{@workflow}"
6
+ end
7
+
8
+ def initialize(name, uid, parent, root, time_zone, sis, workflow)
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
16
+ end
17
+
18
+ def self.random (parent_id = 1 , root_id = 1)
19
+ a = Forgery('name').company_name
20
+ Account.new(
21
+ a,
22
+ "#{a}-#{rand(10000)}",
23
+ parent_id,
24
+ root_id,
25
+ Forgery('time').zone,
26
+ (10000+rand(10000000)),
27
+ 'active')
28
+ end
29
+ end
@@ -0,0 +1,24 @@
1
+ class Assignment < Forgery
2
+ attr_reader :name, :description, :due_at, :lock_at, :course_id, :assignment_group
3
+ attr_writer :due_at, :lock_at
4
+
5
+ def initialize(name, description, due_at, lock_at, course, group)
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
12
+ end
13
+
14
+ def self.random (course = 1, group = 1)
15
+ d = Forgery('date').date
16
+ Assignment.new(
17
+ "What #{Forgery('name').job_title} #{Forgery('name').full_name} said about #{Forgery('name').industry}",
18
+ "#{Forgery('lorem_ipsum').paragraphs}",
19
+ d,
20
+ d+10.days,
21
+ course,
22
+ group )
23
+ end
24
+ end
@@ -0,0 +1,9 @@
1
+ class AssignmentGrade < Forgery
2
+
3
+ def to_s
4
+ string = ""
5
+ end
6
+
7
+ def self.random
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AssignmentGroup < Forgery
2
+
3
+ def to_s
4
+ string = ""
5
+ end
6
+
7
+ def self.random
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AssignmentSubmission < Forgery
2
+
3
+ def to_s
4
+ string = ""
5
+ end
6
+
7
+ def self.random
8
+ end
9
+ end
@@ -0,0 +1,44 @@
1
+ class Course < Forgery
2
+ attr_reader :name, :uid, :sis_id, :description
3
+ @@local_dictionaries = File.absolute_path("lib")
4
+
5
+ def initialize(name, uid, sis, desc)
6
+ @name = name
7
+ @uid = uid
8
+ @sis_id = sis
9
+ @description = desc
10
+ end
11
+
12
+ def to_s
13
+ s = "#{@name}, #{@uid}, #{@sis_id}, #{@description}"
14
+ end
15
+
16
+ def self.set_prefix prefix
17
+ @@prefix = prefix
18
+ end
19
+
20
+ def self.random
21
+ Course.new(
22
+ Course.course_name,
23
+ Course.course_code,
24
+ (12000+rand(1000000)).to_s,
25
+ Course.description
26
+ )
27
+ end
28
+
29
+ def self.course_code
30
+ Forgery.load_from!(@@local_dictionaries)
31
+ dictionaries[:course_codes][@@row]
32
+ end
33
+
34
+ def self.course_name
35
+ Forgery.load_from!(@@local_dictionaries)
36
+ name_count = Forgery.dictionaries[:course_names].count
37
+ @@row = rand(name_count)
38
+ dictionaries[:course_names][@@row]
39
+ end
40
+
41
+ def self.description
42
+ Forgery(:lorem_ipsum).words(2+rand(30))
43
+ end
44
+ end
@@ -0,0 +1,9 @@
1
+ class GroupInAccount < Forgery
2
+
3
+ def to_s
4
+ string = ""
5
+ end
6
+
7
+ def self.random
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class GroupInCourse < Forgery
2
+
3
+ def to_s
4
+ string = ""
5
+ end
6
+
7
+ def self.random
8
+ end
9
+ end
@@ -0,0 +1,23 @@
1
+ class Section < Forgery
2
+ attr_reader :name, :sis_id, :course_id, :course_sis_id, :start_at, :end_at
3
+ attr_writer :course, :course_sis_id
4
+
5
+ def initialize(name, sis_id, course, start_at, end_at)
6
+ @name = name
7
+ @sis_id = sis_id
8
+ @course_id = course
9
+ @start_at = start_at
10
+ @end_at = end_at
11
+ end
12
+
13
+ def self.random(course=1)
14
+ d = Forgery('date').date
15
+ Section.new(
16
+ "#{Forgery('address').country} #{Forgery('basic').color}",
17
+ (21000+rand(1000000)),
18
+ course,
19
+ d,
20
+ d+90.days
21
+ )
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ class User < Forgery
2
+ attr_reader :name, :sis_id, :login_id, :email, :time_zone
3
+
4
+ def initialize (name, sis, login, email, time_zone)
5
+ @name = name
6
+ @sis_id = sis
7
+ @login_id = login
8
+ @email = email
9
+ @time_zone = time_zone
10
+ end
11
+
12
+ def self.random
13
+ fn = Forgery('name').first_name
14
+ ln = Forgery('name').last_name
15
+ e = "tbyington+#{fn}.#{ln}@instructure.com"
16
+ User.new(
17
+ "#{fn} #{ln}",
18
+ (3000+rand(1000000)),
19
+ e,
20
+ e,
21
+ Forgery('time').zone
22
+ )
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bobross
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
+ platform: ruby
6
+ authors:
7
+ - Jacob Slack
8
+ - Trevor Byington
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2019-06-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2.0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '10.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '10.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: bearcat
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 1.3.30
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 1.3.30
70
+ description: Generates data to put in your canvas instance. Data can be exported as
71
+ CSV for uploading or sent directly via api call
72
+ email:
73
+ - jacobs@instructure.com
74
+ - tbyington@instructure.com
75
+ executables: []
76
+ extensions: []
77
+ extra_rdoc_files: []
78
+ files:
79
+ - ".gitignore"
80
+ - ".rbenv-gemsets"
81
+ - ".rspec"
82
+ - ".travis.yml"
83
+ - Gemfile
84
+ - Gemfile.lock
85
+ - LICENSE.txt
86
+ - README.md
87
+ - Rakefile
88
+ - bin/console
89
+ - bin/setup
90
+ - bobross.gemspec
91
+ - lib/bobross.rb
92
+ - lib/bobross/version.rb
93
+ - lib/dictionaries/course_codes
94
+ - lib/dictionaries/course_names
95
+ - lib/models/account.rb
96
+ - lib/models/assignment.rb
97
+ - lib/models/assignment_grade.rb
98
+ - lib/models/assignment_group.rb
99
+ - lib/models/assignment_submission.rb
100
+ - lib/models/course.rb
101
+ - lib/models/group_in_account.rb
102
+ - lib/models/group_in_course.rb
103
+ - lib/models/section.rb
104
+ - lib/models/user.rb
105
+ homepage: https://rubygems.org/gems/bobross
106
+ licenses:
107
+ - MIT
108
+ metadata:
109
+ allowed_push_host: https://rubygems.org
110
+ homepage_uri: https://rubygems.org/gems/bobross
111
+ source_code_uri: https://github.com/instructurecustomdevqa/bobross
112
+ post_install_message:
113
+ rdoc_options: []
114
+ require_paths:
115
+ - lib
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ requirements: []
127
+ rubygems_version: 3.0.3
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: Generates data to put in your canvas instance.
131
+ test_files: []