git_reflow 0.6.5 → 0.6.6

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a03428bd10395a06f13dba78ed2d3c0f5a44d365
4
- data.tar.gz: 39ccbe0eba5a4bc2d1c8dd4f773abdaf2a4494e3
3
+ metadata.gz: bb81aa92d38e6c5b348ce8838f4c387ddcd93acb
4
+ data.tar.gz: d9e9551ff37a67dec4593a368f8fcd72080ad1c9
5
5
  SHA512:
6
- metadata.gz: cf391753fa8dce7bbc246b1310e83b7a30407462b69bb5a99e675b07adf3ca5ecf5a54b50e425db533a8d97f0b9b889c263010fbb60e3b2dc23da1e3a2cd6025
7
- data.tar.gz: dcfad07027cc0a827a62b614c2a8b1f201df578a46b8c8a710758c3103dffa1bfb4276d30908ab091bb55449bbbbe33bd9b85a6a0d1bdc7d069fcec868373b3f
6
+ metadata.gz: dede713a4bd84a1060afaf57de37a3edd797a64708c3e7e2ee9cfe3705ea28490f554723bfeb01b541da0becc239ad17eeeb6039d230361c3f53798a721d5c19
7
+ data.tar.gz: 8049748445af1ef7fe6b5d9c214d96aa06194ed430d32da8fcdb26c95aa107374b52a14da6f757aac59b1c165855622d715059bddea90973a7097ca5c698dee7
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_reflow (0.6.5)
5
- colorize (= 0.6.0)
4
+ git_reflow (0.6.6)
5
+ colorize (>= 0.7.0)
6
6
  github_api (= 0.12.3)
7
7
  gli (= 2.12.2)
8
8
  highline
@@ -22,7 +22,7 @@ GEM
22
22
  columnize (= 0.9.0)
23
23
  rb-readline (= 0.5.2)
24
24
  coderay (1.1.0)
25
- colorize (0.6.0)
25
+ colorize (0.7.7)
26
26
  columnize (0.9.0)
27
27
  crack (0.4.2)
28
28
  safe_yaml (~> 1.0.0)
@@ -115,4 +115,4 @@ DEPENDENCIES
115
115
  wwtd (= 0.7.0)
116
116
 
117
117
  BUNDLED WITH
118
- 1.10.5
118
+ 1.10.6
data/circle.yml CHANGED
@@ -1,16 +1,16 @@
1
1
  dependencies:
2
2
  pre:
3
3
  - rvm install 2.0.0
4
- - rvm install 2.1.6
5
- - rvm install 2.2.2
4
+ - rvm install 2.1.7
5
+ - rvm install 2.2.3
6
6
 
7
7
  override:
8
- - 'rvm-exec 2.0.0-p643 bundle install'
9
- - 'rvm-exec 2.1.6 bundle install'
10
- - 'rvm-exec 2.2.2 bundle install'
8
+ - 'rvm-exec 2.0.0-p647 bundle install'
9
+ - 'rvm-exec 2.1.7 bundle install'
10
+ - 'rvm-exec 2.2.3 bundle install'
11
11
 
12
12
  test:
13
13
  override:
14
- - 'rvm-exec 2.0.0-p643 bundle exec rake'
15
- - 'rvm-exec 2.1.6 bundle exec rake'
16
- - 'rvm-exec 2.2.2 bundle exec rake'
14
+ - 'rvm-exec 2.0.0-p647 bundle exec rake'
15
+ - 'rvm-exec 2.1.7 bundle exec rake'
16
+ - 'rvm-exec 2.2.3 bundle exec rake'
data/git_reflow.gemspec CHANGED
@@ -28,7 +28,7 @@ spec = Gem::Specification.new do |s|
28
28
  s.add_development_dependency('webmock')
29
29
  s.add_development_dependency('wwtd', '0.7.0')
30
30
 
31
- s.add_dependency('colorize', '0.6.0')
31
+ s.add_dependency('colorize', '>= 0.7.0')
32
32
  s.add_dependency('gli', '2.12.2')
33
33
  s.add_dependency('highline')
34
34
  s.add_dependency('httpclient')
@@ -26,7 +26,7 @@ command :review do |c|
26
26
 
27
27
  GitReflow.run("#{default_editor} #{pull_request_msg_file}", with_system: true)
28
28
 
29
- pr_msg = File.open(pull_request_msg_file).each_line.map(&:strip).to_a
29
+ pr_msg = File.read(pull_request_msg_file).split(/[\r\n]|\r\n/).map(&:strip)
30
30
  title = pr_msg.shift
31
31
 
32
32
  File.delete(pull_request_msg_file)
@@ -0,0 +1,23 @@
1
+ # Thanks to http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on
2
+ # and to Thoughtbot: https://github.com/thoughtbot/cocaine/blob/master/lib/cocaine/os_detector.rb
3
+ module GitReflow
4
+ class OSDetector
5
+ def windows?
6
+ (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
7
+ end
8
+
9
+ def mac?
10
+ (/darwin/ =~ RUBY_PLATFORM) != nil
11
+ end
12
+
13
+ def unix?
14
+ !OS.windows?
15
+ end
16
+
17
+ def linux?
18
+ OS.unix? and not OS.mac?
19
+ end
20
+ end
21
+
22
+ OS = OSDetector.new
23
+ end
@@ -15,11 +15,11 @@ module GitReflow
15
15
  if options[:with_system] == true
16
16
  system(command)
17
17
  elsif options[:loud] == true
18
- output = `#{command}`
18
+ output = %x{#{command}}
19
19
  puts output
20
20
  output
21
21
  else
22
- `#{command}`
22
+ %x{#{command}}
23
23
  end
24
24
  end
25
25
 
@@ -39,18 +39,17 @@ module GitReflow
39
39
 
40
40
  # WARNING: this currently only supports OS X and UBUNTU
41
41
  def ask_to_open_in_browser(url)
42
- if RUBY_PLATFORM =~ /darwin|linux/i
42
+ if OS.linux?
43
43
  open_in_browser = ask "Would you like to open it in your browser? "
44
44
  if open_in_browser =~ /^y/i
45
- if RUBY_PLATFORM =~ /darwin/i
46
- # OS X
45
+ if OS.mac?
47
46
  run "open #{url}"
48
47
  else
49
- # Ubuntu
50
48
  run "xdg-open #{url}"
51
49
  end
52
50
  end
53
51
  end
54
52
  end
53
+
55
54
  end
56
55
  end
@@ -1,3 +1,3 @@
1
1
  module GitReflow
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
data/lib/git_reflow.rb CHANGED
@@ -11,6 +11,7 @@ require 'git_reflow/config'
11
11
  require 'git_reflow/git_server'
12
12
  require 'git_reflow/git_server/git_hub'
13
13
  require 'git_reflow/git_server/bit_bucket'
14
+ require 'git_reflow/os_detector'
14
15
  require 'git_reflow/sandbox'
15
16
  require 'git_reflow/git_helpers'
16
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_reflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentino Stoll
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-08-31 00:00:00.000000000 Z
13
+ date: 2015-09-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: appraisal
@@ -128,16 +128,16 @@ dependencies:
128
128
  name: colorize
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: 0.6.0
133
+ version: 0.7.0
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 0.6.0
140
+ version: 0.7.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: gli
143
143
  requirement: !ruby/object:Gem::Requirement
@@ -256,6 +256,7 @@ files:
256
256
  - lib/git_reflow/git_server/base.rb
257
257
  - lib/git_reflow/git_server/bit_bucket.rb
258
258
  - lib/git_reflow/git_server/git_hub.rb
259
+ - lib/git_reflow/os_detector.rb
259
260
  - lib/git_reflow/sandbox.rb
260
261
  - lib/git_reflow/version.rb
261
262
  - spec/fixtures/git/git_config