bitsa 0.10 → 0.11

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/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  /TAGS
3
3
  /doc/
4
4
  .bundle
5
+ /coverage/*
6
+ /.rvmrc
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bitsa (0.10.beta3)
5
- gdata (= 1.1.1)
4
+ bitsa (0.11)
5
+ gdata (~> 1.1.2)
6
6
  trollop (= 1.15)
7
7
 
8
8
  GEM
@@ -10,17 +10,16 @@ GEM
10
10
  specs:
11
11
  diff-lcs (1.1.2)
12
12
  fakeweb (1.2.8)
13
- gdata (1.1.1)
14
- rspec (2.0.1)
15
- rspec-core (~> 2.0.1)
16
- rspec-expectations (~> 2.0.1)
17
- rspec-mocks (~> 2.0.1)
18
- rspec-core (2.0.1)
19
- rspec-expectations (2.0.1)
20
- diff-lcs (>= 1.1.2)
21
- rspec-mocks (2.0.1)
22
- rspec-core (~> 2.0.1)
23
- rspec-expectations (~> 2.0.1)
13
+ gdata (1.1.2)
14
+ rcov (0.9.9)
15
+ rspec (2.5.0)
16
+ rspec-core (~> 2.5.0)
17
+ rspec-expectations (~> 2.5.0)
18
+ rspec-mocks (~> 2.5.0)
19
+ rspec-core (2.5.1)
20
+ rspec-expectations (2.5.0)
21
+ diff-lcs (~> 1.1.2)
22
+ rspec-mocks (2.5.0)
24
23
  trollop (1.15)
25
24
 
26
25
  PLATFORMS
@@ -30,6 +29,5 @@ DEPENDENCIES
30
29
  bitsa!
31
30
  bundler (>= 1.0.0)
32
31
  fakeweb (~> 1.2.8)
33
- gdata (= 1.1.1)
34
- rspec (~> 2.0.0.beta.22)
35
- trollop (= 1.15)
32
+ rcov
33
+ rspec (~> 2.5.0)
data/HISTORY ADDED
@@ -0,0 +1,17 @@
1
+ === 0.11
2
+
3
+ * 1 minor enhancement:
4
+ * Update gdata to 1.1.2
5
+
6
+ * 2 documentation improvements:
7
+ * Rename History.txt to HISTORY
8
+ * Emphasise that bitsa doesn't work with Ruby 1.9
9
+
10
+ * 1 other:
11
+ * Added coverage to sepcs
12
+
13
+ === 0.10 25 April 2011
14
+
15
+ * 1 major enhancement:
16
+ * Initial release
17
+
@@ -1,22 +1,25 @@
1
- # Bitsa
1
+ = Bitsa
2
2
 
3
- * <http://github.com/colbell/bitsa>
3
+ * http://github.com/colbell/bitsa
4
4
 
5
5
 
6
- A command line tool to access your GMail/Google Apps contacts. Designed to be used
7
- from Mutt but should be able to be used from any email client that
8
- supports calling external programs.
6
+ A command line tool written in Ruby to access your GMail/Google Apps
7
+ contacts. Designed to be used from Mutt but should be able to be used
8
+ from any email client that supports calling external programs.
9
9
 
10
10
 
11
- ## Installation
11
+ == Installation
12
+
13
+ You will need Ruby 1.8.7 for bitsa. The gdata gem doesn't seem to work
14
+ with Ruby 1.9
12
15
 
13
16
  gem install bitsa
14
17
 
15
18
 
16
- ## Configuration
19
+ == Configuration
17
20
 
18
21
  Bitsa is configured through the configuration file
19
- `~/.bitsa_config.yml`. Use your GMail (or Google Apps) email address
22
+ <tt>~/.bitsa_config.yml</tt>. Use your GMail (or Google Apps) email address
20
23
  for the login.
21
24
 
22
25
  ---
@@ -25,10 +28,10 @@ for the login.
25
28
  :cache_file_path: ~/.bitsa_cache.yml
26
29
 
27
30
  The configuration file is not mandatory, you can pass in your email address
28
- and password on the command line, see [Usage](#usage).
31
+ and password on the command line, see Usage.
29
32
 
30
- If you have no configuration file or if `cache_file_path` is not specified in the
31
- configuration file it will default to `~/.bitsa_cache.yml`
33
+ If you have no configuration file or if <tt>cache_file_path</tt> is not specified in the
34
+ configuration file it will default to <tt>~/.bitsa_cache.yml</tt>
32
35
 
33
36
  If you store your email password in the configuration file you should
34
37
  ensue that it is only readable by you:
@@ -36,7 +39,10 @@ ensue that it is only readable by you:
36
39
  chmod 0600 .bitsa_config.yml
37
40
 
38
41
 
39
- ## <a name="usage">Usage</a>
42
+ == Usage
43
+
44
+
45
+ $ bitsa -h
40
46
 
41
47
  Usage: bitsa [global-options] [subcommand] [command-opts]
42
48
 
@@ -65,28 +71,43 @@ To search for all contacts that contain the string rob:
65
71
  jeff@example.net Robert Smith
66
72
  bob@robertsystems Robert Brown
67
73
 
74
+ Contacts are returned as email address, the TAB character and then the
75
+ contacts name.
76
+
68
77
  The first time you run Bitsa and then if it has been more than a day
69
78
  since it was last updated it will get the latest changes from your
70
79
  GMail contacts and copy them to a local cache (~/.bitsa_cache.yml).
71
80
 
72
81
  You can update your cache with the latest changes at any time by using
73
- the `update` sub-command:
82
+ the <tt>update</tt> sub-command:
74
83
 
75
84
  $ bitsa update
76
85
 
77
86
  If you want to clear your local cache and reload from GMail use the
78
- `reload` sub-command:
87
+ <tt>reload</tt> sub-command:
79
88
 
80
89
  $ bitsa reload
81
90
 
82
- ## Usage - Mutt
91
+ === Usage - Mutt
83
92
 
84
- To use for address lookup (&lt;ctrl&gt; t) in Mutt put the following in your
85
- `~/.muttrc` file:
93
+ To use for address lookup in {Mutt}[http://www.mutt.org] put the following in your
94
+ <tt>~/.muttrc</tt> file:
86
95
 
87
96
  set query_command = "bitsa search '%s'"
88
97
 
89
- ## Testing
98
+ === Usage - Sup
99
+
100
+ To use for address lookup in {Sup}[http://sup.rubyforge.org/] put the following in your
101
+ <tt>~/.sup/hooks/extra-contact-addresses.rb</tt> file:
102
+
103
+ require "yaml"
104
+ ignore, contacts = YAML::load_file( ENV['HOME'] + "/.bitsa_cache.yml" )
105
+
106
+ contacts.values.flatten.each_slice(2).map do |e,n|
107
+ "#{e}\t#{n}"
108
+ end
109
+
110
+ == Testing
90
111
 
91
112
  To run the tests after cloning the repository you first need to
92
113
  install the required libraries:
@@ -97,9 +118,9 @@ And then you can run the tests:
97
118
 
98
119
  rake spec
99
120
 
100
- ## License:
121
+ == License
101
122
 
102
- Copyright 2011 Colin Bell.
123
+ Copyright (c) 2011 {Colin Bell}[mailto:col@baibell.org]
103
124
 
104
125
  Bitsa is free software: you can redistribute it and/or modify
105
126
  it under the terms of the GNU General Public License as published by
@@ -114,4 +135,4 @@ GNU General Public License for more details.
114
135
  You should have received a copy of the GNU General Public License
115
136
  along with this program. If not, see <http://www.gnu.org/licenses/>.
116
137
 
117
- * * * * *
138
+ -----
data/bitsa.gemspec CHANGED
@@ -11,15 +11,19 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "https://github.com/colbell/bitsa"
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
-
15
14
  s.required_rubygems_version = ">= 1.3.6"
15
+ s.required_ruby_version = "< 1.9.0"
16
+
17
+ s.extra_rdoc_files = ["README.rdoc", "HISTORY", "COPYING"]
18
+ s.rdoc_options = ["--main", "README.rdoc"]
16
19
 
17
20
  s.add_dependency "trollop", "1.15"
18
- s.add_dependency "gdata", "1.1.1"
21
+ s.add_dependency "gdata", "~> 1.1.2"
19
22
 
20
23
  s.add_development_dependency "bundler", ">= 1.0.0"
21
- s.add_development_dependency "rspec", "~> 2.0.0.beta.22"
24
+ s.add_development_dependency "rspec", "~> 2.5.0"
22
25
  s.add_development_dependency "fakeweb", "~> 1.2.8"
26
+ s.add_development_dependency "rcov"
23
27
 
24
28
  s.files = `git ls-files`.split("\n")
25
29
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
data/lib/bitsa/version.rb CHANGED
@@ -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.10"
21
+ VERSION = "0.11"
22
22
  end
data/spec/helper.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "rubygems"
1
+ #require "rubygems"
2
+ require "rspec" # Requied for rcov to work
2
3
  # require "test/unit"
3
4
  # require "shoulda"
4
5
  # require 'mocha'
data/tasks/spec.rake CHANGED
@@ -1,3 +1,9 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
3
  RSpec::Core::RakeTask.new(:spec) {}
4
+
5
+ desc "Run all specs with rcov"
6
+ RSpec::Core::RakeTask.new(:rcov) do |t|
7
+ t.rcov = true
8
+ t.rcov_opts = %w{--exclude spec\/,gems\/}
9
+ end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitsa
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
- prerelease: false
4
+ hash: 29
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 10
9
- version: "0.10"
8
+ - 11
9
+ version: "0.11"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Colin Noel Bell
@@ -14,8 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-25 00:00:00 +10:00
18
- default_executable:
17
+ date: 2011-07-02 00:00:00 Z
19
18
  dependencies:
20
19
  - !ruby/object:Gem::Dependency
21
20
  name: trollop
@@ -38,14 +37,14 @@ dependencies:
38
37
  requirement: &id002 !ruby/object:Gem::Requirement
39
38
  none: false
40
39
  requirements:
41
- - - "="
40
+ - - ~>
42
41
  - !ruby/object:Gem::Version
43
- hash: 17
42
+ hash: 23
44
43
  segments:
45
44
  - 1
46
45
  - 1
47
- - 1
48
- version: 1.1.1
46
+ - 2
47
+ version: 1.1.2
49
48
  type: :runtime
50
49
  version_requirements: *id002
51
50
  - !ruby/object:Gem::Dependency
@@ -72,14 +71,12 @@ dependencies:
72
71
  requirements:
73
72
  - - ~>
74
73
  - !ruby/object:Gem::Version
75
- hash: 62196431
74
+ hash: 27
76
75
  segments:
77
76
  - 2
77
+ - 5
78
78
  - 0
79
- - 0
80
- - beta
81
- - 22
82
- version: 2.0.0.beta.22
79
+ version: 2.5.0
83
80
  type: :development
84
81
  version_requirements: *id004
85
82
  - !ruby/object:Gem::Dependency
@@ -98,6 +95,20 @@ dependencies:
98
95
  version: 1.2.8
99
96
  type: :development
100
97
  version_requirements: *id005
98
+ - !ruby/object:Gem::Dependency
99
+ name: rcov
100
+ prerelease: false
101
+ requirement: &id006 !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
108
+ - 0
109
+ version: "0"
110
+ type: :development
111
+ version_requirements: *id006
101
112
  description: Allows you to lookup GMail contacts and cache contacts locally from the command line.
102
113
  email:
103
114
  - col@baibell.org
@@ -105,16 +116,18 @@ executables:
105
116
  - bitsa
106
117
  extensions: []
107
118
 
108
- extra_rdoc_files: []
109
-
119
+ extra_rdoc_files:
120
+ - README.rdoc
121
+ - HISTORY
122
+ - COPYING
110
123
  files:
111
124
  - .gitignore
112
125
  - .rspec
113
126
  - COPYING
114
127
  - Gemfile
115
128
  - Gemfile.lock
116
- - History.txt
117
- - README.md
129
+ - HISTORY
130
+ - README.rdoc
118
131
  - Rakefile
119
132
  - TAGS
120
133
  - bin/bitsa
@@ -137,24 +150,26 @@ files:
137
150
  - tasks/create_tags.rake
138
151
  - tasks/retrieve_one_page.rake
139
152
  - tasks/spec.rake
140
- has_rdoc: true
141
153
  homepage: https://github.com/colbell/bitsa
142
154
  licenses: []
143
155
 
144
156
  post_install_message:
145
- rdoc_options: []
146
-
157
+ rdoc_options:
158
+ - --main
159
+ - README.rdoc
147
160
  require_paths:
148
161
  - lib
149
162
  required_ruby_version: !ruby/object:Gem::Requirement
150
163
  none: false
151
164
  requirements:
152
- - - ">="
165
+ - - <
153
166
  - !ruby/object:Gem::Version
154
- hash: 3
167
+ hash: 51
155
168
  segments:
169
+ - 1
170
+ - 9
156
171
  - 0
157
- version: "0"
172
+ version: 1.9.0
158
173
  required_rubygems_version: !ruby/object:Gem::Requirement
159
174
  none: false
160
175
  requirements:
@@ -169,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
184
  requirements: []
170
185
 
171
186
  rubyforge_project:
172
- rubygems_version: 1.3.7
187
+ rubygems_version: 1.8.5
173
188
  signing_key:
174
189
  specification_version: 3
175
190
  summary: Command line GMail Contacts lookup tool.
data/History.txt DELETED
@@ -1,4 +0,0 @@
1
- === 0.10 25 April 2011
2
-
3
- * 1 major enhancement:
4
- * Initial release