zorro 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 +1 -0
- data/bin/zorro +72 -0
- data/lib/zorro/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bf2371a7163ec0d58e26b64371370acd4393ed3
|
4
|
+
data.tar.gz: 809f31a0420801899a86a247160a57b454a7fb4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d010096be5940684d93b5d3c2ec73946b68f45433298e6ed593fb2fbf582b7d6dec11e8422540e3e4c33f417d53ffe8aaa15abcce9b733c11bd8e7ea88af6dc0
|
7
|
+
data.tar.gz: 61fa69b2db49fbeba5e046643b6964b5e89e166cd37dbcfc4c27530b173a6e819c077911358bb771c1437b610bf80c0098d2c5a5f3e1bee04005c96bbf80e3ce
|
data/.gitignore
CHANGED
data/bin/zorro
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'commander/import'
|
5
|
+
require 'yaml'
|
6
|
+
|
7
|
+
# Without .zorro.yml
|
8
|
+
#
|
9
|
+
# zorro bitbucket --account zigotto --repo zorro
|
10
|
+
# zorro bitbucket --account zigotto --repo zorro --open branches
|
11
|
+
# zorro bitbucket --account zigotto --repo zorro --open pulls
|
12
|
+
# zorro bitbucket --account zigotto --repo zorro --open source
|
13
|
+
#
|
14
|
+
# With .zorro.yml
|
15
|
+
#
|
16
|
+
# bitbucket:
|
17
|
+
# :account: zigotto
|
18
|
+
# :repo: zorro
|
19
|
+
# :open: root
|
20
|
+
#
|
21
|
+
# zorro
|
22
|
+
# zorro --open branches
|
23
|
+
# zorro --open pulls
|
24
|
+
# zorro --open source
|
25
|
+
|
26
|
+
program :version, '0.0.1'
|
27
|
+
program :description, 'Zorro FTW!'
|
28
|
+
|
29
|
+
command :bitbucket do |c|
|
30
|
+
c.syntax = 'zorro bitbucket [options]'
|
31
|
+
c.description = 'Helps you interact with Bitbucket'
|
32
|
+
c.example 'Opens the repository branches', 'zorro --account bitbucket_username --repo my_repo --open branches'
|
33
|
+
|
34
|
+
c.option '--account STRING', String, 'You bitbucket account name'
|
35
|
+
c.option '--repo STRING', String, 'Repository name'
|
36
|
+
c.option '--open STRING', String, 'You can use (branches, pulls or source)'
|
37
|
+
|
38
|
+
c.action do |args, options|
|
39
|
+
|
40
|
+
config_file = File.join(File.expand_path('.'), '.zorro.yml')
|
41
|
+
options.default YAML.load_file(config_file)['bitbucket'] if File.exists?(config_file)
|
42
|
+
|
43
|
+
case options.open
|
44
|
+
when 'branches'
|
45
|
+
`open https://bitbucket.org/#{options.account}/#{options.repo}/branches`
|
46
|
+
when 'pulls'
|
47
|
+
`open https://bitbucket.org/#{options.account}/#{options.repo}/pull-requests`
|
48
|
+
when 'source'
|
49
|
+
`open https://bitbucket.org/#{options.account}/#{options.repo}/src`
|
50
|
+
when 'root'
|
51
|
+
`open https://bitbucket.org/#{options.account}/#{options.repo}`
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
default_command :bitbucket
|
57
|
+
|
58
|
+
command :trello do |c|
|
59
|
+
c.syntax = 'zorro trello [options]'
|
60
|
+
c.description = 'Helps you interact with Trello'
|
61
|
+
c.example 'Opens the project page', 'zorro trello --url https://trello.com/b/zxPDMIWO/intelrisk-x-zigotto'
|
62
|
+
|
63
|
+
c.option '--id STRING', String, 'You board ID'
|
64
|
+
|
65
|
+
c.action do |args, options|
|
66
|
+
|
67
|
+
config_file = File.join(File.expand_path('.'), '.zorro.yml')
|
68
|
+
options.default YAML.load_file(config_file)['trello'] if File.exists?(config_file)
|
69
|
+
|
70
|
+
`open https://trello.com/b/#{options.id}`
|
71
|
+
end
|
72
|
+
end
|
data/lib/zorro/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zorro
|
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
|
- Jesus Lopes
|
@@ -55,7 +55,8 @@ dependencies:
|
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- jlopes@zigotto.com.br
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- zorro
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
@@ -64,6 +65,7 @@ files:
|
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|
66
67
|
- Rakefile
|
68
|
+
- bin/zorro
|
67
69
|
- lib/zorro.rb
|
68
70
|
- lib/zorro/version.rb
|
69
71
|
- zorro.gemspec
|