review-tools 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ade5a9f9cb16ace9912b5b36263e4299c1ac0b6e0149e403f5a31ad134f07c9d
4
- data.tar.gz: 8b2e50d95bc804e3e045bd14861a5febe221b938dec92da2f895361a635b8e78
3
+ metadata.gz: 7a6ee8fb851ae499fef1f56b1eb8e422db3483cac6f9fa75afa6a9abd6c25dd6
4
+ data.tar.gz: 077c6675d26778601230ce9cc43243637e696ae9084b2d6d1bb2a4570caf9f02
5
5
  SHA512:
6
- metadata.gz: 9ece3512583296726455f9366d1ef8be5f2a09aa5929b0784f45167047583a818c9712e6488604f1b3eec010f3f7bc35d637237773ab9de3c47c1f2e993eb46d
7
- data.tar.gz: '07482148cac023943c04060f85950f680309f352d65968fd9c69e1438c490c945598f0886c394ff288bcbf15b428d82cee4aad6f27a863d982a6e97128a24d6d'
6
+ metadata.gz: cf2106a5112b035e7666e73b8f3f4a5ae20a8b76d04f958a98245509382ed69aa3160f223b2a82cd26fdba4baa032dff1e91cac5ac205179bfe519bc6210edbc
7
+ data.tar.gz: 41d1117841af5a486dec7a7a6275f30af3a5652dd95fdf468906a6b9875807534966670fb9ea157529d816fe15d3977afefe1eb989f7767af23f6ac262041289
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- review-tools (0.2.5)
4
+ review-tools (0.2.6)
5
5
  nokogiri (~> 1.10.4)
6
6
 
7
7
  GEM
data/README-ja.md CHANGED
@@ -14,7 +14,7 @@ review-tools gem は、 GitHub 上の Rails プロジェクトの pull request
14
14
  こんな感じのワンライナーで、使用している各 Ruby のバージョンへ gem install できます。
15
15
 
16
16
  ```
17
- orig_version=`rbenv version | sed -e 's/ .*$//'`; for rbv in `rbenv versions | sed -e 's/^[* ]*//' | cut -d ' ' -f 1 | grep -v system`; do rbenv global $rbv; gem install review-tools; done; rbenv global $orig_version
17
+ orig_version=`rbenv version | sed -e 's/ .*$//'`; for rbv in `rbenv versions | sed -e 's/^[* ]*//' | cut -d ' ' -f 1 | grep -v system`; do rbenv local $rbv; gem install review-tools; done; rbenv global $orig_version
18
18
  ```
19
19
 
20
20
  もしくは Gemfile に加えてしまってもいいでしょう。
@@ -30,16 +30,16 @@ elif [ `(which pront || true) | wc -l` -ge "1" ]; then
30
30
  pronto run
31
31
  fi
32
32
 
33
- if [ `(grep 'rspec' Gemfile || true) | wc -l` -ge "1" ]; then
34
- bundle exec rspec spec
35
- else
36
- bundle exec rake test
37
- fi
38
-
39
33
  if [ `(grep 'rubocop' Gemfile || true) | wc -l` -ge "1" ]; then
40
34
  bundle exec rubocop
41
35
  elif [ `(which rubocop || true) | wc -l` -ge "1" ]; then
42
36
  rubocop
43
37
  fi
44
38
 
39
+ if [ `(grep 'rspec' Gemfile || true) | wc -l` -ge "1" ]; then
40
+ bundle exec rspec spec
41
+ else
42
+ bundle exec rake test
43
+ fi
44
+
45
45
  run_additional_task test_tasks
@@ -8,6 +8,13 @@ function check_if_git_dir () {
8
8
  fi
9
9
  }
10
10
 
11
+ function change_ruby_version () {
12
+ if [ -f .ruby-version ]; then
13
+ rbenv local `cat .ruby-version`
14
+ fi
15
+ bundle install --path vendor/bundle --jobs=4 --retry=3
16
+ }
17
+
11
18
  function run_additional_task () {
12
19
  task_name="$1"
13
20
  if [ -f "${HOME}/.config/review-tools.yml" ]; then
@@ -24,11 +24,7 @@ src_branch="$4"
24
24
 
25
25
  check_if_git_dir
26
26
 
27
- git checkout master
28
27
  git fetch -a || true
29
- git gc --prune=now || true
30
- git remote prune origin || true
31
- git pull origin master
32
28
 
33
29
  git checkout "$dst_branch"
34
30
  git pull origin "$dst_branch"
@@ -30,9 +30,11 @@ if [ -x bin/rake ]; then
30
30
  diff_file="/tmp/changes_of_routes_$$.txt"
31
31
 
32
32
  git checkout "$dst_branch"
33
+ change_ruby_version
33
34
  bundle exec rake routes > ${dst_routes}
34
35
 
35
36
  git checkout "$src_branch"
37
+ change_ruby_version
36
38
  bundle exec rake routes > ${src_routes}
37
39
 
38
40
  diff -u ${dst_routes} ${src_routes} > ${diff_file}
@@ -24,10 +24,7 @@ source "${script_dir}/common_functions.sh"
24
24
 
25
25
  check_if_git_dir
26
26
 
27
- if [ -f .ruby-version ]; then
28
- rbenv local `cat .ruby-version`
29
- fi
30
- bundle install --path vendor/bundle --jobs=4 --retry=3
27
+ change_ruby_version
31
28
 
32
29
  run_additional_task preparation
33
30
 
data/bin/run_review.sh CHANGED
@@ -36,7 +36,7 @@ logifle=~/tmp/run_review_`date +'%Y%m%d-%H%M%S'`.log
36
36
  "${script_dir}/look_changes_of_routes.sh" into "$dst_branch" from "$src_branch" || true
37
37
  # show_notification "run_review.sh" "Failed: look_changes_of_routes.sh" $error_exit
38
38
 
39
- if [ -z ${RUN_REVIEW_WITH_NO_TEST:-} ]; then
39
+ if [ -z ${run_review_with_no_test:-} ]; then
40
40
  "${script_dir}/check_and_test.sh" ||
41
41
  show_notification "run_review.sh" "Failed: check_and_test.sh" $error_exit
42
42
 
@@ -1,5 +1,5 @@
1
1
  module Review
2
2
  module Tools
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  end
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.5
4
+ version: 0.2.6
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-05 00:00:00.000000000 Z
11
+ date: 2019-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri