svn2git 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14294b9fe3b9c678bde246f6312efa2e32721bdb
4
- data.tar.gz: 72b0efbcca461dc3e9f73bb2c60d87e627b1cff8
3
+ metadata.gz: 5c4a9fc54bbab7715f45e042b64a8d43c7c45ba8
4
+ data.tar.gz: 62f4f6a037614764a92279b050bf17bc924535c5
5
5
  SHA512:
6
- metadata.gz: 55d42fb0ac0c9d0da5d98dfac0554ac30151eb418e2a1303a014c3b6278c7bfc1f81444d4116247204233fe0e2751260d30aa83cee995b31070bdd868f4a9ead
7
- data.tar.gz: 5dae5756b74582e831bd9eed0e8dc85348b99afc16ced0a4dcd776a11afbe537e2c2a766d89a73cb8815ea7af2c0f984133831407ecb9fc95eaf4dbda04d1800
6
+ metadata.gz: 2148e941a74b9b9d1b7e57f9c0932f05f29f4b37b368ec80581b4174ebe835440443e53ec29ac74b303c4121317297a71c8c5485d5993a1537fdac575c3e1459
7
+ data.tar.gz: 943712834f6d29603c17eb266f2327b6e892874e9a2ad4cfd65fb6d04e463c2213ba5b02543f796b15236605932376e4eefc530be6bacf063371c694544ed947
data/ChangeLog.markdown CHANGED
@@ -1,10 +1,15 @@
1
- # 2.2.4 - 2014-04-08
1
+ # 2.2.5 - 2014-03-09
2
+
3
+ * Fixed an with single quote escaping (thanks aucl).
4
+ * Escape double quotes (e.g., if they appear in a commit message) before passing to the shell (thanks aucl).
5
+
6
+ # 2.2.4 - 2014-03-08
2
7
 
3
8
  There was a permissions problem with some of the files packed in 2.2.3. This was caught immediately after the gem
4
9
  was pushed, so it was yanked as it simply wouldn't work for anyone. 2.2.4 contains everything 2.2.3 did, but with
5
10
  proper packaging.
6
11
 
7
- # 2.2.3 - 2014-04-08
12
+ # 2.2.3 - 2014-03-08
8
13
 
9
14
  This is a bugfix release. First change done by FeeJai
10
15
 
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'rake'
2
+ require 'rake/testtask'
2
3
  require 'rubygems/package_task'
3
4
 
4
5
  begin
@@ -7,39 +8,23 @@ begin
7
8
  spec.name = "svn2git"
8
9
  spec.summary = "A tool for migrating svn projects to git"
9
10
  spec.authors = ["James Coglan", "Kevin Menard"]
10
- spec.homepage = "https://www.negativetwenty.net/redmine/projects/svn2git"
11
+ spec.homepage = "https://github.com/nirvdrum/svn2git"
11
12
  spec.email = "nirvdrum@gmail.com"
13
+ spec.add_development_dependency 'test-unit'
12
14
  end
13
15
  Jeweler::GemcutterTasks.new
14
16
 
15
17
  rescue LoadError
16
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
18
+ puts "Jeweler not available. Install it with: gem install jeweler"
17
19
  end
18
-
19
- #
20
- # spec = Gem::Specification.new do |spec|
21
- #
22
- # spec.version = "1.1.0"
23
- # spec.platform = Gem::Platform::RUBY
24
- #
25
- #
26
- # spec.require_path = "lib"
27
- # spec.files = FileList["lib/**/*"].to_a
28
- # spec.autorequire = "lib/svn2git.rb"
29
- # spec.bindir = "bin"
30
- # spec.executables = ["svn2git"]
31
- # spec.default_executable = "svn2git"
32
- #
33
- #
34
- #
35
- #
36
- # spec.test_files = FileList["test/**/*"].to_a
37
- # spec.has_rdoc = true
38
- # spec.extra_rdoc_files = ["README"]
39
- # spec.rdoc_options << "--main" << "README" << '--line-numbers' << '--inline-source'
40
- # end
41
- #
42
- # Rake::GemPackageTask.new(spec) do |pkg|
43
- # pkg.need_tar = true
44
- # end
45
- #
20
+
21
+ desc 'Test the rubber plugin.'
22
+ Rake::TestTask.new(:test) do |t|
23
+ t.libs << 'lib'
24
+ t.libs << 'test'
25
+ t.pattern = 'test/**/*_test.rb'
26
+ t.verbose = true
27
+ end
28
+
29
+ desc 'Default: run unit tests.'
30
+ task :default => :test
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 2
4
- :patch: 4
4
+ :patch: 5
5
5
  :build:
@@ -145,6 +145,14 @@ module Svn2Git
145
145
  options
146
146
  end
147
147
 
148
+ def self.escape_quotes(str)
149
+ str.gsub(/'|"/) { |c| "\\#{c}" }
150
+ end
151
+
152
+ def escape_quotes(str)
153
+ Svn2Git::Migration.escape_quotes(str)
154
+ end
155
+
148
156
  private
149
157
 
150
158
  def clone!
@@ -374,10 +382,6 @@ module Svn2Git
374
382
  end
375
383
  end
376
384
 
377
- def escape_quotes(str)
378
- str.gsub("'", "'\\\\''")
379
- end
380
-
381
385
  def git_config_command
382
386
  if @git_config_command.nil?
383
387
  status = run_command('git config --local --get user.name', false)
data/svn2git.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: svn2git 2.2.4 ruby lib
5
+ # stub: svn2git 2.2.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "svn2git"
9
- s.version = "2.2.4"
9
+ s.version = "2.2.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["James Coglan", "Kevin Menard"]
14
- s.date = "2014-03-09"
14
+ s.date = "2014-03-10"
15
15
  s.email = "nirvdrum@gmail.com"
16
16
  s.executables = ["svn2git"]
17
17
  s.extra_rdoc_files = [
@@ -26,12 +26,25 @@ Gem::Specification.new do |s|
26
26
  "VERSION.yml",
27
27
  "bin/svn2git",
28
28
  "lib/svn2git.rb",
29
- "lib/svn2git/blah.rb",
30
29
  "lib/svn2git/migration.rb",
31
- "svn2git.gemspec"
30
+ "svn2git.gemspec",
31
+ "test/escape_quotes_test.rb",
32
+ "test/test_helper.rb"
32
33
  ]
33
- s.homepage = "https://www.negativetwenty.net/redmine/projects/svn2git"
34
- s.rubygems_version = "2.2.0"
34
+ s.homepage = "https://github.com/nirvdrum/svn2git"
35
+ s.rubygems_version = "2.2.2"
35
36
  s.summary = "A tool for migrating svn projects to git"
37
+
38
+ if s.respond_to? :specification_version then
39
+ s.specification_version = 4
40
+
41
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
+ s.add_development_dependency(%q<test-unit>, [">= 0"])
43
+ else
44
+ s.add_dependency(%q<test-unit>, [">= 0"])
45
+ end
46
+ else
47
+ s.add_dependency(%q<test-unit>, [">= 0"])
48
+ end
36
49
  end
37
50
 
@@ -0,0 +1,22 @@
1
+ require File.expand_path(File.join(__FILE__, '..', 'test_helper'))
2
+
3
+ class EscapeQuotesTest < Test::Unit::TestCase
4
+ def test_identity
5
+ expected = 'A string without any need to escape.'
6
+ actual = Svn2Git::Migration.escape_quotes(expected)
7
+
8
+ assert_equal expected, actual
9
+ end
10
+
11
+ def test_escape_single_quotes
12
+ actual = Svn2Git::Migration.escape_quotes("Here's a message with 'single quotes.'")
13
+
14
+ assert_equal "Here\\'s a message with \\'single quotes.\\'", actual
15
+ end
16
+
17
+ def test_escape_double_quotes
18
+ actual = Svn2Git::Migration.escape_quotes('Here is a message with "double quotes."')
19
+
20
+ assert_equal 'Here is a message with \\"double quotes.\\"', actual
21
+ end
22
+ end
@@ -0,0 +1,4 @@
1
+ $:.unshift "#{File.dirname(__FILE__)}/../lib"
2
+
3
+ require 'svn2git'
4
+ require 'test/unit'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svn2git
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-09 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2014-03-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: test-unit
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
14
28
  description:
15
29
  email: nirvdrum@gmail.com
16
30
  executables:
@@ -27,10 +41,11 @@ files:
27
41
  - VERSION.yml
28
42
  - bin/svn2git
29
43
  - lib/svn2git.rb
30
- - lib/svn2git/blah.rb
31
44
  - lib/svn2git/migration.rb
32
45
  - svn2git.gemspec
33
- homepage: https://www.negativetwenty.net/redmine/projects/svn2git
46
+ - test/escape_quotes_test.rb
47
+ - test/test_helper.rb
48
+ homepage: https://github.com/nirvdrum/svn2git
34
49
  licenses: []
35
50
  metadata: {}
36
51
  post_install_message:
@@ -49,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
64
  version: '0'
50
65
  requirements: []
51
66
  rubyforge_project:
52
- rubygems_version: 2.2.0
67
+ rubygems_version: 2.2.2
53
68
  signing_key:
54
69
  specification_version: 4
55
70
  summary: A tool for migrating svn projects to git
data/lib/svn2git/blah.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'migration'
2
-
3
- migration = Svn2Git::Migration.new(ARGV)
4
- migration.run!