bobes-textmagic 0.2.2 → 0.2.3

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.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 Vladimír Bobeš Tužinský
1
+ Copyright (c) 2009 Vladimir Bobes Tuzinsky
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -26,6 +26,10 @@ Use +sudo+ if required by your system.
26
26
 
27
27
  == Basic usage
28
28
 
29
+ Start with requiring +textmagic+ library:
30
+
31
+ require 'textmagic'
32
+
29
33
  To create an API instance, run:
30
34
 
31
35
  api = TextMagic::API.new(username, password)
@@ -115,4 +119,4 @@ Google group[http://groups.google.com/group/textmagic-api].
115
119
 
116
120
  == Copyright
117
121
 
118
- Copyright (c) 2009 Vladimír Bobeš Tužinský. See LICENSE for details.
122
+ Copyright (c) 2009 Vladimir Bobes Tuzinsky. See LICENSE for details.
data/Rakefile CHANGED
@@ -5,11 +5,15 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "textmagic"
8
- gem.summary = %Q{Ruby interface to the TextMagic's SMS gateway}
8
+ gem.summary = %Q{Ruby interface to the TextMagic's Bulk SMS Gateway}
9
9
  gem.email = "vladimir.tuzinsky@gmail.com"
10
10
  gem.homepage = "http://github.com/bobes/textmagic"
11
- gem.authors = ["Vladimír Bobeš Tužinský"]
11
+ gem.authors = ["Vladimir Bobes Tuzinsky"]
12
12
  gem.rubyforge_project = "textmagic"
13
+ gem.add_runtime_dependency "httparty", ">= 0.4.3"
14
+ gem.add_development_dependency "mocha", ">= 0.9.5"
15
+ gem.add_development_dependency "fakeweb", ">= 1.2.2"
16
+ gem.add_development_dependency "jeremymcanally-matchy", ">= 0.1.0"
13
17
  end
14
18
 
15
19
  Jeweler::RubyforgeTasks.new
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 2
4
+ :patch: 3
data/lib/api.rb CHANGED
@@ -39,7 +39,7 @@ module TextMagic
39
39
 
40
40
  # Executes a send command and returns a hash with message ids, sent text and
41
41
  # number of parts if successful, otherwise it raises an Error.
42
- # The returned hash will be extended with custom reader method defined
42
+ # The returned hash will be extended with custom reader methods defined
43
43
  # in Response module.
44
44
  #
45
45
  # This method accepts any positive number of phone numbers and an additional
@@ -64,12 +64,8 @@ module TextMagic
64
64
  # response = api.send('Hi Vilma', '999314159265', '999271828182')
65
65
  # response.message_ids
66
66
  # # => ['141421', '173205']
67
- # response.message_id_hash
68
- # # => { '999314159265' => '141421', '999271828182' => '173205' }
69
- # response.message_id
67
+ # response['999314159265']
70
68
  # # => '141421'
71
- # response.message_id('999271828182')
72
- # # => '173205'
73
69
  # response.parts_count
74
70
  # # => 1
75
71
  def send(text, *args)
@@ -94,7 +90,7 @@ module TextMagic
94
90
  # Executes a message_status command and returns a hash with states of
95
91
  # messages for specified ids if successful, otherwise it raises a
96
92
  # TextMagic::API::Error.
97
- # The returned hash will be extended with custom reader method defined
93
+ # The returned hash will be extended with custom reader methods defined
98
94
  # in Response module.
99
95
  #
100
96
  # This method accepts any positive number of ids specified as an array
@@ -127,7 +123,7 @@ module TextMagic
127
123
 
128
124
  # Executes a receive command and returns a hash with unread messages
129
125
  # if successful, otherwise it raises an Error.
130
- # The returned hash will be extended with custom reader method defined
126
+ # The returned hash will be extended with custom reader methods defined
131
127
  # in Response module.
132
128
  #
133
129
  # This method accepts an optional +last_retrieved_id+ value.
@@ -154,7 +150,7 @@ module TextMagic
154
150
 
155
151
  # Executes a delete_reply command and returns a hash with a list of deleted
156
152
  # message ids if successful, otherwise it raises an Error.
157
- # The returned hash will be extended with custom reader method defined
153
+ # The returned hash will be extended with custom reader methods defined
158
154
  # in Response module.
159
155
  #
160
156
  # This method accepts any positive number of ids specified as an array
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{textmagic}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Vladim\303\255r Bobe\305\241 Tu\305\276insk\303\275"]
9
- s.date = %q{2009-05-25}
8
+ s.authors = ["Vladimir Bobes Tuzinsky"]
9
+ s.date = %q{2009-05-26}
10
10
  s.email = %q{vladimir.tuzinsky@gmail.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  s.require_paths = ["lib"]
42
42
  s.rubyforge_project = %q{textmagic}
43
43
  s.rubygems_version = %q{1.3.1}
44
- s.summary = %q{Ruby interface to the TextMagic's SMS gateway}
44
+ s.summary = %q{Ruby interface to the TextMagic's Bulk SMS Gateway}
45
45
  s.test_files = [
46
46
  "test/test_api.rb",
47
47
  "test/test_charset.rb",
@@ -57,8 +57,20 @@ Gem::Specification.new do |s|
57
57
  s.specification_version = 2
58
58
 
59
59
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
60
+ s.add_runtime_dependency(%q<httparty>, [">= 0.4.3"])
61
+ s.add_development_dependency(%q<mocha>, [">= 0.9.5"])
62
+ s.add_development_dependency(%q<fakeweb>, [">= 1.2.2"])
63
+ s.add_development_dependency(%q<jeremymcanally-matchy>, [">= 0.1.0"])
60
64
  else
65
+ s.add_dependency(%q<httparty>, [">= 0.4.3"])
66
+ s.add_dependency(%q<mocha>, [">= 0.9.5"])
67
+ s.add_dependency(%q<fakeweb>, [">= 1.2.2"])
68
+ s.add_dependency(%q<jeremymcanally-matchy>, [">= 0.1.0"])
61
69
  end
62
70
  else
71
+ s.add_dependency(%q<httparty>, [">= 0.4.3"])
72
+ s.add_dependency(%q<mocha>, [">= 0.9.5"])
73
+ s.add_dependency(%q<fakeweb>, [">= 1.2.2"])
74
+ s.add_dependency(%q<jeremymcanally-matchy>, [">= 0.1.0"])
63
75
  end
64
76
  end
metadata CHANGED
@@ -1,18 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobes-textmagic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
- - "Vladim\xC3\xADr Bobe\xC5\xA1 Tu\xC5\xBEinsk\xC3\xBD"
7
+ - Vladimir Bobes Tuzinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-25 00:00:00 -07:00
12
+ date: 2009-05-26 00:00:00 -07:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: httparty
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.4.3
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: mocha
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.9.5
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: fakeweb
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.2.2
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: jeremymcanally-matchy
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.1.0
54
+ version:
16
55
  description:
17
56
  email: vladimir.tuzinsky@gmail.com
18
57
  executables: []
@@ -69,7 +108,7 @@ rubyforge_project: textmagic
69
108
  rubygems_version: 1.2.0
70
109
  signing_key:
71
110
  specification_version: 2
72
- summary: Ruby interface to the TextMagic's SMS gateway
111
+ summary: Ruby interface to the TextMagic's Bulk SMS Gateway
73
112
  test_files:
74
113
  - test/test_api.rb
75
114
  - test/test_charset.rb