review-tools 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/common_functions.sh +7 -0
- data/bin/git_checkout_target_branches.sh +4 -4
- data/bin/look_changes_of_routes.sh +50 -0
- data/bin/prepare_rails_and_frontend.sh +1 -4
- data/bin/run_review.sh +4 -1
- data/exe/look_changes_of_routes +6 -0
- data/lib/review/tools/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efa3ef4b9107dd04ee69430903e9dd07f2a6934ac18246ed81b664c7c45e53e2
|
4
|
+
data.tar.gz: f1fa973f98c0bd190c977b4f6f3436b9a61dd1a43d7f3698b1f56b91dfc7475a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eedfa1177a7a0935e58670a830613d50b4742b7935ce215007a29b7dea4a556c8732e95dd36262d990d6c63a39f322637622f0b98ce93042ff56ea33a977dfd
|
7
|
+
data.tar.gz: aedf8ab202ee8f822448649194c3756918e9c7f33805172b7ca4d4c79b80bb1a934bb6fc084ce3649a5058816720ae9bac64bc8c6344eeeb3e13209a4c64dc08
|
data/Gemfile.lock
CHANGED
data/bin/common_functions.sh
CHANGED
@@ -11,6 +11,9 @@ set -o xtrace
|
|
11
11
|
trap 'echo "Ctrl-C captured and exit."; exit 1' INT
|
12
12
|
trap 'echo "some error occured at $(pwd) and exit."; exit 8' SIGHUP
|
13
13
|
|
14
|
+
script_dir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
15
|
+
source "${script_dir}/common_functions.sh"
|
16
|
+
|
14
17
|
if [ $# -ne 4 ] || [ "$1" != "into" ] || [ "$3" != "from" ]; then
|
15
18
|
echo "Usage: git_checkout_target_branches into milestone/abc from feature/cde" 1>&2
|
16
19
|
exit 1
|
@@ -19,10 +22,7 @@ fi
|
|
19
22
|
dst_branch="$2"
|
20
23
|
src_branch="$4"
|
21
24
|
|
22
|
-
|
23
|
-
echo "Error: no git repository" 1>&2
|
24
|
-
exit 1
|
25
|
-
fi
|
25
|
+
check_if_git_dir
|
26
26
|
|
27
27
|
git checkout master
|
28
28
|
git fetch -a || true
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
#
|
3
|
+
# Usage: look_changes_of_routes.sh into milestone/abc from feature/cde
|
4
|
+
#
|
5
|
+
|
6
|
+
set -o errexit
|
7
|
+
set -o pipefail
|
8
|
+
set -o nounset
|
9
|
+
# set -o xtrace
|
10
|
+
|
11
|
+
trap 'echo "Ctrl-C captured and exit."; exit 1' INT
|
12
|
+
trap 'echo "some error occured at $(pwd) and exit."; exit 8' SIGHUP
|
13
|
+
|
14
|
+
script_dir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
15
|
+
source "${script_dir}/common_functions.sh"
|
16
|
+
|
17
|
+
if [ $# -ne 4 ] || [ "$1" != "into" ] || [ "$3" != "from" ]; then
|
18
|
+
echo "Usage: look_changes_of_routes into milestone/abc from feature/cde" 1>&2
|
19
|
+
exit 1
|
20
|
+
fi
|
21
|
+
|
22
|
+
dst_branch="$2"
|
23
|
+
src_branch="$4"
|
24
|
+
|
25
|
+
check_if_git_dir
|
26
|
+
|
27
|
+
if [ -x bin/rails ]; then
|
28
|
+
dst_routes="/tmp/dst_routes_$$.txt"
|
29
|
+
src_routes="/tmp/src_routes_$$.txt"
|
30
|
+
diff_file="/tmp/changes_of_routes_$$.txt"
|
31
|
+
|
32
|
+
git checkout "$dst_branch"
|
33
|
+
bundle exec bin/rake routes > ${dst_routes}
|
34
|
+
|
35
|
+
git checkout "$src_branch"
|
36
|
+
bundle exec bin/rake routes > ${src_routes}
|
37
|
+
|
38
|
+
diff -u ${dst_routes} ${src_routes} > ${diff_file}
|
39
|
+
if [ -s ${diff_file} ]; then
|
40
|
+
echo '========= changes of routes ==========='
|
41
|
+
cat ${diff_file}
|
42
|
+
echo '======================================='
|
43
|
+
else
|
44
|
+
echo '========= changes of routes: NO ROUTE CHANGES ==========='
|
45
|
+
fi
|
46
|
+
|
47
|
+
rm -f ${dst_routes} ${src_routes} ${diff_file}
|
48
|
+
else
|
49
|
+
echo "Warning: no bin/rake command. So skiped looking changes of routes" 1>&2
|
50
|
+
fi
|
@@ -22,10 +22,7 @@ trap 'echo "some error occured at $(pwd) and exit."; exit 8' SIGHUP
|
|
22
22
|
script_dir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
23
23
|
source "${script_dir}/common_functions.sh"
|
24
24
|
|
25
|
-
|
26
|
-
echo "Error: no git repository" 1>&2
|
27
|
-
exit 1
|
28
|
-
fi
|
25
|
+
check_if_git_dir
|
29
26
|
|
30
27
|
if [ -f .ruby-version ]; then
|
31
28
|
rbenv local `cat .ruby-version`
|
data/bin/run_review.sh
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
set -o errexit
|
7
7
|
set -o pipefail
|
8
8
|
set -o nounset
|
9
|
-
set -o xtrace
|
9
|
+
# set -o xtrace
|
10
10
|
|
11
11
|
script_dir=$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
12
12
|
source "${script_dir}/common_functions.sh"
|
@@ -32,6 +32,9 @@ logifle=~/tmp/run_review_`date +'%Y%m%d-%H%M%S'`.log
|
|
32
32
|
"${script_dir}/prepare_rails_and_frontend.sh" ||
|
33
33
|
show_notification "run_review.sh" "Failed: prepare_rails_and_frontend.sh" $error_exit
|
34
34
|
|
35
|
+
"${script_dir}/look_changes_of_routes.sh" ||
|
36
|
+
show_notification "run_review.sh" "Failed: look_changes_of_routes.sh" $error_exit
|
37
|
+
|
35
38
|
if [ -z ${RUN_REVIEW_WITH_NO_TEST:-} ]; then
|
36
39
|
"${script_dir}/check_and_test.sh" ||
|
37
40
|
show_notification "run_review.sh" "Failed: check_and_test.sh" $error_exit
|
data/lib/review/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: review-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shigeru Hagiwara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -74,6 +74,7 @@ executables:
|
|
74
74
|
- analyze_coverage
|
75
75
|
- check_and_test
|
76
76
|
- git_checkout_target_branches
|
77
|
+
- look_changes_of_routes
|
77
78
|
- prepare_rails_and_frontend
|
78
79
|
- run_review
|
79
80
|
extensions: []
|
@@ -94,12 +95,14 @@ files:
|
|
94
95
|
- bin/common_functions.sh
|
95
96
|
- bin/console
|
96
97
|
- bin/git_checkout_target_branches.sh
|
98
|
+
- bin/look_changes_of_routes.sh
|
97
99
|
- bin/prepare_rails_and_frontend.sh
|
98
100
|
- bin/run_review.sh
|
99
101
|
- bin/setup
|
100
102
|
- exe/analyze_coverage
|
101
103
|
- exe/check_and_test
|
102
104
|
- exe/git_checkout_target_branches
|
105
|
+
- exe/look_changes_of_routes
|
103
106
|
- exe/prepare_rails_and_frontend
|
104
107
|
- exe/run_review
|
105
108
|
- lib/review/tools.rb
|