zio 0.0.2 → 0.0.3
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 +4 -4
- data/.gitignore +2 -1
- data/lib/zio/branch.rb +13 -13
- data/lib/zio/up.rb +2 -3
- data/lib/zio/version.rb +1 -1
- data/zio.gemspec +1 -1
- metadata +6 -7
- data/Gemfile.lock +0 -113
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52403445fc9727cf1916c1a85624ca3d9ae1326d
|
4
|
+
data.tar.gz: 0a1cd727f98a07d017f42a61673000ff150bdc9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de0de46ae91ba696828d174f80f9ddd0db13f69a5cfa099cfda297c9f8e68994a64a027fbbb5996396219add57423110e32c3f72730af3ed56fa155d546c73e2
|
7
|
+
data.tar.gz: edeb75423017cbd2fa819f3a380d4640336d72d51f4a86c20446d32bfdb351c340d1984169b0d99b8d2897e4d4503b160f1b92daf8597f1f588e6b60561364d7
|
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
# Created by .ignore support plugin (hsz.mobi)
|
1
|
+
# Created by .ignore support plugin (hsz.mobi)
|
2
|
+
Gemfile.lock
|
data/lib/zio/branch.rb
CHANGED
@@ -3,39 +3,39 @@ require 'open3'
|
|
3
3
|
module Zio
|
4
4
|
class Branch
|
5
5
|
attr_accessor :options
|
6
|
-
def initialize(options={})
|
6
|
+
def initialize(options = {})
|
7
7
|
@options = options
|
8
8
|
raise MISSING_ARGUMENTS unless options[:dir] || options[:set]
|
9
9
|
end
|
10
10
|
|
11
11
|
def checkout
|
12
12
|
_paths.each do |path|
|
13
|
-
#
|
14
|
-
puts
|
13
|
+
puts sprintf("\nProcessing - #{path}").color(:green)
|
14
|
+
puts sprintf('---------------------------').color(:green)
|
15
15
|
stdout, stderr, status = Open3.capture3("cd #{path} && git stash && git rev-parse --verify #{options[:branch]}")
|
16
16
|
|
17
17
|
# Branch does not exists
|
18
|
-
if status.exitstatus != 0
|
19
|
-
|
18
|
+
if status.exitstatus != 0
|
19
|
+
puts "Branch #{options[:branch]} does not exists yet!".color(:blue)
|
20
|
+
if options[:force]
|
21
|
+
puts "Creating new branch - #{options[:branch]}".color(:blue)
|
22
|
+
stdout, stderr, status = Open3.capture3(
|
20
23
|
"cd #{path} && git checkout #{options[:base_branch]} && git checkout -b #{options[:branch]}"
|
21
|
-
|
24
|
+
)
|
25
|
+
puts stdout.color(:blue)
|
26
|
+
end
|
22
27
|
else
|
23
28
|
stdout, stderr, status = Open3.capture3("cd #{path} && git checkout #{options[:branch]}")
|
29
|
+
puts sprintf("%s%s", stderr.color(:red), stdout.color(:blue))
|
24
30
|
end
|
25
31
|
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
29
|
-
def pull(path)
|
30
|
-
stdout, stderr, status = Open3.capture3("cd #{path} && git stash && git checkout master && git pull --rebase")
|
31
|
-
publish 'up_capture_complete', [path, stdout, stderr, status]
|
32
32
|
end
|
33
33
|
|
34
34
|
def _paths
|
35
35
|
return options[:set] unless options[:set].nil?
|
36
36
|
@_paths ||= begin
|
37
37
|
Dir.foreach(options[:dir]).map do |path|
|
38
|
-
next if path == '.' || path == '..' || !File.
|
38
|
+
next if path == '.' || path == '..' || !File.exist?(File.expand_path(path, options[:dir]) + '/.git')
|
39
39
|
ab_path = File.expand_path(path, options[:dir])
|
40
40
|
File.directory?(ab_path) ? ab_path : nil
|
41
41
|
end.compact
|
data/lib/zio/up.rb
CHANGED
@@ -31,11 +31,10 @@ module Zio
|
|
31
31
|
end
|
32
32
|
data = out.shift
|
33
33
|
path, stdout, stderr, status = *data
|
34
|
-
|
35
|
-
puts sprintf("\nProcessing - #{dirname}").color(:green)
|
34
|
+
puts sprintf("\nProcessing - #{path}").color(:green)
|
36
35
|
puts sprintf('---------------------------').color(:green)
|
37
36
|
if status.exitstatus == 0
|
38
|
-
puts sprintf('[%s] - %s',
|
37
|
+
puts sprintf('[%s] - %s', path, stdout).color(:blue)
|
39
38
|
else
|
40
39
|
STDERR.puts stderr.color(:red)
|
41
40
|
end
|
data/lib/zio/version.rb
CHANGED
data/zio.gemspec
CHANGED
@@ -20,6 +20,6 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency('rdoc')
|
21
21
|
s.add_development_dependency('aruba')
|
22
22
|
s.add_runtime_dependency('gli','2.13.1')
|
23
|
-
s.add_runtime_dependency('celluloid')
|
23
|
+
s.add_runtime_dependency('celluloid', '0.17.1.2')
|
24
24
|
s.add_runtime_dependency('rainbow')
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Your Name Here
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: celluloid
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.17.1.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.17.1.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rainbow
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,6 @@ files:
|
|
106
106
|
- ".gitignore"
|
107
107
|
- ".ruby-version"
|
108
108
|
- Gemfile
|
109
|
-
- Gemfile.lock
|
110
109
|
- README.rdoc
|
111
110
|
- Rakefile
|
112
111
|
- bin/zio
|
data/Gemfile.lock
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
zio (0.0.1)
|
5
|
-
celluloid
|
6
|
-
gli (= 2.13.1)
|
7
|
-
rainbow
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
aruba (0.9.0)
|
13
|
-
childprocess (~> 0.5.6)
|
14
|
-
contracts (~> 0.9)
|
15
|
-
cucumber (>= 1.3.19)
|
16
|
-
ffi (~> 1.9.10)
|
17
|
-
rspec-expectations (>= 2.99)
|
18
|
-
thor (~> 0.19)
|
19
|
-
builder (3.2.2)
|
20
|
-
celluloid (0.17.1.2)
|
21
|
-
bundler
|
22
|
-
celluloid-essentials
|
23
|
-
celluloid-extras
|
24
|
-
celluloid-fsm
|
25
|
-
celluloid-pool
|
26
|
-
celluloid-supervision
|
27
|
-
dotenv
|
28
|
-
nenv
|
29
|
-
rspec-logsplit (>= 0.1.2)
|
30
|
-
timers (>= 4.1.1)
|
31
|
-
celluloid-essentials (0.20.2.1)
|
32
|
-
bundler
|
33
|
-
dotenv
|
34
|
-
nenv
|
35
|
-
rspec-logsplit (>= 0.1.2)
|
36
|
-
timers (>= 4.1.1)
|
37
|
-
celluloid-extras (0.20.1)
|
38
|
-
bundler
|
39
|
-
dotenv
|
40
|
-
nenv
|
41
|
-
rspec-logsplit (>= 0.1.2)
|
42
|
-
timers (>= 4.1.1)
|
43
|
-
celluloid-fsm (0.20.1)
|
44
|
-
bundler
|
45
|
-
dotenv
|
46
|
-
nenv
|
47
|
-
rspec-logsplit (>= 0.1.2)
|
48
|
-
timers (>= 4.1.1)
|
49
|
-
celluloid-pool (0.20.1)
|
50
|
-
bundler
|
51
|
-
dotenv
|
52
|
-
nenv
|
53
|
-
rspec-logsplit (>= 0.1.2)
|
54
|
-
timers (>= 4.1.1)
|
55
|
-
celluloid-supervision (0.20.1.1)
|
56
|
-
bundler
|
57
|
-
dotenv
|
58
|
-
nenv
|
59
|
-
rspec-logsplit (>= 0.1.2)
|
60
|
-
timers (>= 4.1.1)
|
61
|
-
childprocess (0.5.6)
|
62
|
-
ffi (~> 1.0, >= 1.0.11)
|
63
|
-
contracts (0.11.0)
|
64
|
-
cucumber (2.0.2)
|
65
|
-
builder (>= 2.1.2)
|
66
|
-
cucumber-core (~> 1.2.0)
|
67
|
-
diff-lcs (>= 1.1.3)
|
68
|
-
gherkin (~> 2.12)
|
69
|
-
multi_json (>= 1.7.5, < 2.0)
|
70
|
-
multi_test (>= 0.1.2)
|
71
|
-
cucumber-core (1.2.0)
|
72
|
-
gherkin (~> 2.12.0)
|
73
|
-
diff-lcs (1.2.5)
|
74
|
-
dotenv (2.0.2)
|
75
|
-
ffi (1.9.10)
|
76
|
-
ffi (1.9.10-java)
|
77
|
-
gherkin (2.12.2)
|
78
|
-
multi_json (~> 1.3)
|
79
|
-
gherkin (2.12.2-java)
|
80
|
-
multi_json (~> 1.3)
|
81
|
-
gli (2.13.1)
|
82
|
-
hitimes (1.2.2)
|
83
|
-
hitimes (1.2.2-java)
|
84
|
-
json (1.8.3)
|
85
|
-
json (1.8.3-java)
|
86
|
-
multi_json (1.11.2)
|
87
|
-
multi_test (0.1.2)
|
88
|
-
nenv (0.2.0)
|
89
|
-
rainbow (2.0.0)
|
90
|
-
rake (10.4.2)
|
91
|
-
rdoc (4.2.0)
|
92
|
-
json (~> 1.4)
|
93
|
-
rspec-expectations (3.3.1)
|
94
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.3.0)
|
96
|
-
rspec-logsplit (0.1.3)
|
97
|
-
rspec-support (3.3.0)
|
98
|
-
thor (0.19.1)
|
99
|
-
timers (4.1.1)
|
100
|
-
hitimes
|
101
|
-
|
102
|
-
PLATFORMS
|
103
|
-
java
|
104
|
-
ruby
|
105
|
-
|
106
|
-
DEPENDENCIES
|
107
|
-
aruba
|
108
|
-
rake
|
109
|
-
rdoc
|
110
|
-
zio!
|
111
|
-
|
112
|
-
BUNDLED WITH
|
113
|
-
1.10.6
|