rfetion 0.4.8 → 0.5.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.
- data/README.textile +2 -2
- data/Rakefile +20 -0
- data/VERSION +1 -1
- data/lib/rfetion/contact.rb +7 -7
- data/lib/rfetion/fetion.rb +260 -292
- data/lib/rfetion/sipc_message.rb +104 -0
- data/lib/rfetion.rb +3 -1
- data/rfetion.gemspec +13 -3
- data/spec/rfetion/fetion_spec.rb +369 -0
- data/spec/rfetion/sipc_message_spec.rb +93 -0
- data/spec/spec.opts +8 -0
- data/spec/spec_helper.rb +8 -0
- metadata +11 -4
data/README.textile
CHANGED
data/Rakefile
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'spec/rake/spectask'
|
4
|
+
require 'rake/rdoctask'
|
2
5
|
require 'jeweler'
|
3
6
|
|
7
|
+
desc 'Default: run unit tests.'
|
8
|
+
task :default => :spec
|
9
|
+
|
10
|
+
desc 'Generate documentation for the rfetion plugin.'
|
11
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
12
|
+
rdoc.rdoc_dir = 'rdoc'
|
13
|
+
rdoc.title = 'rfetion'
|
14
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
15
|
+
rdoc.rdoc_files.include('README')
|
16
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Run all specs in spec directory"
|
20
|
+
Spec::Rake::SpecTask.new(:spec) do |t|
|
21
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
22
|
+
end
|
23
|
+
|
4
24
|
Jeweler::Tasks.new do |gemspec|
|
5
25
|
gemspec.name = 'rfetion'
|
6
26
|
gemspec.summary = 'rfetion is a ruby gem for China Mobile fetion service that you can send SMS free.'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/rfetion/contact.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class Contact
|
2
|
-
attr_reader :uri, :mobile_no, :nickname, :impresa, :nickname
|
2
|
+
attr_reader :sid, :uri, :mobile_no, :nickname, :impresa, :nickname
|
3
3
|
|
4
|
-
def initialize(
|
5
|
-
@
|
6
|
-
@
|
7
|
-
@
|
8
|
-
@
|
9
|
-
@
|
4
|
+
def initialize(attrs)
|
5
|
+
@sid = attrs["sid"]
|
6
|
+
@uri = attrs["su"]
|
7
|
+
@mobile_no = attrs["m"]
|
8
|
+
@nickname = attrs["n"]
|
9
|
+
@impresa = attrs["i"]
|
10
10
|
end
|
11
11
|
end
|