xignite 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/lib/xignite/hash.rb +1 -1
- data/lib/xignite/service.rb +2 -2
- data/lib/xignite/version.rb +1 -1
- metadata +9 -20
data/CHANGELOG.md
CHANGED
data/lib/xignite/hash.rb
CHANGED
@@ -13,7 +13,7 @@ module Xignite
|
|
13
13
|
Date.strptime(v, '%m/%d/%Y')
|
14
14
|
when /^\d+:\d+:\d+ [APM]{2}$/
|
15
15
|
tz = ::TZInfo::Timezone.get(options[:timezone] || 'GMT')
|
16
|
-
tz.local_to_utc(
|
16
|
+
tz.local_to_utc(DateTime.strptime("#{data['Date']} #{v}", "#{DATE_FORMAT} #{TIME_FORMAT}"))
|
17
17
|
else
|
18
18
|
v
|
19
19
|
end
|
data/lib/xignite/service.rb
CHANGED
@@ -54,7 +54,7 @@ module Xignite
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def initialize(curl_response=nil)
|
57
|
-
return
|
57
|
+
return if curl_response.nil?
|
58
58
|
Crack::XML.parse(curl_response.body_str).each do |klass, data|
|
59
59
|
data = weed(data)
|
60
60
|
Xignite.const_set(klass, Class.new(Xignite.const_get(data.class.to_s))) unless Xignite.const_defined?(klass)
|
@@ -66,7 +66,7 @@ module Xignite
|
|
66
66
|
private
|
67
67
|
|
68
68
|
def weed(data)
|
69
|
-
data.reject! { |key| key =~ /\Axmlns/ }
|
69
|
+
data.reject! { |key, _| key =~ /\Axmlns/ }
|
70
70
|
key = data.keys.first
|
71
71
|
array = data[key]
|
72
72
|
if data.keys.size == 1 && array.class == ::Array
|
data/lib/xignite/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xignite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-11 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70149193684900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,21 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rspec
|
27
|
-
requirement: &70117322795640 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ! '>='
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70117322795640
|
24
|
+
version_requirements: *70149193684900
|
36
25
|
- !ruby/object:Gem::Dependency
|
37
26
|
name: curb
|
38
|
-
requirement: &
|
27
|
+
requirement: &70149193684440 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
29
|
requirements:
|
41
30
|
- - ! '>='
|
@@ -43,10 +32,10 @@ dependencies:
|
|
43
32
|
version: '0'
|
44
33
|
type: :runtime
|
45
34
|
prerelease: false
|
46
|
-
version_requirements: *
|
35
|
+
version_requirements: *70149193684440
|
47
36
|
- !ruby/object:Gem::Dependency
|
48
37
|
name: crack
|
49
|
-
requirement: &
|
38
|
+
requirement: &70149193684020 !ruby/object:Gem::Requirement
|
50
39
|
none: false
|
51
40
|
requirements:
|
52
41
|
- - ! '>='
|
@@ -54,10 +43,10 @@ dependencies:
|
|
54
43
|
version: '0'
|
55
44
|
type: :runtime
|
56
45
|
prerelease: false
|
57
|
-
version_requirements: *
|
46
|
+
version_requirements: *70149193684020
|
58
47
|
- !ruby/object:Gem::Dependency
|
59
48
|
name: tzinfo
|
60
|
-
requirement: &
|
49
|
+
requirement: &70149193671500 !ruby/object:Gem::Requirement
|
61
50
|
none: false
|
62
51
|
requirements:
|
63
52
|
- - ! '>='
|
@@ -65,7 +54,7 @@ dependencies:
|
|
65
54
|
version: '0'
|
66
55
|
type: :runtime
|
67
56
|
prerelease: false
|
68
|
-
version_requirements: *
|
57
|
+
version_requirements: *70149193671500
|
69
58
|
description: Access the Xignite financial data web services with a simple and intuitive
|
70
59
|
Ruby library
|
71
60
|
email:
|