penchant 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/penchant/version.rb +1 -1
- data/script/gemfile +0 -1
- data/script/hooks/commit-msg +1 -0
- data/script/hooks/pre-commit +1 -1
- data/script/initialize-environment +1 -1
- data/template/script/hooks/commit-msg +24 -0
- data/template/script/hooks/post-commit +1 -0
- data/template/script/hooks/pre-commit +1 -16
- metadata +4 -3
data/lib/penchant/version.rb
CHANGED
data/script/gemfile
CHANGED
data/script/hooks/commit-msg
CHANGED
data/script/hooks/pre-commit
CHANGED
@@ -5,7 +5,7 @@ if File.file?('Gemfile.erb')
|
|
5
5
|
|
6
6
|
Dir.chdir '..' do
|
7
7
|
File.readlines(File.join(pwd, 'Gemfile.erb')).find_all { |line| line[':git'] }.each do |line|
|
8
|
-
repo = line[%r{:git => (['"])(
|
8
|
+
repo = line[%r{:git => (['"])([^'"]+)\1}, 2]
|
9
9
|
|
10
10
|
puts "Installing #{repo}"
|
11
11
|
system %{git clone #{repo}}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
msg=$(cat $1)
|
4
|
+
|
5
|
+
OLD_GIT_DIR=$GIT_DIR
|
6
|
+
|
7
|
+
if [[ "${msg}" != *"[ci skip]"* ]]; then
|
8
|
+
if [ "$(penchant gemfile-env)" != "remote" ]; then
|
9
|
+
penchant gemfile remote
|
10
|
+
fi
|
11
|
+
|
12
|
+
bundle exec rake
|
13
|
+
R=$?
|
14
|
+
if [ $R -ne 0 ]; then exit $R; fi
|
15
|
+
fi
|
16
|
+
|
17
|
+
if [ "$(penchant gemfile-env)" != "remote deployment" ]; then
|
18
|
+
unset GIT_DIR
|
19
|
+
penchant gemfile remote --deployment
|
20
|
+
GIT_DIR=$OLD_GIT_DIR
|
21
|
+
git add Gemfile*
|
22
|
+
fi
|
23
|
+
|
24
|
+
exit 0
|
@@ -1,19 +1,4 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
if [ "$(penchant gemfile-env)" != "remote" ]; then
|
6
|
-
penchant gemfile remote
|
7
|
-
fi
|
8
|
-
|
9
|
-
bundle exec rake
|
10
|
-
R=$?
|
11
|
-
if [ $R -ne 0 ]; then exit $R; fi
|
12
|
-
|
13
|
-
if [ "$(penchant gemfile-env)" != "remote deployment" ]; then
|
14
|
-
unset GIT_DIR
|
15
|
-
penchant gemfile remote --deployment
|
16
|
-
GIT_DIR=$OLD_GIT_DIR
|
17
|
-
git add Gemfile*
|
18
|
-
fi
|
3
|
+
# this has been moved to commit-msg
|
19
4
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: penchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- spec/lib/penchant_spec.rb
|
52
52
|
- spec/spec_helper.rb
|
53
53
|
- template/script/gemfile
|
54
|
+
- template/script/hooks/commit-msg
|
54
55
|
- template/script/hooks/post-commit
|
55
56
|
- template/script/hooks/pre-commit
|
56
57
|
- template/script/initialize-environment
|
@@ -69,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
70
|
version: '0'
|
70
71
|
segments:
|
71
72
|
- 0
|
72
|
-
hash:
|
73
|
+
hash: 826851711402513730
|
73
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
75
|
none: false
|
75
76
|
requirements:
|
@@ -78,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
79
|
version: '0'
|
79
80
|
segments:
|
80
81
|
- 0
|
81
|
-
hash:
|
82
|
+
hash: 826851711402513730
|
82
83
|
requirements: []
|
83
84
|
rubyforge_project: penchant
|
84
85
|
rubygems_version: 1.8.17
|