jishan_fast_track_gem 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +15 -1
- data/bin/bundle +114 -0
- data/bin/console +24 -9
- data/bin/gemoji +29 -0
- data/bin/htmldiff +29 -0
- data/bin/ldiff +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/setup +27 -6
- data/lib/eligibility_check.rb +5 -4
- data/lib/files_check.rb +3 -1
- data/lib/jishan_fast_track_gem/version.rb +1 -1
- data/lib/jishan_fast_track_gem.rb +5 -2
- data/lib/manage_lists.rb +6 -6
- data/lib/rebate_calculator.rb +6 -6
- metadata +8 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3004f97d8e017db74bc31e69a364fe03b6e8266d6d65982eaaa3615135583c08
|
4
|
+
data.tar.gz: 2d090b42855900c293f79af1c2dd2e822cdc85d0a1bda1da40aaefdc051e09e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbafaff3602098979750bd2185211239815cd1514e0e8e4753094eff6be2b9ff4f6bf1f79eb28242c3663f6d70b922e03d8323f3554f1247c9513b2be5c41374
|
7
|
+
data.tar.gz: 81121f2fda24bbc4e3b31e713a1198f123f1268cc21dd0e3de028ce2d21b7037d0c8817ba3b67e0bb1b85a094c79670a97e2f00ac6aab125d00deb127ecd4ede
|
data/.rspec
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jishan_fast_track_gem (0.1.
|
4
|
+
jishan_fast_track_gem (0.1.3)
|
5
5
|
colorize (~> 0.8.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
colorize (0.8.1)
|
11
|
+
diff-lcs (1.3)
|
11
12
|
equatable (0.6.1)
|
12
13
|
gemoji (3.0.1)
|
13
14
|
highline (2.0.3)
|
@@ -25,6 +26,18 @@ GEM
|
|
25
26
|
highline (>= 1.6, < 3)
|
26
27
|
options (~> 2.3.0)
|
27
28
|
rake (12.3.3)
|
29
|
+
rspec (3.0.0)
|
30
|
+
rspec-core (~> 3.0.0)
|
31
|
+
rspec-expectations (~> 3.0.0)
|
32
|
+
rspec-mocks (~> 3.0.0)
|
33
|
+
rspec-core (3.0.4)
|
34
|
+
rspec-support (~> 3.0.0)
|
35
|
+
rspec-expectations (3.0.4)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.0.0)
|
38
|
+
rspec-mocks (3.0.4)
|
39
|
+
rspec-support (~> 3.0.0)
|
40
|
+
rspec-support (3.0.4)
|
28
41
|
tty-color (0.5.1)
|
29
42
|
tty-cursor (0.7.1)
|
30
43
|
tty-prompt (0.21.0)
|
@@ -48,6 +61,7 @@ DEPENDENCIES
|
|
48
61
|
logging
|
49
62
|
progress_bar
|
50
63
|
rake (~> 12.0)
|
64
|
+
rspec (~> 3.0.0)
|
51
65
|
tty-prompt
|
52
66
|
|
53
67
|
BUNDLED WITH
|
data/bin/bundle
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "rubygems"
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
+
bundler_version = nil
|
28
|
+
update_index = nil
|
29
|
+
ARGV.each_with_index do |a, i|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
+
bundler_version = $1
|
35
|
+
update_index = i
|
36
|
+
end
|
37
|
+
bundler_version
|
38
|
+
end
|
39
|
+
|
40
|
+
def gemfile
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
43
|
+
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
|
+
end
|
46
|
+
|
47
|
+
def lockfile
|
48
|
+
lockfile =
|
49
|
+
case File.basename(gemfile)
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
+
else "#{gemfile}.lock"
|
52
|
+
end
|
53
|
+
File.expand_path(lockfile)
|
54
|
+
end
|
55
|
+
|
56
|
+
def lockfile_version
|
57
|
+
return unless File.file?(lockfile)
|
58
|
+
lockfile_contents = File.read(lockfile)
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
+
Regexp.last_match(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
def bundler_version
|
64
|
+
@bundler_version ||=
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version
|
67
|
+
end
|
68
|
+
|
69
|
+
def bundler_requirement
|
70
|
+
return "#{Gem::Requirement.default}.a" unless bundler_version
|
71
|
+
|
72
|
+
bundler_gem_version = Gem::Version.new(bundler_version)
|
73
|
+
|
74
|
+
requirement = bundler_gem_version.approximate_recommendation
|
75
|
+
|
76
|
+
return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
|
77
|
+
|
78
|
+
requirement += ".a" if bundler_gem_version.prerelease?
|
79
|
+
|
80
|
+
requirement
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_bundler!
|
84
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
85
|
+
|
86
|
+
activate_bundler
|
87
|
+
end
|
88
|
+
|
89
|
+
def activate_bundler
|
90
|
+
gem_error = activation_error_handling do
|
91
|
+
gem "bundler", bundler_requirement
|
92
|
+
end
|
93
|
+
return if gem_error.nil?
|
94
|
+
require_error = activation_error_handling do
|
95
|
+
require "bundler/version"
|
96
|
+
end
|
97
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
98
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
99
|
+
exit 42
|
100
|
+
end
|
101
|
+
|
102
|
+
def activation_error_handling
|
103
|
+
yield
|
104
|
+
nil
|
105
|
+
rescue StandardError, LoadError => e
|
106
|
+
e
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
m.load_bundler!
|
111
|
+
|
112
|
+
if m.invoked_as_script?
|
113
|
+
load Gem.bin_path("bundler", "bundle")
|
114
|
+
end
|
data/bin/console
CHANGED
@@ -1,14 +1,29 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
|
4
|
-
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'console' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
5
14
|
|
6
|
-
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
8
16
|
|
9
|
-
|
10
|
-
|
11
|
-
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
12
28
|
|
13
|
-
|
14
|
-
IRB.start(__FILE__)
|
29
|
+
load Gem.bin_path("wisper", "console")
|
data/bin/gemoji
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'gemoji' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("gemoji", "gemoji")
|
data/bin/htmldiff
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'htmldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "htmldiff")
|
data/bin/ldiff
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'ldiff' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("diff-lcs", "ldiff")
|
data/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rspec' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/setup
CHANGED
@@ -1,8 +1,29 @@
|
|
1
|
-
#!/usr/bin/env
|
2
|
-
|
3
|
-
IFS=$'\n\t'
|
4
|
-
set -vx
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
5
3
|
|
6
|
-
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'setup' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
7
10
|
|
8
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("wisper", "setup")
|
data/lib/eligibility_check.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'csv'
|
3
|
+
require 'colorize'
|
3
4
|
|
4
5
|
|
5
6
|
class Solar_panel_rebate_egilibility_check
|
6
7
|
def initialize(name)
|
7
8
|
@name = name
|
8
9
|
end
|
9
|
-
|
10
|
+
|
10
11
|
def ower_of_the_property
|
11
|
-
puts "Are you the property owner and the current occupier?"
|
12
|
-
puts "1. yes"
|
13
|
-
puts "2. no"
|
12
|
+
puts "Are you the property owner and the current occupier?".colorize(:light_blue)
|
13
|
+
puts "1. yes".colorize(:light_blue)
|
14
|
+
puts "2. no".colorize(:light_blue)
|
14
15
|
answer = gets.chomp.to_i
|
15
16
|
if answer == 1
|
16
17
|
puts "check the next question."
|
data/lib/files_check.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'csv'
|
3
|
+
require 'colorize'
|
3
4
|
|
4
5
|
|
5
6
|
|
@@ -7,8 +8,9 @@ class Provided_files_check
|
|
7
8
|
def initialize(name)
|
8
9
|
@name = name
|
9
10
|
end
|
11
|
+
|
10
12
|
def income_proof
|
11
|
-
puts "provide the proof of income document URL (only .pdf or .doc): "
|
13
|
+
puts "provide the proof of income document URL (only .pdf or .doc): ".colorize(:light_blue)
|
12
14
|
url = gets.chomp
|
13
15
|
if url =~ URI::regexp
|
14
16
|
puts "valid file URL."
|
@@ -3,10 +3,13 @@ require_relative 'rebate_calculator'
|
|
3
3
|
require_relative 'files_check'
|
4
4
|
require_relative 'eligibility_check'
|
5
5
|
require_relative 'manage_lists'
|
6
|
+
require 'logging'
|
6
7
|
|
8
|
+
# logging write the intro
|
9
|
+
# Help file includes *comprehensive* instructions which *accurately* describe: steps to install the application; dependencies required by the application; system/hardware requirements; features of the application.
|
7
10
|
|
8
|
-
|
9
|
-
|
11
|
+
ruby = Solar_panel_rebate_egilibility_check.new("Ruby")
|
12
|
+
ruby.ower_of_the_property
|
10
13
|
|
11
14
|
john_files = Provided_files_check.new("john_files")
|
12
15
|
# john_files.income_proof
|
data/lib/manage_lists.rb
CHANGED
@@ -2,20 +2,20 @@
|
|
2
2
|
class Manage_list
|
3
3
|
attr_reader :eligible_list
|
4
4
|
@@processing_number = 0
|
5
|
-
def initialize
|
6
|
-
@list_name = list_name
|
5
|
+
def initialize
|
7
6
|
@eligible_list = []
|
8
7
|
end
|
9
8
|
def self.display_processing_number
|
10
9
|
@@processing_number
|
11
10
|
end
|
12
|
-
def remove_applicant(name)
|
13
|
-
@eligible_list.delete(name)
|
14
|
-
@@processing_number -= 1
|
15
|
-
end
|
16
11
|
|
17
12
|
def add_to_eligible_list(name)
|
18
13
|
@eligible_list << name
|
19
14
|
@@processing_number += 1
|
20
15
|
end
|
16
|
+
|
17
|
+
def remove_applicant(name)
|
18
|
+
@eligible_list.delete(name)
|
19
|
+
@@processing_number -= 1
|
20
|
+
end
|
21
21
|
end
|
data/lib/rebate_calculator.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
|
1
|
+
require 'csv'
|
2
2
|
|
3
3
|
class Rebate_calculator
|
4
|
-
def initialize
|
5
|
-
@name = name
|
4
|
+
def initialize
|
6
5
|
@stc_rating = 0
|
7
6
|
@stc = 0
|
8
7
|
end
|
8
|
+
|
9
9
|
def stc_postcode_rating(postcode)
|
10
|
-
csv_text = File.read('stc_rating.csv')
|
10
|
+
csv_text = File.read(__dir__ + '/stc_rating.csv')
|
11
11
|
csv = CSV.parse(csv_text, headers: true)
|
12
12
|
result = csv.find do |num|
|
13
13
|
stc_table = num.to_hash
|
@@ -17,12 +17,12 @@ class Rebate_calculator
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def stc_calculator(kw, deeming_year)
|
20
|
-
@stc = kw * @stc_rating * deeming_year
|
20
|
+
@stc = (kw * @stc_rating * deeming_year).floor
|
21
21
|
end
|
22
22
|
|
23
23
|
def rebate
|
24
24
|
stc_value = 37.5
|
25
25
|
rebate_amount = @stc * stc_value
|
26
|
-
rebate_amount > 1888 ? 1888 : rebate_amount
|
26
|
+
rebate_amount > 1888 ? 1888 : rebate_amount
|
27
27
|
end
|
28
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jishan_fast_track_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jishan_Lu
|
@@ -32,13 +32,20 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- ".gitignore"
|
35
|
+
- ".rspec"
|
35
36
|
- CODE_OF_CONDUCT.md
|
36
37
|
- Gemfile
|
37
38
|
- Gemfile.lock
|
38
39
|
- LICENSE.txt
|
39
40
|
- README.md
|
40
41
|
- Rakefile
|
42
|
+
- bin/bundle
|
41
43
|
- bin/console
|
44
|
+
- bin/gemoji
|
45
|
+
- bin/htmldiff
|
46
|
+
- bin/ldiff
|
47
|
+
- bin/rake
|
48
|
+
- bin/rspec
|
42
49
|
- bin/setup
|
43
50
|
- jishan_fast_track_gem.gemspec
|
44
51
|
- lib/cec_approved_retailers.csv
|