git-gems 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/git/gems/cli.rb +11 -9
- data/lib/git/gems/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b78f169778098dd843eba2f5f3527b3f7eac4b12
|
4
|
+
data.tar.gz: bd95c9845c9bd911ef548d6fbd253fad71edc2e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 116e5037b2c78b4b02c7c36950b84eb9c328f936605234046cde20477322c5aac7987be9716e83c0c7cbd864f11b84c71ef781f54e21b8be03d471141c66e842
|
7
|
+
data.tar.gz: 12fe8db8dad7612e729479d07c7c2edfce0eb8c1f56ae609b423eaef92e5d79e18aad860d9a41ed7293bd5046048a1c7dbfd80d2f8d8cc3bccfb877641c6e8e9
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ make a template of the repository nor a rack app without also be of gem.
|
|
38
38
|
`release_tag` command:
|
39
39
|
taged for release. Tag name is the default YYYYMMDDHHmm.
|
40
40
|
|
41
|
-
git gems release_tag [
|
41
|
+
git gems release_tag [--version][version_name]
|
42
42
|
|
43
43
|
`exec` command:
|
44
44
|
The runs are passed to the bundle exec option if it does not support came over. Argument is also in accordance with the rules of the `bundle exec`.
|
data/lib/git/gems/cli.rb
CHANGED
@@ -24,20 +24,20 @@ module Git
|
|
24
24
|
end
|
25
25
|
|
26
26
|
public
|
27
|
-
option :path,
|
28
|
-
option :binstubs,
|
29
|
-
desc "
|
27
|
+
option :path, :default => default_install_path
|
28
|
+
option :binstubs, :default => default_binstubs_path
|
29
|
+
desc "install [OPTIONS]","do bundle install."
|
30
30
|
def install(*args)
|
31
|
-
exec_cmd "bundle install --path=#{options[:path]} --binstubs=#{options[:binstubs]}"
|
31
|
+
exec_cmd "bundle install --path=#{options[:path]} --binstubs=#{options[:binstubs]} #{args.join(%{ })}"
|
32
32
|
end
|
33
33
|
default_task :install
|
34
34
|
|
35
|
-
desc '
|
35
|
+
desc 'exec [COMMAND] [OPTIONS]','do bundle exec .'
|
36
36
|
def exec(cmd, *args)
|
37
37
|
exec_cmd "bundle exec #{cmd} #{args.join(%{ })}"
|
38
38
|
end
|
39
39
|
|
40
|
-
desc '
|
40
|
+
desc 'init','initilalize ruby project'
|
41
41
|
def init()
|
42
42
|
%w(Rakefile Gemfile README.md).each do |f|
|
43
43
|
exec_cmd "cp -a #{File.expand_path("../../../../fixtures/#{f}.template", __FILE__)} ./#{f}"
|
@@ -47,10 +47,12 @@ module Git
|
|
47
47
|
exec_cmd "git init"
|
48
48
|
end
|
49
49
|
|
50
|
-
option :version,
|
51
|
-
|
52
|
-
|
50
|
+
option :version, :default => Time.now.strftime("%Y%m%d%H%M")
|
51
|
+
option :push, :type => :boolean
|
52
|
+
desc 'release [--version] [version_name]', 'taged release-tag'
|
53
|
+
def release
|
53
54
|
exec_cmd "git tag -a 'release-#{options[:version]}'"
|
55
|
+
exec_cmd "git push origin --tags" if options[:push]
|
54
56
|
end
|
55
57
|
|
56
58
|
private
|
data/lib/git/gems/version.rb
CHANGED