basecamp 0.0.11 → 0.0.12
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.
- checksums.yaml +4 -4
- data/README.rdoc +21 -3
- data/lib/basecamp/base.rb +2 -2
- data/lib/basecamp/resources/time_entry.rb +2 -2
- data/lib/basecamp/resources/todo_item.rb +5 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 530ce9b599651c1308f8a5ef01ec873ba4557abe
|
4
|
+
data.tar.gz: 6f00fa38d7342e244ceb6cee10dd5310e96211b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdc25f6403aea5c04128c8dfb04b6169b82eff59d4c86fd2f32d1ce77904b3c59d7303940957a4a74e3b53c48337295f790f35517538960eb43c1e75319dc47b
|
7
|
+
data.tar.gz: 48217e705aeb46283f89d4ed6e6867c474ab562d4bee5dadc715295ae46d0c7463e0573f9e0948cafc729c7eccab1932812f67af565df85d4684bbbdeb838e2e
|
data/README.rdoc
CHANGED
@@ -47,11 +47,19 @@ requires your Basecamp site address and your login credentials or API token.
|
|
47
47
|
|
48
48
|
Basecamp.establish_oauth_connection!('yoururl.basecamphq.com', 'oauth_access_token')
|
49
49
|
|
50
|
-
===
|
50
|
+
=== Using SSL/Non SSL basecamp accounts (https://yoururl.basecamphq.com)
|
51
51
|
|
52
|
-
|
52
|
+
Basecamp uses SSL in all accounts so that's the default value here for establish_connection!. This will use https for the connection:
|
53
53
|
|
54
|
-
Basecamp.
|
54
|
+
Basecamp.establish_connection!('yoururl.basecamphq.com', 'APITOKEN', 'X')
|
55
|
+
|
56
|
+
Basecamp.establish_oauth_connection!('yoururl.basecamphq.com', 'oauth_access_token')
|
57
|
+
|
58
|
+
But if for some reason your basecamp account doesn't use SSL, you can disable with:
|
59
|
+
|
60
|
+
Basecamp.establish_connection!('yoururl.basecamphq.com', 'APITOKEN', 'X', false)
|
61
|
+
|
62
|
+
Basecamp.establish_oauth_connection!('yoururl.basecamphq.com', 'oauth_access_token', false)
|
55
63
|
|
56
64
|
This is the same whether you're accessing using the ActiveResource interface,
|
57
65
|
or the legacy interface.
|
@@ -200,6 +208,16 @@ So you have to do something like this:
|
|
200
208
|
todo_items
|
201
209
|
end
|
202
210
|
|
211
|
+
=== Time entries
|
212
|
+
|
213
|
+
There are two ways to create time-entries
|
214
|
+
|
215
|
+
# TodoItem as Parent Resource
|
216
|
+
Basecamp::TimeEntry.create(:todo_item_id => item_id, :date => date, :person_id => person_id, :hours => hours, :description => '')
|
217
|
+
# Project as Parent Resource
|
218
|
+
Basecamp::TimeEntry.create(:project_id => project_id, :date => date, :person_id => person_id, :hours => hours, :description => '')
|
219
|
+
|
220
|
+
|
203
221
|
= Using the non-REST interface
|
204
222
|
|
205
223
|
You can access other resources not included in this wrapper yet using "record" and "records".
|
data/lib/basecamp/base.rb
CHANGED
@@ -3,7 +3,7 @@ module Basecamp
|
|
3
3
|
attr_accessor :use_xml
|
4
4
|
attr_reader :site, :user, :password, :use_ssl, :use_oauth, :access_token
|
5
5
|
|
6
|
-
def establish_connection!(site, user, password, use_ssl =
|
6
|
+
def establish_connection!(site, user, password, use_ssl = true, use_xml = true)
|
7
7
|
@site = site
|
8
8
|
@user = user
|
9
9
|
@password = password
|
@@ -19,7 +19,7 @@ module Basecamp
|
|
19
19
|
@connection = Connection.new(self)
|
20
20
|
end
|
21
21
|
|
22
|
-
def establish_oauth_connection!(site, access_token, use_ssl =
|
22
|
+
def establish_oauth_connection!(site, access_token, use_ssl = true, use_xml = true)
|
23
23
|
@site = site
|
24
24
|
@use_ssl = use_ssl
|
25
25
|
@use_xml = use_xml
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Basecamp; class TimeEntry < Basecamp::Resource
|
2
|
-
parent_resources :project
|
2
|
+
parent_resources :project, :todo_item
|
3
3
|
|
4
4
|
def self.all(project_id, page = 0)
|
5
5
|
find(:all, :params => { :project_id => project_id, :page => page })
|
@@ -8,4 +8,4 @@ module Basecamp; class TimeEntry < Basecamp::Resource
|
|
8
8
|
def self.report(options={})
|
9
9
|
find(:all, :from => :report, :params => options)
|
10
10
|
end
|
11
|
-
end; end
|
11
|
+
end; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basecamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anibal Cucco
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -154,9 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.6.14.4
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Basecamp API wrapper.
|
161
161
|
test_files: []
|
162
|
-
has_rdoc:
|