gitx 2.23.0 → 2.23.1.ci.174.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dc99f98efdef1ecd276d9c08530ec4b60405f740
4
- data.tar.gz: b8f6b5163cb1667290f0fd89356294409a4cfe65
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWQ4YTgwMmJmNWVkZjIxNDUzN2NjY2RkNTQ5N2FjOWRhN2E5NzYxYg==
5
+ data.tar.gz: !binary |-
6
+ NDhmNzlmYTA2OGIyOTIzMDNiZGVkZjg5YzQwMWE5ZGM1NTMzZWQwYQ==
5
7
  SHA512:
6
- metadata.gz: 3e41b146b9c04363ea9c204bbea9553cd6c5b14503baaf2888b497e54121324faa66144ccf5d281e15a44d21765656fb352e8b83d711172b8b3c2a829728352a
7
- data.tar.gz: 4a1b73060f0073fec72f043d966ef9941291467c7bd8d394a5366abbaed32403388202c9fc5cadfe1df5e17c27efa07e2ece9467d988f0a09247ab6ad1e7d3e0
8
+ metadata.gz: !binary |-
9
+ Zjk0ZGNkMjVjNTBiMTQzYjNhZDE1NmVjYmRhM2VlZjQwMzFlYzA0MmM1YTk3
10
+ NjdlMzkxYTJmMTA0NTdkYWNmMGM5MzlmZTNhM2Q0YjQ0OGZlOGFlNDkxMDQ2
11
+ ZWZjMDMzMDlhZTc0ZjA0NzZhYTYzMGExN2MyZTQ4ZGQyMzYxM2M=
12
+ data.tar.gz: !binary |-
13
+ Njk2YzRkMjhjMDJlYmVhODdhYjY2ZTdjMTI0N2QyYWQ5MDM4Y2M4NjhiZTdh
14
+ MzljZWVmN2U2YWZhNjg2ZjZjYWY4YjE1OThkYjJiZmVkMTgxNGZhMzJkNjBl
15
+ ZjllODIzYzNkYWJkZmNmZGVkMzFmODg0ZTNiN2QyNTQzYTJmNGM=
data/.rubocop.yml CHANGED
@@ -1,3 +1,11 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-04-18 08:55:15 -0700 using RuboCop version 0.33.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
1
9
  LineLength:
2
10
  Max: 200
3
11
 
@@ -7,6 +15,30 @@ Documentation:
7
15
  StringLiterals:
8
16
  EnforcedStyle: single_quotes
9
17
 
18
+ # Offense count: 7
19
+ Metrics/AbcSize:
20
+ Max: 25
21
+
22
+ # Offense count: 2
23
+ Metrics/CyclomaticComplexity:
24
+ Max: 7
25
+
26
+ # Offense count: 5
27
+ # Configuration parameters: CountComments.
28
+ Metrics/MethodLength:
29
+ Max: 19
30
+
31
+ # Offense count: 1
32
+ # Configuration parameters: CountComments.
33
+ Metrics/ModuleLength:
34
+ Max: 123
35
+
36
+ # Offense count: 3
37
+ Style/RescueModifier:
38
+ Exclude:
39
+ - 'lib/gitx/cli/integrate_command.rb'
40
+ - 'lib/gitx/cli/nuke_command.rb'
41
+
10
42
  FileName:
11
43
  Exclude:
12
44
  - bin/*
data/Rakefile CHANGED
@@ -3,3 +3,7 @@ require 'bundler/gem_tasks'
3
3
  require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new('spec')
5
5
  task default: :spec
6
+
7
+ require 'rubocop/rake_task'
8
+ RuboCop::RakeTask.new
9
+ task default: :rubocop
@@ -42,11 +42,11 @@ module Gitx
42
42
  end
43
43
 
44
44
  def assert_aggregate_branch!(target_branch)
45
- fail "Invalid aggregate branch: #{target_branch} must be one of supported aggregate branches #{config.aggregate_branches}" unless config.aggregate_branch?(target_branch)
45
+ raise "Invalid aggregate branch: #{target_branch} must be one of supported aggregate branches #{config.aggregate_branches}" unless config.aggregate_branch?(target_branch)
46
46
  end
47
47
 
48
48
  def assert_not_protected_branch!(branch, action)
49
- fail "Cannot #{action} reserved branch" if config.reserved_branch?(branch) || config.aggregate_branch?(branch)
49
+ raise "Cannot #{action} reserved branch" if config.reserved_branch?(branch) || config.aggregate_branch?(branch)
50
50
  end
51
51
 
52
52
  def config
@@ -9,7 +9,7 @@ module Gitx
9
9
  method_option :branch, type: :string, aliases: '-b', desc: 'branch name for build tag'
10
10
  method_option :message, type: :string, aliases: '-m', desc: 'message to attach to the buildtag'
11
11
  def buildtag
12
- fail "Branch must be one of the supported taggable branches: #{config.taggable_branches}" unless config.taggable_branch?(branch_name)
12
+ raise "Branch must be one of the supported taggable branches: #{config.taggable_branches}" unless config.taggable_branch?(branch_name)
13
13
  run_git_cmd 'tag', git_tag, '--annotate', '--message', label
14
14
  run_git_cmd 'push', 'origin', git_tag
15
15
  end
@@ -7,38 +7,47 @@ module Gitx
7
7
  class CleanupCommand < BaseCommand
8
8
  desc 'cleanup', 'Cleanup branches that have been merged into master from the repo'
9
9
  def cleanup
10
- checkout_branch config.base_branch
11
- run_git_cmd 'pull'
12
- run_git_cmd 'remote', 'prune', 'origin'
13
-
10
+ update_base_branch
14
11
  say 'Deleting local and remote branches that have been merged into '
15
12
  say config.base_branch, :green
16
- merged_branches(remote: true).each do |branch|
13
+ filtered_merged_branches(:remote).each do |branch|
17
14
  run_git_cmd 'push', 'origin', '--delete', branch
18
15
  end
19
- merged_branches(remote: false).each do |branch|
16
+ filtered_merged_branches(:local).each do |branch|
20
17
  run_git_cmd 'branch', '--delete', branch
21
18
  end
22
19
  end
23
20
 
24
21
  private
25
22
 
23
+ def update_base_branch
24
+ checkout_branch config.base_branch
25
+ run_git_cmd 'pull'
26
+ run_git_cmd 'remote', 'prune', 'origin'
27
+ end
28
+
26
29
  # @return list of branches that have been merged
27
- def merged_branches(options = {})
28
- args = []
29
- args << '--remote' if options[:remote]
30
- args << '--merged'
31
- output = run_git_cmd('branch', *args).split("\n")
32
- branches = output.map do |branch|
33
- branch = branch.gsub(/\*/, '').strip.split(' ').first
34
- branch = branch.gsub('origin/', '') if options[:remote]
35
- branch
30
+ # filter out reserved and aggregate branches
31
+ def filtered_merged_branches(source)
32
+ merged_branches(source).reject do |branch|
33
+ config.reserved_branches.include?(branch) || config.aggregate_branch?(branch)
36
34
  end
37
- branches.uniq!
38
- branches -= config.reserved_branches
39
- branches.reject! { |b| config.aggregate_branch?(b) }
35
+ end
36
+
37
+ # @return list of branches that have been merged
38
+ # see http://stackoverflow.com/questions/26804024/git-branch-merged-sha-via-rugged-libgit2-bindings
39
+ def merged_branches(source)
40
+ merged_branches = repo.branches.each(source).select do |branch|
41
+ target = branch.resolve.target
42
+ repo.merge_base(base_branch_merge_target, target) == target.oid
43
+ end
44
+ merged_branches.map do |branch|
45
+ branch.name.gsub('origin/', '')
46
+ end
47
+ end
40
48
 
41
- branches
49
+ def base_branch_merge_target
50
+ repo.head.target
42
51
  end
43
52
  end
44
53
  end
@@ -9,7 +9,7 @@ module Gitx
9
9
  method_option :destination, type: :string, aliases: '-d', desc: 'destination branch to reset to'
10
10
  def nuke(bad_branch)
11
11
  good_branch = options[:destination] || ask("What branch do you want to reset #{bad_branch} to? (default: #{bad_branch})")
12
- good_branch = bad_branch if good_branch.length == 0
12
+ good_branch = bad_branch if good_branch.empty?
13
13
 
14
14
  last_known_good_tag = current_build_tag(good_branch)
15
15
  return unless yes?("Reset #{bad_branch} to #{last_known_good_tag}? (y/n)", :green)
@@ -47,7 +47,7 @@ module Gitx
47
47
 
48
48
  def current_build_tag(branch)
49
49
  last_build_tag = build_tags_for_branch(branch).last
50
- fail "No known good tag found for branch: #{branch}. Verify tag exists via `git tag -l 'build-#{branch}-*'`" unless last_build_tag
50
+ raise "No known good tag found for branch: #{branch}. Verify tag exists via `git tag -l 'build-#{branch}-*'`" unless last_build_tag
51
51
  last_build_tag
52
52
  end
53
53
 
@@ -8,14 +8,14 @@ module Gitx
8
8
  class ReviewCommand < BaseCommand
9
9
  include Gitx::Github
10
10
 
11
- BUMP_COMMENT_PREFIX = '[gitx] review bump :tada:'
11
+ BUMP_COMMENT_PREFIX = '[gitx] review bump :tada:'.freeze
12
12
  BUMP_COMMENT_FOOTER = <<-EOS.dedent
13
13
  # Bump comments should include:
14
14
  # * Summary of what changed
15
15
  #
16
16
  # This footer will automatically be stripped from the created comment
17
17
  EOS
18
- APPROVAL_COMMENT_PREFIX = '[gitx] review approved :shipit:'
18
+ APPROVAL_COMMENT_PREFIX = '[gitx] review approved :shipit:'.freeze
19
19
  APPROVAL_COMMENT_FOOTER = <<-EOS.dedent
20
20
  # Approval comments can include:
21
21
  # * Feedback
@@ -23,7 +23,7 @@ module Gitx
23
23
  #
24
24
  # This footer will automatically be stripped from the created comment
25
25
  EOS
26
- REJECTION_COMMENT_PREFIX = '[gitx] review rejected'
26
+ REJECTION_COMMENT_PREFIX = '[gitx] review rejected'.freeze
27
27
  REJECTION_COMMENT_FOOTER = <<-EOS.dedent
28
28
  # Rejection comments should include:
29
29
  # * Feedback
@@ -42,7 +42,7 @@ module Gitx
42
42
  method_option :reject, type: :boolean, desc: 'reject the pull request an post comment on pull request'
43
43
  # @see http://developer.github.com/v3/pulls/
44
44
  def review(branch = nil)
45
- fail 'Github authorization token not found' unless authorization_token
45
+ raise 'Github authorization token not found' unless authorization_token
46
46
 
47
47
  branch ||= current_branch.name
48
48
  pull_request = find_or_create_pull_request(branch)
@@ -5,7 +5,7 @@ require 'gitx/cli/base_command'
5
5
  module Gitx
6
6
  module Cli
7
7
  class StartCommand < BaseCommand
8
- EXAMPLE_BRANCH_NAMES = %w( api-fix-invalid-auth desktop-cleanup-avatar-markup share-form-add-edit-link )
8
+ EXAMPLE_BRANCH_NAMES = %w( api-fix-invalid-auth desktop-cleanup-avatar-markup share-form-add-edit-link ).freeze
9
9
  VALID_BRANCH_NAME_REGEX = /^[A-Za-z0-9\-_]+$/
10
10
 
11
11
  desc 'start', 'start a new git branch with latest changes from master'
@@ -3,7 +3,7 @@ require 'thor/core_ext/hash_with_indifferent_access'
3
3
 
4
4
  module Gitx
5
5
  class Configuration
6
- CONFIG_FILE = '.gitx.yml'
6
+ CONFIG_FILE = '.gitx.yml'.freeze
7
7
 
8
8
  attr_reader :config
9
9
 
data/lib/gitx/executor.rb CHANGED
@@ -11,14 +11,16 @@ module Gitx
11
11
  yield "$ #{cmd.join(' ')}" if block_given?
12
12
  output = ''
13
13
 
14
- Open3.popen2e(*cmd) do |stdin, stdout_err, wait_thread|
15
- while line = stdout_err.gets
14
+ Open3.popen2e(*cmd) do |_stdin, stdout_err, wait_thread|
15
+ loop do
16
+ line = stdout_err.gets
17
+ break unless line
16
18
  output << line
17
19
  yield line if block_given?
18
20
  end
19
21
 
20
22
  exit_status = wait_thread.value
21
- fail ExecutionError, "#{cmd.join(' ')} failed" unless exit_status.success?
23
+ raise ExecutionError, "#{cmd.join(' ')} failed" unless exit_status.success?
22
24
  end
23
25
  output
24
26
  end
@@ -4,7 +4,7 @@ class String
4
4
  indent = scan(/^[ \t]*(?=\S)/).min.size || 0
5
5
  gsub(/^[ \t]{#{indent}}/, '')
6
6
  end
7
- alias_method :dedent, :undent
7
+ alias dedent undent
8
8
 
9
9
  def blank?
10
10
  to_s == ''
@@ -12,13 +12,13 @@ class Thor
12
12
  f.flush
13
13
 
14
14
  flags = case editor
15
- when 'mate', 'emacs', 'subl'
16
- '-w'
17
- when 'mvim'
18
- '-f'
19
- else
20
- ''
21
- end
15
+ when 'mate', 'emacs', 'subl'
16
+ '-w'
17
+ when 'mvim'
18
+ '-f'
19
+ else
20
+ ''
21
+ end
22
22
  pid = fork { exec([editor, flags, f.path].join(' ')) }
23
23
  Process.waitpid(pid)
24
24
  File.read(f.path)
data/lib/gitx/github.rb CHANGED
@@ -4,9 +4,9 @@ require 'yaml'
4
4
 
5
5
  module Gitx
6
6
  module Github
7
- GLOBAL_CONFIG_FILE = '~/.config/gitx/github.yml'
8
- REVIEW_CONTEXT = 'peer_review'
9
- CLIENT_URL = 'https://github.com/wireframe/gitx'
7
+ GLOBAL_CONFIG_FILE = '~/.config/gitx/github.yml'.freeze
8
+ REVIEW_CONTEXT = 'peer_review'.freeze
9
+ CLIENT_URL = 'https://github.com/wireframe/gitx'.freeze
10
10
  PULL_REQUEST_FOOTER = <<-EOS.dedent
11
11
  # Pull Request Protips(tm):
12
12
  # * Describe how this change accomplishes the task at hand
@@ -72,14 +72,14 @@ module Gitx
72
72
  end
73
73
 
74
74
  def pull_request_body(branch)
75
- changelog = run_git_cmd('log', "origin/#{config.base_branch}...#{branch}", '--reverse', '--no-merges', "--pretty=format:* %B")
75
+ changelog = run_git_cmd('log', "origin/#{config.base_branch}...#{branch}", '--reverse', '--no-merges', '--pretty=format:* %B')
76
76
  description = options[:description]
77
77
 
78
78
  description_template = []
79
79
  description_template << "#{description}\n" if description
80
80
  description_template << changelog
81
81
 
82
- body = ask_editor(description_template.join("\n"), editor: repo.config['core.editor'], footer: PULL_REQUEST_FOOTER)
82
+ ask_editor(description_template.join("\n"), editor: repo.config['core.editor'], footer: PULL_REQUEST_FOOTER)
83
83
  end
84
84
 
85
85
  def pull_request_title(branch)
@@ -120,7 +120,7 @@ module Gitx
120
120
 
121
121
  def github_client_name
122
122
  timestamp = Time.now.utc.strftime('%FT%R:%S%z')
123
- client_name = "Git eXtensions #{timestamp}"
123
+ "Git eXtensions #{timestamp}"
124
124
  end
125
125
 
126
126
  def github_client
@@ -131,7 +131,7 @@ module Gitx
131
131
  # @raise error if github.user is not configured
132
132
  def username
133
133
  username = repo.config['github.user']
134
- fail "Github user not configured. Run: `git config --global github.user 'me@email.com'`" unless username
134
+ raise "Github user not configured. Run: `git config --global github.user 'me@email.com'`" unless username
135
135
  username
136
136
  end
137
137
 
@@ -142,7 +142,7 @@ module Gitx
142
142
  # https://github.com/wireframe/gitx.git #=> wireframe/gitx
143
143
  def github_slug
144
144
  remote = repo.config['remote.origin.url']
145
- remote.to_s.gsub(/\.git$/, '').split(/[:\/]/).last(2).join('/')
145
+ remote.to_s.gsub(/\.git$/, '').split(%r{[:\/]}).last(2).join('/')
146
146
  end
147
147
 
148
148
  def github_organization
data/lib/gitx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gitx
2
- VERSION = '2.23.0'
2
+ VERSION = '2.23.1'.freeze
3
3
  end
@@ -11,20 +11,29 @@ describe Gitx::Cli::CleanupCommand do
11
11
  end
12
12
  let(:cli) { described_class.new(args, options, config) }
13
13
  let(:executor) { cli.send(:executor) }
14
- let(:branch) { double('fake branch', name: 'feature-branch') }
15
- let(:remote_branches) { '' }
16
- let(:local_branches) { '' }
14
+ let(:remote_branches) { [] }
15
+ let(:local_branches) { [] }
16
+ let(:workdir) { '.' }
17
+ let(:oid) { '123123' }
18
+ let(:target) { double(:target, oid: oid) }
19
+ let(:reference) { double(:ref, target: target) }
20
+ let(:repo) { double(:repo, workdir: workdir, head: reference) }
21
+ let(:branches) { double(:branches) }
17
22
 
18
23
  before do
19
- allow(cli).to receive(:current_branch).and_return(branch)
24
+ allow(cli).to receive(:repo).and_return(repo)
25
+ allow(repo).to receive(:branches).and_return(branches)
26
+ allow(repo).to receive(:merge_base).with(target, target).and_return(oid)
27
+ allow(branches).to receive(:each).with(:local).and_return(local_branches)
28
+ allow(branches).to receive(:each).with(:remote).and_return(remote_branches)
20
29
  end
21
30
 
22
31
  describe '#cleanup' do
23
32
  context 'when merged local branches exist' do
24
33
  let(:local_branches) do
25
- <<-EOS.dedent
26
- merged-local-feature
27
- EOS
34
+ [
35
+ double(:branch, name: 'merged-local-feature', resolve: reference)
36
+ ]
28
37
  end
29
38
  before do
30
39
  allow(cli).to receive(:say)
@@ -32,8 +41,6 @@ describe Gitx::Cli::CleanupCommand do
32
41
  expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
33
42
  expect(executor).to receive(:execute).with('git', 'pull').ordered
34
43
  expect(executor).to receive(:execute).with('git', 'remote', 'prune', 'origin').ordered
35
- expect(executor).to receive(:execute).with('git', 'branch', '--remote', '--merged').and_return(remote_branches).ordered
36
- expect(executor).to receive(:execute).with('git', 'branch', '--merged').and_return(local_branches).ordered
37
44
  expect(executor).to receive(:execute).with('git', 'branch', '--delete', 'merged-local-feature').ordered
38
45
 
39
46
  cli.cleanup
@@ -44,9 +51,9 @@ describe Gitx::Cli::CleanupCommand do
44
51
  end
45
52
  context 'when merged remote branches exist' do
46
53
  let(:remote_branches) do
47
- <<-EOS.dedent
48
- origin/merged-remote-feature
49
- EOS
54
+ [
55
+ double(:branch, name: 'origin/merged-remote-feature', resolve: reference)
56
+ ]
50
57
  end
51
58
  before do
52
59
  allow(cli).to receive(:say)
@@ -54,9 +61,7 @@ describe Gitx::Cli::CleanupCommand do
54
61
  expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
55
62
  expect(executor).to receive(:execute).with('git', 'pull').ordered
56
63
  expect(executor).to receive(:execute).with('git', 'remote', 'prune', 'origin').ordered
57
- expect(executor).to receive(:execute).with('git', 'branch', '--remote', '--merged').and_return(remote_branches).ordered
58
64
  expect(executor).to receive(:execute).with('git', 'push', 'origin', '--delete', 'merged-remote-feature').ordered
59
- expect(executor).to receive(:execute).with('git', 'branch', '--merged').and_return(local_branches).ordered
60
65
 
61
66
  cli.cleanup
62
67
  end
@@ -66,9 +71,9 @@ describe Gitx::Cli::CleanupCommand do
66
71
  end
67
72
  context 'when mreged remote branches with slash exist' do
68
73
  let(:remote_branches) do
69
- <<-EOS.dedent
70
- origin/merged-remote-feature/review
71
- EOS
74
+ [
75
+ double(:branch, name: 'origin/merged-remote-feature/review', resolve: reference)
76
+ ]
72
77
  end
73
78
  before do
74
79
  allow(cli).to receive(:say)
@@ -76,9 +81,7 @@ describe Gitx::Cli::CleanupCommand do
76
81
  expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
77
82
  expect(executor).to receive(:execute).with('git', 'pull').ordered
78
83
  expect(executor).to receive(:execute).with('git', 'remote', 'prune', 'origin').ordered
79
- expect(executor).to receive(:execute).with('git', 'branch', '--remote', '--merged').and_return(remote_branches).ordered
80
84
  expect(executor).to receive(:execute).with('git', 'push', 'origin', '--delete', 'merged-remote-feature/review').ordered
81
- expect(executor).to receive(:execute).with('git', 'branch', '--merged').and_return(local_branches).ordered
82
85
 
83
86
  cli.cleanup
84
87
  end
@@ -84,7 +84,7 @@ describe Gitx::Cli::IntegrateCommand do
84
84
  expect(executor).to receive(:execute).with('git', 'update').ordered
85
85
  expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
86
86
  expect(executor).to receive(:execute).with('git', 'update').ordered
87
- expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', "--pretty=format:* %B").and_return(changelog).ordered
87
+ expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', '--pretty=format:* %B').and_return(changelog).ordered
88
88
  expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
89
89
  expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
90
90
  expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
@@ -158,7 +158,8 @@ describe Gitx::Cli::IntegrateCommand do
158
158
  expect(executor).to receive(:execute).with('git', 'fetch', 'origin').ordered
159
159
  expect(executor).to receive(:execute).with('git', 'branch', '--delete', '--force', 'staging').ordered
160
160
  expect(executor).to receive(:execute).with('git', 'checkout', 'staging').ordered
161
- expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', '[gitx] Integrating feature-branch into staging (Pull request #10)', 'feature-branch').and_raise('git merge feature-branch failed').ordered
161
+ expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', '[gitx] Integrating feature-branch into staging (Pull request #10)', 'feature-branch')
162
+ .and_raise('git merge feature-branch failed').ordered
162
163
 
163
164
  VCR.use_cassette('pull_request_does_exist_with_success_status') do
164
165
  expect { cli.integrate }.to raise_error(/Merge conflict occurred. Please fix merge conflict and rerun command with --resume feature-branch flag/)
@@ -152,7 +152,7 @@ describe Gitx::Cli::ReleaseCommand do
152
152
  expect(executor).to receive(:execute).with('git', 'update').ordered
153
153
  expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
154
154
  expect(executor).to receive(:execute).with('git', 'update').ordered
155
- expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', "--pretty=format:* %B").and_return('2013-01-01 did some stuff').ordered
155
+ expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', '--pretty=format:* %B').and_return('2013-01-01 did some stuff').ordered
156
156
  expect(executor).to receive(:execute).with('git', 'checkout', 'master').ordered
157
157
  expect(executor).to receive(:execute).with('git', 'pull', 'origin', 'master').ordered
158
158
  expect(executor).to receive(:execute).with('git', 'merge', '--no-ff', '--message', '[gitx] Releasing feature-branch to master (Pull request #10)', 'feature-branch').ordered
@@ -46,7 +46,7 @@ describe Gitx::Cli::ReviewCommand do
46
46
  allow(cli).to receive(:authorization_token).and_return(authorization_token)
47
47
  expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
48
48
  expect(executor).to receive(:execute).with('git', 'update').ordered
49
- expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', "--pretty=format:* %B").and_return(changelog).ordered
49
+ expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', '--pretty=format:* %B').and_return(changelog).ordered
50
50
  expect(cli).to receive(:ask_editor).with(changelog, hash_including(footer: Gitx::Github::PULL_REQUEST_FOOTER)).and_return('description')
51
51
 
52
52
  stub_request(:post, 'https://api.github.com/repos/wireframe/gitx/pulls').to_return(status: 201, body: new_pull_request.to_json, headers: { 'Content-Type' => 'application/json' })
@@ -82,11 +82,11 @@ describe Gitx::Cli::ReviewCommand do
82
82
  allow(cli).to receive(:authorization_token).and_return(authorization_token)
83
83
  expect(executor).to receive(:execute).with('git', 'checkout', 'feature-branch').ordered
84
84
  expect(executor).to receive(:execute).with('git', 'update').ordered
85
- expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', "--pretty=format:* %B").and_return(changelog).ordered
85
+ expect(executor).to receive(:execute).with('git', 'log', 'origin/master...feature-branch', '--reverse', '--no-merges', '--pretty=format:* %B').and_return(changelog).ordered
86
86
  expect(cli).to receive(:ask_editor).with(changelog, hash_including(footer: Gitx::Github::PULL_REQUEST_FOOTER)).and_return(pull_request_description)
87
87
 
88
88
  stub_request(:post, 'https://api.github.com/repos/wireframe/gitx/pulls')
89
- .with(body: {base: 'master', head: 'feature-branch', title: 'feature branch', body: pull_request_description}.to_json)
89
+ .with(body: { base: 'master', head: 'feature-branch', title: 'feature branch', body: pull_request_description }.to_json)
90
90
  .to_return(status: 201, body: new_pull_request.to_json, headers: { 'Content-Type' => 'application/json' })
91
91
 
92
92
  VCR.use_cassette('pull_request_does_not_exist') do
@@ -9,6 +9,6 @@ module Kernel
9
9
  end
10
10
  end
11
11
 
12
- alias_method :execute_without_stub, :`
13
- alias_method :`, :execute_with_stub
12
+ alias execute_without_stub `
13
+ alias ` execute_with_stub
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.23.1.ci.174.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
@@ -14,224 +14,224 @@ dependencies:
14
14
  name: rugged
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.24.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.24.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: octokit
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '3.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: timecop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - ! '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - ! '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: vcr
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - ! '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - ! '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: guard
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: guard-rspec
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: coveralls
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - ! '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - ! '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: terminal-notifier
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - ! '>='
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - ! '>='
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: terminal-notifier-guard
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - ">="
213
+ - - ! '>='
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - ">="
220
+ - - ! '>='
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: rubocop
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">="
227
+ - - ! '>='
228
228
  - !ruby/object:Gem::Version
229
229
  version: '0'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - ">="
234
+ - - ! '>='
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  description: Git eXtensions for improved development workflows
@@ -251,13 +251,13 @@ executables:
251
251
  extensions: []
252
252
  extra_rdoc_files: []
253
253
  files:
254
- - ".gitignore"
255
- - ".gitx.yml"
256
- - ".hound.yml"
257
- - ".rspec"
258
- - ".rubocop.yml"
259
- - ".ruby-version"
260
- - ".travis.yml"
254
+ - .gitignore
255
+ - .gitx.yml
256
+ - .hound.yml
257
+ - .rspec
258
+ - .rubocop.yml
259
+ - .ruby-version
260
+ - .travis.yml
261
261
  - CONTRIBUTING.md
262
262
  - Gemfile
263
263
  - Guardfile
@@ -328,17 +328,17 @@ require_paths:
328
328
  - lib
329
329
  required_ruby_version: !ruby/object:Gem::Requirement
330
330
  requirements:
331
- - - ">="
331
+ - - ! '>='
332
332
  - !ruby/object:Gem::Version
333
333
  version: '0'
334
334
  required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  requirements:
336
- - - ">="
336
+ - - ! '>'
337
337
  - !ruby/object:Gem::Version
338
- version: '0'
338
+ version: 1.3.1
339
339
  requirements: []
340
340
  rubyforge_project:
341
- rubygems_version: 2.4.8
341
+ rubygems_version: 2.4.5
342
342
  signing_key:
343
343
  specification_version: 4
344
344
  summary: Utility scripts for Git to increase productivity for common operations
@@ -367,4 +367,3 @@ test_files:
367
367
  - spec/support/timecop.rb
368
368
  - spec/support/vcr.rb
369
369
  - spec/support/webmock.rb
370
- has_rdoc: