taskmapper-basecamp 0.5.0
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/.document +5 -0
- data/.travis.yml +4 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +52 -0
- data/LICENSE +20 -0
- data/README.md +63 -0
- data/Rakefile +41 -0
- data/VERSION +1 -0
- data/lib/basecamp/basecamp.rb +655 -0
- data/lib/provider/basecamp.rb +39 -0
- data/lib/provider/comment.rb +63 -0
- data/lib/provider/project.rb +94 -0
- data/lib/provider/ticket.rb +162 -0
- data/lib/taskmapper-basecamp.rb +5 -0
- data/spec/comments_spec.rb +103 -0
- data/spec/fixtures/comments/74197051.json +1 -0
- data/spec/fixtures/comments/74197051.xml +14 -0
- data/spec/fixtures/comments/74197096.json +1 -0
- data/spec/fixtures/comments/74197096.xml +14 -0
- data/spec/fixtures/comments.json +1 -0
- data/spec/fixtures/comments.xml +47 -0
- data/spec/fixtures/project_count.json +1 -0
- data/spec/fixtures/project_count.xml +5 -0
- data/spec/fixtures/projects/5220065.json +1 -0
- data/spec/fixtures/projects/5220065.xml +16 -0
- data/spec/fixtures/projects/create.json +1 -0
- data/spec/fixtures/projects/create.xml +2 -0
- data/spec/fixtures/projects.json +1 -0
- data/spec/fixtures/projects.xml +19 -0
- data/spec/fixtures/todo_items/62509330_todo_item.xml +15 -0
- data/spec/fixtures/todo_list_9972756.xml +14 -0
- data/spec/fixtures/todo_list_with_items.json +1 -0
- data/spec/fixtures/todo_list_with_items.xml +3477 -0
- data/spec/fixtures/todo_lists/9972756_items.json +1 -0
- data/spec/fixtures/todo_lists/9972756_items.xml +93 -0
- data/spec/fixtures/todo_lists/9973518_items.json +1 -0
- data/spec/fixtures/todo_lists/9973518_items.xml +98 -0
- data/spec/fixtures/todo_lists/create.json +1 -0
- data/spec/fixtures/todo_lists/create.xml +14 -0
- data/spec/fixtures/todo_lists.json +1 -0
- data/spec/fixtures/todo_lists.xml +29 -0
- data/spec/projects_spec.rb +83 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/taskmapper-basecamp_spec.rb +20 -0
- data/spec/tickets_spec.rb +87 -0
- data/taskmapper-basecamp.gemspec +100 -0
- metadata +201 -0
data/.document
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
gem "taskmapper", "~> 0.8"
|
7
|
+
gem "xml-simple", "~> 1.1"
|
8
|
+
# Add dependencies to develop your gem here.
|
9
|
+
# Include everything needed to run rake, tests, features, etc.
|
10
|
+
group :development do
|
11
|
+
gem "rspec", "~> 2.3"
|
12
|
+
gem "jeweler", "~> 1.6"
|
13
|
+
gem "simplecov", "~> 0.5", :platforms => :ruby_19
|
14
|
+
gem "rcov", "~> 1.0", :platforms => :ruby_18
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (3.2.3)
|
5
|
+
activesupport (= 3.2.3)
|
6
|
+
builder (~> 3.0.0)
|
7
|
+
activeresource (3.2.3)
|
8
|
+
activemodel (= 3.2.3)
|
9
|
+
activesupport (= 3.2.3)
|
10
|
+
activesupport (3.2.3)
|
11
|
+
i18n (~> 0.6)
|
12
|
+
multi_json (~> 1.0)
|
13
|
+
builder (3.0.0)
|
14
|
+
diff-lcs (1.1.3)
|
15
|
+
git (1.2.5)
|
16
|
+
hashie (1.2.0)
|
17
|
+
i18n (0.6.0)
|
18
|
+
jeweler (1.6.4)
|
19
|
+
bundler (~> 1.0)
|
20
|
+
git (>= 1.2.5)
|
21
|
+
rake
|
22
|
+
multi_json (1.0.4)
|
23
|
+
rake (0.9.2.2)
|
24
|
+
rcov (1.0.0)
|
25
|
+
rspec (2.3.0)
|
26
|
+
rspec-core (~> 2.3.0)
|
27
|
+
rspec-expectations (~> 2.3.0)
|
28
|
+
rspec-mocks (~> 2.3.0)
|
29
|
+
rspec-core (2.3.1)
|
30
|
+
rspec-expectations (2.3.0)
|
31
|
+
diff-lcs (~> 1.1.2)
|
32
|
+
rspec-mocks (2.3.0)
|
33
|
+
simplecov (0.5.4)
|
34
|
+
multi_json (~> 1.0.3)
|
35
|
+
simplecov-html (~> 0.5.3)
|
36
|
+
simplecov-html (0.5.3)
|
37
|
+
taskmapper (0.8.0)
|
38
|
+
activeresource (~> 3.0)
|
39
|
+
activesupport (~> 3.0)
|
40
|
+
hashie (~> 1.2)
|
41
|
+
xml-simple (1.1.1)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
jeweler (~> 1.6)
|
48
|
+
rcov (~> 1.0)
|
49
|
+
rspec (~> 2.3)
|
50
|
+
simplecov (~> 0.5)
|
51
|
+
taskmapper (~> 0.8)
|
52
|
+
xml-simple (~> 1.1)
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 HybridGroup
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# taskmapper-basecamp
|
2
|
+
|
3
|
+
This is the provider for interaction with [basecamp](http://www.basecamphq.com) using [taskmapper](http://ticketrb.com)
|
4
|
+
|
5
|
+
# Basecamp Setup
|
6
|
+
|
7
|
+
Basecamp's API access is disabled by default on their accounts. You will have to go to the account page and enable it.
|
8
|
+
|
9
|
+
1. From the dashboard, click the "Account (Upgrade/Invoices)" tab in the right hand side.
|
10
|
+
2. Scroll down to the Basecamp API section. (It should be near the bottom, second-to-last.)
|
11
|
+
3. Enable it. Once it's enabled, you'll see: "The API is currently enabled for this account."
|
12
|
+
|
13
|
+
## Token
|
14
|
+
|
15
|
+
It is recommended that you use the authentication token instead of a username and password to authenticate with basecamp. The token can be found from the "My Info" link at the top right hand corner next to the "Sign out" link.
|
16
|
+
|
17
|
+
At the bottom of that page is the "Authentication tokens" section. Click on the "Show your tokens" link for your API token. It's the first one.
|
18
|
+
|
19
|
+
# Usage
|
20
|
+
|
21
|
+
Initialize the basecamp taskmapper instance using a token or username and password:
|
22
|
+
|
23
|
+
basecamp = taskmapper.new(:basecamp, :domain => 'yourdomain.basecamphq.com', :token => 'abc000...')
|
24
|
+
basecamp = taskmapper.new(:basecamp, :domain => 'yourdomain.basecamphq.com', :username => 'you', :password => 'pass')
|
25
|
+
|
26
|
+
## Find projects
|
27
|
+
|
28
|
+
projects = basecamp.projects
|
29
|
+
project = basecamp.project(id)
|
30
|
+
|
31
|
+
## Find tickets
|
32
|
+
|
33
|
+
Since basecamp does not have the conventional "tickets", taskmapper-basecamp considers a TodoItem as a ticket, but will prepend the TodoList's title to the TodoItem's title.
|
34
|
+
tickets = project.tickets
|
35
|
+
ticket = project.ticket(<todoitem_id>)
|
36
|
+
|
37
|
+
## Find comments
|
38
|
+
|
39
|
+
comments = ticket.comments
|
40
|
+
|
41
|
+
## More
|
42
|
+
|
43
|
+
For more usage information, see [taskmapper](http://github.com/hybridgroup/taskmapper). This provider should implement all the taskmapper functionality. If it does not, please notify us.
|
44
|
+
|
45
|
+
## Contributions
|
46
|
+
|
47
|
+
* [Kir Shatrov](https://github.com/kirs) ([Evrone company](https://github.com/organizations/evrone))
|
48
|
+
|
49
|
+
Thanks for using taskmapper!
|
50
|
+
|
51
|
+
### Note on Patches/Pull Requests
|
52
|
+
|
53
|
+
* Fork the project.
|
54
|
+
* Make your feature addition or bug fix.
|
55
|
+
* Add tests for it. This is important so I don't break it in a
|
56
|
+
future version unintentionally.
|
57
|
+
* Commit, do not mess with rakefile, version, or history.
|
58
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
59
|
+
* Send me a pull request. Bonus points for topic branches.
|
60
|
+
|
61
|
+
## Copyright
|
62
|
+
|
63
|
+
Copyright (c) 2010 HybridGroup. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "taskmapper-basecamp"
|
8
|
+
gem.summary = %Q{The basecamp provider for taskmapper}
|
9
|
+
gem.description = %Q{This gem provides an interface to basecamp through the taskmapper gem}
|
10
|
+
gem.email = "hong.quach@abigfisch.com"
|
11
|
+
gem.homepage = "http://github.com/kiafaldorius/taskmapper-basecamp"
|
12
|
+
gem.authors = ["HybridGroup"]
|
13
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
|
+
end
|
15
|
+
Jeweler::GemcutterTasks.new
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'rspec/core'
|
21
|
+
require 'rspec/core/rake_task'
|
22
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
23
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
24
|
+
end
|
25
|
+
|
26
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
27
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
28
|
+
spec.rcov = true
|
29
|
+
end
|
30
|
+
|
31
|
+
task :default => :spec
|
32
|
+
|
33
|
+
require 'rake/rdoctask'
|
34
|
+
Rake::RDocTask.new do |rdoc|
|
35
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
36
|
+
|
37
|
+
rdoc.rdoc_dir = 'rdoc'
|
38
|
+
rdoc.title = "taskmapper-kanbanpad#{version}"
|
39
|
+
rdoc.rdoc_files.include('README*')
|
40
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
41
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.5.0
|