cadooz 2.2.1 → 2.2.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: c8e774b7abba9073caff04664a3af8c1fb3dfd97
4
- data.tar.gz: aa6f662004d7898778846fba80d9ba98da0ec389
3
+ metadata.gz: b95bab0303729348b4a61d02e2321f4aba429814
4
+ data.tar.gz: e0acb5d2d6aac4a5cb1074df06f0b9ddcbf139cd
5
5
  SHA512:
6
- metadata.gz: 0f04556e1ee2490c189670553d67d6832ce64819fe8c05dad3bfbd5cfb1e2a75064a60004b54d4ce2d50d855fff01a75ae7b059e2354c4e82e6879e4128c04a2
7
- data.tar.gz: 5151d3f1adefabbc6d568b42c3a81e55f3282761107ae6b7fc4cc432ebe6c3590029ee61e35dd8dfcae350fb83b48e9ceae49bf6319030e0a7027f737e6ad84e
6
+ metadata.gz: 32ab6cd766893896975bbdf1eb68e6655812fe281a0473beed69554862a223ca78b00cb2901c6dc832d0f12f7c82e15495cbe32bd7f3c6914a0beea6676c8b0a
7
+ data.tar.gz: 33121a0fd199eb902a36f16ce1dd5e324efdd37f8a4253761d2747d97dc134e30b2c70fa56213733477d06293650ab1fd90422cf09f2c9a6c0300528b066ab33
data/Rakefile CHANGED
@@ -1,23 +1,9 @@
1
- #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
- begin
8
- require 'rdoc/task'
9
- rescue LoadError
10
- require 'rdoc/rdoc'
11
- require 'rake/rdoctask'
12
- RDoc::Task = Rake::RDocTask
13
- end
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
14
3
 
15
- RDoc::Task.new(:rdoc) do |rdoc|
16
- rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'cadooz'
18
- rdoc.options << '--line-numbers'
19
- rdoc.rdoc_files.include('README.rdoc')
20
- rdoc.rdoc_files.include('lib/**/*.rb')
21
- end
4
+ RSpec::Core::RakeTask.new(:spec)
22
5
 
23
- Bundler::GemHelper.install_tasks
6
+ # run console with gem loaded
7
+ task :console do
8
+ exec "irb -r cadooz -I ./lib"
9
+ end
@@ -18,5 +18,7 @@ class Cadooz::Mutable::Address
18
18
  @street = nil
19
19
  @street_addon = nil
20
20
  @zipcode = nil
21
+
22
+ default_value_for_nil
21
23
  end
22
24
  end
@@ -6,5 +6,7 @@ class Cadooz::Mutable::GreetingCard
6
6
  def initialize
7
7
  @subject = nil
8
8
  @text = nil
9
+
10
+ default_value_for_nil
9
11
  end
10
12
  end
@@ -6,5 +6,7 @@ class Cadooz::Mutable::InvoiceInformation
6
6
  def initialize
7
7
  @debitor_number = nil
8
8
  @value = nil
9
+
10
+ default_value_for_nil
9
11
  end
10
12
  end
@@ -28,5 +28,7 @@ class Cadooz::Mutable::Order
28
28
  @send_mail = nil
29
29
  @test = nil
30
30
  @website = nil
31
+
32
+ default_value_for_nil
31
33
  end
32
34
  end
@@ -18,5 +18,7 @@ class Cadooz::Mutable::OrderPosition
18
18
  @voucher_address = nil
19
19
  @voucher_address_editable = nil
20
20
  @voucher_address_preset = nil
21
+
22
+ default_value_for_nil
21
23
  end
22
24
  end
@@ -10,5 +10,7 @@ class Cadooz::Mutable::Payment
10
10
  @type = nil
11
11
  @value = nil
12
12
  @verified = nil
13
+
14
+ default_value_for_nil
13
15
  end
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module Cadooz
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -38,6 +38,13 @@ module Mixins
38
38
 
39
39
  Cadooz.constants.include?(klass)
40
40
  end
41
+
42
+ def default_value_for_nil
43
+ self.instance_variables.each do |var|
44
+ value = self.instance_variable_get(var)
45
+ self.instance_variable_set(var, 'not available') if value.blank?
46
+ end
47
+ end
41
48
  end
42
49
 
43
50
  class String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadooz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Brown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon