salesforce_certification_calculator 0.1.4 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e97d4d7af4420856a1b03fde07ed7c38c2a85874b5e29a540355a1f03c95649
4
- data.tar.gz: 96e31ed19bf27d059915041a878fc77dab947e9731b47239fc462fbaef985870
3
+ metadata.gz: f2ac782d0341d2326b1f420b69e7841de95e3f8f00a50a359ffb6d75d799c61d
4
+ data.tar.gz: cdd4011f3d02210b682293da4973b67fac299572a75df2a26a5ae5563496d709
5
5
  SHA512:
6
- metadata.gz: 8ead965184debb4f3e697c67e14ff764e04ad576f069bd9dd193b4295ed740a4ecc5fe02b8b6a356f5b04e3a251df67e7d0b1fcf31a159a2eb1e7a2d2f804e47
7
- data.tar.gz: 1fc0675eebf398a6518e7b039412817ac295c69c83ee2ec450c7befdeea76fb3c1bcbca0e0dd43ff402daeabd0beb1c73541d13f0cacec3417c6521f502390cb
6
+ metadata.gz: 644d95bd25b831e8fbda3b4052b126e172d22aa49b27c101425bbaa0a251e95f6c2207c65e9159b4b26e7f72e72e05ad0d0fcaa8bd127f2f1a22aba24996cb77
7
+ data.tar.gz: be70fc1855a3d76c9476546292624da2a406e4c3af000bf57ca8e1cdc99ce8cc64ac2babbd37f0177c01b5e5ad833b1ed6e30340c58fa721b54afd42e61002ef
data/README.md CHANGED
@@ -64,11 +64,11 @@ If you have trouble downloading the package or just want to play around with the
64
64
  1. Fork this repository
65
65
  2. Clone it to your local computer
66
66
  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.1.4.gem`
67
+ 4. Then install that built module: `gem install ./salesforce_certification_calculator-0.1.7.gem`
68
68
  5. Open a Ruby environment to use the module: `irb`
69
69
  6. Execute any of the recently installed methods
70
70
 
71
- You may need to update the specific version of the build as later releases come out (e.g., `-0.1.4.gem` may need to become `-0.2.0.gem`).
71
+ You may need to update the specific version of the build as later releases come out (e.g., `-0.1.7.gem` may need to become `-0.2.0.gem`).
72
72
 
73
73
  ## Usage
74
74
 
@@ -82,7 +82,7 @@ Of course, you may use any of the other methods provided by the package, but `de
82
82
 
83
83
  ## Documentation
84
84
 
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/0.1.4). 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.
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/). 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
86
 
87
87
  ## Code Examples
88
88
 
@@ -56,6 +56,8 @@ class SalesforceCertificationCalculator::Exam
56
56
  # Sets total to error message when sum of sections' weights is not 100
57
57
  if summed_weights != 100
58
58
  @total = "CANNOT CALCULATE"
59
+ else
60
+ @total = @total.round(2)
59
61
  end
60
62
  end
61
63
  end
@@ -11,7 +11,20 @@ class SalesforceCertificationCalculator::FileReader
11
11
  # @return [Array] collection of Exam objects
12
12
  def generate_exams_list
13
13
  exams = []
14
- files = Dir.glob("data/*xml")
14
+ gems_path = ENV["HOME"] + "/gems/gems"
15
+ all_gems = Dir.children(gems_path)
16
+ sfc_gems = []
17
+
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)
15
28
 
16
29
  files.each do |file|
17
30
  exam = SFC::Exam.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salesforce_certification_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jackson Reeves
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '2.0'
139
+ version: '3.1'
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="