salesforce_certification_calculator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +114 -0
  3. data/Rakefile +15 -0
  4. data/bin/salesforce_certification_calculator +5 -0
  5. data/data/Administrator-Spring2022.xml +40 -0
  6. data/data/AdvancedAdministrator-Spring2022.xml +40 -0
  7. data/data/B2BSolutionArchitect-Spring2022.xml +30 -0
  8. data/data/B2CSolutionArchitect-Spring2022.xml +30 -0
  9. data/data/DataArchitect-Spring2022.xml +35 -0
  10. data/data/DevelopmentLifecycleAndDeploymentArchitect-Spring2022.xml +45 -0
  11. data/data/EducationCloudConsultant-Spring2022.xml +35 -0
  12. data/data/ExperienceCloudConsultant-Spring2022.xml +45 -0
  13. data/data/IdentityAndAccessManagementArchitect-Spring2022.xml +35 -0
  14. data/data/IntegrationArchitect-Spring2022.xml +35 -0
  15. data/data/JavaScriptDeveloperI-Spring2022.xml +40 -0
  16. data/data/MarketingCloudAdministrator-Spring2022.xml +30 -0
  17. data/data/MarketingCloudConsultant-Spring2022.xml +35 -0
  18. data/data/MarketingCloudDeveloper-Spring2022.xml +30 -0
  19. data/data/MarketingCloudEmailSpecialist-Spring2022.xml +30 -0
  20. data/data/PlatformAppBuilder-Spring2022.xml +30 -0
  21. data/data/PlatformDeveloperI-Spring2022.xml +25 -0
  22. data/data/PlatformDeveloperII-Spring2022.xml +30 -0
  23. data/data/SalesCloudConsultant-Spring2022.xml +55 -0
  24. data/data/ServiceCloudConsultant-Spring2022.xml +50 -0
  25. data/data/SharingAndVisibilityArchitect-Spring2022.xml +20 -0
  26. data/lib/salesforce_certification_calculator/exam.rb +63 -0
  27. data/lib/salesforce_certification_calculator/file_reader.rb +53 -0
  28. data/lib/salesforce_certification_calculator/section.rb +25 -0
  29. data/lib/salesforce_certification_calculator/u_i.rb +107 -0
  30. data/lib/salesforce_certification_calculator.rb +92 -0
  31. data/test/test_exam.rb +498 -0
  32. data/test/test_file_reader.rb +65 -0
  33. data/test/test_salesforce_certification_calculator.rb +189 -0
  34. data/test/test_section.rb +59 -0
  35. data/test/test_u_i.rb +297 -0
  36. metadata +98 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 261768563e556f96d8dc7cf3c0c27bb192f21a364261e727986d41e1a5fa0106
4
+ data.tar.gz: 847be3e13f524378222c85e1b569dbebd061c497ef992fe816d2662d083cc180
5
+ SHA512:
6
+ metadata.gz: 56a368833a149e38fe351cae441e8a82c2badc22b6d0a71bfbdd9f1fa7182fabd34bd6f75868056e952acd51bcdbb474e352f2e8d3dbabfd523ceb1fc6ac4876
7
+ data.tar.gz: 2b9f04207b572825091fa0d17aa407d1a9805e22ec03beefd5072432f8110916aa7402de557c716408ad34f2e1c30874b4c6475011b73b246197d6bb3388c424
data/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # Salesforce Certification Calculator
2
+
3
+ *Calculates cumulative percentage from Salesforce certification section results*
4
+
5
+ **Contents**
6
+ 1. [Description](https://github.com/jtreeves/salesforce_certification_calculator#description)
7
+ 2. [Inspiration](https://github.com/jtreeves/salesforce_certification_calculator#inspiration)
8
+ 3. [Features](https://github.com/jtreeves/salesforce_certification_calculator#features)
9
+ 4. [Requirements](https://github.com/jtreeves/salesforce_certification_calculator#requirements)
10
+ 5. [Installation](https://github.com/jtreeves/salesforce_certification_calculator#installation)
11
+ 6. [Usage](https://github.com/jtreeves/salesforce_certification_calculator#usage)
12
+ 7. [Documentation](https://github.com/jtreeves/salesforce_certification_calculator#documentation)
13
+ 8. [Code Examples](https://github.com/jtreeves/salesforce_certification_calculator#code-examples)
14
+ 9. [Testing](https://github.com/jtreeves/salesforce_certification_calculator#testing)
15
+ 10. [Future Goals](https://github.com/jtreeves/salesforce_certification_calculator#future-goals)
16
+
17
+ ## Description
18
+
19
+ A **Ruby** gem module for taking all the sections' weights and scores provided by **Salesforce** and using them to generate a cumulative score for the entire exam. Built using [Ruby's guide to making gems](https://guides.rubygems.org/make-your-own-gem/).
20
+
21
+ ## Inspiration
22
+
23
+ I've taken a few Salesforce certification exams in my day, and I was always annoyed that even though Salesforce provides you with your score on a given section, it refuses to provide you with a simple cumulative score. It does tell you if you passed of failed, but it would be useful to know by exactly how much. I created this module to give users a simple way to achieve that for themselves.
24
+
25
+ ## Features
26
+
27
+ - Archive of files with key details for 21 current exams, including their sections and weights
28
+ - File reading functionality
29
+ - User interface for the CLI to provide prompts to walk user through the input process
30
+ - Methods for calculating the cumulative total and for walking the user through all stages of data collection
31
+
32
+ ## Requirements
33
+
34
+ - Ruby (check with `ruby -v`)
35
+ - Nokogiri (check with `nokogiri -v`), which may be automatically installed when you install the main module
36
+
37
+ ## Installation
38
+
39
+ ### Download Package
40
+
41
+ ```
42
+ gem install salesforce_certification_calculator
43
+ ```
44
+
45
+ ### Create Local Repository
46
+
47
+ If you have trouble downloading the package or just want to play around with the code yourself, you can clone down the repository. Ensure you already have Ruby on your local computer. (You can check this by executing `ruby -v`.)
48
+
49
+ 1. Fork this repository
50
+ 2. Clone it to your local computer
51
+ 3. From within your local version of the directory, build the module: `gem build salesforce_certification_calculator.gemspec`
52
+ 4. Then install that built module: `gem install ./salesforce_certification_calculator-0.1.0.gem`
53
+ 5. Open a Ruby environment to use the module: `irb`
54
+ 6. Execute any of the recently installed methods
55
+
56
+ You may need to update the specific version of the build as later releases come out (e.g., `-0.1.0.gem` may need to become `-0.2.0.gem`).
57
+
58
+ ## Usage
59
+
60
+ 1. Open a Ruby environment to use the module: `irb`
61
+ 2. Require the package: `require 'salesforce_certification_calculator'`
62
+ 3. Create a new calculator to use: `calculator = SalesforceCertificationCalculator.new`
63
+ 4. Use the main method to provide data and generate your cumulative score: `calculator.determine_percentage_manually`
64
+ 5. Fill in the data in response to the questions as they're presented, and the final output will be your cumulative score
65
+
66
+ Of course, you may use any of the other methods provided by the package, but `determine_percentage_manually` is the core method.
67
+
68
+ ## Documentation
69
+
70
+ This project uses **YARD** for documentation generation. To view the docs, go to the `doc` folder. To generate the docs yourself, execute `rake yard` in the CLI from the root of your local copy of the project.
71
+
72
+ ## Code Examples
73
+
74
+ **Final function to generate the cumulative score from all provided section data**
75
+ ```ruby
76
+ def calculate_total
77
+ summed_weights = 0
78
+
79
+ @sections.each do |section|
80
+ summed_weights += section.weight
81
+ @total += section.weight * section.score / 100.0
82
+ end
83
+
84
+ if summed_weights != 100
85
+ @total = "CANNOT CALCULATE"
86
+ end
87
+ end
88
+ ```
89
+
90
+ **Helper function to pull data stored in a reference XML file**
91
+ ```ruby
92
+ def extract_initial_exam_data(exam)
93
+ doc = File.open(exam.file) { |f| Nokogiri::XML(f) }
94
+ names = doc.xpath("//name")
95
+ weights = doc.xpath("//weight")
96
+
97
+ (0..names.length-1).each do |i|
98
+ exam.add_section(names[i].content, weights[i].content.to_i)
99
+ end
100
+
101
+ return exam
102
+ end
103
+ ```
104
+
105
+ ## Testing
106
+
107
+ This project has 103 automated tests, located in the `test` folder at the root. To run them, execute `rake test`. In order to successfully run these tests, you may need to also install `stringio` and `o_stream_catcher`.
108
+
109
+ ## Future Goals
110
+
111
+ - Extract score data from text file (or better yet, a PDF or directly from an email message), and use that to also determine which exam it is for in the hopes of minimizing the amount of data that the user needs to key in
112
+ - More robust error handling and exception raising for when a user attempts to run `calculate_total` on an exam with sections whose weights do not equal 100; similar issue with interacting with the UI methods
113
+ - A **Rails** app to live in the browser an facilitate much of the above
114
+ - More aesthetically appealing documentation pages
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require "yard"
2
+ require "rake/testtask"
3
+
4
+ YARD::Rake::YardocTask.new do |t|
5
+ t.files = ["lib/**/*.rb"]
6
+ end
7
+
8
+ Rake::TestTask.new do |t|
9
+ t.libs << "test"
10
+ end
11
+
12
+ desc "Run tests"
13
+ task default: :test
14
+
15
+ # --- Ran 103 tests in 0.018368s on 7/21/22 --- OK --- #
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "salesforce_certification_calculator"
4
+
5
+ puts SalesforceCertificationCalculator.cumulative_score(ARGV[0], ARGV[1])
@@ -0,0 +1,40 @@
1
+ <exam>
2
+ <title>Administrator - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Configuration and Setup</name>
7
+ <weight>20</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Object Manager and Lighting App Builder</name>
12
+ <weight>20</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Sales and Marketing Applications</name>
17
+ <weight>12</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Service and Support Applications</name>
22
+ <weight>11</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Productivity and Collaboration</name>
27
+ <weight>7</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Data and Analytics Management</name>
32
+ <weight>14</weight>
33
+ </section>
34
+
35
+ <section>
36
+ <name>Workflow/Process Automation</name>
37
+ <weight>16</weight>
38
+ </section>
39
+ </sections>
40
+ </exam>
@@ -0,0 +1,40 @@
1
+ <exam>
2
+ <title>Advanced Administrator - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Security and Access</name>
7
+ <weight>20</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Objects and Applications</name>
12
+ <weight>19</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Auditing and Monitoring</name>
17
+ <weight>10</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Cloud Applications</name>
22
+ <weight>11</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Data and Analytics Management</name>
27
+ <weight>13</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Environment Management and Deployment</name>
32
+ <weight>7</weight>
33
+ </section>
34
+
35
+ <section>
36
+ <name>Process Automation</name>
37
+ <weight>20</weight>
38
+ </section>
39
+ </sections>
40
+ </exam>
@@ -0,0 +1,30 @@
1
+ <exam>
2
+ <title>B2B Solution Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Discovery and Customer Success</name>
7
+ <weight>25</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Data Governance and Integration</name>
12
+ <weight>26</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Design</name>
17
+ <weight>29</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Delivery</name>
22
+ <weight>12</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Operationalize the Solution</name>
27
+ <weight>8</weight>
28
+ </section>
29
+ </sections>
30
+ </exam>
@@ -0,0 +1,30 @@
1
+ <exam>
2
+ <title>B2C Solution Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Discovery and Customer Success</name>
7
+ <weight>18</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Functional Capabilities and Business Value</name>
12
+ <weight>19</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Architecture Design</name>
17
+ <weight>23</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Data Models and Management</name>
22
+ <weight>21</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Integration</name>
27
+ <weight>19</weight>
28
+ </section>
29
+ </sections>
30
+ </exam>
@@ -0,0 +1,35 @@
1
+ <exam>
2
+ <title>Data Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Data Modeling/Database Design</name>
7
+ <weight>25</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Master Data Management</name>
12
+ <weight>5</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Salesforce Data Management</name>
17
+ <weight>25</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Data Governance</name>
22
+ <weight>10</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Large Data Volume Considerations</name>
27
+ <weight>20</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Data Migration</name>
32
+ <weight>15</weight>
33
+ </section>
34
+ </sections>
35
+ </exam>
@@ -0,0 +1,45 @@
1
+ <exam>
2
+ <title>Development Lifecycle and Deployment Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Application Lifecycle Management</name>
7
+ <weight>8</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Planning</name>
12
+ <weight>13</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>System Design</name>
17
+ <weight>15</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Building</name>
22
+ <weight>14</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Deploying</name>
27
+ <weight>14</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Testing</name>
32
+ <weight>13</weight>
33
+ </section>
34
+
35
+ <section>
36
+ <name>Releasing</name>
37
+ <weight>13</weight>
38
+ </section>
39
+
40
+ <section>
41
+ <name>Operating</name>
42
+ <weight>10</weight>
43
+ </section>
44
+ </sections>
45
+ </exam>
@@ -0,0 +1,35 @@
1
+ <exam>
2
+ <title>Education Cloud Consultant - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Domain Expertise</name>
7
+ <weight>18</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Education Cloud Configuration</name>
12
+ <weight>22</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Implementation Strategies and Best Practices</name>
17
+ <weight>18</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Solution Design</name>
22
+ <weight>19</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Integration and Data Management</name>
27
+ <weight>16</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Analytics</name>
32
+ <weight>7</weight>
33
+ </section>
34
+ </sections>
35
+ </exam>
@@ -0,0 +1,45 @@
1
+ <exam>
2
+ <title>Experience Cloud Consultant - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Experience Cloud Basics</name>
7
+ <weight>8</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Sharing, Visibility, and Licensing</name>
12
+ <weight>17</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Branding, Personalization, and Content</name>
17
+ <weight>15</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Templates and Themes</name>
22
+ <weight>10</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>User Creation and Authentication</name>
27
+ <weight>13</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Adoption and Analytics</name>
32
+ <weight>5</weight>
33
+ </section>
34
+
35
+ <section>
36
+ <name>Administration Setup and Configuration</name>
37
+ <weight>25</weight>
38
+ </section>
39
+
40
+ <section>
41
+ <name>Customization Considerations and Limitations</name>
42
+ <weight>7</weight>
43
+ </section>
44
+ </sections>
45
+ </exam>
@@ -0,0 +1,35 @@
1
+ <exam>
2
+ <title>Identity and Access Management Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Identity Management Concepts</name>
7
+ <weight>17</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Accepting Third-Party Identity in Salesforce</name>
12
+ <weight>21</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Salesforce as an Identity Provider</name>
17
+ <weight>17</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Access Management Best Practices</name>
22
+ <weight>15</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Salesforce Identity</name>
27
+ <weight>12</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Community (Partner and Customer)</name>
32
+ <weight>18</weight>
33
+ </section>
34
+ </sections>
35
+ </exam>
@@ -0,0 +1,35 @@
1
+ <exam>
2
+ <title>Integration Architect - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Evaluate the Current System Landscape</name>
7
+ <weight>8</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Evaluate Business Needs</name>
12
+ <weight>11</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Translate Needs to Integration Requirements</name>
17
+ <weight>22</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Design Integration Solutions</name>
22
+ <weight>28</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Build Solution</name>
27
+ <weight>23</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Maintain Integration</name>
32
+ <weight>8</weight>
33
+ </section>
34
+ </sections>
35
+ </exam>
@@ -0,0 +1,40 @@
1
+ <exam>
2
+ <title>JavaScript Developer I - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Variables, Types, and Collections</name>
7
+ <weight>23</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Objects, Functions, and Classes</name>
12
+ <weight>25</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Browser and Events</name>
17
+ <weight>17</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Debugging and Error Handling</name>
22
+ <weight>7</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Asynchronous Programming</name>
27
+ <weight>13</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Server Side JavaScript</name>
32
+ <weight>8</weight>
33
+ </section>
34
+
35
+ <section>
36
+ <name>Testing</name>
37
+ <weight>7</weight>
38
+ </section>
39
+ </sections>
40
+ </exam>
@@ -0,0 +1,30 @@
1
+ <exam>
2
+ <title>Marketing Cloud Administrator - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Digital Marketing Proficiency</name>
7
+ <weight>13</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Subscriber Data Management</name>
12
+ <weight>18</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Setup</name>
17
+ <weight>38</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Channel Management</name>
22
+ <weight>16</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Maintenance</name>
27
+ <weight>15</weight>
28
+ </section>
29
+ </sections>
30
+ </exam>
@@ -0,0 +1,35 @@
1
+ <exam>
2
+ <title>Marketing Cloud Consultant - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Discovery and Architecture</name>
7
+ <weight>16</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Integration</name>
12
+ <weight>20</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>Account Configuration</name>
17
+ <weight>12</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Automation</name>
22
+ <weight>20</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Data Modeling and Management</name>
27
+ <weight>21</weight>
28
+ </section>
29
+
30
+ <section>
31
+ <name>Messaging</name>
32
+ <weight>11</weight>
33
+ </section>
34
+ </sections>
35
+ </exam>
@@ -0,0 +1,30 @@
1
+ <exam>
2
+ <title>Marketing Cloud Developer - Spring 2022</title>
3
+
4
+ <sections>
5
+ <section>
6
+ <name>Data Modeling</name>
7
+ <weight>14</weight>
8
+ </section>
9
+
10
+ <section>
11
+ <name>Programmatic Languages</name>
12
+ <weight>35</weight>
13
+ </section>
14
+
15
+ <section>
16
+ <name>API</name>
17
+ <weight>22</weight>
18
+ </section>
19
+
20
+ <section>
21
+ <name>Data Management</name>
22
+ <weight>22</weight>
23
+ </section>
24
+
25
+ <section>
26
+ <name>Security</name>
27
+ <weight>7</weight>
28
+ </section>
29
+ </sections>
30
+ </exam>