fortytwoish 0.2.0 → 0.3.0
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.
- checksums.yaml +5 -5
- data/README.md +9 -2
- data/fortytwoish.gemspec +1 -1
- data/lib/fortytwoish/client.rb +4 -1
- data/lib/fortytwoish/configuration.rb +16 -0
- data/lib/fortytwoish/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c962bb192e01699aaa98d8831af0de165086508423bde7d58fe266c021260cf
|
4
|
+
data.tar.gz: 5d3596927c642abdf25bb1d338e67624dc26c3f41ba318aae96c330054137ee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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('
|
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/
|
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
|
|
data/fortytwoish.gemspec
CHANGED
@@ -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
|
data/lib/fortytwoish/client.rb
CHANGED
@@ -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
|
data/lib/fortytwoish/version.rb
CHANGED
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.
|
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-
|
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.
|
110
|
+
rubygems_version: 2.7.6
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: For sending SMS using Fortytwo API
|