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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e12796549d6cfc1532333f7ecb5a14850c7d6541
4
- data.tar.gz: 1295ed2cd93042652ae1f6a5ece9cb6ddc6c03c6
3
+ metadata.gz: 2a6922c503db36ec8c5a0402a96c7a098d6c2e18
4
+ data.tar.gz: 5824a170a896105170b2d17318af8ca22878ffd5
5
5
  SHA512:
6
- metadata.gz: 472b43088920939f45daf6396b6543db378acb8c0a5834e27f4a6feefb02a5cc78c55fb5b145d7bcce5c7fe0085fe58abc079125d92b8386885930dad82ab436
7
- data.tar.gz: 8bd6338571961b8181b966cfe7a75b15b14c82a9352c638964af81480c8363716851de2f806f3883b2cc99f3ee184e1c1247289e3b0d62a4ccfe5b04de42ddcf
6
+ metadata.gz: 23cd2a8298ba629d762508a141fb10ab9d9f38de59a766f9899db1a41d9f08f3710089dbed5b3cc27d5f9669955c0a3187e90732c1e71e33810c7b1b960500bd
7
+ data.tar.gz: 4e5d98b5a643cb4e79364fda6f329a32d5d4fd85d0440c4fc2e5c270ac53d5b2d767978bd1a0bf951bf784c3650081da13339c3aac87d4ce6128ab60eadc25ef
@@ -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
- { key: "#{name}", value: list }
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
@@ -1,3 +1,3 @@
1
1
  module Databox
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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 "I was here"
39
- messages.add "This is test"
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.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-02-09 00:00:00.000000000 Z
11
+ date: 2014-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty