fortytwoish 0.2.0 → 0.3.0

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
- SHA1:
3
- metadata.gz: e43721fd45337ec54cd14a5ca30ed3f7854daf5a
4
- data.tar.gz: 46982c5cf8bd60973c463a44373f92bb35fb225d
2
+ SHA256:
3
+ metadata.gz: 2c962bb192e01699aaa98d8831af0de165086508423bde7d58fe266c021260cf
4
+ data.tar.gz: 5d3596927c642abdf25bb1d338e67624dc26c3f41ba318aae96c330054137ee8
5
5
  SHA512:
6
- metadata.gz: acbb71347345d21d50cd440e95cf013d72c3292f2122fd3e9fdb9dc623a52d3730c52f8df806c763e76e8aa3fcb2f75eb5222c03473bf6110c7094174a3a12ec
7
- data.tar.gz: ca49ada97832d5541e1eb88b0c1816cc6ed97e6afd6578a43ee50cbec115e5a2d183474368ccac32d93960bc75ed9f45a80a9afe7da6857d2e5129d36a05f5ab
6
+ metadata.gz: 72c66f0d9acdeaebd5c795d023f7efba167bfb7505dd457184ce4ca13cb03c4e81bf88be8528c6148155b770a993036106f4cb9eb1450a2f60838d44eded3ce7
7
+ data.tar.gz: 49a1b623bdfb9e923240a066d18debe599d8893857eac9ccf139db6f6999c2ae09151d97fe9ec30ee5d9af605c25e9ed5f3e24ab49b1f5a6f66f09d5537327b5
data/README.md CHANGED
@@ -25,6 +25,7 @@ You can configurate by adding this code to Rails initializer for example:
25
25
  ```ruby
26
26
  Fortytwoish.configure do |config|
27
27
  config.token = 'XXX'
28
+ config.encoding = 'GSM7' # GSM7, UCS2, BINARY are available, GSM7 is default
28
29
  end
29
30
  ```
30
31
 
@@ -33,7 +34,7 @@ end
33
34
  Here is example usage of this gem:
34
35
 
35
36
  ```ruby
36
- Fortytwoish::Client.new('46703051158', 'hello, world!').send
37
+ Fortytwoish::Client.new('15415553010', 'hello, world!').send
37
38
  ```
38
39
 
39
40
  ## Development
@@ -44,7 +45,13 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
44
45
 
45
46
  ## Contributing
46
47
 
47
- Bug reports and pull requests are welcome on GitHub at https://github.com/RushPlay/fortytwoiiish.
48
+ Bug reports and pull requests are welcome on GitHub at https://github.com/RushPlay/fortytwoish.
49
+
50
+ ## Release notes
51
+
52
+ ### 0.3.0
53
+
54
+ * Configurable encoding added
48
55
 
49
56
  ## License
50
57
 
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'bundler', '~> 1.16'
24
24
  spec.add_development_dependency 'rake', '~> 10.0'
25
25
  spec.add_development_dependency 'rspec', '~> 3.0'
26
- spec.add_development_dependency 'webmock'
26
+ spec.add_development_dependency 'webmock', '~> 3.0'
27
27
  end
@@ -40,7 +40,10 @@ module Fortytwoish
40
40
  def body
41
41
  {
42
42
  destinations: numbers.map { |number| { number: number } },
43
- 'sms_content': { message: message }
43
+ sms_content: {
44
+ message: message,
45
+ encoding: configuration.encoding
46
+ }
44
47
  }.to_json
45
48
  end
46
49
  end
@@ -1,5 +1,21 @@
1
1
  module Fortytwoish
2
+ ALLOWED_ENCODINGS = [
3
+ GSM7 = 'GSM7',
4
+ UCS2 = 'UCS2',
5
+ BINARY = 'BINARY'
6
+ ]
7
+
2
8
  class Configuration
3
9
  attr_accessor :token
10
+ attr_reader :encoding
11
+
12
+ def initialize
13
+ self.encoding = GSM7
14
+ end
15
+
16
+ def encoding=(new_encoding)
17
+ return unless ALLOWED_ENCODINGS.include?(new_encoding)
18
+ @encoding = new_encoding
19
+ end
4
20
  end
5
21
  end
@@ -1,3 +1,3 @@
1
1
  module Fortytwoish
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fortytwoish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davor Babić
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-13 00:00:00.000000000 Z
11
+ date: 2018-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.0'
69
69
  description: Simple gem that implements sending SMS using Fortytwo API.
70
70
  email:
71
71
  - davor@davor.se
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.7.6
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: For sending SMS using Fortytwo API