smsc 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,24 @@
1
+ Smsc - sending SMS via http://smsc.ru in a simple way
2
+ ============================================================
3
+
4
+ Smsc gem is a simple smsc.ru service API wrapper for Ruby
5
+
6
+ Installation
7
+ -------------------------------------------------------
8
+
9
+ $ gem install smsc
10
+
11
+ or if you using bundler in your app (e.g. some Rails application) to manage gem dependencies simply add this line
12
+ to your Gemfile
13
+
14
+ $ gem 'smsc'
15
+
16
+ What it can do?
17
+ -----------------------------------
18
+
19
+ Sending sms:
20
+
21
+ ~~~~ ruby
22
+ sms = Smsc::Sms.new('login', 'password', 'windows-1251') # encoding is optional - utf-8 by default
23
+ sms.message('Some nice message', ['+11111234567', '+12221234567'])
24
+ ~~~~~
@@ -1,3 +1,4 @@
1
+ require 'digest/md5'
1
2
  require 'httparty'
2
3
 
3
4
  require "smsc/sender"
@@ -9,12 +10,11 @@ module Smsc
9
10
 
10
11
  def initialize(login, password, charset = 'utf-8')
11
12
  @login = login
12
- @password = password
13
+ @password = Digest::MD5.hexdigest(password.to_s)
13
14
  @charset = charset
14
15
  end
15
16
 
16
17
  def message(message, phones)
17
- message = message
18
18
  phones = phones.join(",")
19
19
  Smsc::Sender.post('https://smsc.ru/sys/send.php', :query => { :login => login, :psw => password, :phones => phones, :mes => message, :charset => charset })
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Smsc
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -19,7 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # specify any dependencies here; for example:
22
- # s.add_development_dependency "rspec"
23
- # s.add_runtime_dependency "rest-client"
24
- s.add_dependency "httparty", "~> 0.8.1"
22
+ s.add_dependency "httparty", "~> 0.9.0"
25
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smsc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-02 00:00:00.000000000 Z
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &15303840 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.1
21
+ version: 0.9.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *15303840
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.0
25
30
  description: Simple client for sending SMS via smsc.ru
26
31
  email:
27
32
  - voronkovaa@gmail.com
@@ -31,6 +36,7 @@ extra_rdoc_files: []
31
36
  files:
32
37
  - .gitignore
33
38
  - Gemfile
39
+ - README.markdown
34
40
  - Rakefile
35
41
  - lib/smsc.rb
36
42
  - lib/smsc/sender.rb
@@ -56,8 +62,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
62
  version: '0'
57
63
  requirements: []
58
64
  rubyforge_project: smsc
59
- rubygems_version: 1.8.10
65
+ rubygems_version: 1.8.24
60
66
  signing_key:
61
67
  specification_version: 3
62
68
  summary: Simple client for sending SMS via smsc.ru
63
69
  test_files: []
70
+ has_rdoc: