mercurial-ruby 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = mercurial-ruby
2
2
 
3
- Ruby API for Mercurial DVCS. Uses command line interface to communicate with Mercurial repositories.
3
+ Ruby API for Mercurial DVCS. Powers Mercurial on http://beanstalkapp.com
4
4
 
5
5
  == Documentation
6
6
 
@@ -90,16 +90,6 @@ You can provide a timeout for pretty much any command you are running. Do it lik
90
90
 
91
91
  repository.commits.all(:timeout => 5)
92
92
 
93
- == Contributing to mercurial-ruby
94
-
95
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
96
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
97
- * Fork the project
98
- * Start a feature/bugfix branch
99
- * Commit and push until you are happy with your contribution
100
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
101
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
102
-
103
93
  == Copyright
104
94
 
105
95
  Copyright (c) 2012 Ilya Sabanin. See LICENSE.txt for
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.6
1
+ 0.7.7
@@ -6,7 +6,7 @@ require 'time'
6
6
  #
7
7
  module Mercurial
8
8
 
9
- VERSION = '0.7.6'
9
+ VERSION = '0.7.7'
10
10
 
11
11
  class Error < RuntimeError; end
12
12
 
@@ -1,11 +1,11 @@
1
1
  module Mercurial
2
2
 
3
3
  #
4
- # The class represents Mercurial blame output. Obtained by running an +hg blame+ command.
4
+ # The class represents Mercurial blame output (+hg blame+ command).
5
5
  #
6
- # This is for the Blame object itself, {Mercurial::BlameFactory BlameFactory} is responsible
7
- # for assembling instances of the Blame. For the list of all possible blame-related operations please
8
- # look documentation for {Mercurial::BlameFactory BlameFactory}.
6
+ # This class is for Blame object itself, {Mercurial::BlameFactory BlameFactory} is responsible
7
+ # for assembling instances of Blame. For the list of all possible blame-related operations
8
+ # check {Mercurial::BlameFactory BlameFactory}.
9
9
  #
10
10
  class Blame
11
11
 
@@ -1,7 +1,7 @@
1
1
  module Mercurial
2
2
 
3
3
  #
4
- # The class represents a single line of the Mercurial blame output.
4
+ # The class represents a single line of the blame output.
5
5
  #
6
6
  class BlameLine
7
7
 
@@ -4,10 +4,10 @@ module Mercurial
4
4
  # The class represents Mercurial branch. Obtained by running an +hg branches+ command.
5
5
  #
6
6
  # The class represents Branch object itself, {Mercurial::BranchFactory BranchFactory} is responsible
7
- # for assembling instances of Branch. For the list of all possible branch-related operations please
8
- # look documentation for {Mercurial::BranchFactory BranchFactory}.
7
+ # for assembling instances of Branch. For the list of all possible branch-related operations
8
+ # check {Mercurial::BranchFactory BranchFactory}.
9
9
  #
10
- # Read more about Mercurial branches:
10
+ # For general information on Mercurial branches:
11
11
  #
12
12
  # http://mercurial.selenic.com/wiki/Branch
13
13
  #
@@ -6,7 +6,7 @@ module Mercurial
6
6
  class CommandError < Error; end
7
7
 
8
8
  #
9
- # This class represents a command that will be executed in a shell. You probably don't want to deal with this yourself,
9
+ # This class represents a shell command. You probably don't want to deal with this yourself,
10
10
  # use the {Mercurial::Shell Shell} class instead.
11
11
  #
12
12
  class Command
@@ -2,13 +2,13 @@ module Mercurial
2
2
 
3
3
  #
4
4
  # The class represents Mercurial changeset. Obtained by running an +hg log+ command.
5
- # Contains a lot of information, including it's hash ID, author name and email, list of changed files, etc.
5
+ # Contains a lot of information, including commit's ID, author name, email, list of changed files, etc.
6
6
  #
7
7
  # The class represents Commit object itself, {Mercurial::CommitFactory CommitFactory} is responsible
8
- # for assembling instances of Commit. For the list of all possible commit-related operations please
9
- # look documentation for {Mercurial::CommitFactory CommitFactory}.
8
+ # for assembling instances of Commit. For the list of all possible commit-related operations
9
+ # check {Mercurial::CommitFactory CommitFactory}.
10
10
  #
11
- # Read more about Mercurial commits:
11
+ # For general information on Mercurial commits:
12
12
  #
13
13
  # http://mercurial.selenic.com/wiki/Commit
14
14
  #
@@ -1,10 +1,10 @@
1
1
  module Mercurial
2
2
 
3
3
  #
4
- # Represents +.hg/hgrc+ configuration file stored in the repository.
4
+ # Represents +.hg/hgrc+ configuration from the repository.
5
5
  # Useful for adding/removing various settings.
6
6
  #
7
- # You can read more about hgrc here:
7
+ # For general information on hgrc:
8
8
  #
9
9
  # http://www.selenic.com/mercurial/hgrc.5.html
10
10
  #
@@ -19,7 +19,7 @@ module Mercurial
19
19
  end
20
20
 
21
21
  #
22
- # Returns absolute path to the config file:
22
+ # Returns an absolute path to the config file:
23
23
  #
24
24
  # config.path # => /home/ilya/repos/fancyrepo/.hg/hgrc
25
25
  #
@@ -29,7 +29,7 @@ module Mercurial
29
29
 
30
30
  #
31
31
  # Returns true if the config file actually exists on disk.
32
- # For new repositories it's missing by default.
32
+ # The file is usually missing in new repositories.
33
33
  #
34
34
  def exists?
35
35
  File.exists?(path)
@@ -47,7 +47,7 @@ module Mercurial
47
47
  #
48
48
  # config.add_setting('merge-tools', 'kdiff3.executable', '~/bin/kdiff3')
49
49
  #
50
- # It will write the following content to the +hgrc+:
50
+ # will write the following content to hgrc:
51
51
  #
52
52
  # [merge-tools]
53
53
  # kdiff3.executable = ~/bin/kdiff3
@@ -68,7 +68,7 @@ module Mercurial
68
68
  end
69
69
 
70
70
  #
71
- # Removes specified setting from the hgrc:
71
+ # Removes specified setting from hgrc:
72
72
  #
73
73
  # config.delete_setting!('merge-tools', 'kdiff3.executable')
74
74
  #
@@ -79,7 +79,7 @@ module Mercurial
79
79
  end
80
80
 
81
81
  #
82
- # Returns true if specified setting exists in specified group.
82
+ # Returns true if a specified setting exists in specified group.
83
83
  #
84
84
  # config.setting_exists?('hooks', 'changegroup')
85
85
  #
@@ -10,12 +10,12 @@ module Mercurial
10
10
  # conf.debug_mode = true
11
11
  # end
12
12
  #
13
- # Currently only the following settings are supported:
13
+ # Only the following settings are supported:
14
14
  #
15
- # * hg_binary_path — path to hg binary in your system. Default is /usr/local/bin/hg.
16
- # * shell_timeout — default execution timeout for all hg shell commands. Default is 3000.
17
- # * cache_store — Rails's CacheStore compatible class for caching results of successful hg commands. Default is nil.
18
- # * debug_mode — send all hg commands to stdout before execution. Default is false.
15
+ # * hg_binary_path — path to hg binary in your system. Defaults to /usr/local/bin/hg.
16
+ # * shell_timeout — default execution timeout for all hg shell commands. Defaults to 3000.
17
+ # * cache_store — Rails's CacheStore compatible class for caching results of successful hg commands. Defaults to nil.
18
+ # * debug_mode — send all hg commands to stdout before execution. Defaults to false.
19
19
  #
20
20
  class Configuration
21
21
 
@@ -4,8 +4,8 @@ module Mercurial
4
4
  # The class represents Mercurial diff. Obtained by running an +hg diff+ command.
5
5
  #
6
6
  # The class represents Diff object itself, {Mercurial::DiffFactory DiffFactory} is responsible
7
- # for assembling instances of Diff. For the list of all possible diff-related operations please
8
- # look documentation for {Mercurial::DiffFactory DiffFactory}.
7
+ # for assembling instances of Diff. For the list of all possible diff-related operations
8
+ # check {Mercurial::DiffFactory DiffFactory}.
9
9
  #
10
10
  class Diff
11
11
 
@@ -15,7 +15,7 @@ module Mercurial
15
15
  # SHA1 hash of version b of the file.
16
16
  attr_reader :hash_b
17
17
 
18
- # Version a if the file name.
18
+ # Version a of the file name.
19
19
  attr_reader :file_a
20
20
 
21
21
  # Version b of the file name.
@@ -1,5 +1,6 @@
1
1
  module Mercurial
2
2
 
3
+ #
3
4
  # This class was ported from grit.
4
5
  #
5
6
  # It implements a file-based 'file index', a simple index of
@@ -17,6 +17,10 @@ module Mercurial
17
17
  def binary?
18
18
  false
19
19
  end
20
+
21
+ def name
22
+ ''
23
+ end
20
24
 
21
25
  def path
22
26
  ''
@@ -1,8 +1,8 @@
1
1
  module Mercurial
2
2
 
3
3
  #
4
- # This is a tiny helper class that makes it simple for you to execute shell commands.
5
- # Use it to execute hg commands that don't have a proper wrappers yet.
4
+ # This class makes it easy for you to execute shell commands.
5
+ # Use it to execute hg commands that don't have proper wrappers yet.
6
6
  #
7
7
  class Shell
8
8
 
@@ -19,7 +19,7 @@ module Mercurial
19
19
  #
20
20
  # ==== Arguments interpolation
21
21
  #
22
- # Interpolation make your commands secure by escaping dangerous characters and wrapping everything in quotes:
22
+ # Interpolation make your commands secure by wrapping everything in single quotes and sanitizing them:
23
23
  #
24
24
  # Shell.run(["clone ? ?", url, destination], :append_hg => true)
25
25
  #
@@ -33,13 +33,13 @@ module Mercurial
33
33
  #
34
34
  # Gives you piping flexibility:
35
35
  #
36
- # Shell.run('log', :pipe => "grep '9:0f41dd2ec166' -wc", :in => repository_path)
36
+ # Shell.run('log', :pipe => "grep '9:0f41dd2ec166' -wc", :in => repository_path, :append_hg => true)
37
37
  #
38
38
  # Same as running +hg log | grep '9:0f41dd2ec166' -wc+
39
39
  #
40
40
  # ==== :timeout
41
41
  #
42
- # Specify a timeout in seconds for your command:
42
+ # Specify execution timeout in seconds for your command:
43
43
  #
44
44
  # Shell.run("/usr/bin/long-running-task", :timeout => 5)
45
45
  #
@@ -59,7 +59,7 @@ module Mercurial
59
59
  end
60
60
 
61
61
  if dir = options.delete(:in)
62
- build << "cd #{ dir }"
62
+ build << interpolate_arguments(["cd ?", dir])
63
63
  end
64
64
 
65
65
  if cmd.kind_of?(Array)
@@ -5,9 +5,9 @@ module Mercurial
5
5
  #
6
6
  # The class represents Tag object itself, {Mercurial::TagFactory TagFactory} is responsible
7
7
  # for assembling instances of Tag. For the list of all possible tag-related operations please
8
- # look documentation for {Mercurial::TagFactory TagFactory}.
8
+ # check {Mercurial::TagFactory TagFactory}.
9
9
  #
10
- # Read more about Mercurial tags:
10
+ # For general information on Mercurial tags:
11
11
  #
12
12
  # http://mercurial.selenic.com/wiki/Tag
13
13
  #
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mercurial-ruby}
8
- s.version = "0.7.6"
8
+ s.version = "0.7.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilya Sabanin"]
12
- s.date = %q{2012-10-23}
12
+ s.date = %q{2013-01-22}
13
13
  s.description = %q{Ruby API for Mercurial DVCS.}
14
14
  s.email = %q{ilya.sabanin@gmail.com}
15
15
  s.extra_rdoc_files = [
data/test/test_commit.rb CHANGED
@@ -74,7 +74,7 @@ describe Mercurial::Commit do
74
74
 
75
75
  it "should not die when trying to return stats for a commit without stats" do
76
76
  commit = @repository.commits.by_hash_id('8173f122b0d0')
77
- commit.stats.must_equal {}
77
+ commit.stats.must_equal Hash.new
78
78
  end
79
79
 
80
80
  it "should return IDs of it's trivial parents" do
data/test/test_shell.rb CHANGED
@@ -13,7 +13,7 @@ describe Mercurial::Shell do
13
13
 
14
14
  it "should compile commands" do
15
15
  command_mock = mock('command', :execute => true)
16
- Mercurial::Command.expects(:new).with("cd #{ @repository.path } && /usr/local/bin/hg log", :repository => @repository, :append_hg => true).returns(command_mock).once
16
+ Mercurial::Command.expects(:new).with("cd '#{ @repository.path }' && /usr/local/bin/hg log", :repository => @repository, :append_hg => true).returns(command_mock).once
17
17
  @shell.hg('log')
18
18
  end
19
19
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercurial-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 6
10
- version: 0.7.6
9
+ - 7
10
+ version: 0.7.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ilya Sabanin
@@ -15,10 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-23 00:00:00 -04:00
18
+ date: 2013-01-22 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
+ type: :runtime
23
+ prerelease: false
24
+ name: open4
22
25
  version_requirements: &id001 !ruby/object:Gem::Requirement
23
26
  none: false
24
27
  requirements:
@@ -31,10 +34,10 @@ dependencies:
31
34
  - 0
32
35
  version: 1.3.0
33
36
  requirement: *id001
34
- type: :runtime
35
- name: open4
36
- prerelease: false
37
37
  - !ruby/object:Gem::Dependency
38
+ type: :development
39
+ prerelease: false
40
+ name: minitest
38
41
  version_requirements: &id002 !ruby/object:Gem::Requirement
39
42
  none: false
40
43
  requirements:
@@ -45,10 +48,10 @@ dependencies:
45
48
  - 0
46
49
  version: "0"
47
50
  requirement: *id002
51
+ - !ruby/object:Gem::Dependency
48
52
  type: :development
49
- name: minitest
50
53
  prerelease: false
51
- - !ruby/object:Gem::Dependency
54
+ name: bundler
52
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
53
56
  none: false
54
57
  requirements:
@@ -61,10 +64,10 @@ dependencies:
61
64
  - 0
62
65
  version: 1.0.0
63
66
  requirement: *id003
67
+ - !ruby/object:Gem::Dependency
64
68
  type: :development
65
- name: bundler
66
69
  prerelease: false
67
- - !ruby/object:Gem::Dependency
70
+ name: jeweler
68
71
  version_requirements: &id004 !ruby/object:Gem::Requirement
69
72
  none: false
70
73
  requirements:
@@ -77,10 +80,10 @@ dependencies:
77
80
  - 4
78
81
  version: 1.6.4
79
82
  requirement: *id004
83
+ - !ruby/object:Gem::Dependency
80
84
  type: :development
81
- name: jeweler
82
85
  prerelease: false
83
- - !ruby/object:Gem::Dependency
86
+ name: rcov
84
87
  version_requirements: &id005 !ruby/object:Gem::Requirement
85
88
  none: false
86
89
  requirements:
@@ -91,10 +94,10 @@ dependencies:
91
94
  - 0
92
95
  version: "0"
93
96
  requirement: *id005
97
+ - !ruby/object:Gem::Dependency
94
98
  type: :development
95
- name: rcov
96
99
  prerelease: false
97
- - !ruby/object:Gem::Dependency
100
+ name: mocha
98
101
  version_requirements: &id006 !ruby/object:Gem::Requirement
99
102
  none: false
100
103
  requirements:
@@ -106,10 +109,10 @@ dependencies:
106
109
  - 9
107
110
  version: "0.9"
108
111
  requirement: *id006
112
+ - !ruby/object:Gem::Dependency
109
113
  type: :development
110
- name: mocha
111
114
  prerelease: false
112
- - !ruby/object:Gem::Dependency
115
+ name: ruby-debug
113
116
  version_requirements: &id007 !ruby/object:Gem::Requirement
114
117
  none: false
115
118
  requirements:
@@ -121,9 +124,6 @@ dependencies:
121
124
  - 10
122
125
  version: "0.10"
123
126
  requirement: *id007
124
- type: :development
125
- name: ruby-debug
126
- prerelease: false
127
127
  description: Ruby API for Mercurial DVCS.
128
128
  email: ilya.sabanin@gmail.com
129
129
  executables: []