megam_api 1.8.13 → 1.8.14
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/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/balances_collection.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2348aa7e02ff2fd6aa831a40034044ff98696f7d
|
4
|
+
data.tar.gz: c249032d7b8a8d71a15ea55b491a55738a391bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e045627fbf25b44b5892a5806df196621fbbf1c298ae0125a6b9c820eea3591e8482686d8a3ce3aa3d5f547965c7bb3780c8ba22c50ffb436df009fb74463728
|
7
|
+
data.tar.gz: 7956989644446bdc12b62efc6914e6e7ee72c0778de9d2e52e063dbf2da1d74fe6060401b86160bc7977a59f1759d9a3916c62b280c32530e76f3940886d2a5b
|
data/lib/megam/api/version.rb
CHANGED
@@ -20,14 +20,14 @@ module Megam
|
|
20
20
|
def []=(index, arg)
|
21
21
|
is_megam_balance(arg)
|
22
22
|
@balance[index] = arg
|
23
|
-
@balance_by_name[arg.
|
23
|
+
@balance_by_name[arg.id] = index
|
24
24
|
end
|
25
25
|
|
26
26
|
def <<(*args)
|
27
27
|
args.flatten.each do |a|
|
28
28
|
is_megam_balance(a)
|
29
29
|
@balance << a
|
30
|
-
@balance_by_name[a.
|
30
|
+
@balance_by_name[a.id] =@balance.length - 1
|
31
31
|
end
|
32
32
|
self
|
33
33
|
end
|
@@ -42,15 +42,15 @@ module Megam
|
|
42
42
|
# be placed after the most recent addition done by the currently executing
|
43
43
|
# balance
|
44
44
|
@balance.insert(@insert_after_idx + 1, balance)
|
45
|
-
# update
|
45
|
+
# update id -> location mappings and register new balance
|
46
46
|
@balance_by_name.each_key do |key|
|
47
47
|
@balance_by_name[key] += 1 if@balance_by_name[key] > @insert_after_idx
|
48
48
|
end
|
49
|
-
@balance_by_name[balance.
|
49
|
+
@balance_by_name[balance.id] = @insert_after_idx + 1
|
50
50
|
@insert_after_idx += 1
|
51
51
|
else
|
52
52
|
@balance << balance
|
53
|
-
@balance_by_name[balance.
|
53
|
+
@balance_by_name[balance.id] =@balance.length - 1
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
@@ -73,7 +73,7 @@ module Megam
|
|
73
73
|
def lookup(balance)
|
74
74
|
lookup_by = nil
|
75
75
|
if balance.kind_of?(Megam::Balances)
|
76
|
-
lookup_by = balance.
|
76
|
+
lookup_by = balance.id
|
77
77
|
elsif balance.kind_of?(String)
|
78
78
|
lookup_by = balance
|
79
79
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Vinodhini V, Rathish VBR, Rajesh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|