salesforce_certification_calculator 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -10
- data/lib/salesforce_certification_calculator/file_reader.rb +13 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee895a9e21c058eefc6cb56279c7ec58f700b5dfec8a08d034482ba0d656a04f
|
4
|
+
data.tar.gz: b988479222226cf9a93513e7eadd5aee75e8dad8db6d6ccdb1c82cd35b55c28a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1819b8eed67b8e1dd3b8e957a25155c4a117c009b6476c37723c8e1d97d6af71304b142d12dc847f614b1381859520e6d3f495ca662de1caf048aaf4a1eaa62
|
7
|
+
data.tar.gz: 5d648caa5592a03f61f42ab341f434d8d69327158186333536780a835ba629d7ba4cb0ce81b903155e521b8324d81fe8d2e701d2de89298a41de264cacc76b39
|
data/README.md
CHANGED
@@ -40,13 +40,11 @@ I've taken a few Salesforce certification exams in my day, and I was always anno
|
|
40
40
|
|
41
41
|
1. Install `rbenv` via Homebrew: `brew install rbenv`
|
42
42
|
2. Update your `.zshrc` config file:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
export
|
47
|
-
export
|
48
|
-
export PATH=$HOME/gems/bin:$PATH
|
49
|
-
```
|
43
|
+
> `export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.1.0/bin:$PATH"`
|
44
|
+
> `eval "$(rbenv init - zsh)"`
|
45
|
+
> `export PATH=$HOME/.rbenv/shims:$PATH`
|
46
|
+
> `export GEM_HOME=$HOME/gems`
|
47
|
+
> `export PATH=$HOME/gems/bin:$PATH`
|
50
48
|
3. Install latest version of Ruby via the `rbenv` package: `rbenv install 3.1.2`
|
51
49
|
4. Set global version of Ruby via the `rbenv` package: `rbenv global 3.1.2`
|
52
50
|
5. Fix `racc` version: `gem pristine racc --version 1.6.0`
|
@@ -64,11 +62,11 @@ If you have trouble downloading the package or just want to play around with the
|
|
64
62
|
1. Fork this repository
|
65
63
|
2. Clone it to your local computer
|
66
64
|
3. From within your local version of the directory, build the module: `gem build salesforce_certification_calculator.gemspec`
|
67
|
-
4. Then install that built module: `gem install ./salesforce_certification_calculator-0.
|
65
|
+
4. Then install that built module: `gem install ./salesforce_certification_calculator-0.2.0.gem`
|
68
66
|
5. Open a Ruby environment to use the module: `irb`
|
69
67
|
6. Execute any of the recently installed methods
|
70
68
|
|
71
|
-
You may need to update the specific version of the build as later releases come out (e.g., `-0.
|
69
|
+
You may need to update the specific version of the build as later releases come out (e.g., `-0.2.0.gem` may need to become `-0.3.0.gem`).
|
72
70
|
|
73
71
|
## Usage
|
74
72
|
|
@@ -82,7 +80,7 @@ Of course, you may use any of the other methods provided by the package, but `de
|
|
82
80
|
|
83
81
|
## Documentation
|
84
82
|
|
85
|
-
This project uses **YARD** for documentation generation. To view the published form, see the [documentation on the RubyDoc site](https://www.rubydoc.info/gems/salesforce_certification_calculator/
|
83
|
+
This project uses **YARD** for documentation generation. To view the published form, see the [documentation on the RubyDoc site](https://www.rubydoc.info/gems/salesforce_certification_calculator/). To view the docs locally, 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.
|
86
84
|
|
87
85
|
## Code Examples
|
88
86
|
|
@@ -11,9 +11,20 @@ class SalesforceCertificationCalculator::FileReader
|
|
11
11
|
# @return [Array] collection of Exam objects
|
12
12
|
def generate_exams_list
|
13
13
|
exams = []
|
14
|
-
|
14
|
+
gems_path = ENV["HOME"] + "/gems/gems"
|
15
|
+
all_gems = Dir.children(gems_path)
|
16
|
+
sfc_gems = []
|
15
17
|
|
16
|
-
|
18
|
+
all_gems.each do |gem|
|
19
|
+
if gem.include? "salesforce_certification_calculator"
|
20
|
+
sfc_gems.push(gem)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
sfc_gems.sort
|
25
|
+
latest_sfc = sfc_gems[sfc_gems.length - 1]
|
26
|
+
base_path = gems_path + "/" + latest_sfc
|
27
|
+
files = Dir.glob("data/*xml", base: base_path)
|
17
28
|
|
18
29
|
files.each do |file|
|
19
30
|
exam = SFC::Exam.new
|