truesenses 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -1,12 +1,13 @@
1
1
  module Truesenses
2
2
  class Config
3
- attr_reader :password, :username, :protocol, :origin
3
+ attr_reader :password, :username, :protocol, :origin, :deliver
4
4
  def initialize(options)
5
5
  options = options.stringify_keys
6
6
  @password = options['password']
7
7
  @username = options['username']
8
8
  @protocol = options['protocol'] || :http
9
9
  @origin = options['origin']
10
+ @deliver = options.has_key?('deliver') ? options['deliver'] : true
10
11
  verify!
11
12
  end
12
13
 
@@ -25,7 +25,11 @@ module Truesenses
25
25
  end
26
26
  params['FLASH'] = 'ON' if options[:flash]
27
27
  params['TEST'] = 'ON' if options[:test]
28
- post_request('SENDMESSAGE', params)
28
+ if self.config.deliver
29
+ post_request('SENDMESSAGE', params)
30
+ else
31
+ puts "Fake Delivery: #{message} to #{receipient}"
32
+ end
29
33
  end
30
34
 
31
35
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: truesenses
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - pascalbetz