flyerhzm-rfetion 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +22 -1
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/bin/rfetion +5 -0
- data/lib/rfetion/command.rb +36 -0
- data/rfetion.gemspec +8 -2
- metadata +18 -6
data/README.textile
CHANGED
@@ -4,11 +4,16 @@ rfetion is a ruby gem for China Mobile fetion service that you can send SMS free
|
|
4
4
|
|
5
5
|
**************************************************************************
|
6
6
|
|
7
|
+
h2. Demo
|
8
|
+
|
9
|
+
see "http://fetion.heroku.com":http://fetion.heroku.com
|
10
|
+
|
11
|
+
**************************************************************************
|
12
|
+
|
7
13
|
h2. Install
|
8
14
|
|
9
15
|
<pre><code>
|
10
16
|
gem sources -a http://gems.github.com
|
11
|
-
gem install uuid
|
12
17
|
gem install flyerhzm-rfetion
|
13
18
|
</code></pre>
|
14
19
|
|
@@ -25,3 +30,19 @@ send sms to friends
|
|
25
30
|
<pre><code>
|
26
31
|
Fetion.send_sms_to_friends(mobile_no, password, friend_mobile_no or array of friends_mobile_no, content)
|
27
32
|
</code></pre>
|
33
|
+
|
34
|
+
**************************************************************************
|
35
|
+
|
36
|
+
h2. Shell command
|
37
|
+
|
38
|
+
you can use it in shell command directly
|
39
|
+
|
40
|
+
<pre><code>
|
41
|
+
rfetion -h
|
42
|
+
|
43
|
+
Usage: rfetion [options]
|
44
|
+
-m, --mobile MOBILE Fetion mobile number
|
45
|
+
-p, --password PASSWORD Fetion password
|
46
|
+
-c, --content CONTENT Fetion message content
|
47
|
+
-f, --friends MOBILE1,MOBILE2 (optional) Fetion friends mobile number, if no friends mobile number, send message to yourself
|
48
|
+
</code></pre>
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/bin/rfetion
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
|
3
|
+
options = {}
|
4
|
+
|
5
|
+
OptionParser.new do |opts|
|
6
|
+
# Set a banner, displayed at the top of the help screen.
|
7
|
+
opts.banner = "Usage: rfetion [options]"
|
8
|
+
|
9
|
+
opts.on('-m', '--mobile MOBILE', 'Fetion mobile number') do |mobile|
|
10
|
+
options[:mobile_no] = mobile
|
11
|
+
end
|
12
|
+
|
13
|
+
opts.on('-p', '--password PASSWORD', 'Fetion password') do |f|
|
14
|
+
options[:password] = f
|
15
|
+
end
|
16
|
+
|
17
|
+
opts.on('-c', '--content CONTENT', 'Fetion message content') do |f|
|
18
|
+
options[:content] = f
|
19
|
+
end
|
20
|
+
|
21
|
+
options[:friends_mobile] = []
|
22
|
+
opts.on('-f', '--friends MOBILE1,MOBILE2', Array, '(optional) Fetion friends mobile number, if no friends mobile number, send message to yourself') do |f|
|
23
|
+
options[:friends_mobile] = f
|
24
|
+
end
|
25
|
+
|
26
|
+
opts.parse!
|
27
|
+
end
|
28
|
+
puts options.inspect
|
29
|
+
|
30
|
+
if options[:mobile_no] and options[:password] and options[:content]
|
31
|
+
if options[:friends_mobile].empty?
|
32
|
+
Fetion.send_sms_to_self(options[:mobile_no], options[:password], options[:content])
|
33
|
+
else
|
34
|
+
Fetion.send_sms_to_friends(options[:mobile_no], options[:password], options[:friends_mobile], options[:content])
|
35
|
+
end
|
36
|
+
end
|
data/rfetion.gemspec
CHANGED
@@ -5,13 +5,14 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rfetion}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Richard Huang"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-26}
|
13
13
|
s.description = %q{rfetion is a ruby gem for China Mobile fetion service that you can send SMS free.}
|
14
14
|
s.email = %q{flyerhzm@gmail.com}
|
15
|
+
s.executables = ["rfetion", "rfetion"]
|
15
16
|
s.extra_rdoc_files = [
|
16
17
|
"README.textile"
|
17
18
|
]
|
@@ -19,7 +20,9 @@ Gem::Specification.new do |s|
|
|
19
20
|
"README.textile",
|
20
21
|
"Rakefile",
|
21
22
|
"VERSION",
|
23
|
+
"bin/rfetion",
|
22
24
|
"lib/rfetion.rb",
|
25
|
+
"lib/rfetion/command.rb",
|
23
26
|
"lib/rfetion/fetion.rb",
|
24
27
|
"rfetion.gemspec"
|
25
28
|
]
|
@@ -34,8 +37,11 @@ Gem::Specification.new do |s|
|
|
34
37
|
s.specification_version = 3
|
35
38
|
|
36
39
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
40
|
+
s.add_runtime_dependency(%q<uuid>, [">= 0"])
|
37
41
|
else
|
42
|
+
s.add_dependency(%q<uuid>, [">= 0"])
|
38
43
|
end
|
39
44
|
else
|
45
|
+
s.add_dependency(%q<uuid>, [">= 0"])
|
40
46
|
end
|
41
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flyerhzm-rfetion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
@@ -9,14 +9,24 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-26 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: uuid
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
16
25
|
description: rfetion is a ruby gem for China Mobile fetion service that you can send SMS free.
|
17
26
|
email: flyerhzm@gmail.com
|
18
|
-
executables:
|
19
|
-
|
27
|
+
executables:
|
28
|
+
- rfetion
|
29
|
+
- rfetion
|
20
30
|
extensions: []
|
21
31
|
|
22
32
|
extra_rdoc_files:
|
@@ -25,7 +35,9 @@ files:
|
|
25
35
|
- README.textile
|
26
36
|
- Rakefile
|
27
37
|
- VERSION
|
38
|
+
- bin/rfetion
|
28
39
|
- lib/rfetion.rb
|
40
|
+
- lib/rfetion/command.rb
|
29
41
|
- lib/rfetion/fetion.rb
|
30
42
|
- rfetion.gemspec
|
31
43
|
has_rdoc: false
|