excel-data 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
data/lib/excel-data/cor_ext.rb
CHANGED
@@ -14,7 +14,6 @@ String.class_eval do
|
|
14
14
|
percent_of_day = ("0."+ms[1]).to_f
|
15
15
|
ms_seconds = percent_of_day * 1.day.to_i
|
16
16
|
ms_date = ms_start + ms_days.days+ms_seconds.seconds
|
17
|
-
# ms_date_formatted = ms_date.strftime("%m/%d/%y %I:%M %p")
|
18
17
|
end
|
19
18
|
return ms_date
|
20
19
|
end
|
@@ -29,6 +28,14 @@ Float.class_eval do
|
|
29
28
|
ms_date = ms_start + ms_days.days+ms_seconds.seconds
|
30
29
|
return ms_date
|
31
30
|
end
|
31
|
+
def to_excel_currency
|
32
|
+
if self > 0
|
33
|
+
return "$"+self.round(2).to_s
|
34
|
+
else
|
35
|
+
return ''
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
32
39
|
end
|
33
40
|
Integer.class_eval do
|
34
41
|
def parse_excel_date
|
@@ -53,7 +60,6 @@ Hash.class_eval do
|
|
53
60
|
end
|
54
61
|
paramaters << paramater_string
|
55
62
|
}
|
56
|
-
|
57
63
|
return "?&"+paramaters.join("&")
|
58
64
|
end
|
59
65
|
|
data/lib/excel-data/iqy.rb
CHANGED
@@ -3,11 +3,11 @@ class Iqy
|
|
3
3
|
def initialize(base_url)
|
4
4
|
@base_url = base_url
|
5
5
|
end
|
6
|
-
def iqy_url(params
|
6
|
+
def iqy_url(params,path)
|
7
7
|
@base_url+path+params.to_excel_param
|
8
8
|
end
|
9
9
|
|
10
|
-
def iqy_file(params
|
10
|
+
def iqy_file(params,path)
|
11
11
|
start_iqy+iqy_url(params,path)+end_iqy
|
12
12
|
end
|
13
13
|
|
data/lib/excel-data/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
3
|
+
#Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
@@ -9,3 +9,7 @@ Connecting to database specified by database.yml
|
|
9
9
|
Connecting to database specified by database.yml
|
10
10
|
Connecting to database specified by database.yml
|
11
11
|
Connecting to database specified by database.yml
|
12
|
+
Connecting to database specified by database.yml
|
13
|
+
Connecting to database specified by database.yml
|
14
|
+
Connecting to database specified by database.yml
|
15
|
+
Connecting to database specified by database.yml
|