tachikoma 4.0.4 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/.travis.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/README.md +5 -5
- data/lib/tachikoma/application.rb +19 -28
- data/lib/tachikoma/version.rb +1 -1
- data/lib/tasks/app.rake +0 -27
- data/spec/tachikoma/application_spec.rb +0 -18
- data/tachikoma.gemspec +4 -4
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3495d6a4018f6d60ff5dfa3e73b6848d76b01afa
|
4
|
+
data.tar.gz: 7d8ebcbff5cd2aa9f8cbd5f272c256690dcfa480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c6ab89936447a175a7085bd201b980e575c20d0252069fc41a4b6258b79413e9c3175d13f04c573f5221460b7f9f9459de6187ee030e424ddf230b46058df1
|
7
|
+
data.tar.gz: ca286c963ec8c8d59e4cc1472271a24e5c7f7f5c877ee5ad23ec1038b416a8684c2a16880ded3ba7a68e7977b014b621bb60c91ae5592958c13400d9b4be006e
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Tachikoma
|
2
2
|
|
3
|
-
[![Gem Version](
|
4
|
-
[![Build Status](
|
5
|
-
[![Code Climate](
|
6
|
-
[![Coverage Status](
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/tachikoma.svg?style=flat)](http://badge.fury.io/rb/tachikoma)
|
4
|
+
[![Build Status](http://img.shields.io/travis/sanemat/tachikoma/master.svg?style=flat)](https://travis-ci.org/sanemat/tachikoma)
|
5
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/sanemat/tachikoma.svg?style=flat)](https://codeclimate.com/github/sanemat/tachikoma)
|
6
|
+
[![Coverage Status](http://img.shields.io/coveralls/sanemat/tachikoma/master.svg?style=flat)](https://coveralls.io/r/sanemat/tachikoma)
|
7
7
|
|
8
|
-
|
8
|
+
Interval Pull Requester with bundle/carton/none update. [Actual pull request](https://github.com/mrtaddy/fenix-knight/pull/25)
|
9
9
|
|
10
10
|
![tachikoma](https://gist.github.com/sanemat/6605029/raw/ztachikoma-demo5.gif 'tachikoma')
|
11
11
|
![tachikoma](https://gist.github.com/sanemat/6605029/raw/ztachikoma-demo6.gif 'tachikoma')
|
@@ -32,7 +32,7 @@ module Tachikoma
|
|
32
32
|
each_config_path = File.join(Tachikoma.data_path, "#{@build_for}.yaml")
|
33
33
|
each_config = YAML.safe_load_file(each_config_path) if File.exist?(each_config_path)
|
34
34
|
unless each_config
|
35
|
-
fail %Q
|
35
|
+
fail %Q(Something wrong, BUILD_FOR: #{@build_for}, your config_path: #{each_config_path})
|
36
36
|
end
|
37
37
|
|
38
38
|
@configure = base_config.merge(user_config).merge(each_config)
|
@@ -53,8 +53,8 @@ module Tachikoma
|
|
53
53
|
@pull_request_url = repository_identity(@url)
|
54
54
|
@pull_request_body = @configure['pull_request_body']
|
55
55
|
@pull_request_base = @configure['pull_request_base']
|
56
|
-
@pull_request_head = "#{@target_head}:
|
57
|
-
@pull_request_title = "
|
56
|
+
@pull_request_head = "#{@target_head}:tachikoma/update-#{@readable_time}"
|
57
|
+
@pull_request_title = "Exec tachikoma update #{@readable_time}"
|
58
58
|
end
|
59
59
|
|
60
60
|
def clean
|
@@ -64,46 +64,46 @@ module Tachikoma
|
|
64
64
|
|
65
65
|
def fetch
|
66
66
|
clean
|
67
|
-
sh "git clone #{@authorized_base_url} #{Tachikoma.repos_path
|
67
|
+
sh "git clone #{@authorized_base_url} #{Tachikoma.repos_path}/#{@build_for}"
|
68
68
|
end
|
69
69
|
|
70
70
|
def bundle
|
71
|
-
Dir.chdir("#{Tachikoma.repos_path
|
71
|
+
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
72
72
|
Bundler.with_clean_env do
|
73
|
-
sh %Q
|
73
|
+
sh %Q(ruby -i -pe '$_.gsub! /^ruby/, "#ruby"' Gemfile)
|
74
74
|
sh "git config user.name #{@commiter_name}"
|
75
75
|
sh "git config user.email #{@commiter_email}"
|
76
|
-
sh "git checkout -b
|
76
|
+
sh "git checkout -b tachikoma/update-#{@readable_time} #{@base_remote_branch}"
|
77
77
|
sh "bundle --gemfile Gemfile --no-deployment --without nothing --path vendor/bundle #{@parallel_option}"
|
78
78
|
sh 'bundle update'
|
79
79
|
sh 'git add Gemfile.lock'
|
80
|
-
sh %Q
|
81
|
-
sh "git push #{@authorized_compare_url}
|
80
|
+
sh %Q(git commit -m "Bundle update #{@readable_time}") do; end # ignore exitstatus
|
81
|
+
sh "git push #{@authorized_compare_url} tachikoma/update-#{@readable_time}"
|
82
82
|
end
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
86
|
def carton
|
87
|
-
Dir.chdir("#{Tachikoma.repos_path
|
87
|
+
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
88
88
|
sh "git config user.name #{@commiter_name}"
|
89
89
|
sh "git config user.email #{@commiter_email}"
|
90
|
-
sh "git checkout -b
|
90
|
+
sh "git checkout -b tachikoma/update-#{@readable_time} #{@base_remote_branch}"
|
91
91
|
sh 'carton install'
|
92
92
|
sh 'carton update'
|
93
93
|
sh 'git add carton.lock' if File.exist?('carton.lock')
|
94
94
|
sh 'git add cpanfile.snapshot' if File.exist?('cpanfile.snapshot')
|
95
|
-
sh %Q
|
96
|
-
sh "git push #{@authorized_compare_url}
|
95
|
+
sh %Q(git commit -m "Carton update #{@readable_time}") do; end # ignore exitstatus
|
96
|
+
sh "git push #{@authorized_compare_url} tachikoma/update-#{@readable_time}"
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
100
|
def none
|
101
|
-
Dir.chdir("#{Tachikoma.repos_path
|
101
|
+
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
102
102
|
sh "git config user.name #{@commiter_name}"
|
103
103
|
sh "git config user.email #{@commiter_email}"
|
104
|
-
sh "git checkout -b
|
105
|
-
sh %Q
|
106
|
-
sh "git push #{@authorized_compare_url}
|
104
|
+
sh "git checkout -b tachikoma/update-#{@readable_time} #{@base_remote_branch}"
|
105
|
+
sh %Q(git commit --allow-empty -m "None update #{@readable_time}") do; end # ignore exitstatus
|
106
|
+
sh "git push #{@authorized_compare_url} tachikoma/update-#{@readable_time}"
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
@@ -122,12 +122,9 @@ module Tachikoma
|
|
122
122
|
uri = URI.parse(fetch_url)
|
123
123
|
case type
|
124
124
|
when 'fork'
|
125
|
-
%Q
|
125
|
+
%Q(#{uri.scheme}://#{github_token}:x-oauth-basic@#{uri.host}#{path_for_fork(uri.path, github_account)})
|
126
126
|
when 'shared'
|
127
127
|
"#{uri.scheme}://#{github_token}:x-oauth-basic@#{uri.host}#{uri.path}"
|
128
|
-
when 'private'
|
129
|
-
warn '[DEPRECATION] `type: private` is deprecated. Please use `type: fork` or `type: shared` instead.'
|
130
|
-
"#{uri.scheme}://#{github_token}:x-oauth-basic@#{uri.host}#{uri.path}"
|
131
128
|
else
|
132
129
|
fail InvalidType, "Invalid type #{type}"
|
133
130
|
end
|
@@ -138,16 +135,13 @@ module Tachikoma
|
|
138
135
|
case type
|
139
136
|
when 'fork', 'shared'
|
140
137
|
"#{uri.scheme}://#{github_token}:x-oauth-basic@#{uri.host}#{uri.path}"
|
141
|
-
when 'private'
|
142
|
-
warn '[DEPRECATION] `type: private` is deprecated. Please use `type: fork` or `type: shared` instead.'
|
143
|
-
"#{uri.scheme}://#{github_token}:x-oauth-basic@#{uri.host}#{uri.path}"
|
144
138
|
else
|
145
139
|
fail InvalidType, "Invalid type #{type}"
|
146
140
|
end
|
147
141
|
end
|
148
142
|
|
149
143
|
def path_for_fork(path, github_account)
|
150
|
-
path.sub(%r
|
144
|
+
path.sub(%r{^/[^/]+}) { '/' + github_account }
|
151
145
|
end
|
152
146
|
|
153
147
|
def target_repository_user(type, fetch_url, github_account)
|
@@ -156,9 +150,6 @@ module Tachikoma
|
|
156
150
|
github_account
|
157
151
|
when 'shared'
|
158
152
|
URI.parse(fetch_url).path.split('/', 3)[1]
|
159
|
-
when 'private'
|
160
|
-
warn '[DEPRECATION] `type: private` is deprecated. Please use `type: fork` or `type: shared` instead.'
|
161
|
-
URI.parse(fetch_url).path.split('/', 3)[1]
|
162
153
|
else
|
163
154
|
fail InvalidType, "Invalid type: #{type}"
|
164
155
|
end
|
data/lib/tachikoma/version.rb
CHANGED
data/lib/tasks/app.rake
CHANGED
@@ -10,31 +10,4 @@ namespace :tachikoma do
|
|
10
10
|
task :run_carton do
|
11
11
|
Tachikoma::Application.run 'carton'
|
12
12
|
end
|
13
|
-
|
14
|
-
# Deprecated: Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead
|
15
|
-
task :load do
|
16
|
-
warn '[DEPRECATION] `tachikoma:load` is deleted. Please use `tachikoma:run_bundle` or `tachikoma:run_carton instead.'
|
17
|
-
end
|
18
|
-
|
19
|
-
# Deprecated: Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead
|
20
|
-
task :fetch do
|
21
|
-
warn '[DEPRECATION] `tachikoma:fetch` is deleted. Please use `tachikoma:run_bundle` or `tachikoma:run_carton instead.'
|
22
|
-
end
|
23
|
-
|
24
|
-
# Deprecated: Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead
|
25
|
-
task :bundle do
|
26
|
-
warn '[DEPRECATION] `tachikoma:bundle` is deprecated. Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead.'
|
27
|
-
Tachikoma::Application.run 'bundle'
|
28
|
-
end
|
29
|
-
|
30
|
-
# Deprecated: Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead
|
31
|
-
task :carton do
|
32
|
-
warn '[DEPRECATION] `tachikoma:carton` is deprecated. Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead.'
|
33
|
-
Tachikoma::Application.run 'carton'
|
34
|
-
end
|
35
|
-
|
36
|
-
# Deprecated: Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead
|
37
|
-
task :pull_request do
|
38
|
-
warn '[DEPRECATION] `tachikoma:pull_request` is deleted. Please use `tachikoma:run_bundle` or `tachikoma:run_carton` instead.'
|
39
|
-
end
|
40
13
|
end
|
@@ -123,10 +123,6 @@ YAML
|
|
123
123
|
let(:type) { 'shared' }
|
124
124
|
it { expect(subject.target_repository_user(type, url, github_user)).to eq repos_user }
|
125
125
|
end
|
126
|
-
context 'private' do
|
127
|
-
let(:type) { 'private' }
|
128
|
-
it { expect(subject.target_repository_user(type, url, github_user)).to eq repos_user }
|
129
|
-
end
|
130
126
|
end
|
131
127
|
|
132
128
|
context 'invalid type' do
|
@@ -154,13 +150,6 @@ YAML
|
|
154
150
|
let(:authorized_compare_url) { 'https://token:x-oauth-basic@github.com/writable/example2.git' }
|
155
151
|
it { is_expected.to eq authorized_compare_url }
|
156
152
|
end
|
157
|
-
context 'private' do
|
158
|
-
let(:base_url) { 'https://github.com/writable/example2.git' }
|
159
|
-
let(:account) { 'me' }
|
160
|
-
let(:type) { 'private' }
|
161
|
-
let(:authorized_compare_url) { 'https://token:x-oauth-basic@github.com/writable/example2.git' }
|
162
|
-
it { is_expected.to eq authorized_compare_url }
|
163
|
-
end
|
164
153
|
end
|
165
154
|
|
166
155
|
context 'invalid type' do
|
@@ -191,13 +180,6 @@ YAML
|
|
191
180
|
let(:authorized_base_url) { 'https://token:x-oauth-basic@github.com/writable/example2.git' }
|
192
181
|
it { is_expected.to eq authorized_base_url }
|
193
182
|
end
|
194
|
-
context 'private' do
|
195
|
-
let(:base_url) { 'https://github.com/writable/example2.git' }
|
196
|
-
let(:account) { 'me' }
|
197
|
-
let(:type) { 'private' }
|
198
|
-
let(:authorized_base_url) { 'https://token:x-oauth-basic@github.com/writable/example2.git' }
|
199
|
-
it { is_expected.to eq authorized_base_url }
|
200
|
-
end
|
201
183
|
end
|
202
184
|
|
203
185
|
context 'invalid type' do
|
data/tachikoma.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Tachikoma::VERSION
|
9
9
|
spec.authors = ['sanemat']
|
10
10
|
spec.email = ['o.gata.ken@gmail.com']
|
11
|
-
spec.description = %q
|
12
|
-
spec.summary = %q
|
11
|
+
spec.description = %q(Interval pull requester with bundle/carton update.)
|
12
|
+
spec.summary = %q(Update gem frequently gets less pain. Let's doing bundle update as a habit!)
|
13
13
|
spec.homepage = 'https://github.com/sanemat/tachikoma'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'safe_yaml'
|
22
22
|
spec.add_dependency 'rake'
|
23
|
-
spec.add_dependency 'octokit', '
|
23
|
+
spec.add_dependency 'octokit', '>= 3.2', '< 3.3'
|
24
24
|
spec.add_dependency 'json'
|
25
25
|
spec.add_dependency 'thor'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '>= 1.3', '< 1.7'
|
28
28
|
spec.add_development_dependency 'dotenv'
|
29
|
-
spec.add_development_dependency 'rspec', '>= 3.0.0
|
29
|
+
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tachikoma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sanemat
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: safe_yaml
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: octokit
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
47
|
+
version: '3.2'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '3.3'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
57
|
+
version: '3.2'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.3'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: json
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +126,14 @@ dependencies:
|
|
120
126
|
requirements:
|
121
127
|
- - ">="
|
122
128
|
- !ruby/object:Gem::Version
|
123
|
-
version: 3.0.0
|
129
|
+
version: 3.0.0
|
124
130
|
type: :development
|
125
131
|
prerelease: false
|
126
132
|
version_requirements: !ruby/object:Gem::Requirement
|
127
133
|
requirements:
|
128
134
|
- - ">="
|
129
135
|
- !ruby/object:Gem::Version
|
130
|
-
version: 3.0.0
|
136
|
+
version: 3.0.0
|
131
137
|
description: Interval pull requester with bundle/carton update.
|
132
138
|
email:
|
133
139
|
- o.gata.ken@gmail.com
|