databox 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/databox/integration.rb +6 -4
- data/lib/databox/version.rb +1 -1
- data/spec/databox/messages_spec.rb +4 -4
- 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: 2a6922c503db36ec8c5a0402a96c7a098d6c2e18
|
4
|
+
data.tar.gz: 5824a170a896105170b2d17318af8ca22878ffd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23cd2a8298ba629d762508a141fb10ab9d9f38de59a766f9899db1a41d9f08f3710089dbed5b3cc27d5f9669955c0a3187e90732c1e71e33810c7b1b960500bd
|
7
|
+
data.tar.gz: 4e5d98b5a643cb4e79364fda6f329a32d5d4fd85d0440c4fc2e5c270ac53d5b2d767978bd1a0bf951bf784c3650081da13339c3aac87d4ce6128ab60eadc25ef
|
data/lib/databox/integration.rb
CHANGED
@@ -25,15 +25,17 @@ class Databox::Integration < Databox::Client
|
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
|
-
#TODO: Add support for icons
|
29
28
|
class Databox::Messages < Databox::Integration
|
30
29
|
|
31
|
-
def add message
|
32
|
-
@list.push message
|
30
|
+
def add message, icon
|
31
|
+
@list.push [message, icon]
|
33
32
|
end
|
34
33
|
|
35
34
|
def to_data
|
36
|
-
|
35
|
+
[
|
36
|
+
{ key: "#{name}", value: list.map(&:first) },
|
37
|
+
{ key: "#{name}@icons", value: list.map{|e| e[1] } },
|
38
|
+
]
|
37
39
|
end
|
38
40
|
|
39
41
|
end
|
data/lib/databox/version.rb
CHANGED
@@ -8,7 +8,7 @@ describe Databox::Messages do
|
|
8
8
|
it { expect(messages.name).to eq "just_messages" }
|
9
9
|
|
10
10
|
it {
|
11
|
-
expect { messages.add("Just message") }
|
11
|
+
expect { messages.add("Just message", "Number") }
|
12
12
|
.to change { messages.list.size }.from(0).to(1)
|
13
13
|
}
|
14
14
|
|
@@ -20,7 +20,7 @@ describe Databox::Messages do
|
|
20
20
|
.to_return { request_from "simple_message" }
|
21
21
|
}
|
22
22
|
|
23
|
-
before { messages.add("I was here") }
|
23
|
+
before { messages.add("I was here", "USD") }
|
24
24
|
|
25
25
|
it {
|
26
26
|
expect { messages.save }
|
@@ -35,8 +35,8 @@ describe Databox::Messages do
|
|
35
35
|
}
|
36
36
|
|
37
37
|
before do
|
38
|
-
messages.add
|
39
|
-
messages.add
|
38
|
+
messages.add("I was here", "Number")
|
39
|
+
messages.add("This is test", "EUR")
|
40
40
|
end
|
41
41
|
|
42
42
|
it {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: databox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oto Brglez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|