nordea-rb 0.3.1 → 0.3.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -50,10 +50,9 @@ protected
50
50
 
51
51
  feed.entry do |entry|
52
52
  entry.id "tag:nordea,#{SCHEMA_DATE}:#{@pnr}/#{item.account.index};" +
53
- "#{item_time.strftime('%Y-%m-%d')};#{item.text.gsub(/\W/, '')};" +
53
+ "#{item_time.strftime('%Y-%m-%d')};#{item.final_text.gsub(/\W/, '')};"
54
54
  amount = %Q{%.2f SEK} % item.amount
55
55
  entry.title "#{item.text} #{amount}"
56
- "#{item.amount};#{}".gsub(/\s+/, '')
57
56
  entry.content %{<table>
58
57
  <tr><th>Konto:</th> <td>#{item.account.name}</td></tr>
59
58
  <tr><th>Datum:</th> <td>#{item_date}</td></tr>
@@ -8,6 +8,10 @@ module Nordea
8
8
 
9
9
  attr_accessor :date, :amount, :text, :account
10
10
 
11
+ def final_text
12
+ text.sub("Res. köp", "Kortköp")
13
+ end
14
+
11
15
  def withdrawal?
12
16
  amount < 0
13
17
  end
@@ -2,7 +2,7 @@ module Nordea
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join(".")
8
8
  end
data/nordea-rb.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{nordea-rb}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Martin Str\303\266m"]
12
- s.date = %q{2009-11-29}
12
+ s.date = %q{2009-12-27}
13
13
  s.default_executable = %q{nordea}
14
14
  s.description = %q{Ruby library for accessing your Nordea Bank account and transferring money between your own accounts.}
15
15
  s.email = %q{name@my-domain.se}
@@ -32,6 +32,10 @@ class TestTransaction < Test::Unit::TestCase
32
32
  assert_equal "Res. köp", @transaction.text
33
33
  end
34
34
 
35
+ should 'have a text with the "reserved" part stripped' do
36
+ assert_equal "Kortköp", @transaction.final_text
37
+ end
38
+
35
39
  # should "allow to create a Transaction using a hash for params" do
36
40
  # transaction = Nordea::Transaction.new(:date => '2009-10-11', :text => "foo", :amount => -13.37)
37
41
  # assert_equal '2009-10-11', transaction.date.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nordea-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Martin Str\xC3\xB6m"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-29 00:00:00 +01:00
12
+ date: 2009-12-27 00:00:00 +01:00
13
13
  default_executable: nordea
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency