jishan_fast_track_gem 0.1.4 → 0.1.5
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/Gemfile +2 -2
- data/Gemfile.lock +3 -7
- data/lib/files_check.rb +11 -12
- data/lib/jishan_fast_track_gem/version.rb +1 -1
- data/lib/jishan_fast_track_gem.rb +6 -11
- 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: 9eb7330cec0d1d1825a87b6961e91c3cd299b48da14da0e6eedc931b3e2ea0ef
|
4
|
+
data.tar.gz: b047ac28d5e251024ebd351a0414cef4ad012ec3c9983b892adbdbea6ca325c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ffe07f583fb80e1a3093ff5037d4a24470fe7356cb038e1e1b8c8c785af36d6b53c4d6dc6b7a2506603d55517c2223bb7e3b71a139a9699944b8ddc681c6d4
|
7
|
+
data.tar.gz: f569d73a731e14937c178708c1759af0cf7f62cc7aecb5e1672b8ebe6e40dfea3fa87d0f05aa129a2fb902c2b7a73252223e205820f3cc880f0f931716893d72
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jishan_fast_track_gem (0.1.
|
4
|
+
jishan_fast_track_gem (0.1.4)
|
5
5
|
colorize (~> 0.8.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -12,11 +12,6 @@ GEM
|
|
12
12
|
equatable (0.6.1)
|
13
13
|
gemoji (3.0.1)
|
14
14
|
highline (2.0.3)
|
15
|
-
little-plugger (1.1.4)
|
16
|
-
logging (2.2.2)
|
17
|
-
little-plugger (~> 1.1)
|
18
|
-
multi_json (~> 1.10)
|
19
|
-
multi_json (1.14.1)
|
20
15
|
necromancer (0.5.1)
|
21
16
|
options (2.3.2)
|
22
17
|
pastel (0.7.3)
|
@@ -38,6 +33,7 @@ GEM
|
|
38
33
|
rspec-mocks (3.0.4)
|
39
34
|
rspec-support (~> 3.0.0)
|
40
35
|
rspec-support (3.0.4)
|
36
|
+
table_print (1.5.6)
|
41
37
|
tty-color (0.5.1)
|
42
38
|
tty-cursor (0.7.1)
|
43
39
|
tty-prompt (0.21.0)
|
@@ -58,10 +54,10 @@ DEPENDENCIES
|
|
58
54
|
colorize (~> 0.8.1)
|
59
55
|
gemoji
|
60
56
|
jishan_fast_track_gem!
|
61
|
-
logging
|
62
57
|
progress_bar
|
63
58
|
rake (~> 12.0)
|
64
59
|
rspec (~> 3.0.0)
|
60
|
+
table_print
|
65
61
|
tty-prompt
|
66
62
|
|
67
63
|
BUNDLED WITH
|
data/lib/files_check.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'csv'
|
3
3
|
require 'colorize'
|
4
|
-
|
4
|
+
require 'table_print'
|
5
5
|
|
6
6
|
|
7
7
|
class Provided_files_check
|
@@ -13,17 +13,16 @@ class Provided_files_check
|
|
13
13
|
puts "provide the proof of income document URL (only .pdf or .doc): ".colorize(:light_blue)
|
14
14
|
url = gets.chomp
|
15
15
|
if url =~ URI::regexp
|
16
|
-
puts "valid file URL."
|
17
16
|
else
|
18
|
-
puts "not valid file URL."
|
17
|
+
puts "It's not a valid file URL."
|
19
18
|
end
|
20
19
|
|
21
20
|
file_type = File.extname(URI.parse(url).path)
|
22
21
|
if file_type == ".pdf" || file_type == ".doc"
|
23
|
-
puts "
|
22
|
+
puts "File upload succeeded."
|
24
23
|
two_forms_of_identity
|
25
24
|
else
|
26
|
-
puts "upload failed. please provide
|
25
|
+
puts "upload failed. please provide .pdf or .doc document."
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|
@@ -35,7 +34,7 @@ class Provided_files_check
|
|
35
34
|
if url =~ URI::regexp
|
36
35
|
puts "valid file URL."
|
37
36
|
else
|
38
|
-
puts "not valid file URL."
|
37
|
+
puts "It's not a valid file URL."
|
39
38
|
end
|
40
39
|
|
41
40
|
file_type = File.extname(URI.parse(url).path)
|
@@ -43,7 +42,7 @@ class Provided_files_check
|
|
43
42
|
file_arr << file_type
|
44
43
|
puts "file upload succeeded."
|
45
44
|
else
|
46
|
-
|
45
|
+
puts "upload failed. please provide .pdf or .doc document."
|
47
46
|
end
|
48
47
|
break if file_arr.size == 2
|
49
48
|
end
|
@@ -55,17 +54,16 @@ class Provided_files_check
|
|
55
54
|
url = gets.chomp
|
56
55
|
file_type = File.extname(URI.parse(url).path)
|
57
56
|
|
58
|
-
|
59
|
-
puts "valid file URL."
|
57
|
+
if url =~ URI::regexp
|
60
58
|
else
|
61
|
-
puts "not valid file URL."
|
59
|
+
puts "It's not a valid file URL."
|
62
60
|
end
|
63
61
|
|
64
62
|
if file_type == ".pdf" || file_type == ".doc"
|
65
63
|
puts "file upload succeeded."
|
66
64
|
eligible_quote(url)
|
67
65
|
else
|
68
|
-
puts "upload failed. please provide
|
66
|
+
puts "upload failed. please provide .pdf or .doc document."
|
69
67
|
end
|
70
68
|
end
|
71
69
|
def eligible_quote(url)
|
@@ -81,7 +79,8 @@ class Provided_files_check
|
|
81
79
|
if result != nil
|
82
80
|
puts "Eligible retailer."
|
83
81
|
else
|
84
|
-
puts "Not Eligible retailer."
|
82
|
+
puts "Not Eligible retailer. Please check the provided list of CEC approved retailers below"
|
83
|
+
tp csv.map { |row| row.to_hash }, {:NAME => {display_name: "Company Name"}}, {:URL => {width: 35}}
|
85
84
|
end
|
86
85
|
end
|
87
86
|
end
|
@@ -3,39 +3,34 @@ 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'
|
7
6
|
|
8
|
-
#
|
7
|
+
# write the intro
|
9
8
|
# 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.
|
10
9
|
|
11
10
|
ruby = Solar_panel_rebate_egilibility_check.new("Ruby")
|
12
|
-
ruby.ower_of_the_property
|
11
|
+
# ruby.ower_of_the_property
|
13
12
|
|
14
13
|
john_files = Provided_files_check.new("john_files")
|
15
|
-
|
16
|
-
john_rebate = Rebate_calculator.new
|
14
|
+
john_files.eligible_quote("www.wrong.com")
|
15
|
+
john_rebate = Rebate_calculator.new
|
17
16
|
# john_rebate.stc_postcode_rating(3000)
|
18
17
|
# john_rebate.stc_calculator(5, 5)
|
19
18
|
# p john_rebate.rebate
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
# john_files.retailer_quote
|
24
20
|
# peta_files= Provided_files_check.new("peta_files")
|
25
21
|
# peta_files.retailer_quote
|
26
22
|
|
27
23
|
|
28
|
-
# a_list = Manage_list.new
|
24
|
+
# a_list = Manage_list.new
|
29
25
|
# a_list.add_to_eligible_list("John")
|
30
26
|
# a_list.add_to_eligible_list("Peta")
|
31
27
|
# a_list.add_to_eligible_list("Peta")
|
32
28
|
# a_list.remove_applicant("John")
|
33
29
|
|
34
|
-
|
35
30
|
# p Manage_list.display_processing_number
|
36
31
|
# p a_list.eligible_list
|
37
32
|
|
38
|
-
# john_rebate = Rebate_calculator.new
|
33
|
+
# john_rebate = Rebate_calculator.new
|
39
34
|
# john_rebate.stc_postcode_rating(3163)
|
40
35
|
# john_rebate.stc_calculator(3, 15)
|
41
36
|
# p john_rebate.rebate
|