thimbl 0.0.1 → 0.0.2
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/Gemfile +6 -0
- data/Gemfile.lock +42 -0
- data/Manifest +10 -3
- data/README.md +43 -10
- data/Rakefile +3 -3
- data/bin/thimbl +36 -0
- data/lib/thimbl.rb +5 -123
- data/lib/thimbl/base.rb +223 -0
- data/lib/thimbl/command.rb +71 -0
- data/lib/thimbl/finger.rb +9 -0
- data/test/fixtures/finger_dk_telekommunisten_org.txt +11 -0
- data/test/fixtures/finger_dk_telekommunisten_org_two_break_lines.txt +10 -0
- data/test/test_helper.rb +5 -0
- data/test/thimbl_base_test.rb +220 -0
- data/test/thimbl_command_test.rb +106 -0
- data/thimbl.gemspec +19 -5
- metadata +83 -15
- data/lib/finger.rb +0 -5
- data/test/thimbl_test.rb +0 -89
- data/thimbl.rb +0 -1
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thimbl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Fernando Guillen
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-08 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: json
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
@@ -30,10 +30,10 @@ dependencies:
|
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
version: "0"
|
33
|
-
type: :
|
33
|
+
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: net-scp
|
37
37
|
prerelease: false
|
38
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
@@ -44,28 +44,94 @@ dependencies:
|
|
44
44
|
segments:
|
45
45
|
- 0
|
46
46
|
version: "0"
|
47
|
-
type: :
|
47
|
+
type: :runtime
|
48
48
|
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: fileutils
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: mocha
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
75
|
+
type: :development
|
76
|
+
version_requirements: *id004
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: ruby-debug
|
79
|
+
prerelease: false
|
80
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
89
|
+
type: :development
|
90
|
+
version_requirements: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: delorean
|
93
|
+
prerelease: false
|
94
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
hash: 3
|
100
|
+
segments:
|
101
|
+
- 0
|
102
|
+
version: "0"
|
103
|
+
type: :development
|
104
|
+
version_requirements: *id006
|
49
105
|
description: "Small client for the distributed microbloging protocol: [thimbl](http://www.thimbl.net/)"
|
50
106
|
email: fguillen.mail@gmail.com
|
51
|
-
executables:
|
52
|
-
|
107
|
+
executables:
|
108
|
+
- thimbl
|
53
109
|
extensions: []
|
54
110
|
|
55
111
|
extra_rdoc_files:
|
56
112
|
- README.md
|
57
|
-
-
|
113
|
+
- bin/thimbl
|
58
114
|
- lib/thimbl.rb
|
115
|
+
- lib/thimbl/base.rb
|
116
|
+
- lib/thimbl/command.rb
|
117
|
+
- lib/thimbl/finger.rb
|
59
118
|
files:
|
60
119
|
- Gemfile
|
120
|
+
- Gemfile.lock
|
61
121
|
- Manifest
|
62
122
|
- README.md
|
63
123
|
- Rakefile
|
64
|
-
-
|
124
|
+
- bin/thimbl
|
65
125
|
- lib/thimbl.rb
|
126
|
+
- lib/thimbl/base.rb
|
127
|
+
- lib/thimbl/command.rb
|
128
|
+
- lib/thimbl/finger.rb
|
66
129
|
- test/fixtures/cache.json
|
67
|
-
- test/
|
68
|
-
-
|
130
|
+
- test/fixtures/finger_dk_telekommunisten_org.txt
|
131
|
+
- test/fixtures/finger_dk_telekommunisten_org_two_break_lines.txt
|
132
|
+
- test/test_helper.rb
|
133
|
+
- test/thimbl_base_test.rb
|
134
|
+
- test/thimbl_command_test.rb
|
69
135
|
- thimbl.gemspec
|
70
136
|
has_rdoc: true
|
71
137
|
homepage: http://github.com/fguillen/ThimblClient
|
@@ -108,4 +174,6 @@ signing_key:
|
|
108
174
|
specification_version: 3
|
109
175
|
summary: "Small client for the distributed microbloging protocol: [thimbl](http://www.thimbl.net/)"
|
110
176
|
test_files:
|
111
|
-
- test/
|
177
|
+
- test/test_helper.rb
|
178
|
+
- test/thimbl_base_test.rb
|
179
|
+
- test/thimbl_command_test.rb
|
data/lib/finger.rb
DELETED
data/test/thimbl_test.rb
DELETED
@@ -1,89 +0,0 @@
|
|
1
|
-
require "#{File.dirname(__FILE__)}/../thimbl"
|
2
|
-
require 'test/unit'
|
3
|
-
require 'mocha'
|
4
|
-
require 'ruby-debug'
|
5
|
-
|
6
|
-
class ThimblTest < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
@plan_path = '/tmp/plan'
|
9
|
-
@cache_path = '/tmp/cache'
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
File.delete( @plan_path ) if File.exists? @plan_path
|
14
|
-
File.delete( @cache_path ) if File.exists? @cache_path
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_new
|
18
|
-
thimbl = Thimbl.new( 'plan_path', 'cache_path' )
|
19
|
-
assert_equal( 'plan_path', thimbl.plan_path )
|
20
|
-
assert_equal( 'cache_path', thimbl.cache_path )
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_setup_without_options
|
24
|
-
thimbl = Thimbl.new( @plan_path, @cache_path )
|
25
|
-
thimbl.setup
|
26
|
-
|
27
|
-
puts "XXX: plan: #{File.read @plan_path }"
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_setup_with_options
|
31
|
-
thimbl = Thimbl.new( @plan_path, @cache_path )
|
32
|
-
thimbl.setup(
|
33
|
-
:bio => 'my bio',
|
34
|
-
:website => 'my website',
|
35
|
-
:mobile => 'my mobile',
|
36
|
-
:email => 'my email',
|
37
|
-
:address => 'my address',
|
38
|
-
:name => 'my name'
|
39
|
-
)
|
40
|
-
|
41
|
-
puts "XXX: plan: #{File.read @plan_path }"
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_post
|
45
|
-
thimbl = Thimbl.new( @plan_path, @cache_path )
|
46
|
-
thimbl.setup
|
47
|
-
thimbl.post( "wadus wadus" )
|
48
|
-
|
49
|
-
puts "XXX: plan: #{File.read @plan_path }"
|
50
|
-
puts "XXX: cache: #{File.read @cache_path }"
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_follow
|
54
|
-
thimbl = Thimbl.new( @plan_path, @cache_path )
|
55
|
-
thimbl.setup
|
56
|
-
thimbl.follow( 'nick', 'address' )
|
57
|
-
|
58
|
-
puts "XXX: plan: #{File.read @plan_path }"
|
59
|
-
puts "XXX: cache: #{File.read @cache_path }"
|
60
|
-
end
|
61
|
-
|
62
|
-
def test_fetch
|
63
|
-
thimbl = Thimbl.new( @plan_path, @cache_path )
|
64
|
-
thimbl.setup
|
65
|
-
thimbl.expects(:following).returns( [ {'nick' => 'pepe', 'address' => 'dk@telekommunisten.org' } ] )
|
66
|
-
|
67
|
-
puts thimbl.fetch
|
68
|
-
|
69
|
-
puts "XXX: plan: #{File.read @plan_path }"
|
70
|
-
puts "XXX: cache: #{File.read @cache_path }"
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_messages
|
74
|
-
thimbl = Thimbl.new( @plan_path, "#{File.dirname(__FILE__)}/fixtures/cache.json" )
|
75
|
-
thimbl.load_data
|
76
|
-
puts thimbl.messages
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_print
|
80
|
-
thimbl = Thimbl.new( @plan_path, "#{File.dirname(__FILE__)}/fixtures/cache.json" )
|
81
|
-
thimbl.load_data
|
82
|
-
|
83
|
-
puts thimbl.print
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_parse_time
|
87
|
-
assert_equal( Time.utc( 2010, 11, 29, 6, 3, 35 ), Thimbl.parse_time( '20101129060335' ) )
|
88
|
-
end
|
89
|
-
end
|
data/thimbl.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "#{File.dirname(__FILE__)}/lib/thimbl"
|