omnifocus-pivotaltracker 1.0.0 → 1.1.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/README.md CHANGED
@@ -20,6 +20,19 @@ configuration file and creates corresponding tasks to Omnifocus.
20
20
  3. (On the first run, configuration file will be generated at
21
21
  ~/.omnifocus-pivotaltracker.yml. Go and fill your account information.)
22
22
 
23
+ ## Multi-account support
24
+
25
+ You can add multiple accounts to the configuration file by using the YAML array
26
+ syntax like:
27
+
28
+ ---
29
+ -
30
+ :token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
31
+ :user_name: muo
32
+ -
33
+ :token: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
34
+ :user_name: KN
35
+
23
36
  ## Contributing
24
37
 
25
38
  1. Fork it
@@ -20,14 +20,18 @@ module OmniFocus::Pivotaltracker
20
20
  abort "Created default config in #{path}. Go fill it out."
21
21
  end
22
22
 
23
- config
23
+ # Make things working against single/multiple account settings.
24
+ [config].flatten
24
25
  end
25
26
 
26
27
  def populate_pivotaltracker_tasks
27
28
  config = load_or_create_config
28
- token = config[:token]
29
- user_name = config[:user_name]
29
+ config.each do |conf|
30
+ populate_pivotaltracker_tasks_for_project(conf[:token], conf[:user_name])
31
+ end
32
+ end
30
33
 
34
+ def populate_pivotaltracker_tasks_for_project(token, user_name)
31
35
  projects = fetch_projects(token)
32
36
 
33
37
  projects.each do |project|
@@ -1,5 +1,5 @@
1
1
  require "omnifocus"
2
2
 
3
3
  module OmniFocus::Pivotaltracker
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnifocus-pivotaltracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-03 00:00:00.000000000 Z
12
+ date: 2013-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omnifocus