bitbucket_rest_api 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +43 -0
- data/lib/bitbucket_rest_api/connection.rb +1 -1
- data/lib/bitbucket_rest_api/issues.rb +17 -2
- data/lib/bitbucket_rest_api/users/account.rb +16 -1
- data/lib/bitbucket_rest_api/version.rb +1 -1
- metadata +36 -35
data/LICENSE.txt
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
Copyright (c) 2013 James M Cochran
|
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.
|
21
|
+
|
22
|
+
|
23
|
+
Original github_api project:
|
24
|
+
Copyright (c) 2011 Piotr Murach
|
25
|
+
|
26
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
27
|
+
a copy of this software and associated documentation files (the
|
28
|
+
"Software"), to deal in the Software without restriction, including
|
29
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
30
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
31
|
+
permit persons to whom the Software is furnished to do so, subject to
|
32
|
+
the following conditions:
|
33
|
+
|
34
|
+
The above copyright notice and this permission notice shall be
|
35
|
+
included in all copies or substantial portions of the Software.
|
36
|
+
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
38
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
39
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
40
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
41
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
42
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
43
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -42,7 +42,7 @@ module BitBucket
|
|
42
42
|
#builder.use BitBucket::Request::Jsonize
|
43
43
|
builder.use Faraday::Request::Multipart
|
44
44
|
builder.use Faraday::Request::UrlEncoded
|
45
|
-
builder.use FaradayMiddleware::OAuth, {:consumer_key => client_id, :consumer_secret => client_secret, :token => oauth_token, :token_secret => oauth_secret} if
|
45
|
+
builder.use FaradayMiddleware::OAuth, {:consumer_key => client_id, :consumer_secret => client_secret, :token => oauth_token, :token_secret => oauth_secret} if client_id? and client_secret?
|
46
46
|
builder.use BitBucket::Request::BasicAuth, authentication if basic_authed?
|
47
47
|
builder.use FaradayMiddleware::EncodeJson
|
48
48
|
|
@@ -19,6 +19,11 @@ module BitBucket
|
|
19
19
|
priority
|
20
20
|
status
|
21
21
|
kind
|
22
|
+
limit
|
23
|
+
start
|
24
|
+
search
|
25
|
+
sort
|
26
|
+
reported_by
|
22
27
|
].freeze
|
23
28
|
|
24
29
|
VALID_ISSUE_PARAM_VALUES = {
|
@@ -50,9 +55,19 @@ module BitBucket
|
|
50
55
|
# List issues for a repository
|
51
56
|
#
|
52
57
|
# = Inputs
|
53
|
-
# <tt>:filter</tt> - Optional - See https://confluence.atlassian.com/display/BITBUCKET/Issues#Issues-Filtering for building the filter string
|
54
|
-
# <tt>:start</tt> - Optional - Issue offset, default 0
|
55
58
|
# <tt>:limit</tt> - Optional - Number of issues to retrieve, default 15
|
59
|
+
# <tt>:start</tt> - Optional - Issue offset, default 0
|
60
|
+
# <tt>:search</tt> - Optional - A string to search for
|
61
|
+
# <tt>:sort</tt> - Optional - Sorts the output by any of the metadata fields
|
62
|
+
# <tt>:title</tt> - Optional - Contains a filter operation to restrict the list of issues by the issue title
|
63
|
+
# <tt>:content</tt> - Optional - Contains a filter operation to restrict the list of issues by the issue content
|
64
|
+
# <tt>:version</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the version
|
65
|
+
# <tt>:milestone</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the milestone
|
66
|
+
# <tt>:component</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the component
|
67
|
+
# <tt>:kind</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the issue kind
|
68
|
+
# <tt>:status</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the issue status
|
69
|
+
# <tt>:responsible</tt> - Optional - Contains an is or ! ( is not) filter to restrict the list of issues by the user responsible
|
70
|
+
# <tt>:reported_by</tt> - Optional - Contains a filter operation to restrict the list of issues by the user that reported the issue
|
56
71
|
#
|
57
72
|
# = Examples
|
58
73
|
# bitbucket = BitBucket.new :user => 'user-name', :repo => 'repo-name'
|
@@ -29,5 +29,20 @@ module BitBucket
|
|
29
29
|
response = get_request("/users/#{accountname}/events")
|
30
30
|
end
|
31
31
|
|
32
|
+
#GET the keys
|
33
|
+
def keys(accountname)
|
34
|
+
response = get_request("/users/#{accountname}/ssh-keys")
|
35
|
+
end
|
36
|
+
|
37
|
+
#POST a new key
|
38
|
+
# params should be in format {key: "", label:""}
|
39
|
+
def new_key(accountname, params)
|
40
|
+
response = post_request("/users/#{accountname}/ssh-keys/", params)
|
41
|
+
end
|
42
|
+
|
43
|
+
#DELETE a key
|
44
|
+
def delete_key(accountname, key_id)
|
45
|
+
response = delete_request("/users/#{accountname}/ssh-keys/#{key_id}")
|
46
|
+
end
|
32
47
|
end # Users::Account
|
33
|
-
end # BitBucket
|
48
|
+
end # BitBucket
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitbucket_rest_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-19 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hashie
|
16
|
-
requirement: &
|
16
|
+
requirement: &70134501043220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.0.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70134501043220
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: faraday
|
27
|
-
requirement: &
|
27
|
+
requirement: &70134501042240 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.8.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70134501042240
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: multi_json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70134501041200 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.3'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70134501041200
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: faraday_middleware
|
49
|
-
requirement: &
|
49
|
+
requirement: &70134501039420 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,21 +54,21 @@ dependencies:
|
|
54
54
|
version: 0.9.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70134501039420
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &70134501037860 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
|
-
- -
|
63
|
+
- - ! '>='
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: 1.5.2
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70134501037860
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simple_oauth
|
71
|
-
requirement: &
|
71
|
+
requirement: &70134501036380 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70134501036380
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &70134501034780 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70134501034780
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: cucumber
|
93
|
-
requirement: &
|
93
|
+
requirement: &70134501009220 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70134501009220
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: webmock
|
104
|
-
requirement: &
|
104
|
+
requirement: &70134501007400 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 1.8.0
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70134501007400
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: vcr
|
115
|
-
requirement: &
|
115
|
+
requirement: &70134501005900 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: 2.2.0
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70134501005900
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: simplecov
|
126
|
-
requirement: &
|
126
|
+
requirement: &70134501004400 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 0.6.1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70134501004400
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: guard
|
137
|
-
requirement: &
|
137
|
+
requirement: &70134501002980 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70134501002980
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: guard-rspec
|
148
|
-
requirement: &
|
148
|
+
requirement: &70134501001620 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '0'
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70134501001620
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: guard-cucumber
|
159
|
-
requirement: &
|
159
|
+
requirement: &70134500999620 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: '0'
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *70134500999620
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: rake
|
170
|
-
requirement: &
|
170
|
+
requirement: &70134500998260 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: '0'
|
176
176
|
type: :development
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *70134500998260
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: bundler
|
181
|
-
requirement: &
|
181
|
+
requirement: &70134500997260 !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|
184
184
|
- - ! '>='
|
@@ -186,7 +186,7 @@ dependencies:
|
|
186
186
|
version: '0'
|
187
187
|
type: :development
|
188
188
|
prerelease: false
|
189
|
-
version_requirements: *
|
189
|
+
version_requirements: *70134500997260
|
190
190
|
description: ! ' Ruby wrapper for the BitBucket API supporting OAuth and Basic Authentication '
|
191
191
|
email: mcochran@linux.com
|
192
192
|
executables: []
|
@@ -255,6 +255,7 @@ files:
|
|
255
255
|
- lib/bitbucket_rest_api/version.rb
|
256
256
|
- lib/bitbucket_rest_api.rb
|
257
257
|
- README.md
|
258
|
+
- LICENSE.txt
|
258
259
|
homepage: https://github.com/vongrippen/bitbucket
|
259
260
|
licenses: []
|
260
261
|
post_install_message:
|