Skip to content

Commit cab13cf

Browse files
committed
Merge remote-tracking branch 'main/master'
2 parents 3bad5e3 + 13901a5 commit cab13cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1857
-267
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ features/settings.yml
1414
TAGS
1515
.tags_sorted_by_file
1616
coverage
17+
tags

.rspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--color
1+
--color -fd

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3.0

.rvmrc

Lines changed: 0 additions & 29 deletions
This file was deleted.

bin/console

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env ruby
2+
require 'bundler/setup'
3+
require 'bitbucket_rest_api'
4+
5+
require 'pry'
6+
Pry.start

bitbucket_rest_api.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ Gem::Specification.new do |gem|
2828
gem.add_development_dependency 'simplecov', '~> 0.6.1'
2929
gem.add_development_dependency 'rake'
3030
gem.add_development_dependency 'bundler'
31-
gem.add_development_dependency 'pry'
31+
gem.add_development_dependency 'pry-debugger'
3232
gem.add_development_dependency 'mocha'
3333
end

lib/bitbucket_rest_api.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
require 'bitbucket_rest_api/utils/url'
77
require 'bitbucket_rest_api/connection'
88
require 'bitbucket_rest_api/deprecation'
9-
require 'bitbucket_rest_api/core_ext/ordered_hash'
109

1110
module BitBucket
1211
extend Configuration

lib/bitbucket_rest_api/api.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ def _merge_user_repo_into_params!(params) # :nodoc:
9393
{ 'user' => self.user, 'repo' => self.repo }.merge!(params)
9494
end
9595

96-
# TODO: See whether still needed, consider adding to core_exts
97-
def _hash_traverse(hash, &block)
98-
hash.each do |key, val|
99-
block.call(key)
100-
case val
101-
when Hash
102-
val.keys.each do |k|
103-
_hash_traverse(val, &block)
104-
end
105-
when Array
106-
val.each do |item|
107-
_hash_traverse(item, &block)
108-
end
109-
end
110-
end
111-
return hash
112-
end
113-
11496
def _merge_mime_type(resource, params) # :nodoc:
11597
# params['resource'] = resource
11698
# params['mime_type'] = params['mime_type'] || :raw

lib/bitbucket_rest_api/api/actions.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@ def actions
1717
end
1818

1919
def api_methods_in(klass)
20-
puts "---"
20+
methods = []
2121
(klass.send(:instance_methods, false) - ['actions']).sort.each do |method|
22-
puts "|--> #{method}"
22+
methods << method
2323
end
2424
klass.included_modules.each do |mod|
2525
if mod.to_s =~ /#{klass}/
26-
puts "| \\ #{mod.to_s}"
2726
mod.instance_methods(false).each do |met|
28-
puts "| |--> #{met}"
27+
methods << met
2928
end
30-
puts "| /"
3129
end
3230
end
33-
puts "---"
34-
nil
31+
methods
3532
end
3633

3734
def append_arguments(method)

lib/bitbucket_rest_api/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module Configuration
4949
DEFAULT_BASIC_AUTH = nil
5050

5151
# The endpoint used to connect to BitBucket if none is set, in the event that BitBucket is ever available on location
52-
DEFAULT_ENDPOINT = 'https://bitbucket.org/api'.freeze
52+
DEFAULT_ENDPOINT = 'https://api.bitbucket.org'.freeze
5353

5454
# The value sent in the http header for 'User-Agent' if none is set
5555
DEFAULT_USER_AGENT = "BitBucket Ruby Gem #{BitBucket::VERSION::STRING}".freeze

0 commit comments

Comments
 (0)