zorro 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/bin/zorro +72 -0
  4. data/lib/zorro/version.rb +1 -1
  5. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1987c608a8d86867cc0526bc98e0b0212f2998b
4
- data.tar.gz: 8cca4fba8e0d11136f1deeb35281260f294efb61
3
+ metadata.gz: 3bf2371a7163ec0d58e26b64371370acd4393ed3
4
+ data.tar.gz: 809f31a0420801899a86a247160a57b454a7fb4a
5
5
  SHA512:
6
- metadata.gz: a257a89613f3db62b3204ed93bb409e6adc6b2935e0cb2f88d37f0eaf8c8d4c7068062a0b2d4f65cc84eafc2fd648d6b1e92252d2d3255221ad75e4910bf1b44
7
- data.tar.gz: df81e1c23f4e1d5c2cddd9731bbaa20aed1030c5287cf45f8e3920340de19c92b40d8127b93c57be55f7cdca394064c3014f0e8a5fa7ada7cf356ef7e53d7c4a
6
+ metadata.gz: d010096be5940684d93b5d3c2ec73946b68f45433298e6ed593fb2fbf582b7d6dec11e8422540e3e4c33f417d53ffe8aaa15abcce9b733c11bd8e7ea88af6dc0
7
+ data.tar.gz: 61fa69b2db49fbeba5e046643b6964b5e89e166cd37dbcfc4c27530b173a6e819c077911358bb771c1437b610bf80c0098d2c5a5f3e1bee04005c96bbf80e3ce
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+ .zorro.yml
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Zorro
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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