cm-sms 0.2.3 → 0.2.4

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: b1e5efb6fb6d8b7404b231d6112b9e5b2573a572
4
- data.tar.gz: 40dba4288574a1fba8a7794e5017ed152c7d1521
3
+ metadata.gz: e052fd8b6961f720ed39625f742c64d4e2eaefdc
4
+ data.tar.gz: 3c644a3da6cf7f9163a6c127478948769ad3b006
5
5
  SHA512:
6
- metadata.gz: 7a2bfcf276bc6a624e20ad87c73e21c8635c4fa913ef985ec8d2518c6604b260c0545745ecaa36d98e99374d8c883d95ff1a52389784f28519ed1b94109e7d82
7
- data.tar.gz: 43593310dcbdedab687421a668c4bb7eff9b2db82150369317ea2abf95f396e54775a5e86cbafdd5ead112f634ab5062d35c65fe6a8439e58941eccedddd741d
6
+ metadata.gz: 93e5bf1880a3c5dc30c9790aebaceef370ed67e788cdc249d81dc5cbfb91e4cd74738c3aae2e5a7149d4b96a5ab8bd356c04bbd9d44ca7acb28cce7447fd79c8
7
+ data.tar.gz: 2557110c83e61632dd70bc0bc86fd10d5add9561c1a2dbaccf3efa26bf4505b73dcc440cb55d97e931add3a52c83770a5a50c3db19a932ae797c83df65f00573
data/.gitignore CHANGED
@@ -10,4 +10,5 @@
10
10
 
11
11
  .DS_Store
12
12
  coverage
13
- *.gem
13
+ *.gem
14
+ .coveralls.yml
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'simplecov', require: false, group: :test
7
- gem 'codeclimate-test-reporter', require: nil, group: :test
7
+ gem 'coveralls', require: false, group: :test
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://img.shields.io/travis/HitFox/cm-sms.svg?style=flat-square)](https://travis-ci.org/HitFox/cm-sms)
4
4
  [![Gem](https://img.shields.io/gem/dt/cm-sms.svg?style=flat-square)](https://rubygems.org/gems/cm-sms)
5
5
  [![Code Climate](https://img.shields.io/codeclimate/github/HitFox/cm-sms.svg?style=flat-square)](https://codeclimate.com/github/HitFox/cm-sms)
6
- [![Coverage](https://img.shields.io/codeclimate/coverage/github/HitFox/cm-sms.svg?style=flat-square)](https://codeclimate.com/github/HitFox/cm-sms)
6
+ [![Coverage](https://img.shields.io/coveralls/HitFox/cm-sms.svg?style=flat-square)](https://coveralls.io/github/HitFox/cm-sms)
7
7
 
8
8
 
9
9
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cm/sms`. To experiment with that code, run `bin/console` for an interactive prompt.
@@ -7,7 +7,7 @@ module CmSms
7
7
  module VERSION
8
8
  MAJOR = 0
9
9
  MINOR = 2
10
- TINY = 3
10
+ TINY = 4
11
11
  PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -4,9 +4,11 @@ module CmSms
4
4
 
5
5
  ATTRIBUTE_NAMES = %w(sent received to reference statuscode errorcode errordescription)
6
6
 
7
- attr_reader *ATTRIBUTE_NAMES
7
+ attr_reader *ATTRIBUTE_NAMES, :attributes
8
8
 
9
9
  def initialize(attributes = {})
10
+ @attributes = attributes
11
+
10
12
  attributes.each { |attr, value| instance_variable_set("@#{attr}", value) } if attributes
11
13
  end
12
14
 
@@ -53,6 +55,10 @@ module CmSms
53
55
  def error?
54
56
  errorcode? || rejected? || failed?
55
57
  end
58
+
59
+ def to_yaml
60
+ (@attributes || {}).to_yaml
61
+ end
56
62
 
57
63
  end
58
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - itschn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-22 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler