ninny 0.1.3 → 0.1.9

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
  SHA256:
3
- metadata.gz: a17662c1c2ef0bb98f982f5c463ffd6801e92c39433f58b744384bed0d34389c
4
- data.tar.gz: d4966ce3533cf81411be4433b20e3684daf31d2b610ac2073f1f564f488577ba
3
+ metadata.gz: 6ff0bd65af72ed9501d51694e425da8f51dd787c71a2921a697cf6670b411e4d
4
+ data.tar.gz: 2e354a4951b3a7171a51b740a1c48a40ab58def31d5b1d7474a9db4d2093bb54
5
5
  SHA512:
6
- metadata.gz: 6b0e1e47db683db36036c7a43cc122a13ba280caf2f1bc63474c2950422b2c9ca0c873f096712b23946678e7018e3eafc71dc6218b64e0b3000b99eb841992bf
7
- data.tar.gz: cb4133dedc6165482306b1a1bf30679d024448f336dfcdac697a8d9060b287b7c3b79b954ac33e5048e8097ecc25bdffbb06fafbebc2728a86c0ee0b1a7ff7f4
6
+ metadata.gz: fb91d7c29d7014517d1de0378eea04978a7942aac3d954e47b1caa5183face95ce8e2c215675c81f8c2090acf56185cd9235563d23d2321fe88b6f09c1799e7a
7
+ data.tar.gz: 290120900419245c0049375e1f1ea83573051bcb87e3a2992a81ab9e2c9638e66da60951e0068d99b263c8ef8b461332a2b681eec021caaa5e594c57f7d0934c
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ninny (0.1.3)
4
+ ninny (0.1.9)
5
5
  git (~> 1.5.0)
6
- gitlab (~> 4.11.0)
6
+ gitlab (~> 4.11)
7
7
  pastel (~> 0.7.2)
8
- thor (~> 0.20.0)
8
+ thor (< 2)
9
9
  tty-box (~> 0.3.0)
10
10
  tty-color (~> 0.4)
11
11
  tty-command (~> 0.8.0)
@@ -19,16 +19,16 @@ GEM
19
19
  diff-lcs (1.3)
20
20
  equatable (0.5.0)
21
21
  git (1.5.0)
22
- gitlab (4.11.0)
23
- httparty (~> 0.14, >= 0.14.0)
22
+ gitlab (4.17.0)
23
+ httparty (~> 0.18)
24
24
  terminal-table (~> 1.5, >= 1.5.1)
25
- httparty (0.17.0)
25
+ httparty (0.18.1)
26
26
  mime-types (~> 3.0)
27
27
  multi_xml (>= 0.5.2)
28
28
  kramdown (1.16.2)
29
- mime-types (3.2.2)
29
+ mime-types (3.3.1)
30
30
  mime-types-data (~> 3.2015)
31
- mime-types-data (3.2019.0331)
31
+ mime-types-data (3.2020.1104)
32
32
  multi_xml (0.6.0)
33
33
  necromancer (0.4.0)
34
34
  pastel (0.7.2)
@@ -33,7 +33,8 @@ module Ninny
33
33
 
34
34
  # Public: Check out the branch
35
35
  def check_out_branch
36
- Ninny.git.check_out(branch_to_merge_into)
36
+ Ninny.git.check_out(branch_to_merge_into, false)
37
+ Ninny.git.track_current_branch
37
38
  rescue Ninny::Git::NoBranchOfType
38
39
  prompt.say "No #{branch_type} branch available. Creating one now."
39
40
  CreateDatedBranch.new(branch: branch_type).execute
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Ninny
2
4
  class Git
3
5
  extend Forwardable
@@ -38,7 +40,7 @@ module Ninny
38
40
  def merge(branch_name)
39
41
  if_clean do
40
42
  git.fetch
41
- command 'merge', '--no-ff', "origin/#{branch_name}"
43
+ command 'merge', ['--no-ff', "origin/#{branch_name}"]
42
44
  raise MergeFailed unless clean?
43
45
  push
44
46
  end
@@ -65,12 +67,21 @@ module Ninny
65
67
  def check_out(branch, do_after_pull=true)
66
68
  git.fetch
67
69
  branch.checkout
68
- git.pull if do_after_pull
70
+ pull if do_after_pull
69
71
  unless current_branch.name == branch.name
70
72
  raise CheckoutFailed, "Failed to check out '#{branch}'"
71
73
  end
72
74
  end
73
75
 
76
+ # Public: Track remote branch matching current branch
77
+ #
78
+ # do_after_pull - Should a pull be done after tracking?
79
+ def track_current_branch(do_after_pull=true)
80
+ command('branch', ['-u', "origin/#{current_branch_name}"])
81
+ pull if do_after_pull
82
+ end
83
+
84
+
74
85
  # Public: Create a new branch from the given source
75
86
  #
76
87
  # new_branch_name - The name of the branch to create
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Ninny
2
- VERSION = "0.1.3"
4
+ VERSION = "0.1.9"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
 
2
4
  lib = File.expand_path("../lib", __FILE__)
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -58,10 +60,10 @@ Gem::Specification.new do |spec|
58
60
  # spec.add_dependency "tty-which", "~> 0.4"
59
61
 
60
62
  spec.add_dependency "pastel", "~> 0.7.2"
61
- spec.add_dependency "thor", "~> 0.20.0"
63
+ spec.add_dependency "thor", "< 2"
62
64
 
63
65
  spec.add_dependency "git", "~> 1.5.0"
64
- spec.add_dependency "gitlab", "~> 4.11.0"
66
+ spec.add_dependency "gitlab", "~> 4.11"
65
67
 
66
68
  spec.add_development_dependency "bundler", "~> 1.17"
67
69
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ninny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Allen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2020-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-box
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: thor
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - "<"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.20.0
103
+ version: '2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - "<"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.20.0
110
+ version: '2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: git
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 4.11.0
131
+ version: '4.11'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 4.11.0
138
+ version: '4.11'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: bundler
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -237,11 +237,11 @@ files:
237
237
  - lib/ninny/user_config.rb
238
238
  - lib/ninny/version.rb
239
239
  - ninny.gemspec
240
- homepage:
240
+ homepage:
241
241
  licenses:
242
242
  - MIT
243
243
  metadata: {}
244
- post_install_message:
244
+ post_install_message:
245
245
  rdoc_options: []
246
246
  require_paths:
247
247
  - lib
@@ -256,8 +256,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0'
258
258
  requirements: []
259
- rubygems_version: 3.0.4
260
- signing_key:
259
+ rubygems_version: 3.0.8
260
+ signing_key:
261
261
  specification_version: 4
262
262
  summary: 'ninny (n): an foolish person, see: git'
263
263
  test_files: []