taco_it 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/taco +27 -2
- data/lib/taco.rb +27 -2
- metadata +2 -2
data/bin/taco
CHANGED
@@ -646,6 +646,12 @@ EOT
|
|
646
646
|
Issue::TEMPLATE.gsub(/%{.*?}/, '').strip
|
647
647
|
end
|
648
648
|
end
|
649
|
+
|
650
|
+
def push(opts)
|
651
|
+
opts[:message] ||= 'turn and face the strange'
|
652
|
+
cmd = "git add . && git commit -am '#{opts[:message]}' && git push"
|
653
|
+
system(cmd)
|
654
|
+
end
|
649
655
|
|
650
656
|
private
|
651
657
|
def parse_rc
|
@@ -700,7 +706,7 @@ end
|
|
700
706
|
require 'commander/import'
|
701
707
|
|
702
708
|
program :name, 'taco'
|
703
|
-
program :version, '1.
|
709
|
+
program :version, '1.1.2'
|
704
710
|
program :description, 'simple command line issue tracking'
|
705
711
|
|
706
712
|
command :init do |c|
|
@@ -768,7 +774,6 @@ command :show do |c|
|
|
768
774
|
c.syntax = 'taco show <issue id0..issue idN>'
|
769
775
|
c.summary = 'display details for one or more Issues'
|
770
776
|
c.description = 'Display details for one or more Issues'
|
771
|
-
|
772
777
|
c.example 'show Issue by id', 'taco show 9f9c52ce1ced4ace878155c3a98cced0'
|
773
778
|
c.example 'show Issue by unique id fragment', 'taco show ce1ced'
|
774
779
|
c.example 'show two Issues by unique id fragment', 'taco show ce1ced bc2de4'
|
@@ -832,3 +837,23 @@ command :template do |c|
|
|
832
837
|
end
|
833
838
|
end
|
834
839
|
end
|
840
|
+
|
841
|
+
command :push do |c|
|
842
|
+
c.syntax = 'taco push'
|
843
|
+
c.summary = 'Add, commit, and push all changes to git remote.'
|
844
|
+
c.description = 'Shortcut for: git add . && git commit -a && git push'
|
845
|
+
|
846
|
+
c.option '--message STRING', String, 'Override the default commit message.'
|
847
|
+
|
848
|
+
c.action do |args, options|
|
849
|
+
begin
|
850
|
+
# FIXME: merge this kind of thing into commander: tell it how many arguments we expect.
|
851
|
+
raise ArgumentError.new("Unexpected arguments: #{args.join(', ')}") unless args.size == 0
|
852
|
+
|
853
|
+
puts cli.push({ :message => options.message })
|
854
|
+
rescue Exception => e
|
855
|
+
puts "Error: #{e}"
|
856
|
+
exit 1
|
857
|
+
end
|
858
|
+
end
|
859
|
+
end
|
data/lib/taco.rb
CHANGED
@@ -646,6 +646,12 @@ EOT
|
|
646
646
|
Issue::TEMPLATE.gsub(/%{.*?}/, '').strip
|
647
647
|
end
|
648
648
|
end
|
649
|
+
|
650
|
+
def push(opts)
|
651
|
+
opts[:message] ||= 'turn and face the strange'
|
652
|
+
cmd = "git add . && git commit -am '#{opts[:message]}' && git push"
|
653
|
+
system(cmd)
|
654
|
+
end
|
649
655
|
|
650
656
|
private
|
651
657
|
def parse_rc
|
@@ -700,7 +706,7 @@ end
|
|
700
706
|
require 'commander/import'
|
701
707
|
|
702
708
|
program :name, 'taco'
|
703
|
-
program :version, '1.
|
709
|
+
program :version, '1.1.2'
|
704
710
|
program :description, 'simple command line issue tracking'
|
705
711
|
|
706
712
|
command :init do |c|
|
@@ -768,7 +774,6 @@ command :show do |c|
|
|
768
774
|
c.syntax = 'taco show <issue id0..issue idN>'
|
769
775
|
c.summary = 'display details for one or more Issues'
|
770
776
|
c.description = 'Display details for one or more Issues'
|
771
|
-
|
772
777
|
c.example 'show Issue by id', 'taco show 9f9c52ce1ced4ace878155c3a98cced0'
|
773
778
|
c.example 'show Issue by unique id fragment', 'taco show ce1ced'
|
774
779
|
c.example 'show two Issues by unique id fragment', 'taco show ce1ced bc2de4'
|
@@ -832,3 +837,23 @@ command :template do |c|
|
|
832
837
|
end
|
833
838
|
end
|
834
839
|
end
|
840
|
+
|
841
|
+
command :push do |c|
|
842
|
+
c.syntax = 'taco push'
|
843
|
+
c.summary = 'Add, commit, and push all changes to git remote.'
|
844
|
+
c.description = 'Shortcut for: git add . && git commit -a && git push'
|
845
|
+
|
846
|
+
c.option '--message STRING', String, 'Override the default commit message.'
|
847
|
+
|
848
|
+
c.action do |args, options|
|
849
|
+
begin
|
850
|
+
# FIXME: merge this kind of thing into commander: tell it how many arguments we expect.
|
851
|
+
raise ArgumentError.new("Unexpected arguments: #{args.join(', ')}") unless args.size == 0
|
852
|
+
|
853
|
+
puts cli.push({ :message => options.message })
|
854
|
+
rescue Exception => e
|
855
|
+
puts "Error: #{e}"
|
856
|
+
exit 1
|
857
|
+
end
|
858
|
+
end
|
859
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taco_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commander
|