gitan 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. data/CHANGES +12 -8
  2. data/VERSION +1 -1
  3. data/bin/gitan +15 -10
  4. data/gitan.gemspec +2 -2
  5. metadata +3 -3
data/CHANGES CHANGED
@@ -1,20 +1,24 @@
1
1
  = Gitan changelog
2
2
 
3
3
  == Master for 0.0.3
4
+ * small revision on usage.
5
+ * gitan status -a option changed to be -A.
6
+ * gitan status is added an option of --argument.
4
7
 
5
8
  == Version 0.0.2
6
- * Bugfix of to_be_pushed; to be false just after git pull.
9
+ * bugfix of Gitan::Repo#to_be_pushed; to be false just after git pull.
10
+ * bugfix of Gitan::REpo#to_be_staged.
7
11
  * add bin/gitan
8
- * add gitan subcommand, gitan status, alternatively to bin/gitanstatus
9
- * add gitan subcommand, gitan heads
10
- * add gitan subcommand, gitan commit
11
- * add gitan subcommand, gitan push
12
- * add gitan subcommand, gitan pull
12
+ * add gitan subcommand, 'gitan status', alternatively to bin/gitanstatus
13
+ * add gitan subcommand, 'gitan heads'
14
+ * add gitan subcommand, 'gitan commit'
15
+ * add gitan subcommand, 'gitan push'
16
+ * add gitan subcommand, 'gitan pull'
13
17
  * add --remote option to 'gitan status'
14
- * add --all and --explain options to gitan status
18
+ * add --all and --explain options to 'gitan status'
15
19
 
16
20
  == Version 0.0.1
17
- * small bugfix for executable bin/gitanstatus
21
+ * bugfix for executable bin/gitanstatus
18
22
 
19
23
  == Version 0.0.0
20
24
  * add Gitan::Repo
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/gitan CHANGED
@@ -6,7 +6,8 @@
6
6
  #
7
7
  #gitan status
8
8
  # Show status of every git working trees.
9
- # Confirm the command 'git rev-parse FETCH_HEAD' show a hash value.
9
+ # You should confirm the command 'git rev-parse FETCH_HEAD'
10
+ # shows a hash value.
10
11
  # If not, you should execute 'git pull'
11
12
  #
12
13
  #gitan commit
@@ -16,7 +17,7 @@
16
17
  # Commit every working tree that has changes to be pushed.
17
18
  #
18
19
  #gitan pull
19
- # Pull every working tree that has update on remote.
20
+ # Pull every working tree that has updates on remote repository.
20
21
 
21
22
  require "optparse"
22
23
  require "yaml"
@@ -26,17 +27,17 @@ require "gitan"
26
27
  def show_usage
27
28
  puts <<-HERE
28
29
  USAGE
29
- gitan heads [path]"
30
- gitan status [path] [-r remote_dir]"
31
- gitan commit [path] [-a arguments]"
32
- gitan push [path] [-a arguments]"
33
- gitan pull [path] [-a arguments] [-r remote_dir]"
30
+ gitan heads [path]
31
+ gitan status [path] [--argument=str] [-r remote_dir]
32
+ gitan commit [path] [--argument=str]
33
+ gitan push [path] [--argument=str]
34
+ gitan pull [path] [--argument=str] [-r remote_dir]
34
35
 
35
36
  Default value of 'path' is ~/git.
36
37
 
37
38
  Examples:
38
39
  gitan heads /home/git
39
- gitan status -r example.com:/home/git
40
+ gitan status -r example.com:/home/git --argument="-s"
40
41
  gitan commit --argument='-am "commit message"'
41
42
  gitan push -a "origin master"
42
43
  gitan pull ~/git -r example.com:/home/git -a "origin master"
@@ -60,7 +61,6 @@ def repositories(remote_heads = {})
60
61
  git_dir = ENV["HOME"] + "/git"
61
62
  git_dir = File::expand_path(ARGV[0]) if ARGV[0]
62
63
 
63
-
64
64
  dirs = Dir.glob(git_dir + "/*").sort.map do |path|
65
65
  if File.directory? path
66
66
  remote_head = nil
@@ -82,7 +82,8 @@ end
82
82
 
83
83
  def status
84
84
  add_remote_option
85
- OPTION_PARSER.on("-a", "--all", "show all repositories."){ OPTIONS[:all] = true}
85
+ add_argument_option
86
+ OPTION_PARSER.on("-A", "--all", "show all repositories."){ OPTIONS[:all] = true}
86
87
  OPTION_PARSER.on("-e", "--explain", "show explanation for abbreviation."){ OPTIONS[:explain] = true}
87
88
  OPTION_PARSER.parse!(ARGV)
88
89
 
@@ -102,6 +103,10 @@ def status
102
103
  Gitan::Repo.show_abbreviation if OPTIONS[:explain]
103
104
  repos.each do |repo|
104
105
  puts repo.short_status
106
+ #pp OPTION
107
+ if OPTIONS[:argument]
108
+ execute(repo.path, "git status #{OPTIONS[:argument]}")
109
+ end
105
110
  end
106
111
  end
107
112
 
data/gitan.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gitan"
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ippei94da"]
12
- s.date = "2013-09-09"
12
+ s.date = "2013-12-20"
13
13
  s.description = "This gem provides some commands to manage multiple git repositories."
14
14
  s.email = "ippei94da@gmail.com"
15
15
  s.executables = ["gitan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-09-09 00:00:00.000000000 Z
12
+ date: 2013-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  segments:
131
131
  - 0
132
- hash: -792430867
132
+ hash: -684982509
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  none: false
135
135
  requirements: