100+ results for 'bitbucket'
Not the results you expected?
deploy.rb (https://bitbucket.org/kvp/fusu.ma.git) Ruby · 141 lines
gd.rb (https://bitbucket.org/zozo123/homebrew.git) Ruby · 42 lines
3 class Gd < Formula
4 url "http://www.libgd.org/releases/gd-2.0.36RC1.tar.gz"
5 homepage "http://bitbucket.org/pierrejoye/gd-libgd"
6 mirror "http://download.osgeo.org/mapserver/libgd/gd-2.0.36RC1.tar.gz"
7 md5 "39ac48e6d5e0012a3bd2248a0102f209"
9 head "http://bitbucket.org/pierrejoye/gd-libgd", :using => :hg
11 depends_on 'jpeg' => :recommended
api.rb (https://bitbucket.org/snishio/bitbucket-api-extension.git) Ruby · 121 lines
1 # coding: utf-8
3 module BitbucketApiExtension; end
5 class BitbucketApiExtension::Api
7 BITBUCKET_URI = 'https://bitbucket.org'
8 BITBUCKET_API_URI = 'https://api.bitbucket.org/1.0/repositories'
23 list = html.map do |request|
24 title = request.xpath('td[@class="title"]/div/a').text
25 BitbucketApiExtension::PullRequest.new(
26 title: title,
27 id: title.scan(/#(\d+):.*/)
29 .first,
30 request_page_url: request.xpath('td[@class="title"]/div/a')
31 .map{ |link| BITBUCKET_URI + link['href'] }
32 .first
33 .to_s,
pip.rb (https://bitbucket.org/cavneb/cookbooks.git) Ruby · 146 lines
deploy.rb (https://bitbucket.org/JakubOboza/genetic-algorithms.git) Ruby · 52 lines
bitbucket_adapter.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 46 lines
1 require 'json'
3 class BitbucketAdapter
5 def initialize(json)
8 case @payload['scm'].downcase
9 when 'git'
10 @scm = BitbucketGit
11 when 'hg'
12 @scm = BitbucketHg
28 path = "#{@payload['owner']}/#{@payload['slug']}"
30 local_root_path = Setting.plugin_redmine_bitbucket[:local_path]
31 local_url = "#{local_root_path}/#{project.identifier}/#{path}"
keepingtracks.rb (https://bitbucket.org/sea_wolf/keepingtracks-website.git) Ruby · 62 lines
10 app_about = "Keep track of your rail journeys in the UK, with your Android device."
11 app_subhead = "is an Android app to help you keep track of your rail journeys."
12 homepage_path = "https://bitbucket.org/sea_wolf/keepingtracks"
13 trello_url = "https://trello.com/b/0xS1MOQd"
14 github_path = "https://github.com/seawolf/KeepingTracks"
deploy.rb (https://bitbucket.org/channainfo/papua-new-guinea-hiv-aids.git) Ruby · 91 lines
routes.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 55 lines
gd.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 58 lines
3 class Gd < Formula
4 homepage 'https://bitbucket.org/libgd/gd-libgd'
5 # libgd doesn't have their latest (non-alpha) version.
6 # When they do release a stable version, use that url.
7 # Watch this space: http://libgd.bitbucket.org/pages/downloads.html
8 url 'http://download.osgeo.org/mapserver/libgd/gd-2.0.36RC1.tar.gz'
9 sha1 '21cf2ec93fd80836fc0cb4741201f7cc5440819a'
11 head 'https://bitbucket.org/libgd/gd-libgd', :using => :hg
13 option :universal
bitbucket.rb (https://bitbucket.org/pygmael/reposlanger.git) Ruby · 79 lines
import_routing_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 165 lines
89 end
91 # status_import_bitbucket GET /import/bitbucket/status(.:format) import/bitbucket#status
92 # callback_import_bitbucket GET /import/bitbucket/callback(.:format) import/bitbucket#callback
93 # jobs_import_bitbucket GET /import/bitbucket/jobs(.:format) import/bitbucket#jobs
94 # import_bitbucket POST /import/bitbucket(.:format) import/bitbucket#create
95 describe Import::BitbucketController, 'routing' do
96 it_behaves_like 'importer routing' do
97 let(:except_actions) { [:new] }
98 let(:provider) { 'bitbucket' }
99 end
100 end
indexer_jobs.rb (https://bitbucket.org/bjfish/indexer_jobs.git) Ruby · 176 lines
9 require 'tire'
10 require 'resque'
11 require 'bitbucket_rest_api'
13 module IndexerJobs
63 class BitbucketJob
64 include Resque::Plugins::Status
65 @queue = :bitbucket
75 index_id = options['index_id']
77 bitbucket = BitBucket.new do |config|
78 config.oauth_token = token
79 config.oauth_secret = secret
deploy.rb (https://bitbucket.org/soe/parasquid-cs2001.git) Ruby · 84 lines
deploy.rb (https://bitbucket.org/mgduk/mgdreader.git) Ruby · 69 lines
makejson.pl (https://bitbucket.org/haraki/mash-time-zone-converter.git) Perl · 141 lines
upgrade.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 62 lines
18 begin
19 open("https://bitbucket.org/atlassian/agent-charlie/get/#{@branch}.tar.gz") do |io|
21 z = Zlib::GzipReader.new(io)
50 end
52 # curl -o "$charlieTmp/charlie.tar.gz" "https://bitbucket.org/atlassian/agent-charlie/get/stable.tar.gz" &&
53 # tar -C "$charlieRoot" -zxf "$charlieTmp/charlie.tar.gz" --strip-components 1 &&
bitbucketgit_hook_controller.rb (https://bitbucket.org/br3dr3n/redmine-bitbucket-git.git) Ruby · 56 lines
2 # Update by Bastian Bringenberg <typo3@bastian-bringenberg.de> 2012
4 class BitbucketgitHookController < ApplicationController
6 skip_before_filter :verify_authenticity_token, :check_if_login_required
8 def index
9 payload = JSON.parse(params[:payload])
10 logger.debug { "Received from Bitbucket: #{payload.inspect}" }
12 # For now, we assume that the repository name is the same as the project identifier
13 identifier = payload['repository']['name']
15 searchPath = Dir.getwd + '/' + Setting.plugin_redmine_bitbucketgit_hook[:bitbucketgit_dir].to_s + '/' + payload['repository']['owner'] + '_' + payload['repository']['name'] +'.git'
16 repository = Repository.find_by_url(searchPath)
restExample.pl (https://bitbucket.org/SaiPatel/keysight-plugins-for-atlassian-products.git) Perl · 182 lines
deploy.rb (https://bitbucket.org/hon3y/hny_project_typo3.git) Ruby · 119 lines
deploy.rb (https://bitbucket.org/shinyay/rails_capistrano_sample.git) Ruby · 126 lines
pypy.rb (https://bitbucket.org/zozo123/homebrew.git) Ruby · 95 lines
pypy.rb (https://bitbucket.org/smcferrin/homebrew.git) Ruby · 91 lines
8 class Pypy < Formula
9 homepage 'http://pypy.org/'
10 url 'https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-osx64.tar.bz2'
11 version '1.9'
12 sha1 '825e15724419fbdb6fe215eeea044f9181883c90'
14 devel do
15 url 'https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-beta1-osx64.tar.bz2'
16 version '2.0-beta1'
17 sha1 'e4938fdf33072e457fee6cb22798ec08b5a01978'
deploy.rb (https://bitbucket.org/srmoscow/hanzi.git) Ruby · 71 lines
pypy.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 90 lines
deploy.rb (https://bitbucket.org/UIUCLibrary/dspace-rails.git) Ruby · 99 lines
bitbucket.rb (https://bitbucket.org/KitaitiMakoto/gitpusher.git) Ruby · 63 lines
4 module GitPusher
5 module Service
6 class BitBucket < Base
8 def initialize(config)
9 super(config)
10 @user = Pit.get(
11 'bitbucket', :require => { 'user' => 'Your user name of BitBucket' }
12 )['user']
13 @password = Pit.get(
14 'bitbucket', :require => { 'password' => 'Your user password of BitBucket' }
15 )['password']
16 end
deploy.rb (https://bitbucket.org/h6165/seatfoo.git) Ruby · 68 lines
deploy.rb (https://bitbucket.org/anujan/pentakill-university.git) Ruby · 26 lines
application.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 23 lines
bitbucket_singleton.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 37 lines
3 require 'rest-client'
5 if not Object.const_defined?('BitbucketSingleton')
6 class BitbucketSingleton < GenericLoginSingleton
8 def initialize
9 super('Bitbucket', 'Username or email')
10 end
14 RestClient::Request.execute(
15 :method => :get,
16 :url => 'https://bitbucket.org/api/1.0/user',
17 :user => @username,
18 :password => @password
28 puts <<-'EOS'.gsub(/^\t*/, '')
30 Agent Charlie requires your Bitbucket account details so we can install your private key and check out some
31 useful tools to set up your development environment.
test_stash-create-pull-request.rb (https://bitbucket.org/penland365/stash-command-line-tools.git) Ruby · 30 lines
vera++.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 30 lines
3 # Use prebuilt docs to avoid need for pandoc
4 class VeraMan < Formula
5 url 'https://bitbucket.org/verateam/vera/downloads/vera++-1.2.1-doc.tar.gz'
6 sha1 'fce30676c815b99aa66d25c9dfbd2eda2c74bd7a'
7 end
9 class Veraxx < Formula
10 homepage 'https://bitbucket.org/verateam/vera'
11 url 'https://bitbucket.org/verateam/vera/downloads/vera++-1.2.1.tar.gz'
datadog.rb (https://bitbucket.org/ToadJamb/forks_backup.git) Ruby · 116 lines
deploy.rb (https://bitbucket.org/ktadokoro/2ch_summary.git) Ruby · 99 lines
deploy.rb (https://bitbucket.org/funollet/gurb-platform.git) Ruby · 63 lines
deploy.rb (https://bitbucket.org/brucemakallan/uganda-swimming-federation.git) Ruby · 92 lines
gd.rb (https://bitbucket.org/smcferrin/homebrew.git) Ruby · 53 lines
3 class Gd < Formula
4 homepage 'http://bitbucket.org/pierrejoye/gd-libgd'
5 url 'http://www.libgd.org/releases/gd-2.0.36RC1.tar.gz'
6 mirror 'http://download.osgeo.org/mapserver/libgd/gd-2.0.36RC1.tar.gz'
7 sha1 '21cf2ec93fd80836fc0cb4741201f7cc5440819a'
9 head 'http://bitbucket.org/pierrejoye/gd-libgd', :using => :hg
11 depends_on :libpng => :recommended
bbnew (https://bitbucket.org/designermonkey/bbnew) Ruby · 89 lines
26 end
28 opts.on('-p', '--pass password', 'BitBucket password') do |pass|
29 config["pass"] = pass
30 end
55 end
57 config['conf'] ||= "~/.bitbucket"
58 if File.exist?(File.expand_path config['conf'])
59 File.open File.expand_path(config['conf']) do |bb|
64 end
66 uri = URI.parse('https://api.bitbucket.org/1.0/repositories/')
68 http = Net::HTTP.new(uri.host, uri.port)
metadata.rb (https://bitbucket.org/izovskih/devops-5_summer2018.git) Ruby · 26 lines
15 #
16 # issues_url 'https://github.com/<insert_org_here>/final-ha-deploy/issues'
17 issues_url 'https://bitbucket.org/izovskih/devops-5_summer2018/src/master/A_Iazovskikh/chef-repo/'
19 # The `source_url` points to the development repository for this cookbook. A
22 #
23 # source_url 'https://github.com/<insert_org_here>/final-ha-deploy'
24 source_url 'https://bitbucket.org/izovskih/devops-5_summer2018/src/master/A_Iazovskikh/chef-repo/'
26 depends 'aws', '~> 7.5.0'
bitbucket_service_controller.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 27 lines
1 require "json"
3 class BitbucketServiceController < ApplicationController
4 unloadable
8 def index
9 bitbucket = BitbucketService.new
11 unless bitbucket.service_enabled? && bitbucket.valid_key?(params[:key])
13 end
15 result = bitbucket.find_and_update_repository(params[:project_id], params[:payload])
17 if result.nil?
deploy.rb (https://bitbucket.org/blazetango/jiffeez.git) Ruby · 57 lines
DefaultMatcher.pm (https://bitbucket.org/exussum/pockito) Perl · 166 lines
deploy.rb (https://bitbucket.org/shinyay/chef_rails_template.git) Ruby · 52 lines
deploy.rb (https://bitbucket.org/Inomoz/inomoz-bp.git) Ruby · 34 lines
php54-ev.rb (https://bitbucket.org/mkalkbrenner/homebrew-php.git) Ruby · 25 lines
upload_bitbucket_keys.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 68 lines
3 require 'json'
5 Puppet::Type.newtype(:upload_bitbucket_keys) do
6 @doc = "Uploads your private key to Bitbucket"
21 response = RestClient::Request.execute(
22 :method => :get,
23 :url => "https://bitbucket.org/api/1.0/user",
24 :user => self.resource[:username],
25 :password => self.resource[:password]
32 RestClient::Request.execute(
33 :method => :post,
34 :url => "https://bitbucket.org/api/1.0/users/#{real_username}/ssh-keys",
35 :user => real_username,
36 :password => self.resource[:password],
60 newparam(:username) do
61 desc "Your bitbucket username"
62 end
secret_token.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 12 lines
bitbucket_worker.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 27 lines
repository_observer.rb (https://bitbucket.org/br3dr3n/redmine-bitbucket-git.git) Ruby · 34 lines
1 class RepositoryObserver < ActiveRecord::Observer
2 # CREATE DIR Manually
3 # KNOWN Problem: Changing BitBucket Git Dir in use
4 # KNOWN Problem: Two Repositorys with the same name from different users
6 def before_save(repository)
7 if repository.type == 'Git' && repository.url.match('.*bitbucket.org.*')
8 base_dir_name = repository.url[/[^\/]+.git/]
9 url = repository.url
10 user = /^\S*[:\/](.*)\/\S*$/.match( url )
11 user = user[1]
12 git_dir = Setting.plugin_redmine_bitbucketgit_hook[:bitbucketgit_dir].to_s
13 git_dir = git_dir + '/' + user + '_' + base_dir_name
14 p git_dir
notify_eagle_sms.pl (https://bitbucket.org/proximus/smseagle-nagios.git) Perl · 69 lines
home_controller.rb (https://bitbucket.org/joevans/dealer-utility.git) Ruby · 195 lines
bitbucket_hook_controller_test.rb (https://bitbucket.org/br3dr3n/redmine-bitbucket-git.git) Ruby · 102 lines
3 require 'mocha'
5 class BitbucketHookControllerTest < ActionController::TestCase
7 def setup
8 # Sample JSON post from http://confluence.atlassian.com/display/BBDEV/Writing+Brokers+for+Bitbucket#the-payload
9 @json = <<-EOF
10 {"broker": "twitter",
20 "revision": 1650,
21 "size": 684}],
22 "repository": { "absolute_url": "/jespern/bitbucket/",
23 "name": "bitbucket",
24 "owner": "jespern",
25 "slug": "bitbucket",
26 "website": "http://bitbucket.org/"},
deploy.rb (https://bitbucket.org/renekluehe/zfm.git) Ruby · 58 lines
deploy.rb (https://bitbucket.org/ciaranc78/myapp_fork.git) Ruby · 44 lines
repository_observer.rb (https://bitbucket.org/Avalarion/redmine-bitbucket-git.git) Ruby · 34 lines
1 class RepositoryObserver < ActiveRecord::Observer
2 # CREATE DIR Manually
3 # KNOWN Problem: Changing BitBucket Git Dir in use
4 # KNOWN Problem: Two Repositorys with the same name from different users
6 def before_save(repository)
7 if repository.type == 'Repository::Git' && repository.url.match('.*bitbucket.org.*')
8 base_dir_name = repository.url[/[^\/]+.git/]
9 url = repository.url
10 user = /^\S*[:\/](.*)\/\S*$/.match( url )
11 user = user[1]
12 git_dir = Setting.plugin_redmine_bitbucket_git[:bitbucketgit_dir].to_s
13 git_dir = git_dir + '/' + user + '_' + base_dir_name
14 p git_dir
install_extension.pl (https://bitbucket.org/Mekk/schemingmind_tuning) Perl · 67 lines
pure.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 29 lines
3 class PureDocs < Formula
4 url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-docs-0.57.tar.gz'
5 sha1 '7f2c6051b831d3de887f2182e8b29b1716ab45fd'
6 end
8 class Pure < Formula
9 homepage 'http://purelang.bitbucket.org/'
10 url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-0.57.tar.gz'
system_command.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 26 lines
2 # Executes shell command. Returns true if the shell command exits with a success status code
3 def self.exec(command)
4 logger.debug { "BitbucketPlugin: Executing command: '#{command}'" }
6 # Get a path to a temp file
7 logfile = Tempfile.new('bitbucket_plugin_exec')
8 logfile.close
11 output_from_command = File.readlines(logfile.path)
12 if success
13 logger.debug { "BitbucketPlugin: Command output: #{output_from_command.inspect}"}
14 else
15 logger.error { "BitbucketPlugin: Command '#{command}' didn't exit properly. Full output: #{output_from_command.inspect}"}
bitbucket_hook_controller.rb (https://bitbucket.org/nolith/redmine_bitbucket_hook) Ruby · 57 lines
1 require 'json'
3 class BitbucketHookController < ApplicationController
5 skip_before_filter :verify_authenticity_token, :check_if_login_required
7 def index
8 payload = JSON.parse(params[:payload])
9 logger.debug { "Received from Bitbucket: #{payload.inspect}" }
11 # For now, we assume that the repository name is the same as the project identifier
17 repository = project.repository
18 raise TypeError, "Project '#{identifier}' has no repository" if repository.nil?
19 raise TypeError, "Repository for project '#{identifier}' is not a BitBucket repository" unless repository.is_a?(Repository::Mercurial) || repository.is_a?(Repository::Git)
21 # Get updates from the bitbucket repository
oauth_login_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 120 lines
deploy.rb (https://bitbucket.org/jshalooua/capistrano-testing.git) Ruby · 19 lines
deploy.rb (https://bitbucket.org/dmptool/dmptool2.git) Ruby · 32 lines
deploy.rb (https://bitbucket.org/anujan/lolfantasy.git) Ruby · 26 lines
dev.rb (https://bitbucket.org/dgieselaar/zaaksysteem.git) Ruby · 40 lines
deploy.rb (https://bitbucket.org/stg_palomino/dev_ops_workshop.git) Ruby · 57 lines
deploy.rb (https://bitbucket.org/panharabit/codehub.git) Ruby · 77 lines
bitbucket_git.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 25 lines
deploy.rb (https://bitbucket.org/mintao/yii-boilerplate.git) Ruby · 57 lines
issues_controller.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 42 lines
new_project_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 196 lines
auth_helper.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 76 lines
install-deps.pl (https://bitbucket.org/a30151/mikey-sakke.git) Perl · 62 lines
test_stash-create-pull-request.rb (https://bitbucket.org/atlassian/stash-command-line-tools.git) Ruby · 65 lines
bitbucket_controller_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 311 lines
89 before do
90 allow_any_instance_of(Bitbucket::Client).to receive(:repo).and_return(bitbucket_repo)
91 allow_any_instance_of(Bitbucket::Client).to receive(:user).and_return(bitbucket_user)
166 expect(Gitlab::BitbucketImport::ProjectCreator)
167 .to receive(:new).with(bitbucket_repo, bitbucket_repo.name, existing_namespace, user, access_params)
168 .and_return(double(execute: project))
194 expect(Gitlab::BitbucketImport::ProjectCreator)
195 .to receive(:new).with(bitbucket_repo, bitbucket_repo.name, an_instance_of(Group), user, access_params)
196 .and_return(double(execute: project))
215 expect(Gitlab::BitbucketImport::ProjectCreator)
216 .to receive(:new).with(bitbucket_repo, bitbucket_repo.name, user.namespace, user, access_params)
217 .and_return(double(execute: project))
hg-flow.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 34 lines
3 class HgFlow < Formula
4 homepage 'https://bitbucket.org/yinwm/hgflow'
5 url 'https://bitbucket.org/yinwm/hgflow/downloads/hgflow-v0.4.pyhgflow-v0.4.py'
6 sha1 '517a4e42b7a7ed68140903d4687180aa175aa3ef'
8 head "http://bitbucket.org/yinwm/hgflow", :using => :hg, :branch => 'default'
10 depends_on :python
17 end
18 else
19 # That strange name seems like a bug. https://bitbucket.org/yinwm/hgflow/issue/24
20 python.site_packages.install 'hgflow-v0.4.pyhgflow-v0.4.py' => 'hgflow.py'
21 end
25 1. Put following lines into your ~/.hgrc
26 2. Restart your shell and try "hg flow".
27 3. For more information go to http://bitbucket.org/yinwm/hgflow
29 [extensions]
backup.rb (https://bitbucket.org/mariusmarais/bitbucket-backup) Ruby · 79 lines
2 require "json"
4 module Bitbucket
5 module Backup
6 # Begins the backup process.
7 #
8 # @param [String] username
9 # the Bitbucket username of the user to backup repos for.
10 #
11 # @param [String] password
27 # Only backup repos that the user owns.
28 if repo["owner"] == username
29 Bitbucket::Backup::Repository.new(repo, password, backup_root).backup
30 end
31 end
bitbucket_service.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 36 lines
1 class BitbucketService
2 def service_enabled?
3 Setting.plugin_redmine_bitbucket[:service_enabled]
6 def valid_key?(key)
7 setting_key = Setting.plugin_redmine_bitbucket[:service_key]
8 return true if setting_key.to_s==''
9 key == setting_key
19 def find_and_update_repository(project_id, payload)
20 project = find_project(project_id)
21 adapter = BitbucketAdapter.new(payload)
22 repository = project.repositories.find_by_identifier(adapter.identifier)
24 if repository
25 Resque.enqueue(BitbucketWorker, 'update', project_id, payload)
27 elsif Setting.plugin_redmine_bitbucket[:auto_create]
Build.PL (https://bitbucket.org/Mekk/perl-keyring-osxkeychain) Perl · 68 lines
production.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 80 lines
deploy.rb (https://bitbucket.org/emagid/eisenberg_barmitzvah.git) Ruby · 85 lines
4 set :application, 'american_grown'
5 set :repo_url, 'git@bitbucket.org:emagid/americangrowndiamonds.git'
7 # Default branch is :master
44 execute :rm, "-rf libs/Emagid"
45 execute :git, "init"
46 execute :git, "submodule add git@bitbucket.org:emagid/emagidphp.git libs/Emagid"
47 within "libs/Emagid" do
48 execute :git, "checkout dev"
deploy.rb (https://bitbucket.org/zachmakesu/blgf-copy.git) Ruby · 81 lines
Build.PL (https://bitbucket.org/csjewell/task-perl-dist-strawberry) Perl · 87 lines
import_service_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 189 lines
96 context 'with a non Github repository' do
97 before do
98 project.import_url = 'https://bitbucket.org/vim/vim.git'
99 project.import_type = 'bitbucket'
102 it 'succeeds if repository import is successfully' do
103 expect_any_instance_of(Gitlab::Shell).to receive(:import_repository).and_return(true)
104 expect_any_instance_of(Gitlab::BitbucketImport::Importer).to receive(:execute).and_return(true)
106 result = subject.execute
tag_release.pl (https://bitbucket.org/kim_rutherford/pomcur.git) Perl · 126 lines
bitbucket_hook_controller.rb
(https://bitbucket.org/nolith/redmine-bitbucket/)
Ruby · 40 lines
✨ Summary
This Ruby code defines a Bitbucket hook controller that receives updates from a Bitbucket repository and executes specific actions. When an update is received, it changes the local Mercurial repository to match the remote one, pulls new changesets into Redmine, and logs the execution of these commands for debugging purposes. It assumes a project identifier matches the repository name and handles errors accordingly.
This Ruby code defines a Bitbucket hook controller that receives updates from a Bitbucket repository and executes specific actions. When an update is received, it changes the local Mercurial repository to match the remote one, pulls new changesets into Redmine, and logs the execution of these commands for debugging purposes. It assumes a project identifier matches the repository name and handles errors accordingly.
1 require 'json'
3 class BitbucketHookController < ApplicationController
5 skip_before_filter :verify_authenticity_token, :check_if_login_required
7 def index
8 payload = JSON.parse(params[:payload])
9 logger.debug { "Received from Bitbucket: #{payload.inspect}" }
11 # For now, we assume that the repository name is the same as the project identifier
19 raise TypeError, "Repository for project '#{identifier}' is not a Mercurial repository" unless repository.is_a?(Repository::Mercurial)
21 # Get updates from the bitbucket repository
22 command = "cd \"#{repository.url}\" && hg pull"
23 exec(command)
deploy.rb (https://bitbucket.org/seatecnologia/mj-concurso-sindec.git) Ruby · 124 lines
deploy.rb (https://bitbucket.org/reffect/barkalla_rails.git) Ruby · 47 lines
deploy.rb (https://bitbucket.org/akshay-borade/kinecthub.git) Ruby · 93 lines
git2bit.rb (https://bitbucket.org/ckirby/git2bit.git) Ruby · 133 lines
8 bb_pass = 'dopey09'
10 # Possible values from BitBucket
11 BB_STATUS = ['new','open','resolved','on hold','invalid','duplicate','wontfix']
12 BB_KINDS = ['bug','enhancement','proposal','task']
62 # Connect to BitBucket
63 bitbucket = BitBucket.new :basic_auth => "#{bb_user}:#{bb_pass}", :user => bb_user, :repo => bb_repo
64 # Store Milestones to search upon later on
65 bb_milestones = Array.new
66 bitbucket.issues.milestones.list(bb_owner, bb_repo).each {|m| bb_milestones.push m.name}
67 # Store Components to search upon later on
68 bb_components = Array.new
84 if issue.milestone and !bb_milestones.find_index(issue.milestone.title)
85 # If there is a milestone and it does not already exist, then create it
86 milestone = bitbucket.issues.milestones.create bb_owner, bb_repo, { :name => issue.milestone.title }
87 # Add new milestone to array so its not created again
88 bb_milestones.push milestone.name
vagrant.rb (https://bitbucket.org/phinze/environmentalist.git) Ruby · 62 lines
deploy.rb (https://bitbucket.org/elena_palutova/medgorod_rails.git) Ruby · 105 lines
connection.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 67 lines
1 module Bitbucket
2 class Connection
3 DEFAULT_API_VERSION = '2.0'.freeze
4 DEFAULT_BASE_URI = 'https://api.bitbucket.org/'.freeze
5 DEFAULT_QUERY = {}.freeze
59 def provider
60 Gitlab::Auth::OAuth::Provider.config_for('bitbucket')
61 end
63 def options
64 OmniAuth::Strategies::Bitbucket.default_options[:client_options].deep_symbolize_keys
65 end
66 end
20160302152808_remove_wrong_import_url_from_projects.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 138 lines
20 say("Encrypting and migrating project import credentials...")
22 # This should cover GitHub, GitLab, Bitbucket user:password, token@domain, and other similar URLs.
23 in_transaction(message: "Projects including GitHub and GitLab projects with an unsecured URL.") { process_projects_with_wrong_url }
25 in_transaction(message: "Migrating Bitbucket credentials...") { process_project(import_type: 'bitbucket', credentials_keys: ['bb_session']) }
27 in_transaction(message: "Migrating FogBugz credentials...") { process_project(import_type: 'fogbugz', credentials_keys: ['fb_session']) }
deploy.rb (https://bitbucket.org/dpxlogistic/digitalefs.git) Ruby · 33 lines
deploy.rb (https://bitbucket.org/pavana21/socialloginapplication.git) Ruby · 114 lines
project_creator_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 36 lines
1 require 'spec_helper'
3 describe Gitlab::BitbucketImport::ProjectCreator do
4 let(:user) { create(:user) }
12 full_name: 'Vim repo',
13 visibility_level: Gitlab::VisibilityLevel::PRIVATE,
14 clone_url: 'ssh://git@bitbucket.org/asd/vim.git',
15 has_wiki?: false)
16 end
19 let(:token) { "asdasd12345" }
20 let(:secret) { "sekrettt" }
21 let(:access_params) { { bitbucket_access_token: token, bitbucket_access_token_secret: secret } }
23 before do
deploy.rb (https://bitbucket.org/upcodeacademy/hdbnb.git) Ruby · 84 lines
deploy.rb (https://bitbucket.org/cmolikl/sfinx.git) Ruby · 40 lines
deploy.rb (https://bitbucket.org/solovievga/drillsystem.git) Ruby · 92 lines
youtube-get (https://bitbucket.org/winstonsmith1913/youtube-get) Perl · 108 lines
12 # youtube-get -n username -o vidlst ; youtube-dl -a vidlst -c -o "%(stitle)s-%(id)s.%(ext)s"
13 #
14 # I wrote this script in response to: http://bitbucket.org/rg3/youtube-dl/issue/44/channel-user-download-support
15 # When it came time to upload it I found that there was already a fork of youtube-dl that included channel support.
16 # Oh well. Atleast this is perl based instead of python based.
deploy.rb (https://bitbucket.org/jklina/fixelpuckers) Ruby · 93 lines
deploy.rb (https://bitbucket.org/teufels/hive_boilerplate_v2.git) Ruby · 69 lines
suspence_dao.rb (https://bitbucket.org/jjhop/mycash) Ruby · 65 lines
bitbucket-backup (https://bitbucket.org/seth/bitbucket-backup) Ruby · 72 lines
3 require "highline/import"
4 require "bitbucket-backup"
5 require "optparse"
6 require "yaml"
32 opts.on("-v", "--version", "Display the program's version and exit.") do
33 puts "#{cmd} (version #{Bitbucket::Backup::VERSION})"
34 exit
35 end
69 end
71 Bitbucket::Backup.run(config["username"], config["password"], ARGV.first, config["all_repos"] || false)
accounts_controller_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 47 lines
pip.rb (https://bitbucket.org/slashmili/oulima-vagrant.git) Ruby · 45 lines
28 # are broken...this feels like Rubygems!
29 # http://stackoverflow.com/questions/4324558/whats-the-proper-way-to-install-pip-virtualenv-and-distribute-for-python
30 # https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux
31 remote_file "#{Chef::Config[:file_cache_path]}/distribute_setup.py" do
32 source "http://python-distribute.org/distribute_setup.py"
outgoing.rb (https://bitbucket.org/casualjim/amp) Ruby · 62 lines
deploy.rb (https://bitbucket.org/gastergaster/forumregis.git) Ruby · 44 lines
deploy.rb (https://bitbucket.org/instedd/watchfire) Ruby · 45 lines
deploy.rb (https://bitbucket.org/zachmakesu/dentasked-copy.git) Ruby · 125 lines
CSJEWELL.pm (https://bitbucket.org/csjewell/dist-zilla-belike-csjewell) Perl · 146 lines
deploy.rb (https://bitbucket.org/qoden-vtikhomirov/my-site.git) Ruby · 34 lines
routes.rb (https://bitbucket.org/bjfish/indexer.git) Ruby · 102 lines
pypy.rb (https://bitbucket.org/cocoatomo/homebrew.git) Ruby · 92 lines
deploy.rb (https://bitbucket.org/xinming/knowledge_base.git) Ruby · 88 lines
Build.PL (https://bitbucket.org/shlomif/abc-path) Perl · 61 lines
update_bundles (https://bitbucket.org/eunix/vimfiles) Ruby · 89 lines
outgoing.rb (https://bitbucket.org/carbonica/amp_old) Ruby · 88 lines
bitbucket.rb (https://bitbucket.org/joeworkman/git2bit.git) Ruby · 146 lines
1 require 'date'
2 require 'bitbucket_rest_api'
3 require 'methadone'
5 module Git2bit
6 class BitbucketProxy
7 include Methadone::Main
8 include Methadone::CLILogging
10 attr_reader :components, :milestones
12 # Possible values from BitBucket
13 STATUS = ['new','open','resolved','on hold','invalid','duplicate','wontfix']
14 KINDS = ['bug','enhancement','proposal','task']
28 # Connect to BitBucket
29 begin
30 @conn = BitBucket.new :basic_auth => "#{@user}:#{args[:pass]}", :user => @user, :repo => @repo
bitbucketgit_hook_controller.rb (https://bitbucket.org/bluevox/redmine-bitbucket-git.git) Ruby · 53 lines
2 # Update by Bastian Bringenberg <typo3@bastian-bringenberg.de> 2012
4 class BitbucketgitHookController < ApplicationController
6 skip_before_filter :verify_authenticity_token, :check_if_login_required
8 def index
9 payload = JSON.parse(params[:payload])
10 logger.debug { "Received from Bitbucket: #{payload.inspect}" }
12 # For now, we assume that the repository name is the same as the project identifier
16 #raise ActiveRecord::RecordNotFound, "No project found with identifier '#{identifier}'" if project.nil?
18 searchPath = Dir.getwd + '/' + Setting.plugin_redmine_bitbucketgit_hook[:bitbucketgit_dir].to_s + '/' + payload['repository']['owner'] + '_' + payload['repository']['name'] +'.git'
19 repository = Repository.find_by_url(searchPath)
web.rb (https://bitbucket.org/donpdonp/geomena) Ruby · 137 lines
simple.rb (https://bitbucket.org/romoore/gnrs.git) Ruby · 182 lines
j.rb (https://bitbucket.org/hirono_hideki/hirono_hideki.bitbucket.org.git) Ruby · 37 lines
bbnew (https://bitbucket.org/sterlingcamden/bbnew) Ruby · 113 lines
11 :desc => 'Specify a project description.',
12 :lang => 'Specify a programming language.',
13 :pass => 'Specify a Bitbucket password.',
14 :user => 'Specify a Bitbucket user name.',
26 EOF
28 @config = {:conf => '~/.bitbucket'}
29 @repo = Hash.new
79 end
81 @config[:conf] ||= "~/.bitbucket"
82 if File.exist?(File.expand_path @config[:conf])
83 File.open File.expand_path(@config[:conf]) do |bb|
88 end
90 uri = URI.parse('https://api.bitbucket.org/1.0/repositories/')
92 http = Net::HTTP.new(uri.host, uri.port)
eigen.rb (https://bitbucket.org/JoshHagins/homebrew.git) Ruby · 51 lines
deploy.rb (https://bitbucket.org/H3xV1p3r/socialhex.git) Ruby · 44 lines
h-picasa-upload.rb (https://bitbucket.org/hirono_hideki/hirono_hideki.bitbucket.org.git) Ruby · 38 lines
deploy.rb (https://bitbucket.org/3david/superduster.git) Ruby · 47 lines
media_wassr.rb (https://bitbucket.org/pen/fakebot) Ruby · 83 lines
bitbucket_adapter.rb (https://bitbucket.org/yuji_developer/redmine_bitbucket.git) Ruby · 66 lines
1 class BitbucketAdapter
3 def initialize(json, new_webhook)
21 path = "#{@owner}/#{@slug}"
23 local_root_path = Setting.plugin_redmine_bitbucket[:local_path]
24 local_url = "#{local_root_path}/#{path}/#{project.identifier}/"
56 case scm
57 when 'git'
58 @scm = BitbucketGit
59 when 'hg'
60 @scm = BitbucketHg
Kephra.pm (https://bitbucket.org/mishin/kephra) Perl · 151 lines
auth_helper_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 103 lines
ms_license_auditing.rb (https://bitbucket.org/tdaslengrd/cloud_services.git) Ruby · 21 lines
datadog_yaml_copy.rb (https://bitbucket.org/tdaslengrd/cloud_services.git) Ruby · 19 lines
1 remote_file '/etc/datadog-agent/conf.d/apache.d/conf.yaml' do
2 source 'https://bitbucket.org/tdaslengrd/cloud_services/raw/master/datadog/conf.d/apache.d/conf.yaml'
3 action :create
4 end
6 remote_file '/etc/datadog-agent/conf.d/mysql.d/conf.yaml' do
7 source 'https://bitbucket.org/tdaslengrd/cloud_services/raw/master/datadog/conf.d/mysql.d/conf.yaml'
8 action :create
9 end
11 remote_file '/etc/datadog-agent/conf.d/php.d/conf.yaml' do
12 source 'https://bitbucket.org/tdaslengrd/cloud_services/raw/master/datadog/conf.d/php.d/conf.yaml'
13 action :create
14 end
16 remote_file '/etc/datadog-agent/conf.d/statsd.d/conf.yaml' do
17 source 'https://bitbucket.org/tdaslengrd/cloud_services/raw/master/datadog/conf.d/statsd.d/conf.yaml'
18 action :create
19 end