penchant 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Penchant
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/script/gemfile CHANGED
@@ -4,7 +4,6 @@ require 'rubygems'
4
4
  require 'penchant'
5
5
 
6
6
  if Penchant::Gemfile.do_full_env_switch!(ARGV[0])
7
- system %{bundle}
8
7
  puts "Gemfile switched to #{ARGV[0]}"
9
8
  else
10
9
  exit 0
@@ -21,3 +21,4 @@ if [ "$(penchant gemfile-env)" != "remote deployment" ]; then
21
21
  git add Gemfile*
22
22
  fi
23
23
 
24
+ exit 0
@@ -1,4 +1,4 @@
1
1
  #!/bin/bash
2
2
 
3
- # this is now handled in commit-msg, to allow for skipping of test running based on the commit message
3
+ # this has been moved to commit-msg
4
4
 
@@ -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 => (['"])(.*)\1}, 2]
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,4 +1,5 @@
1
1
  #!/bin/bash
2
2
 
3
+ unset GIT_DIR
3
4
  penchant gemfile remote --switch-back
4
5
 
@@ -1,19 +1,4 @@
1
1
  #!/bin/bash
2
2
 
3
- OLD_GIT_DIR=$GIT_DIR
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.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: -2805133852426367993
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: -2805133852426367993
82
+ hash: 826851711402513730
82
83
  requirements: []
83
84
  rubyforge_project: penchant
84
85
  rubygems_version: 1.8.17