bitsa 0.11 → 0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +13 -7
- data/HISTORY +7 -1
- data/README.rdoc +14 -15
- data/Rakefile +1 -2
- data/bitsa.gemspec +7 -3
- data/lib/bitsa.rb +1 -1
- data/lib/bitsa/args_processor.rb +1 -1
- data/lib/bitsa/config_file.rb +1 -1
- data/lib/bitsa/contacts_cache.rb +1 -1
- data/lib/bitsa/gmail_contacts_loader.rb +2 -2
- data/lib/bitsa/settings.rb +1 -1
- data/lib/bitsa/version.rb +2 -2
- data/spec/gmail_contacts_loader_spec.rb +1 -1
- metadata +79 -110
data/Gemfile.lock
CHANGED
@@ -1,25 +1,30 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bitsa (0.
|
5
|
-
|
4
|
+
bitsa (0.20)
|
5
|
+
gdata_19 (~> 1.1.3)
|
6
6
|
trollop (= 1.15)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
diff-lcs (1.1.
|
11
|
+
diff-lcs (1.1.3)
|
12
12
|
fakeweb (1.2.8)
|
13
|
-
|
14
|
-
|
13
|
+
gdata_19 (1.1.5)
|
14
|
+
multi_json (1.3.5)
|
15
|
+
rake (0.9.2.2)
|
15
16
|
rspec (2.5.0)
|
16
17
|
rspec-core (~> 2.5.0)
|
17
18
|
rspec-expectations (~> 2.5.0)
|
18
19
|
rspec-mocks (~> 2.5.0)
|
19
|
-
rspec-core (2.5.
|
20
|
+
rspec-core (2.5.2)
|
20
21
|
rspec-expectations (2.5.0)
|
21
22
|
diff-lcs (~> 1.1.2)
|
22
23
|
rspec-mocks (2.5.0)
|
24
|
+
simplecov (0.6.4)
|
25
|
+
multi_json (~> 1.0)
|
26
|
+
simplecov-html (~> 0.5.3)
|
27
|
+
simplecov-html (0.5.3)
|
23
28
|
trollop (1.15)
|
24
29
|
|
25
30
|
PLATFORMS
|
@@ -29,5 +34,6 @@ DEPENDENCIES
|
|
29
34
|
bitsa!
|
30
35
|
bundler (>= 1.0.0)
|
31
36
|
fakeweb (~> 1.2.8)
|
32
|
-
|
37
|
+
rake
|
33
38
|
rspec (~> 2.5.0)
|
39
|
+
simplecov
|
data/HISTORY
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
=== 0.20
|
2
|
+
|
3
|
+
* 2 minor enhancements
|
4
|
+
* Get working with Ruby 1.9.X
|
5
|
+
* Use SSL
|
6
|
+
|
1
7
|
=== 0.11
|
2
8
|
|
3
9
|
* 1 minor enhancement:
|
@@ -8,7 +14,7 @@
|
|
8
14
|
* Emphasise that bitsa doesn't work with Ruby 1.9
|
9
15
|
|
10
16
|
* 1 other:
|
11
|
-
* Added coverage to
|
17
|
+
* Added coverage to specs
|
12
18
|
|
13
19
|
=== 0.10 25 April 2011
|
14
20
|
|
data/README.rdoc
CHANGED
@@ -10,13 +10,12 @@ from any email client that supports calling external programs.
|
|
10
10
|
|
11
11
|
== Installation
|
12
12
|
|
13
|
-
|
14
|
-
with Ruby 1.9
|
13
|
+
Since version 0.20 bitsa should work with both Ruby 1.8.7 and 1.9.x.
|
15
14
|
|
16
15
|
gem install bitsa
|
17
16
|
|
18
17
|
|
19
|
-
== Configuration
|
18
|
+
== Configuration
|
20
19
|
|
21
20
|
Bitsa is configured through the configuration file
|
22
21
|
<tt>~/.bitsa_config.yml</tt>. Use your GMail (or Google Apps) email address
|
@@ -45,31 +44,31 @@ ensue that it is only readable by you:
|
|
45
44
|
$ bitsa -h
|
46
45
|
|
47
46
|
Usage: bitsa [global-options] [subcommand] [command-opts]
|
48
|
-
|
47
|
+
|
49
48
|
Global options are:
|
50
49
|
--config-file, -c <s>: Configuration file (default: ~/.bitsa_config.yml)
|
51
50
|
--login, -l <s>: Login
|
52
51
|
--password, -p <s>: Password
|
53
|
-
|
52
|
+
|
54
53
|
bitsa sub-commands
|
55
54
|
update: get the latest changes from Gmail
|
56
55
|
reload: Clear all cached addresses and reload from Gmail
|
57
56
|
search: Search for the passed string
|
58
|
-
|
57
|
+
|
59
58
|
Information about this program
|
60
59
|
--version, -v: Print version and exit
|
61
60
|
--help, -h: Show this message
|
62
|
-
|
61
|
+
|
63
62
|
|
64
63
|
To search for all contacts that contain the string rob:
|
65
64
|
|
66
65
|
$ bitsa search rob
|
67
|
-
|
68
|
-
Rob_Smith@example.com.au
|
69
|
-
Rob_Smith@example.com
|
70
|
-
robert@example.com
|
71
|
-
jeff@example.net
|
72
|
-
bob@robertsystems
|
66
|
+
|
67
|
+
Rob_Smith@example.com.au Robert Smith
|
68
|
+
Rob_Smith@example.com Robert Smith
|
69
|
+
robert@example.com Robert Jones
|
70
|
+
jeff@example.net Robert Smith
|
71
|
+
bob@robertsystems Robert Brown
|
73
72
|
|
74
73
|
Contacts are returned as email address, the TAB character and then the
|
75
74
|
contacts name.
|
@@ -120,7 +119,7 @@ And then you can run the tests:
|
|
120
119
|
|
121
120
|
== License
|
122
121
|
|
123
|
-
Copyright (c) 2011 {Colin Bell}[mailto:col@baibell.org]
|
122
|
+
Copyright (c) 2011-2012 {Colin Bell}[mailto:col@baibell.org]
|
124
123
|
|
125
124
|
Bitsa is free software: you can redistribute it and/or modify
|
126
125
|
it under the terms of the GNU General Public License as published by
|
@@ -133,6 +132,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
133
132
|
GNU General Public License for more details.
|
134
133
|
|
135
134
|
You should have received a copy of the GNU General Public License
|
136
|
-
along with this program. If not, see
|
135
|
+
along with this program. If not, see [http://www.gnu.org/licenses/].
|
137
136
|
|
138
137
|
-----
|
data/Rakefile
CHANGED
data/bitsa.gemspec
CHANGED
@@ -12,18 +12,22 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{Command line GMail Contacts lookup tool.}
|
13
13
|
s.description = %q{Allows you to lookup GMail contacts and cache contacts locally from the command line.}
|
14
14
|
s.required_rubygems_version = ">= 1.3.6"
|
15
|
-
s.required_ruby_version = "< 1.9.0"
|
15
|
+
#s.required_ruby_version = "< 1.9.0"
|
16
16
|
|
17
17
|
s.extra_rdoc_files = ["README.rdoc", "HISTORY", "COPYING"]
|
18
18
|
s.rdoc_options = ["--main", "README.rdoc"]
|
19
19
|
|
20
20
|
s.add_dependency "trollop", "1.15"
|
21
|
-
|
21
|
+
|
22
|
+
# Use the fork until the real one works with Ruby 1.9X
|
23
|
+
#s.add_dependency "gdata", "~> 1.1.2"
|
24
|
+
s.add_dependency "gdata_19", "~> 1.1.3"
|
22
25
|
|
23
26
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
24
27
|
s.add_development_dependency "rspec", "~> 2.5.0"
|
25
28
|
s.add_development_dependency "fakeweb", "~> 1.2.8"
|
26
|
-
s.add_development_dependency "
|
29
|
+
s.add_development_dependency "simplecov"
|
30
|
+
s.add_development_dependency "rake"
|
27
31
|
|
28
32
|
s.files = `git ls-files`.split("\n")
|
29
33
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/bitsa.rb
CHANGED
data/lib/bitsa/args_processor.rb
CHANGED
data/lib/bitsa/config_file.rb
CHANGED
data/lib/bitsa/contacts_cache.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Loads Contacts from Gmail into a <tt>ContactsCache</tt> object.
|
2
2
|
#
|
3
|
-
# Copyright (C) 2011 Colin Noel Bell.
|
3
|
+
# Copyright (C) 2011-2012 Colin Noel Bell.
|
4
4
|
#
|
5
5
|
# This file is part of Bitsa.
|
6
6
|
#
|
@@ -51,7 +51,7 @@ module Bitsa #:nodoc:
|
|
51
51
|
|
52
52
|
def load_chunk(client, idx, cache)
|
53
53
|
last_modified = nil
|
54
|
-
url = "
|
54
|
+
url = "https://www.google.com/m8/feeds/contacts/#{@user}/thin"
|
55
55
|
url += "?orderby=lastmodified"
|
56
56
|
url += "&showdeleted=true"
|
57
57
|
url += "&max-results=#{@@FETCH_SIZE}"
|
data/lib/bitsa/settings.rb
CHANGED
data/lib/bitsa/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Application Version information.
|
2
2
|
#
|
3
|
-
# Copyright (C) 2011 Colin Noel Bell.
|
3
|
+
# Copyright (C) 2011-2012 Colin Noel Bell.
|
4
4
|
#
|
5
5
|
# This file is part of Bitsa.
|
6
6
|
#
|
@@ -18,5 +18,5 @@
|
|
18
18
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
|
20
20
|
module Bitsa #:nodoc:
|
21
|
-
VERSION = "0.
|
21
|
+
VERSION = "0.20"
|
22
22
|
end
|
@@ -11,7 +11,7 @@ describe Bitsa::GmailContactsLoader do
|
|
11
11
|
FakeWeb.allow_net_connect = false
|
12
12
|
FakeWeb.register_uri(:post, "https://www.google.com/accounts/ClientLogin",
|
13
13
|
:body => "SID=DQAAAGgA...7Zg8CTN\nLSID=DQAAAGsA...lk8BBbG\nAuth=DQAAAGgA...dk3fA5N")
|
14
|
-
FakeWeb.register_uri(:get, "
|
14
|
+
FakeWeb.register_uri(:get, "https://www.google.com/m8/feeds/contacts/test/thin?orderby=lastmodified&showdeleted=true&max-results=25&start-index=1",
|
15
15
|
:body => <<eos
|
16
16
|
<feed gd:etag='W/"AkANQXo7eCp7ImA9WxFTGUo."' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:gd='http://schemas.google.com/g/2005' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns='http://www.w3.org/2005/Atom'>
|
17
17
|
<id>
|
metadata
CHANGED
@@ -1,126 +1,105 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitsa
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.20'
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 11
|
9
|
-
version: "0.11"
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Colin Noel Bell
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-28 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
20
15
|
name: trollop
|
21
|
-
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &7267640 !ruby/object:Gem::Requirement
|
23
17
|
none: false
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 15
|
31
|
-
version: "1.15"
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.15'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: gdata
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: *7267640
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: gdata_19
|
27
|
+
requirement: &7266240 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
29
|
+
requirements:
|
40
30
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 1
|
45
|
-
- 1
|
46
|
-
- 2
|
47
|
-
version: 1.1.2
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.1.3
|
48
33
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: bundler
|
52
34
|
prerelease: false
|
53
|
-
|
35
|
+
version_requirements: *7266240
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bundler
|
38
|
+
requirement: &7257200 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
hash: 23
|
59
|
-
segments:
|
60
|
-
- 1
|
61
|
-
- 0
|
62
|
-
- 0
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
63
43
|
version: 1.0.0
|
64
44
|
type: :development
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: rspec
|
68
45
|
prerelease: false
|
69
|
-
|
46
|
+
version_requirements: *7257200
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: &7255600 !ruby/object:Gem::Requirement
|
70
50
|
none: false
|
71
|
-
requirements:
|
51
|
+
requirements:
|
72
52
|
- - ~>
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
hash: 27
|
75
|
-
segments:
|
76
|
-
- 2
|
77
|
-
- 5
|
78
|
-
- 0
|
53
|
+
- !ruby/object:Gem::Version
|
79
54
|
version: 2.5.0
|
80
55
|
type: :development
|
81
|
-
version_requirements: *id004
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: fakeweb
|
84
56
|
prerelease: false
|
85
|
-
|
57
|
+
version_requirements: *7255600
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: fakeweb
|
60
|
+
requirement: &7253680 !ruby/object:Gem::Requirement
|
86
61
|
none: false
|
87
|
-
requirements:
|
62
|
+
requirements:
|
88
63
|
- - ~>
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
hash: 15
|
91
|
-
segments:
|
92
|
-
- 1
|
93
|
-
- 2
|
94
|
-
- 8
|
64
|
+
- !ruby/object:Gem::Version
|
95
65
|
version: 1.2.8
|
96
66
|
type: :development
|
97
|
-
version_requirements: *id005
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: rcov
|
100
67
|
prerelease: false
|
101
|
-
|
68
|
+
version_requirements: *7253680
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: &7252900 !ruby/object:Gem::Requirement
|
102
72
|
none: false
|
103
|
-
requirements:
|
104
|
-
- -
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
|
107
|
-
segments:
|
108
|
-
- 0
|
109
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
110
77
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *7252900
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rake
|
82
|
+
requirement: &7251600 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *7251600
|
91
|
+
description: Allows you to lookup GMail contacts and cache contacts locally from the
|
92
|
+
command line.
|
93
|
+
email:
|
114
94
|
- col@baibell.org
|
115
|
-
executables:
|
95
|
+
executables:
|
116
96
|
- bitsa
|
117
97
|
extensions: []
|
118
|
-
|
119
|
-
extra_rdoc_files:
|
98
|
+
extra_rdoc_files:
|
120
99
|
- README.rdoc
|
121
100
|
- HISTORY
|
122
101
|
- COPYING
|
123
|
-
files:
|
102
|
+
files:
|
124
103
|
- .gitignore
|
125
104
|
- .rspec
|
126
105
|
- COPYING
|
@@ -152,41 +131,31 @@ files:
|
|
152
131
|
- tasks/spec.rake
|
153
132
|
homepage: https://github.com/colbell/bitsa
|
154
133
|
licenses: []
|
155
|
-
|
156
134
|
post_install_message:
|
157
|
-
rdoc_options:
|
135
|
+
rdoc_options:
|
158
136
|
- --main
|
159
137
|
- README.rdoc
|
160
|
-
require_paths:
|
138
|
+
require_paths:
|
161
139
|
- lib
|
162
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
141
|
none: false
|
164
|
-
requirements:
|
165
|
-
- -
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
|
168
|
-
segments:
|
169
|
-
- 1
|
170
|
-
- 9
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
segments:
|
171
147
|
- 0
|
172
|
-
|
173
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
hash: -3627828178775541145
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
150
|
none: false
|
175
|
-
requirements:
|
176
|
-
- -
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
hash: 23
|
179
|
-
segments:
|
180
|
-
- 1
|
181
|
-
- 3
|
182
|
-
- 6
|
151
|
+
requirements:
|
152
|
+
- - ! '>='
|
153
|
+
- !ruby/object:Gem::Version
|
183
154
|
version: 1.3.6
|
184
155
|
requirements: []
|
185
|
-
|
186
156
|
rubyforge_project:
|
187
|
-
rubygems_version: 1.8.
|
157
|
+
rubygems_version: 1.8.10
|
188
158
|
signing_key:
|
189
159
|
specification_version: 3
|
190
160
|
summary: Command line GMail Contacts lookup tool.
|
191
161
|
test_files: []
|
192
|
-
|