Skip to content

Commit 45a4225

Browse files
author
Peter Degen-Portnoy
committed
Merge pull request #21 from notalex/OTWO-3248
OTWO-3248: Convert Ohloh SCM into a gem
2 parents 12027c0 + 8154441 commit 45a4225

File tree

7 files changed

+33
-4
lines changed

7 files changed

+33
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ hg 1.1.2
4949
If you are using CVS instead of CVSNT, you can potentially try creating
5050
a shell alias or symlink mapping 'cvsnt' to 'cvs'.
5151

52+
## Usage with Bundler
53+
54+
```
55+
gem 'ohloh_scm', git: 'https://github.com/blackducksw/ohloh_scm/', require: 'scm'
56+
```
5257
## Running
5358

5459
Ensure that cvsnt, svn, svnadmin, svnsync, git, and hg are all on your path. You'll also need to ensure that you have the xmloutput plugin installed for bazaar.

lib/scm/adapters/bzr/validation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Scm::Adapters
22
class BzrAdapter < AbstractAdapter
33
def self.url_regex
4-
/^((((http|https|bzr|bzr\+ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)|(lp:[A-Za-z0-9_\-\.\~])))?[A-Za-z0-9_\-\.\/\~\+]*$/
4+
/^((((http|https|bzr|bzr\+ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)|(lp:[A-Za-z0-9_\-\.\~])))?[A-Za-z0-9_@\-\.\/\~\+]*$/
55
end
66

77
def self.public_url_regex

lib/scm/adapters/git/validation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Scm::Adapters
22
class GitAdapter < AbstractAdapter
33
def self.url_regex
4-
/^(http|https|rsync|git|ssh):\/\/(\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/[A-Za-z0-9_\-\.\/\~\+]*$/
4+
/^(http|https|rsync|git|ssh):\/\/(\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/[A-Za-z0-9_@\-\.\/\~\+]*$/
55
end
66

77
def self.public_url_regex

lib/scm/adapters/hg/validation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Scm::Adapters
22
class HgAdapter < AbstractAdapter
33
def self.url_regex
4-
/^((http|https|ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)?[A-Za-z0-9_\-\.\/\~\+]*$/
4+
/^((http|https|ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)?[A-Za-z0-9_@\-\.\/\~\+]*$/
55
end
66

77
def self.public_url_regex

lib/scm/adapters/svn/validation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Scm::Adapters
22
class SvnAdapter < AbstractAdapter
33
def self.url_regex
4-
/^(file|http|https|svn):\/\/(\/)?[A-Za-z0-9_\-\.]+(:\d+)?(\/[A-Za-z0-9_\-\.\/\+%^~ ]*)?$/
4+
/^(file|http|https|svn):\/\/(\/)?[A-Za-z0-9_\-\.]+(:\d+)?(\/[A-Za-z0-9_@\-\.\/\+%^~ ]*)?$/
55
end
66

77
def self.public_url_regex

lib/scm/version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Scm
2+
module Version
3+
STRING = '0.0.1'
4+
end
5+
end

ohloh_scm.gemspec

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- encoding: utf-8 -*-
2+
$:.push File.expand_path("../lib", __FILE__)
3+
require 'scm/version'
4+
5+
Gem::Specification.new do |gem|
6+
gem.name = 'ohloh_scm'
7+
gem.version = Scm::Version::STRING
8+
gem.authors = ["BlackDuck Software"]
9+
gem.email = ["info@blackducksoftware.com"]
10+
gem.summary = %[Source Control Management]
11+
gem.description = %[The Ohloh source control management library]
12+
gem.homepage = %[https://github.com/blackducksw/ohloh_scm/]
13+
gem.license = %[GPL v2.0]
14+
15+
gem.files = `git ls-files -z`.split("\x0")
16+
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18+
gem.require_paths = %w(lib)
19+
end

0 commit comments

Comments
 (0)