tweetwine 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -0
- data/README.rdoc +32 -2
- data/Rakefile +12 -4
- data/contrib/tweetwine-completion.bash +28 -0
- data/example/example_helper.rb +2 -0
- data/example/show_metadata_example.rb +2 -0
- data/example/use_http_proxy_example.rb +45 -0
- data/lib/tweetwine/cli.rb +12 -1
- data/lib/tweetwine/client.rb +1 -0
- data/lib/tweetwine/meta.rb +1 -1
- data/lib/tweetwine/retrying_http.rb +4 -0
- data/lib/tweetwine/startup_config.rb +13 -4
- data/test/retrying_http_test.rb +16 -0
- data/test/startup_config_test.rb +56 -8
- data/test/util_test.rb +31 -34
- metadata +23 -10
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -2,11 +2,19 @@
|
|
2
2
|
|
3
3
|
A simple but tasty Twitter agent for command line use, made for fun.
|
4
4
|
|
5
|
+
== Features
|
6
|
+
|
7
|
+
* Simple to use command line interface, with Bash completion support
|
8
|
+
* ANSI coloring of statuses, but in discreet manner
|
9
|
+
* Supports shortening URLs in a status update with a configurable shortening
|
10
|
+
service
|
11
|
+
* Configuration file for preferred settings
|
12
|
+
|
5
13
|
== Installation
|
6
14
|
|
7
|
-
Install Tweetwine as a RubyGem
|
15
|
+
Install Tweetwine as a RubyGem:
|
8
16
|
|
9
|
-
$
|
17
|
+
$ gem install tweetwine
|
10
18
|
|
11
19
|
The program is compatible with both Ruby 1.8 and 1.9.
|
12
20
|
|
@@ -76,6 +84,28 @@ The feature can be disabled by
|
|
76
84
|
|
77
85
|
The use of the feature requires <b>nokogiri</b> gem to be installed.
|
78
86
|
|
87
|
+
=== HTTP proxy setting
|
88
|
+
|
89
|
+
If <tt>$http_proxy</tt> environment variable is set, Tweetwine attempts to use
|
90
|
+
the URL in the environment variable as HTTP proxy for all its HTTP
|
91
|
+
connections. This setting can be overridden with <tt>--http-proxy</tt> and
|
92
|
+
<tt>--no-http-proxy</tt> command line options.
|
93
|
+
|
94
|
+
=== Bash command line completion support
|
95
|
+
|
96
|
+
Bash shell supports command line completion via tab character. If you want to
|
97
|
+
enable Tweetwine specific completion with Bash, source the file
|
98
|
+
<tt>tweetwine-completion.bash</tt>, located in <tt>contrib</tt> directory:
|
99
|
+
|
100
|
+
. contrib/tweetwine-completion.bash
|
101
|
+
|
102
|
+
In order to do this automatically when your shell starts, insert the following
|
103
|
+
snippet to your Bash initialization script (such as <tt>~/.bashrc</tt>):
|
104
|
+
|
105
|
+
if [ -f <path_to_tweetwine>/contrib/tweetwine-completion.bash ]; then
|
106
|
+
. <path_to_tweetwine>/contrib/tweetwine-completion.bash
|
107
|
+
fi
|
108
|
+
|
79
109
|
== Contacting
|
80
110
|
|
81
111
|
Please send feedback by email to Tuomas Kareinen < tkareine (at) gmail (dot)
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require "rubygems"
|
|
4
4
|
|
5
5
|
name = "tweetwine"
|
6
6
|
require "#{name}"
|
7
|
-
version = Tweetwine::VERSION
|
7
|
+
version = Tweetwine::VERSION.dup
|
8
8
|
|
9
9
|
require "rake/clean"
|
10
10
|
|
@@ -20,7 +20,15 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.email = "tkareine@gmail.com"
|
21
21
|
|
22
22
|
s.platform = Gem::Platform::RUBY
|
23
|
-
s.files = FileList[
|
23
|
+
s.files = FileList[
|
24
|
+
"Rakefile",
|
25
|
+
"MIT-LICENSE.txt",
|
26
|
+
"*.rdoc",
|
27
|
+
"bin/**/*",
|
28
|
+
"contrib/**/*",
|
29
|
+
"example/**/*",
|
30
|
+
"lib/**/*",
|
31
|
+
"test/**/*"].to_a
|
24
32
|
s.executables = ["tweetwine"]
|
25
33
|
|
26
34
|
s.add_dependency("rest-client", ">= 1.0.0")
|
@@ -47,12 +55,12 @@ end
|
|
47
55
|
|
48
56
|
desc "Install the software as a gem"
|
49
57
|
task :install => [:package] do
|
50
|
-
sh %{
|
58
|
+
sh %{gem install pkg/#{name}-#{version}.gem}
|
51
59
|
end
|
52
60
|
|
53
61
|
desc "Uninstall the gem"
|
54
62
|
task :uninstall => [:clean] do
|
55
|
-
sh %{
|
63
|
+
sh %{gem uninstall #{name}}
|
56
64
|
end
|
57
65
|
|
58
66
|
require "rake/rdoctask"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
_tweetwine_completion ()
|
2
|
+
{
|
3
|
+
local cur prev cmds gopts
|
4
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
5
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
6
|
+
cmds="followers friends home mentions search update user"
|
7
|
+
gopts="--auth --colors --num --no-colors --no-url-shorten --page --version"
|
8
|
+
|
9
|
+
case "${prev}" in
|
10
|
+
followers | friends | home | mentions | search | update | user)
|
11
|
+
COMPREPLY=()
|
12
|
+
;;
|
13
|
+
help)
|
14
|
+
COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
|
15
|
+
;;
|
16
|
+
*)
|
17
|
+
if [[ "${cur}" == -* ]]; then
|
18
|
+
COMPREPLY=( $(compgen -W "${gopts}" -- ${cur}) )
|
19
|
+
else
|
20
|
+
COMPREPLY=( $(compgen -W "${cmds} help" -- ${cur}) )
|
21
|
+
fi
|
22
|
+
;;
|
23
|
+
esac
|
24
|
+
|
25
|
+
return 0
|
26
|
+
}
|
27
|
+
|
28
|
+
complete -F _tweetwine_completion tweetwine
|
data/example/example_helper.rb
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
timecop
|
9
9
|
}.each { |lib| require lib }
|
10
10
|
|
11
|
+
FakeWeb.clean_registry
|
11
12
|
FakeWeb.allow_net_connect = false
|
12
13
|
Timecop.freeze(Time.parse("2009-10-14 01:56:15 +0300"))
|
13
14
|
|
@@ -18,6 +19,7 @@ module Tweetwine
|
|
18
19
|
TEST_USER = "fooman"
|
19
20
|
TEST_PASSWD = "barpwd"
|
20
21
|
TEST_AUTH = "#{TEST_USER}:#{TEST_PASSWD}"
|
22
|
+
TEST_PROXY_URL = "http://proxy.net:8080"
|
21
23
|
|
22
24
|
def launch_app(args, &blk)
|
23
25
|
lib = File.dirname(__FILE__) << "/../lib"
|
@@ -47,8 +47,10 @@ Usage: tweetwine [global_options...] [command] [command_options...]
|
|
47
47
|
-c, --colors Colorize output with ANSI escape codes
|
48
48
|
-n, --num N The number of statuses in page, default 20
|
49
49
|
--no-colors Do not use ANSI colors
|
50
|
+
--no-http-proxy Do not use proxy for HTTP and HTTPS
|
50
51
|
--no-url-shorten Do not shorten URLs for status update
|
51
52
|
-p, --page N The page number for statuses, default 1
|
53
|
+
--http-proxy URL Use proxy for HTTP and HTTPS
|
52
54
|
-v, --version Show version information and exit
|
53
55
|
-h, --help Show this help message and exit
|
54
56
|
END
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "example_helper"
|
2
|
+
|
3
|
+
FakeWeb.register_uri(:get, "https://#{TEST_AUTH}@twitter.com/statuses/home_timeline.json?count=20&page=1", :body => fixture("home.json"))
|
4
|
+
|
5
|
+
Feature "using HTTP proxy setting" do
|
6
|
+
in_order_to "tweet behind an HTTP proxy"
|
7
|
+
as_a "authenticated user"
|
8
|
+
i_want_to "tweet as before"
|
9
|
+
|
10
|
+
Scenario "Proxy is enabled via environment variable" do
|
11
|
+
When "application is launched" do
|
12
|
+
ENV['http_proxy'] = TEST_PROXY_URL
|
13
|
+
@output = launch_cli(%W{-a #{TEST_AUTH} --no-colors})
|
14
|
+
end
|
15
|
+
|
16
|
+
Then "the latest statuses in the home view are shown via proxy" do
|
17
|
+
RestClient.proxy.should == TEST_PROXY_URL
|
18
|
+
@output[0].should == "pelit, 11 days ago:"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Scenario "Proxy is enabled via command line option" do
|
23
|
+
When "application is launched with --http-proxy" do
|
24
|
+
ENV['http_proxy'] = nil
|
25
|
+
@output = launch_cli(%W{-a #{TEST_AUTH} --no-colors --http-proxy #{TEST_PROXY_URL}})
|
26
|
+
end
|
27
|
+
|
28
|
+
Then "the latest statuses in the home view are shown via proxy" do
|
29
|
+
RestClient.proxy.should == TEST_PROXY_URL
|
30
|
+
@output[0].should == "pelit, 11 days ago:"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
Scenario "Proxy is disabled via command line option" do
|
35
|
+
When "application is launched with --no-http-proxy" do
|
36
|
+
ENV['http_proxy'] = TEST_PROXY_URL
|
37
|
+
@output = launch_cli(%W{-a #{TEST_AUTH} --no-colors --no-http-proxy})
|
38
|
+
end
|
39
|
+
|
40
|
+
Then "the latest statuses in the home view are shown via proxy" do
|
41
|
+
RestClient.proxy.should == nil
|
42
|
+
@output[0].should == "pelit, 11 days ago:"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/tweetwine/cli.rb
CHANGED
@@ -36,7 +36,7 @@ module Tweetwine
|
|
36
36
|
def initialize(args, exec_name, config_file, extra_opts = {}, &dependencies_blk)
|
37
37
|
@global_option_parser = create_global_option_parser(exec_name)
|
38
38
|
@config = StartupConfig.new(Client::COMMANDS + [:help], Client::DEFAULT_COMMAND, extra_opts)
|
39
|
-
@config.parse(args, config_file, &@global_option_parser)
|
39
|
+
@config.parse(args, config_file, [:http_proxy], &@global_option_parser)
|
40
40
|
@client = Client.new(dependencies_blk.call(@config.options), @config.options) if @config.command != :help
|
41
41
|
end
|
42
42
|
|
@@ -119,6 +119,11 @@ Usage: #{exec_name} [global_options...] [command] [command_options...]
|
|
119
119
|
:desc => "Do not use ANSI colors",
|
120
120
|
:action => lambda { |arg| parsed[:colors] = false }
|
121
121
|
},
|
122
|
+
{
|
123
|
+
:long => "--no-http-proxy",
|
124
|
+
:desc => "Do not use proxy for HTTP and HTTPS",
|
125
|
+
:action => lambda { |arg| parsed[:http_proxy] = nil }
|
126
|
+
},
|
122
127
|
{
|
123
128
|
:long => "--no-url-shorten",
|
124
129
|
:desc => "Do not shorten URLs for status update",
|
@@ -131,6 +136,12 @@ Usage: #{exec_name} [global_options...] [command] [command_options...]
|
|
131
136
|
:desc => "The page number for statuses, default #{Client::DEFAULT_PAGE_NUM}",
|
132
137
|
:action => lambda { |arg| parsed[:page_num] = arg }
|
133
138
|
},
|
139
|
+
{
|
140
|
+
:long => "--http-proxy URL",
|
141
|
+
:type => String,
|
142
|
+
:desc => "Use proxy for HTTP and HTTPS",
|
143
|
+
:action => lambda { |arg| parsed[:http_proxy] = arg }
|
144
|
+
},
|
134
145
|
{
|
135
146
|
:short => "-v",
|
136
147
|
:long => "--version",
|
data/lib/tweetwine/client.rb
CHANGED
@@ -18,6 +18,7 @@ module Tweetwine
|
|
18
18
|
@io = dependencies.io
|
19
19
|
@username = options[:username].to_s
|
20
20
|
raise ArgumentError, "No authentication data given" if @username.empty?
|
21
|
+
RetryingHttp.proxy = options[:http_proxy] if options[:http_proxy]
|
21
22
|
@http_client = dependencies.http_client
|
22
23
|
@http_resource = @http_client.as_resource("https://twitter.com", :user => @username, :password => options[:password])
|
23
24
|
@num_statuses = Util.parse_int_gt(options[:num_statuses], DEFAULT_NUM_STATUSES, 1, "number of statuses_to_show")
|
data/lib/tweetwine/meta.rb
CHANGED
@@ -11,8 +11,8 @@ module Tweetwine
|
|
11
11
|
@options, @command = default_opts, nil
|
12
12
|
end
|
13
13
|
|
14
|
-
def parse(args = [], config_file = nil, &cmd_option_parser)
|
15
|
-
options = @options.merge(parse_options(args, config_file, &cmd_option_parser))
|
14
|
+
def parse(args = [], config_file = nil, env_lookouts = [], &cmd_option_parser)
|
15
|
+
options = @options.merge(parse_options(args, config_file, env_lookouts, &cmd_option_parser))
|
16
16
|
command = if args.empty? then @default_command else args.shift.to_sym end
|
17
17
|
raise ArgumentError, "Unknown command" unless @supported_commands.include? command
|
18
18
|
@options, @command = options, command
|
@@ -21,10 +21,11 @@ module Tweetwine
|
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
-
def parse_options(args, config_file, &cmd_option_parser)
|
24
|
+
def parse_options(args, config_file, env_lookouts, &cmd_option_parser)
|
25
25
|
cmd_options = if cmd_option_parser then parse_cmdline_args(args, &cmd_option_parser) else {} end
|
26
26
|
config_options = if config_file && File.exists?(config_file) then parse_config_file(config_file) else {} end
|
27
|
-
|
27
|
+
env_options = if env_lookouts then parse_env_vars(env_lookouts) else {} end
|
28
|
+
env_options.merge(config_options.merge(cmd_options))
|
28
29
|
end
|
29
30
|
|
30
31
|
def parse_cmdline_args(args, &cmd_option_parser)
|
@@ -35,5 +36,13 @@ module Tweetwine
|
|
35
36
|
options = YAML.load(File.read(config_file))
|
36
37
|
Util.symbolize_hash_keys(options)
|
37
38
|
end
|
39
|
+
|
40
|
+
def parse_env_vars(env_lookouts)
|
41
|
+
env_lookouts.inject({}) do |result, env_var_name|
|
42
|
+
env_option = ENV[env_var_name.to_s]
|
43
|
+
result[env_var_name.to_sym] = env_option if env_option && !env_option.empty?
|
44
|
+
result
|
45
|
+
end
|
46
|
+
end
|
38
47
|
end
|
39
48
|
end
|
data/test/retrying_http_test.rb
CHANGED
@@ -8,6 +8,22 @@ end
|
|
8
8
|
module Tweetwine
|
9
9
|
module RetryingHttp
|
10
10
|
|
11
|
+
class ModuleTest < Test::Unit::TestCase
|
12
|
+
context "When using HTTP proxy" do
|
13
|
+
setup do
|
14
|
+
RetryingHttp.proxy = "http://proxy.net:8080"
|
15
|
+
end
|
16
|
+
|
17
|
+
should "pass HTTP proxy configuration to RestClient" do
|
18
|
+
assert_equal "http://proxy.net:8080", RestClient.proxy
|
19
|
+
end
|
20
|
+
|
21
|
+
teardown do
|
22
|
+
RetryingHttp.proxy = nil
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
11
27
|
class ClientTest < Test::Unit::TestCase
|
12
28
|
context "A Client instance" do
|
13
29
|
setup do
|
data/test/startup_config_test.rb
CHANGED
@@ -26,7 +26,10 @@ class StartupConfigTest < Test::Unit::TestCase
|
|
26
26
|
|
27
27
|
context "at runtime" do
|
28
28
|
setup do
|
29
|
-
@config = StartupConfig.new(
|
29
|
+
@config = StartupConfig.new(
|
30
|
+
[:default_action, :another_action],
|
31
|
+
:default_action,
|
32
|
+
{:defopt => 42})
|
30
33
|
end
|
31
34
|
|
32
35
|
should "use the default command when given no command as a cmdline argument" do
|
@@ -48,7 +51,7 @@ class StartupConfigTest < Test::Unit::TestCase
|
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
51
|
-
context "when given cmdline args and no config file" do
|
54
|
+
context "when given cmdline args and no config file and no environment variables" do
|
52
55
|
setup do
|
53
56
|
@cmd_args = %w{--opt bar --another_opt baz another_action left overs}
|
54
57
|
@config.parse(@cmd_args) do |args|
|
@@ -61,7 +64,7 @@ class StartupConfigTest < Test::Unit::TestCase
|
|
61
64
|
assert_equal "baz", @config.options[:nopt]
|
62
65
|
end
|
63
66
|
|
64
|
-
should "override default
|
67
|
+
should "override the default value for the option given as a cmdline arg" do
|
65
68
|
assert_equal 56, @config.options[:defopt]
|
66
69
|
end
|
67
70
|
|
@@ -78,7 +81,7 @@ class StartupConfigTest < Test::Unit::TestCase
|
|
78
81
|
end
|
79
82
|
end
|
80
83
|
|
81
|
-
context "when given no cmdline args and
|
84
|
+
context "when given a config file and no cmdline args and no environment variables" do
|
82
85
|
setup do
|
83
86
|
@config.parse([], TEST_CONFIG_FILE)
|
84
87
|
end
|
@@ -87,24 +90,69 @@ class StartupConfigTest < Test::Unit::TestCase
|
|
87
90
|
assert_equal false, @config.options[:colors]
|
88
91
|
end
|
89
92
|
|
90
|
-
should "override default
|
93
|
+
should "override the default value for the option given from the config file" do
|
91
94
|
assert_equal 78, @config.options[:defopt]
|
92
95
|
end
|
93
96
|
end
|
94
97
|
|
95
|
-
context "when given an
|
98
|
+
context "when given an environment variable and no cmdline args no config file" do
|
96
99
|
setup do
|
97
|
-
|
100
|
+
ENV['colors'] = "baba"
|
101
|
+
ENV['defopt'] = "zaza"
|
102
|
+
ENV['blank'] = ""
|
103
|
+
@config.parse([], nil, [:colors, :defopt])
|
104
|
+
end
|
105
|
+
|
106
|
+
should "have the parsed option defined" do
|
107
|
+
assert_equal "baba", @config.options[:colors]
|
108
|
+
end
|
109
|
+
|
110
|
+
should "override default value for the option given as an environment variable" do
|
111
|
+
assert_equal "zaza", @config.options[:defopt]
|
112
|
+
end
|
113
|
+
|
114
|
+
should "not pass blank environment variable" do
|
115
|
+
assert_equal nil, @config.options[:blank]
|
116
|
+
end
|
117
|
+
|
118
|
+
teardown do
|
119
|
+
ENV['colors'] = ENV['defopt'] = ENV['blank'] = nil
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
context "when given an option as a cmdline option and in a config file and as an environment variable" do
|
124
|
+
setup do
|
125
|
+
@config.parse(%w{--colors}, TEST_CONFIG_FILE, [:colors, :defopt]) do |args|
|
98
126
|
args.clear
|
99
127
|
{:defopt => 56, :colors => true}
|
100
128
|
end
|
101
129
|
end
|
102
130
|
|
103
|
-
should "the command line option should override
|
131
|
+
should "the command line option should override all other option sources" do
|
104
132
|
assert_equal true, @config.options[:colors]
|
105
133
|
assert_equal 56, @config.options[:defopt]
|
106
134
|
end
|
107
135
|
end
|
136
|
+
|
137
|
+
context "when given an option from a config file and as an environment variable" do
|
138
|
+
setup do
|
139
|
+
ENV['colors'] = "baba"
|
140
|
+
ENV['defopt'] = "zaza"
|
141
|
+
@config.parse(%w{}, TEST_CONFIG_FILE, [:colors, :defopt]) do |args|
|
142
|
+
args.clear
|
143
|
+
{}
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
should "the config file option should override environment variable" do
|
148
|
+
assert_equal false, @config.options[:colors]
|
149
|
+
assert_equal 78, @config.options[:defopt]
|
150
|
+
end
|
151
|
+
|
152
|
+
teardown do
|
153
|
+
ENV['colors'] = ENV['defopt'] = nil
|
154
|
+
end
|
155
|
+
end
|
108
156
|
end
|
109
157
|
end
|
110
158
|
end
|
data/test/util_test.rb
CHANGED
@@ -111,50 +111,47 @@ class UtilTest < Test::Unit::TestCase
|
|
111
111
|
end
|
112
112
|
|
113
113
|
context "for percent-encoding strings" do
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
assert_equal ".", Util.percent_encode(".")
|
119
|
-
assert_equal "-", Util.percent_encode("-")
|
120
|
-
assert_equal "_", Util.percent_encode("_")
|
114
|
+
%w{a B 3 . - _}.each do |char|
|
115
|
+
should "not encode safe characters, case '#{char}'" do
|
116
|
+
assert_equal char, Util.percent_encode(char)
|
117
|
+
end
|
121
118
|
end
|
122
119
|
|
123
120
|
should "encode space character with percent-encoding, not with '+' character" do
|
124
121
|
assert_equal "%20", Util.percent_encode(" ")
|
125
122
|
end
|
126
123
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
124
|
+
[
|
125
|
+
%w{& %26},
|
126
|
+
%w{? %3F},
|
127
|
+
%w{/ %2F},
|
128
|
+
%w{: %3A},
|
129
|
+
%w{, %2C}
|
130
|
+
].each do |input, expected|
|
131
|
+
should "encode unsafe characters that URI.encode leaves by default unencoded, case '#{input}'" do
|
132
|
+
assert_equal input, URI.encode(input)
|
133
|
+
assert_equal expected, Util.percent_encode(input)
|
134
|
+
end
|
138
135
|
end
|
139
136
|
end
|
140
137
|
|
141
138
|
context "for unescaping HTML" do
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
139
|
+
%w{a B 3 . - _ +}.each do |char|
|
140
|
+
should "not affect already unescaped characters, case '#{char}'" do
|
141
|
+
assert_equal char, Util.unescape_html(char)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
[
|
146
|
+
%w{< <},
|
147
|
+
%w{> >},
|
148
|
+
%w{& &},
|
149
|
+
%w{" "},
|
150
|
+
%W{ \ }
|
151
|
+
].each do |input, expected|
|
152
|
+
should "unescape HTML-escaped characters, case '#{input}'" do
|
153
|
+
assert_equal expected, Util.unescape_html(input)
|
154
|
+
end
|
158
155
|
end
|
159
156
|
end
|
160
157
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweetwine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 9
|
9
|
+
version: 0.2.9
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Tuomas Kareinen
|
@@ -9,19 +14,23 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-02-24 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rest-client
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 1
|
29
|
+
- 0
|
30
|
+
- 0
|
23
31
|
version: 1.0.0
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
description: A simple but tasty Twitter agent for command line use, made for fun.
|
26
35
|
email: tkareine@gmail.com
|
27
36
|
executables:
|
@@ -38,6 +47,7 @@ files:
|
|
38
47
|
- CHANGELOG.rdoc
|
39
48
|
- README.rdoc
|
40
49
|
- bin/tweetwine
|
50
|
+
- contrib/tweetwine-completion.bash
|
41
51
|
- example/example_helper.rb
|
42
52
|
- example/fixtures/home.json
|
43
53
|
- example/fixtures/mentions.json
|
@@ -53,6 +63,7 @@ files:
|
|
53
63
|
- example/show_metadata_example.rb
|
54
64
|
- example/show_user_example.rb
|
55
65
|
- example/update_status_example.rb
|
66
|
+
- example/use_http_proxy_example.rb
|
56
67
|
- lib/tweetwine/cli.rb
|
57
68
|
- lib/tweetwine/client.rb
|
58
69
|
- lib/tweetwine/io.rb
|
@@ -80,7 +91,7 @@ licenses: []
|
|
80
91
|
post_install_message:
|
81
92
|
rdoc_options:
|
82
93
|
- --title
|
83
|
-
- tweetwine 0.2.
|
94
|
+
- tweetwine 0.2.9
|
84
95
|
- --main
|
85
96
|
- README.rdoc
|
86
97
|
- --exclude
|
@@ -92,18 +103,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
103
|
requirements:
|
93
104
|
- - ">="
|
94
105
|
- !ruby/object:Gem::Version
|
106
|
+
segments:
|
107
|
+
- 0
|
95
108
|
version: "0"
|
96
|
-
version:
|
97
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
110
|
requirements:
|
99
111
|
- - ">="
|
100
112
|
- !ruby/object:Gem::Version
|
113
|
+
segments:
|
114
|
+
- 0
|
101
115
|
version: "0"
|
102
|
-
version:
|
103
116
|
requirements: []
|
104
117
|
|
105
118
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.3.
|
119
|
+
rubygems_version: 1.3.6
|
107
120
|
signing_key:
|
108
121
|
specification_version: 3
|
109
122
|
summary: A simple Twitter agent for command line use
|