100+ results for 'bitbucket'

Not the results you expected?

deploy.rb (https://bitbucket.org/kvp/fusu.ma.git) Ruby · 141 lines

5

6 set :application, "fusu.ma"

7 set :repository, "fusuma.bitbucket.org:kvp/fusu.ma.git"

8

9 set :user, "webmaster"

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"

8

9 head "http://bitbucket.org/pierrejoye/gd-libgd", :using => :hg

10

11 depends_on 'jpeg' => :recommended

api.rb (https://bitbucket.org/snishio/bitbucket-api-extension.git) Ruby · 121 lines

1 # coding: utf-8

2

3 module BitbucketApiExtension; end

4

5 class BitbucketApiExtension::Api

6

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

117 # `pip search` doesn't return versions yet

118 # `pip list` may be coming soon:

119 # https://bitbucket.org/ianb/pip/issue/197/option-to-show-what-version-would-be

120 @new_resource.version||'latest'

121 end

deploy.rb (https://bitbucket.org/JakubOboza/genetic-algorithms.git) Ruby · 52 lines

8 set :user, "appserver"

9 set :application, "genetic_algorithms"

10 set :repository, "git@bitbucket.org:JakubOboza/genetic-algorithms.git"

11

12 set :scm, :git

bitbucket_adapter.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 46 lines

1 require 'json'

2

3 class BitbucketAdapter

4

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']}"

29

30 local_root_path = Setting.plugin_redmine_bitbucket[:local_path]

31 local_url = "#{local_root_path}/#{project.identifier}/#{path}"

32

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

22 set :use_sudo , false

23

24 set :repository, "https://channainfo@bitbucket.org/channainfo/papua-new-guinea-hiv-aids.git"

25 set :scm, :git

26 set :scm_username, 'channainfo'

routes.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 55 lines

1 BitbucketIssues::Application.routes.draw do

2 get ':provider/auth' => redirect("/auth/%{provider}")

3 get '/auth/:provider/callback', to: 'sessions#create', :defaults => {:format => :json}

gd.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 58 lines

2

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'

10

11 head 'https://bitbucket.org/libgd/gd-libgd', :using => :hg

12

13 option :universal

bitbucket.rb (https://bitbucket.org/pygmael/reposlanger.git) Ruby · 79 lines

3 module Reposlanger

4 module Providers

5 class Bitbucket

6 include Reposlanger::Provider

7

8 def self.api(options = {})

9 BitBucket.new(defaults.merge(options))

10 end

11

31

32 def clone_url

33 "git@bitbucket.org:#{api.user}/#{name}.git"

34 end

35

import_routing_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 165 lines

89 end

90

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'

12

13 module IndexerJobs

61

62

63 class BitbucketJob

64 include Resque::Plugins::Status

65 @queue = :bitbucket

75 index_id = options['index_id']

76

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

9 set :application, "cs2001"

10 set :server_name, 'cs2001.parasquid.com'

11 set :repository, "ssh://git@bitbucket.org/parasquid/parasquid-cs2001.git"

12 set :git_enable_submodules, true

13 set :user, "tristan"

deploy.rb (https://bitbucket.org/mgduk/mgdreader.git) Ruby · 69 lines

1 site_name = "mgdreader"

2 set :application, "#{site_name}"

3 set :repository, "git@bitbucket.org:mgduk/mgdreader.git"

4 set :scm, :git

5 set :branch, "master"

makejson.pl (https://bitbucket.org/haraki/mash-time-zone-converter.git) Perl · 141 lines

4 # MASH Time Zone Converter v1.0

5 #

6 # https://bitbucket.org/haraki/mash-time-zone-converter

7 #

8 #

upgrade.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 62 lines

17

18 begin

19 open("https://bitbucket.org/atlassian/agent-charlie/get/#{@branch}.tar.gz") do |io|

20

21 z = Zlib::GzipReader.new(io)

50 end

51

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 &&

54

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

3

4 class BitbucketgitHookController < ApplicationController

5

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}" }

11

12 # For now, we assume that the repository name is the same as the project identifier

13 identifier = payload['repository']['name']

14

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)

17

restExample.pl (https://bitbucket.org/SaiPatel/keysight-plugins-for-atlassian-products.git) Perl · 182 lines

17 . "Authorship plugin as the default Confluence REST Interface does not support those operations.\n"

18 . "\n"

19 . "https://bitbucket.org/selberg/entity-authorship\n"

20 . "\n"

21 . "By default, the script will look to find the user credentials in a file called \"credentials.txt\"\n"

deploy.rb (https://bitbucket.org/hon3y/hny_project_typo3.git) Ruby · 119 lines

6 ## :repo_url

7 ##

8 ## e.g. set :repo_url, 'git@bitbucket.org:hon3y/teu_18_ws_installer.git'

9 ##

10 set :repo_url, "git@bitbucket.org:<team>/<customer_abbr>_<yy>_<type>_installer.git"

deploy.rb (https://bitbucket.org/shinyay/rails_capistrano_sample.git) Ruby · 126 lines

23 set :scm ,:git

24 #gitリポジトリ

25 #set :repository, "git@bitbucket.org:shinyay/rails_capistrano_sample.git"

26 set :repository, "https://shinyay@bitbucket.org/shinyay/rails_capistrano_sample.git"

pypy.rb (https://bitbucket.org/zozo123/homebrew.git) Ruby · 95 lines

10

11 if MacOS.prefer_64_bit?

12 url 'https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-osx64.tar.bz2'

13 version '1.8'

14 md5 '1c293253e8e4df411c3dd59dff82a663'

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'

13

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

12 set :scm, :git

13 set :application, 'hanzi'

14 # set :repository, "https://srmoscow@bitbucket.org/srmoscow/hanzi.git"

15 set :repository, "ssh://git@bitbucket.org/srmoscow/hanzi.git"

pypy.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 90 lines

8 class Pypy < Formula

9 homepage 'http://pypy.org/'

10 url 'https://bitbucket.org/pypy/pypy/downloads/pypy-2.0.2-osx64.tar.bz2'

11 version '2.0.2'

12 sha1 'a53de7bc88b9caa635d9d679c6e63813881ea7e9'

deploy.rb (https://bitbucket.org/UIUCLibrary/dspace-rails.git) Ruby · 99 lines

29

30 set :scm, :git

31 set :repository, 'git@bitbucket.org:UIUCLibrary/dspace-rails.git'

32 #uncomment line below to call git from remote server (comment :deploy_via, :copy)

33 #set :deploy_via, :remote_cache

bitbucket.rb (https://bitbucket.org/KitaitiMakoto/gitpusher.git) Ruby · 63 lines

4 module GitPusher

5 module Service

6 class BitBucket < Base

7

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

3

4 set :scm, :git

5 set :repository, "git@bitbucket.org:h6165/seatfoo.git"

6 set :branch, "master"

7 set :deploy_via, :remote_cache

deploy.rb (https://bitbucket.org/anujan/pentakill-university.git) Ruby · 26 lines

18

19 set :scm, "git"

20 set :repository, "https://anujan@bitbucket.org/anujan/pentakill-university.git"

21 set :branch, "master"

22

application.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 23 lines

7 Bundler.require(:default, Rails.env)

8

9 module BitbucketIssues

10 class Application < Rails::Application

11 # Settings in config/environments/* take precedence over those specified here.

bitbucket_singleton.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 37 lines

3 require 'rest-client'

4

5 if not Object.const_defined?('BitbucketSingleton')

6 class BitbucketSingleton < GenericLoginSingleton

7

8 def initialize

9 super('Bitbucket', 'Username or email')

10 end

11

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*/, '')

29

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.

32

test_stash-create-pull-request.rb (https://bitbucket.org/penland365/stash-command-line-tools.git) Ruby · 30 lines

15

16 should "extracting project key and repo slug from non stash url raises exception" do

17 remote = "git@bitbucket.org:sebr/atlassian-stash-rubygem.git"

18 cpr = CreatePullRequest.new nil

19 assert_raise(RuntimeError) { cpr.extract_repository_info remote }

test_stash-git.rb (https://bitbucket.org/penland365/stash-command-line-tools.git) Ruby · 57 lines

39 Atlassian::Stash::Git.instance_eval do

40 def get_remotes

41 "bitbucket git@bitbucket.org:atlassian/stash-command-line-tools.git (fetch)

42 bitbucket git@bitbucket.org:atlassian/stash-command-line-tools.git (push)

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

8

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

43

44 ##

45 # The source_type for the event (nagios, hudson, jenkins, user, my apps, feed, chef, puppet, git, bitbucket, fabric, capistrano)

46 attr_accessor :source_type_name

47

deploy.rb (https://bitbucket.org/ktadokoro/2ch_summary.git) Ruby · 99 lines

26 set :rails_env, 'production'

27

28 set :repository, 'https://ktadokoro@bitbucket.org/ktadokoro/2ch_summary.git'

29 set :branch, 'master'

30

deploy.rb (https://bitbucket.org/funollet/gurb-platform.git) Ruby · 63 lines

2

3 set :application, "gurb-app"

4 set :repository, "ssh://git@bitbucket.org/funollet/gurb-platform.git"

5 set :repository, "https://funollet@bitbucket.org/funollet/gurb-platform.git"

deploy.rb (https://bitbucket.org/brucemakallan/uganda-swimming-federation.git) Ruby · 92 lines

13 set :user, fetch(:application_name)

14 set :deploy_to, "/home/#{fetch(:user)}/app"

15 set :repository, 'https://brucemakallan@bitbucket.org/brucemakallan/uganda-swimming-federation.git'

16 set :branch, 'master'

17 set :rvm_use_path, '/etc/profile.d/rvm.sh'

gd.rb (https://bitbucket.org/smcferrin/homebrew.git) Ruby · 53 lines

2

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'

8

9 head 'http://bitbucket.org/pierrejoye/gd-libgd', :using => :hg

10

11 depends_on :libpng => :recommended

bbnew (https://bitbucket.org/designermonkey/bbnew) Ruby · 89 lines

26 end

27

28 opts.on('-p', '--pass password', 'BitBucket password') do |pass|

29 config["pass"] = pass

30 end

55 end

56

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

65

66 uri = URI.parse('https://api.bitbucket.org/1.0/repositories/')

67

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/'

18

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/'

25

26 depends 'aws', '~> 7.5.0'

bitbucket_service_controller.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 27 lines

1 require "json"

2

3 class BitbucketServiceController < ApplicationController

4 unloadable

5

7

8 def index

9 bitbucket = BitbucketService.new

10

11 unless bitbucket.service_enabled? && bitbucket.valid_key?(params[:key])

13 end

14

15 result = bitbucket.find_and_update_repository(params[:project_id], params[:payload])

16

17 if result.nil?

deploy.rb (https://bitbucket.org/blazetango/jiffeez.git) Ruby · 57 lines

1 set :application, "jiffeez1"

2 set :repository, "git@bitbucket.org:blazetango/jiffeez.git"

3 set :scm, :git

4 set :user, "ec2-user"

DefaultMatcher.pm (https://bitbucket.org/exussum/pockito) Perl · 166 lines

145 =head1 SOURCE

146

147 http://bitbucket.org/exussum/pockito/

148

149 =head1 COPYRIGHT

deploy.rb (https://bitbucket.org/shinyay/chef_rails_template.git) Ruby · 52 lines

7 # リポジトリ

8 set :scm, :git

9 #set :repository, "https://shinyay@bitbucket.org/shinyay/chef_rails_template.git"

10 set :repository, "."

11 set :branch, "master"

deploy.rb (https://bitbucket.org/Inomoz/inomoz-bp.git) Ruby · 34 lines

14 ssh_options[:forward_agent] = true

15 set :scm, :git

16 set :repository, "git@bitbucket.org:inomoz/inomoz-bp.git";

17 set :deploy_via, :remote_cache

18

php54-ev.rb (https://bitbucket.org/mkalkbrenner/homebrew-php.git) Ruby · 25 lines

6 url 'http://pecl.php.net/get/ev-0.2.3.tgz'

7 sha1 '9b818ac6f23994f8b53cc164f65bf649d4562c9c'

8 head 'https://bitbucket.org/osmanov/pecl-ev.git'

9

10 depends_on 'libev'

upload_bitbucket_keys.rb (https://bitbucket.org/atlassian/agent-charlie.git) Ruby · 68 lines

3 require 'json'

4

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],

59

60 newparam(:username) do

61 desc "Your bitbucket username"

62 end

63

secret_token.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 12 lines

10 # Make sure your secret_key_base is kept private

11 # if you're sharing your code publicly.

12 BitbucketIssues::Application.config.secret_key_base = '3d559b3d03580e743d691f570a8f385a24cc4d28023e0756181b611edd4604e78501e1c2e22826132f8b63ff386c90256ea5d4660dd142db641a9dbf8f2731d9'

13

bitbucket_worker.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 27 lines

1 class BitbucketWorker

2 @queue = :bitbucket

4 def self.perform(action, project_id, payload)

5 project = find_project(project_id)

6 adapter = BitbucketAdapter.new(payload)

7

8 if action == 'create'

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

5

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

17 #

18 # README file and the latest version of this plugin can be found on:

19 # https://bitbucket.org/proximus/smseagle-nagios

20 #

21 # ============================= SCRIPT ==========================================

home_controller.rb (https://bitbucket.org/joevans/dealer-utility.git) Ruby · 195 lines

154

155 def activity

156 @rss_feed = "https://bitbucket.org/joevans/dealer-utility/rss?token=070e2d25e60d2df4f6d250d9ac7f52c0"

157 end

158

bitbucket_hook_controller_test.rb (https://bitbucket.org/br3dr3n/redmine-bitbucket-git.git) Ruby · 102 lines

3 require 'mocha'

4

5 class BitbucketHookControllerTest < ActionController::TestCase

6

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

5

6 set :application, "zfm"

7 set :repo_url, "git@bitbucket.org:renekluehe/zfm.git"

8

9 set :ssh_options, {

deploy.rb (https://bitbucket.org/ciaranc78/myapp_fork.git) Ruby · 44 lines

3

4 set :application, "myapp"

5 set :repo_url, "git@bitbucket.org:ciaranc78/myapp_fork.git"

6

7 set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')

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

5

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

63

64 systemx("ssh", "linode.mekk.waw.pl", "cd www_download/smtuning/; ln -sf $remote_xpi_name smtuning.xpi; ln -sf $remote_rdf_name update.rdf");

65 #system("hg push bitbucket");

66 systemx("hg", "push", "bitssh");

67

pure.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 29 lines

2

3 class PureDocs < Formula

4 url 'https://bitbucket.org/purelang/pure-lang/downloads/pure-docs-0.57.tar.gz'

5 sha1 '7f2c6051b831d3de887f2182e8b29b1716ab45fd'

6 end

7

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}'" }

5

6 # Get a path to a temp file

7 logfile = Tempfile.new('bitbucket_plugin_exec')

8 logfile.close

9

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'

2

3 class BitbucketHookController < ApplicationController

4

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}" }

10

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)

20

21 # Get updates from the bitbucket repository

oauth_login_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 120 lines

14 end

15

16 providers = [:github, :twitter, :bitbucket, :gitlab, :google_oauth2,

17 :facebook, :cas3, :auth0, :authentiq]

18

deploy.rb (https://bitbucket.org/jshalooua/capistrano-testing.git) Ruby · 19 lines

1 set :application, 'capistrano testing'

2 set :repo_url, 'https://jshalooua@bitbucket.org/jshalooua/capistrano-testing.git'

3 set :ssh_options, {:forward_agent => true}

4

deploy.rb (https://bitbucket.org/dmptool/dmptool2.git) Ruby · 32 lines

4

5 set :application, 'dmptool2'

6 set :repository, 'git@bitbucket.org:dmptool/dmptool2.git'

7

8 set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names

deploy.rb (https://bitbucket.org/anujan/lolfantasy.git) Ruby · 26 lines

18

19 set :scm, "git"

20 set :repository, "https://anujan@bitbucket.org/anujan/lolfantasy.git"

21 set :branch, "master"

22

dev.rb (https://bitbucket.org/dgieselaar/zaaksysteem.git) Ruby · 40 lines

24 },

25 "queue" => {

26 "repository" => "https://bitbucket.org/mintlab/zaaksysteem-queue.git"

27 }

28 },

deploy.rb (https://bitbucket.org/stg_palomino/dev_ops_workshop.git) Ruby · 57 lines

3

4 set :application, "workshop"

5 set :repo_url, "git@bitbucket.org:stg_palomino/dev_ops_workshop.git"

6

7 # Default branch is :master

deploy.rb (https://bitbucket.org/panharabit/codehub.git) Ruby · 77 lines

52 lock '3.5.0'

53

54 set :repo_url, 'https://panharabit@bitbucket.org/panharabit/codehub.git'

55 # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

56

bitbucket_git.rb (https://bitbucket.org/daenoor/redmine_bitbucket.git) Ruby · 25 lines

1 class BitbucketGit < SystemCommand

2

3 GIT_BIN = Redmine::Configuration['scm_git_command'] || "git"

16 end

17

18 # Clone repository from Bitbucket

19 def self.clone_repository(path, local_url)

20 remote_url = "git@bitbucket.org:#{path}.git"

deploy.rb (https://bitbucket.org/mintao/yii-boilerplate.git) Ruby · 57 lines

1 set :repository, "bitbucket.org:/mintao/#{application}"

2 #set :scm_verbose, true

3 set :deploy_via, :export

issues_controller.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 42 lines

29

30 def issues

31 c = OAuth::Consumer.new(ENV['BITBUCKET_KEY'], ENV['BITBUCKET_SECRET'], :site => 'https://bitbucket.org/api/1.0')

32

33 a = OAuth::AccessToken.new c

new_project_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 196 lines

19

20 expect(page).to have_link('GitHub')

21 expect(page).to have_link('Bitbucket')

22 expect(page).to have_link('GitLab.com')

23 expect(page).to have_link('Google Code')

auth_helper.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 76 lines

1 module AuthHelper

2 PROVIDERS_WITH_ICONS = %w(twitter github gitlab bitbucket google_oauth2 facebook azure_oauth2 authentiq).freeze

3 LDAP_PROVIDER = /\Aldap/

4

install-deps.pl (https://bitbucket.org/a30151/mikey-sakke.git) Perl · 62 lines

55 #

56 my $ecdsa_dir = "$build_dir/Crypt-ECDSA-ajb1";

57 system(qq|git clone https://bitbucket.org/abutcher/crypt-ecdsa-gmpz.git $ecdsa_dir|) if not -x $ecdsa_dir;

58 chdir $ecdsa_dir;

59 system(qq|perl Makefile.PL|) == 0 or die "Failed to generate makefile";

test_stash-create-pull-request.rb (https://bitbucket.org/atlassian/stash-command-line-tools.git) Ruby · 65 lines

15

16 should "extracting project key and repo slug from non stash url raises exception" do

17 remote = "git@bitbucket.org:sebr/atlassian-stash-rubygem.git"

18 cpr = CreatePullRequest.new nil

19 assert_raise(RuntimeError) { cpr.extract_repository_info remote }

bitbucket_controller_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 311 lines

88

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))

169

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))

197

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))

218

hg-flow.rb (https://bitbucket.org/bathtub/tigerbrew.git) Ruby · 34 lines

2

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'

7

8 head "http://bitbucket.org/yinwm/hgflow", :using => :hg, :branch => 'default'

9

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

28

29 [extensions]

backup.rb (https://bitbucket.org/mariusmarais/bitbucket-backup) Ruby · 79 lines

2 require "json"

3

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]

5

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)

23

24 if repository

25 Resque.enqueue(BitbucketWorker, 'update', project_id, payload)

26

27 elsif Setting.plugin_redmine_bitbucket[:auto_create]

Build.PL (https://bitbucket.org/Mekk/perl-keyring-osxkeychain) Perl · 68 lines

58 resources => {

59 license => 'http://dev.perl.org/licenses/',

60 homepage => 'http://bitbucket.org/Mekk/perl-keyring-osxkeychain',

61 repository => 'http://bitbucket.org/Mekk/perl-keyring-osxkeychain',

62 bugtracker => 'https://bitbucket.org/Mekk/perl-keyring-osxkeychain/issues',

63 },

64 },

production.rb (https://bitbucket.org/dictav/bitbucket_issues.git) Ruby · 80 lines

1 BitbucketIssues::Application.configure do

2 # Settings specified here will take precedence over those in config/application.rb.

3

deploy.rb (https://bitbucket.org/emagid/eisenberg_barmitzvah.git) Ruby · 85 lines

3

4 set :application, 'american_grown'

5 set :repo_url, 'git@bitbucket.org:emagid/americangrowndiamonds.git'

6

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

4

5 set :application, 'blgf'

6 set :repo_url, 'git@bitbucket.org:gorated/blgf.git'

7

8 # Default branch is :master

Build.PL (https://bitbucket.org/csjewell/task-perl-dist-strawberry) Perl · 87 lines

78 homepage => 'http://csjewell.comyr.com/',

79 bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Dist-Strawberry',

80 repository => 'http://bitbucket.com/csjewell/task-perl-dist-strawberry'

81 },

82 },

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)

105

106 result = subject.execute

tag_release.pl (https://bitbucket.org/kim_rutherford/pomcur.git) Perl · 126 lines

3 # This script will tag the current master with the next available

4 # version number (eg. v321) and then push the changes to GitHub

5 # and Bitbucket

6

7 use strict;

117 system "git push --tags github master";

118

119 print "pushing to Bitbucket\n";

120 system "git push --tags bitb master";

121

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.

1 require 'json'

2

3 class BitbucketHookController < ApplicationController

4

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}" }

10

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)

20

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

9

10 set :application, "Qu?o fundo?"

11 set :repository, "https://bitbucket.org/seatecnologia/mj-concurso-sindec"

12 set :keep_releases, 3

13 set :branch, "master"

deploy.rb (https://bitbucket.org/reffect/barkalla_rails.git) Ruby · 47 lines

3

4 set :application, "barkalla_rails"

5 set :repo_url, "git@bitbucket.org:reffect/barkalla_rails.git"

6

7 # Default branch is :master

deploy.rb (https://bitbucket.org/akshay-borade/kinecthub.git) Ruby · 93 lines

14 set :domain, 'ec2-13-232-155-114.ap-south-1.compute.amazonaws.com'

15 set :deploy_to, '/var/www/kinect.com'

16 set :repository, 'git@bitbucket.org:akshay-borade/kinecthub.git'

17 set :branch, 'master'

18 set :rails_env, 'production'

git2bit.rb (https://bitbucket.org/ckirby/git2bit.git) Ruby · 133 lines

8 bb_pass = 'dopey09'

9

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

8 else

9 set :scm, :git

10 set :repository, "https://bitbucket.org/phinze/environmentalist/"

11 end

12

deploy.rb (https://bitbucket.org/elena_palutova/medgorod_rails.git) Ruby · 105 lines

17 set :user, 'medgorodror'

18 set :deploy_to, '/home/medgorodror/www/medgorod_ror'

19 set :repository, 'git@bitbucket.org:elena_palutova/medgorod_rails.git'

20 set :branch, 'master'

21 set :rails_env, 'production'

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

6

58

59 def provider

60 Gitlab::Auth::OAuth::Provider.config_for('bitbucket')

61 end

62

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...")

21

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 }

24

25 in_transaction(message: "Migrating Bitbucket credentials...") { process_project(import_type: 'bitbucket', credentials_keys: ['bb_session']) }

26

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

3

4 set :application, 'digitalefs'

5 set :repo_url, 'git@bitbucket.org:dpxlogistic/digitalefs.git'

6

7 # Default branch is :master

deploy.rb (https://bitbucket.org/pavana21/socialloginapplication.git) Ruby · 114 lines

6

7 set :application, "SocialLoginApp"

8 set :repository, "git@bitbucket.org:pavana21/socialloginapplication.git"

9

10 set :scm, :git

project_creator_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 36 lines

1 require 'spec_helper'

2

3 describe Gitlab::BitbucketImport::ProjectCreator do

4 let(:user) { create(:user) }

5

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 } }

22

23 before do

deploy.rb (https://bitbucket.org/upcodeacademy/hdbnb.git) Ruby · 84 lines

1 server '128.199.123.22', roles: [:web, :app, :db], primary: true

2

3 set :repo_url, 'git@bitbucket.org:upcodeacademy/hdbnb.git'

4 set :application, 'hdbnb'

5 set :user, 'deploy'

deploy.rb (https://bitbucket.org/cmolikl/sfinx.git) Ruby · 40 lines

4 set :application, "sfinx"

5 set :scm, :git

6 set :repo_url, "git@bitbucket.org:cmolikl/sfinx.git"

7

8 # Default branch is :master

deploy.rb (https://bitbucket.org/solovievga/drillsystem.git) Ruby · 92 lines

5

6 set :application, application

7 set :repo_url, "git@bitbucket.org:solovievga/drillsystem.git"

8 set :user, user

9 set :puma_threads, [4, 16]

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

12

13 set :scm, :mercurial

14 set :repository, "ssh://hg@bitbucket.org/jklina/fixelpuckers/"

15

16 set :user, "#{rackspace_username}"

deploy.rb (https://bitbucket.org/teufels/hive_boilerplate_v2.git) Ruby · 69 lines

6 ## :repo_url

7 ##

8 ## e.g. set :repo_url, 'git@bitbucket.org:teufels/teu_18_ws_installer.git'

9 ##

10 set :repo_url, "git@bitbucket.org:<team>/<customer_abbr>_<yy>_<type>_installer.git"

suspence_dao.rb (https://bitbucket.org/jjhop/mycash) Ruby · 65 lines

13 # Copyright: (C) 2004-2010 Rafal Kotusiewicz aka 'jjhop'. All rights reserved.

14 #

15 # http://bitbucket.org/jjhop/mycash/overview/

16 # http://bitbucket.org/jjhop/mycash/wiki/Home

bitbucket-backup (https://bitbucket.org/seth/bitbucket-backup) Ruby · 72 lines

2

3 require "highline/import"

4 require "bitbucket-backup"

5 require "optparse"

6 require "yaml"

31

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

70

71 Bitbucket::Backup.run(config["username"], config["password"], ARGV.first, config["all_repos"] || false)

72

accounts_controller_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 47 lines

30 end

31

32 [:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq].each do |provider|

33 describe "#{provider} provider" do

34 let(:user) { create(:omniauth_user, provider: provider.to_s) }

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

38

39 # reverse the order, because the newest are usually last

40 # this is noticed if you get bitbucket email notifications

41 o.reverse! if opts[:"newest-first"]

42

deploy.rb (https://bitbucket.org/gastergaster/forumregis.git) Ruby · 44 lines

3

4 set :application, "ForumRegis"

5 set :repo_url, 'https://gastergaster@bitbucket.org/gastergaster/forumregis.git'

6

7 set :deploy_to, '/home/deploy/ForumRegis'

deploy.rb (https://bitbucket.org/instedd/watchfire) Ruby · 45 lines

8

9 set :application, "watchfire"

10 set :repository, "https://bitbucket.org/instedd/watchfire"

11 set :scm, :mercurial

12 set :deploy_via, :remote_cache

deploy.rb (https://bitbucket.org/zachmakesu/dentasked-copy.git) Ruby · 125 lines

1 set :application, "dentasked"

2 set :repo_url, "git@bitbucket.org:gorated/dentasked.git"

3

4 # Project-specific overrides go here.

CSJEWELL.pm (https://bitbucket.org/csjewell/dist-zilla-belike-csjewell) Perl · 146 lines

91

92 This module does not know how to automatically handle any Mercurial servers

93 other than bitbucket.org, or any other VCS or DVCS server at the moment.

94

95 No bugs have been reported.

deploy.rb (https://bitbucket.org/qoden-vtikhomirov/my-site.git) Ruby · 34 lines

6

7 set :application, 'studiomobile.ru'

8 set :repo_url, 'git@bitbucket.org:efpies/studiomobile-site.git'

9 set :deploy_to, -> { "/home/#{fetch :user}/#{fetch :application}/#{fetch :rails_env}" }

10

routes.rb (https://bitbucket.org/bjfish/indexer.git) Ruby · 102 lines

33 end

34

35 #match 'integrations/bitbucket' => 'integrations#bitbucket'

36 #match 'integrations/trello' => 'integrations#trello'

37

pypy.rb (https://bitbucket.org/cocoatomo/homebrew.git) Ruby · 92 lines

8 class Pypy < Formula

9 homepage 'http://pypy.org/'

10 url 'https://bitbucket.org/pypy/pypy/downloads/pypy-2.1-osx64.tar.bz2'

11 version '2.1.0'

12 sha1 '6cdaa1dc0a47d9eb6d816f7d394ca46f290a1ed5'

deploy.rb (https://bitbucket.org/xinming/knowledge_base.git) Ruby · 88 lines

10 set :application_name, "knowledge_base"

11 set :application, "#{application_name}_#{rails_env}"

12 set :repository, "git@bitbucket.org:xinming/knowledge_base.git"

13

14 ##Rvm

Build.PL (https://bitbucket.org/shlomif/abc-path) Perl · 61 lines

37 resources =>

38 {

39 repository => "http://bitbucket.org/shlomif/abc-path",

40 homepage => "http://www.shlomifish.org/open-source/projects/japanese-puzzle-games/abc-path/",

41 },

update_bundles (https://bitbucket.org/eunix/vimfiles) Ruby · 89 lines

2

3 hg_bundles = [

4 "https://bitbucket.org/ns9tks/vim-fuzzyfinder/",

5 "https://bitbucket.org/ns9tks/vim-l9/",

6 "https://bitbucket.org/sjl/gundo.vim",

7 ]

8

outgoing.rb (https://bitbucket.org/carbonica/amp_old) Ruby · 88 lines

66

67 # reverse the order, because the newest are usually last

68 # this is noticed if you get bitbucket notifications

69 o.reverse! if opts[:"newest-first"]

70

bitbucket.rb (https://bitbucket.org/joeworkman/git2bit.git) Ruby · 146 lines

1 require 'date'

2 require 'bitbucket_rest_api'

3 require 'methadone'

4

5 module Git2bit

6 class BitbucketProxy

7 include Methadone::Main

8 include Methadone::CLILogging

10 attr_reader :components, :milestones

11

12 # Possible values from BitBucket

13 STATUS = ['new','open','resolved','on hold','invalid','duplicate','wontfix']

14 KINDS = ['bug','enhancement','proposal','task']

26

27

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

3

4 class BitbucketgitHookController < ApplicationController

5

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}" }

11

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?

17

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)

20

web.rb (https://bitbucket.org/donpdonp/geomena) Ruby · 137 lines

13

14 get '/api' do

15 redirect "http://bitbucket.org/donpdonp/geomena/wiki/APIReference"

16 end

17

90 end

91

92 post '/bitbucket' do

93 system("./stop.sh; hg pull; hg update; hg log -l 1|head -1|cut -d' ' -f4 > public/version; ./start.sh")

94 end

simple.rb (https://bitbucket.org/romoore/gnrs.git) Ruby · 182 lines

2 #

3 # Simple GNRS experiment that performs the tasks outlined in the project Wiki.

4 # See <https://bitbucket.org/romoore/gnrs/wiki/Running%20an%20Experiment%20on%20Orbit>

5 # for more details.

6 #

j.rb (https://bitbucket.org/hirono_hideki/hirono_hideki.bitbucket.org.git) Ruby · 37 lines

1 #!/home/h272/.rbenv/shims/ruby -Ku

2 DIR = Dir::pwd

3 ANAME = DIR.delete("/home/h272/git/hirono_hideki.bitbucket.org/")

4 cfile = `ls *.jpg`

5 list = DIR.sub(/^.+\//,"") + ".list"

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

27

28 @config = {:conf => '~/.bitbucket'}

29 @repo = Hash.new

30

79 end

80

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

89

90 uri = URI.parse('https://api.bitbucket.org/1.0/repositories/')

91

92 http = Net::HTTP.new(uri.host, uri.port)

eigen.rb (https://bitbucket.org/JoshHagins/homebrew.git) Ruby · 51 lines

1 class Eigen < Formula

2 homepage "http://eigen.tuxfamily.org/"

3 url "http://bitbucket.org/eigen/eigen/get/3.2.3.tar.bz2"

4 sha1 "303e8241aaa879a328d675de368525a591c42e51"

5

11 end

12

13 head "https://bitbucket.org/eigen/eigen", :using => :hg

14

15 depends_on "cmake" => :build

deploy.rb (https://bitbucket.org/H3xV1p3r/socialhex.git) Ruby · 44 lines

3

4 set :application, "SocialHex"

5 set :repo_url, "https://H3xV1p3r@bitbucket.org/H3xV1p3r/socialhex.git"

6

7 set :deploy_to, '/home/deploy/SocialHex'

h-picasa-upload.rb (https://bitbucket.org/hirono_hideki/hirono_hideki.bitbucket.org.git) Ruby · 38 lines

1 #!/home/h272/.rbenv/shims/ruby -Ku

2 DIR = Dir::pwd

3 ANAME = DIR.sub("/home/h272/git/hirono_hideki.bitbucket.org/","")

4 puts ANAME

5 cfile = `ls *.jpg`

deploy.rb (https://bitbucket.org/3david/superduster.git) Ruby · 47 lines

8

9 set :application, "superduster"

10 set :repository, "git@bitbucket.org:3david/superduster.git"

11 set :branch, "master"

12

media_wassr.rb (https://bitbucket.org/pen/fakebot) Ruby · 83 lines

67 agent = Mechanize.new

68 agent.auth(*App::Config.get["media"]["init"])

69 agent.user_agent = "fakebot/1.0 (http://bitbucket.com/pen/fakebot/)"

70 agent.max_history = 1

71 agent

bitbucket_adapter.rb (https://bitbucket.org/yuji_developer/redmine_bitbucket.git) Ruby · 66 lines

1 class BitbucketAdapter

2

3 def initialize(json, new_webhook)

21 path = "#{@owner}/#{@slug}"

22

23 local_root_path = Setting.plugin_redmine_bitbucket[:local_path]

24 local_url = "#{local_root_path}/#{path}/#{project.identifier}/"

25

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

109 =item * HG Source Archive

110

111 L<https://bitbucket.org/lichtkind/kephra>

112

113 =item * Homepage

auth_helper_spec.rb (https://bitbucket.org/terrchen/gitlab-ce.git) Ruby · 103 lines

95 end

96

97 [:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq].each do |provider|

98 it "returns false if the provider is #{provider}" do

99 expect(helper.unlink_allowed?(provider)).to be true

ms_license_auditing.rb (https://bitbucket.org/tdaslengrd/cloud_services.git) Ruby · 21 lines

7

8 remote_file 'C:\etc\scripts\MSLicenseUsageAudit.pa1.ps1' do

9 source 'https://bitbucket.org/atsservicesrd/dev-test/raw/7a84c61cb0a0036d3bffcf3228aa48dc7f868aad/Scripts/MSLicenseUsageAudit.pa1.ps1'

10 action :create

11 not_if { ::File.exists?('C:\etc\scripts\MSLicenseUsageAudit.pa1.ps1') }

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

5

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

10

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

15

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

install-deps.pl (https://bitbucket.org/secollab/libmikey-sakke.git) Perl · 63 lines

55 #

56 my $ecdsa_dir = "$build_dir/Crypt-ECDSA-ajb1";

57 system(qq|git clone https://bitbucket.org/abutcher/crypt-ecdsa-gmpz.git $ecdsa_dir|) if not -x $ecdsa_dir;

58 chdir $ecdsa_dir;

59 system(qq|git pull --rebase|);

configure_CSJEWELL.pm (https://bitbucket.org/csjewell/dist-zilla-belike-csjewell) Perl · 141 lines

54 'Where are your repositories?',

55 { check => sub { defined $_[0] and $_[0] =~ /\S/ms },

56 default => 'http://bitbucket.org/username/',

57 },

58 );