harvestthings 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mdown +1 -2
- data/VERSION.yml +1 -1
- data/harvestthings.gemspec +5 -3
- data/lib/harvestthings/sync.rb +6 -4
- data/script/HarvestThings_install.sh +6 -0
- data/script/HarvestThings_sync.sh +16 -0
- metadata +4 -2
data/README.mdown
CHANGED
@@ -48,7 +48,6 @@ the API calls (other gems are not listed as dependents):
|
|
48
48
|
|
49
49
|
* hpricot
|
50
50
|
* net/http
|
51
|
-
* net/http
|
52
51
|
* uri
|
53
52
|
* base64
|
54
53
|
* bigdecimal
|
@@ -61,7 +60,7 @@ Usage
|
|
61
60
|
as a Ruby Gem
|
62
61
|
|
63
62
|
|
64
|
-
|
63
|
+
require rubygems
|
65
64
|
require harvestthings
|
66
65
|
harvestthings
|
67
66
|
|
data/VERSION.yml
CHANGED
data/harvestthings.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{harvestthings}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Krisher"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-01-13}
|
13
13
|
s.description = %q{harvestthings will sync your clients, projects, and tasks between Things and Harvest, where areas in Things correspond to clients in Harvest}
|
14
14
|
s.email = %q{mike@mikekrisher.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -31,7 +31,9 @@ Gem::Specification.new do |s|
|
|
31
31
|
"lib/harvestthings/things/projects.rb",
|
32
32
|
"lib/harvestthings/things/tasks.rb",
|
33
33
|
"pkg/harvestthings-0.1.0.gem",
|
34
|
-
"pkg/harvestthings-1.0.0.gem"
|
34
|
+
"pkg/harvestthings-1.0.0.gem",
|
35
|
+
"script/HarvestThings_install.sh",
|
36
|
+
"script/HarvestThings_sync.sh"
|
35
37
|
]
|
36
38
|
s.homepage = %q{http://github.com/mkrisher/HarvestThings}
|
37
39
|
s.rdoc_options = ["--charset=UTF-8"]
|
data/lib/harvestthings/sync.rb
CHANGED
@@ -84,6 +84,7 @@ str = <<EOS
|
|
84
84
|
</task>
|
85
85
|
EOS
|
86
86
|
response = @harvest.request "/projects/#{harvest_project_id(project_name)}/task_assignments", :post, str
|
87
|
+
define_harvest_tasks
|
87
88
|
end
|
88
89
|
|
89
90
|
# add_client_to_harvest - saves a Things area_name as a Harvest client
|
@@ -97,7 +98,8 @@ str = <<EOS
|
|
97
98
|
<details></details>
|
98
99
|
</client>
|
99
100
|
EOS
|
100
|
-
response = @harvest.request '/clients', :post, str
|
101
|
+
response = @harvest.request '/clients', :post, str
|
102
|
+
define_harvest_clients
|
101
103
|
end
|
102
104
|
|
103
105
|
|
@@ -162,7 +164,7 @@ private
|
|
162
164
|
def harvest_project?(proj_name)
|
163
165
|
match = false
|
164
166
|
@harvest_projects.each do |project|
|
165
|
-
if project['name'] == proj_name
|
167
|
+
if project['name'].downcase.strip == proj_name.downcase.strip
|
166
168
|
match = true
|
167
169
|
end
|
168
170
|
end
|
@@ -176,7 +178,7 @@ private
|
|
176
178
|
def harvest_client?(area_name)
|
177
179
|
match = false
|
178
180
|
@harvest_clients.each do |client|
|
179
|
-
if client['name'] == area_name
|
181
|
+
if client['name'].downcase.strip == area_name.downcase.strip
|
180
182
|
match = true
|
181
183
|
end
|
182
184
|
end
|
@@ -190,7 +192,7 @@ private
|
|
190
192
|
def harvest_task?(task_name)
|
191
193
|
match = false
|
192
194
|
@harvest_tasks.each do |task|
|
193
|
-
if task['name'] == task_name
|
195
|
+
if task['name'].downcase.strip == task_name.downcase.strip
|
194
196
|
match = true
|
195
197
|
end
|
196
198
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
if [ ! -f ~/.harvestthingsrc ]
|
4
|
+
then
|
5
|
+
echo "Installing Harvest Things sync tool..."
|
6
|
+
gem sources -a http://gemcutter.org
|
7
|
+
sudo gem install harvestthings
|
8
|
+
echo "Done installing Harvest Things sync tool"
|
9
|
+
fi
|
10
|
+
|
11
|
+
|
12
|
+
# Ruby gems always available
|
13
|
+
export RUBYOPT="rubygems"
|
14
|
+
|
15
|
+
echo "Syncing Things with Harvest..."
|
16
|
+
ruby -e "require 'harvestthings'; harvestthings"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harvestthings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Krisher
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-13 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,8 @@ files:
|
|
47
47
|
- lib/harvestthings/things/tasks.rb
|
48
48
|
- pkg/harvestthings-0.1.0.gem
|
49
49
|
- pkg/harvestthings-1.0.0.gem
|
50
|
+
- script/HarvestThings_install.sh
|
51
|
+
- script/HarvestThings_sync.sh
|
50
52
|
has_rdoc: true
|
51
53
|
homepage: http://github.com/mkrisher/HarvestThings
|
52
54
|
licenses: []
|