branch_cli 0.7.0 → 0.7.1

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: 4b756cb09351d8216b599d29aa0d6ee7cccc79f2
4
- data.tar.gz: 122054773404b0c5e5381c9c43b1d72df359e9b6
3
+ metadata.gz: 5879bb934db575321ee8c6b5f8cb15e398dc0e5a
4
+ data.tar.gz: e52a06806b3063fe4f42ff086a800443a9d903ee
5
5
  SHA512:
6
- metadata.gz: 16968f525b1cc7177c2afe372e962462b26f5798e8e66bceec21110ddd2b4b97ebd7b3862cb6a16d01a3b5bef0eeeaaabab655dd86444dcea8227f10c1c587e0
7
- data.tar.gz: a3b917ad7dbadf14a6840fa6c7ab9bbb476db48a6a4793161e4ad97b7b1ba95ec0d9c0b8bbb4a371d5a9c0d7dc8a62f479dd0a18ec919b9bb048344afa3f0a2b
6
+ metadata.gz: df02e8d1d7d607a7e6014ea90f0fb6c1e17db5e33b49d23a12761fe03285df73f3eb275fea4263a6cb2328af96684cfcc14014580005dad41da4f51009c2fcbf
7
+ data.tar.gz: 400d2135a13e09bafb5f062924455424bd6c97129477ddba416a96c3c439d75b274d67f0af375c227a102012a150392125b51a8140c588212bb5b399184701d7
data/README.md CHANGED
@@ -8,6 +8,9 @@ The assumptions `branch` makes are:
8
8
 
9
9
  ![Screenshot](screenshot.png)
10
10
 
11
+ ## Installation
12
+ `gem install branch_cli`
13
+
11
14
  ## Basic usage
12
15
 
13
16
  - Use `branch` as an alternative for `git status`
data/branch_cli.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'branch_cli'
6
- gem.version = '0.7.0'
6
+ gem.version = '0.7.1'
7
7
  gem.authors = ['Daniel Inkpen']
8
8
  gem.email = ['dan2552@gmail.com']
9
9
  gem.description = %q{Faster, safer git branching.}
@@ -97,7 +97,7 @@ def resetToOrigin
97
97
  end
98
98
 
99
99
  def printCurrentBranch
100
- let branchName = getCurrentBranch&.name || "no branch"
100
+ let branchName = (getCurrentBranch && getCurrentBranch.name) || "no branch"
101
101
  prettyPrint("On branch #{branchName.s.Bold}")
102
102
  end
103
103
 
@@ -20,7 +20,7 @@ class Options < SwiftObject
20
20
  return suppliedBranch != nil
21
21
  end
22
22
 
23
- def loadOptions(arguments:)
23
+ def loadOptions(arguments: nil)
24
24
  if arguments.contains("help") || arguments.contains("--help")
25
25
  self.isHelp = true
26
26
  end
@@ -1,7 +1,10 @@
1
1
  class String
2
- def matches(forRegex:)
2
+ def matches(forRegex: nil)
3
3
  lines = split("\n")
4
- lines.map { |l| l.match(forRegex)&.captures }.flatten.compact
4
+ lines.map do |l|
5
+ match = l.match(forRegex)
6
+ match && match.captures
7
+ end.flatten.compact
5
8
  end
6
9
 
7
10
  def clearQuotes
@@ -9,20 +9,20 @@ end
9
9
  class SwiftObject
10
10
  def self.let(*args)
11
11
  bind = binding.of_caller(1)
12
- bind.local_variables.each do |v|
12
+ bind.eval("local_variables").each do |v|
13
13
  attr_reader(v)
14
14
 
15
- variable_defaults[v] = bind.local_variable_get(v)
15
+ variable_defaults[v] = bind.eval("#{v}")
16
16
  end
17
17
  end
18
18
 
19
19
  def self.var(*args)
20
20
  bind = binding.of_caller(1)
21
- bind.local_variables.each do |v|
21
+ bind.eval("local_variables").each do |v|
22
22
  attr_reader(v)
23
23
  attr_writer(v)
24
24
 
25
- variable_defaults[v] = bind.local_variable_get(v)
25
+ variable_defaults[v] = bind.eval("#{v}")
26
26
  end
27
27
  end
28
28
 
@@ -64,7 +64,7 @@ class String
64
64
  start_with?(str)
65
65
  end
66
66
 
67
- def components(separatedBy:)
67
+ def components(separatedBy: ",")
68
68
  split(separatedBy)
69
69
  end
70
70
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: branch_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Inkpen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-20 00:00:00.000000000 Z
11
+ date: 2017-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: formatador
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.2.5
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.2.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: inquirer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.2.1
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.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: binding_of_caller
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.7.2
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.7.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.6'
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: '3.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.10.4
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.10.4
83
83
  description: Faster, safer git branching.
@@ -88,8 +88,8 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - ".gitignore"
92
- - ".rspec"
91
+ - .gitignore
92
+ - .rspec
93
93
  - Gemfile
94
94
  - Gemfile.lock
95
95
  - LICENSE
@@ -122,17 +122,17 @@ require_paths:
122
122
  - lib
123
123
  required_ruby_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - ">="
125
+ - - '>='
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ">="
130
+ - - '>='
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.6.8
135
+ rubygems_version: 2.0.14.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Branch aims to simplify a developer's daily workflow of Git. It is in no