tachikoma 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +8 -6
- data/lib/tachikoma/application.rb +34 -1
- data/lib/tachikoma/cli.rb +6 -4
- data/lib/tachikoma/version.rb +1 -1
- data/lib/tasks/app.rake +18 -2
- data/spec/tachikoma/application_spec.rb +39 -0
- data/tachikoma.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95857c09c8a6d64057d226b230bf5c100963c859
|
4
|
+
data.tar.gz: b096c79c85420335f46b3f121a327c77e04c83e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6d29a6d0eaf97d1c591260c519d7e948bdd025bc29fd8313bbded3f6a5ceab535f65aff11d9490b0b1c284373fb23017c01d21aeab9615e85c3f393b453cfbd
|
7
|
+
data.tar.gz: aee389b7f454f11834ef3c7c71575c83d7cb43401c928bad04bf89259bc20219bbf7d999ccb7943a0fb1f830e9844dc4f4a3f3cd6278d23302460e9ce42a41c6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 4.2.1 (2014-09-28)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
- Get the ability for php application `composer update`(#112, #109, @sanemat)
|
5
|
+
- Deprecate `run_bundle`, Use `run_bundler` instead (#113, @sanemat)
|
6
|
+
- Get the ability for cocoapods application `pods update`(#115, #102, @sanemat)
|
7
|
+
|
1
8
|
## 4.2.0 (2014-08-18)
|
2
9
|
|
3
10
|
Features:
|
data/README.md
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
[![Code Climate](http://img.shields.io/codeclimate/github/sanemat/tachikoma.svg?style=flat)](https://codeclimate.com/github/sanemat/tachikoma)
|
6
6
|
[![Coverage Status](http://img.shields.io/coveralls/sanemat/tachikoma/master.svg?style=flat)](https://coveralls.io/r/sanemat/tachikoma)
|
7
7
|
|
8
|
-
Interval Pull Requester with bundler/carton/david/none update. [Actual pull request](https://github.com/mrtaddy/fenix-knight/pull/25)
|
8
|
+
Interval Pull Requester with bundler/carton/david/cocoapods/composer/none update. [Actual pull request](https://github.com/mrtaddy/fenix-knight/pull/25)
|
9
9
|
|
10
|
-
![tachikoma](https://
|
11
|
-
![tachikoma](https://
|
10
|
+
![tachikoma](https://cloud.githubusercontent.com/assets/75448/4431995/1f7817e4-4681-11e4-8235-64df5c562496.gif 'tachikoma')
|
11
|
+
![tachikoma](https://cloud.githubusercontent.com/assets/75448/4431997/26649596-4681-11e4-8d9e-a456f570acd1.gif 'tachikoma')
|
12
12
|
|
13
13
|
## Usage as gem
|
14
14
|
|
@@ -31,7 +31,7 @@ $ bundle exec tachikoma init
|
|
31
31
|
```
|
32
32
|
$ export BUILD_FOR=<your-repository-name-that-is-same-to-yaml-filename>
|
33
33
|
$ export TOKEN_YOUR_REPOSITORY_NAME_THAT_IS_SAME_TO_YAML_FILENAME=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
34
|
-
$ bundle exec rake tachikoma:
|
34
|
+
$ bundle exec rake tachikoma:run_bundler
|
35
35
|
```
|
36
36
|
|
37
37
|
### Strategies
|
@@ -41,10 +41,12 @@ You can use these strategies:
|
|
41
41
|
- Bundler (Ruby)
|
42
42
|
- Carton (Perl)
|
43
43
|
- David (Node.js)
|
44
|
+
- Cocoapods (Objective-C)
|
45
|
+
- Composer (PHP)
|
44
46
|
- None (without strategy)
|
45
47
|
|
46
|
-
If you use carton, then you use `tachikoma:run_carton` instead of `tachikoma:
|
47
|
-
You can also use `tachikoma:run_none` and `tachikoma:run_david`.
|
48
|
+
If you use carton, then you use `tachikoma:run_carton` instead of `tachikoma:run_bundler`.
|
49
|
+
You can also use `tachikoma:run_none`, `tachikoma:run_cocoapods`, `tachikoma:run_composer` and `tachikoma:run_david`.
|
48
50
|
|
49
51
|
### Setting example
|
50
52
|
[gist-mail setting (data/gist-mail.yaml)](https://github.com/sanemat/bot-motoko-tachikoma/blob/a47ceb8b88f8b6da8028e5c0b641b8a84c9c3505/data/gist-mail.yaml)
|
@@ -67,7 +67,7 @@ module Tachikoma
|
|
67
67
|
sh "git clone #{@authorized_base_url} #{Tachikoma.repos_path}/#{@build_for}"
|
68
68
|
end
|
69
69
|
|
70
|
-
def
|
70
|
+
def bundler
|
71
71
|
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
72
72
|
Bundler.with_clean_env do
|
73
73
|
sh %Q(ruby -i -pe '$_.gsub! /^ruby/, "#ruby"' Gemfile)
|
@@ -83,6 +83,11 @@ module Tachikoma
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
+
def bundle
|
87
|
+
warn '[DEPRECATION] `bundle` is deprecated. Please use `bundler` instead.'
|
88
|
+
bundler
|
89
|
+
end
|
90
|
+
|
86
91
|
def carton
|
87
92
|
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
88
93
|
sh "git config user.name #{@commiter_name}"
|
@@ -119,6 +124,34 @@ module Tachikoma
|
|
119
124
|
end
|
120
125
|
end
|
121
126
|
|
127
|
+
def composer
|
128
|
+
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
129
|
+
sh "git config user.name #{@commiter_name}"
|
130
|
+
sh "git config user.email #{@commiter_email}"
|
131
|
+
sh "git checkout -b tachikoma/update-#{@readable_time} #{@base_remote_branch}"
|
132
|
+
# FIXME: Use Octokit.api_endpoint for GitHub Enterprise
|
133
|
+
sh "composer config github-oauth.github.com #{@github_token}"
|
134
|
+
sh 'composer install --no-interaction'
|
135
|
+
sh 'composer update --no-interaction'
|
136
|
+
sh 'git add composer.lock'
|
137
|
+
sh %Q(git commit -m "Composer update #{@readable_time}") do; end # ignore exitstatus
|
138
|
+
sh "git push #{@authorized_compare_url} tachikoma/update-#{@readable_time}"
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def cocoapods
|
143
|
+
Dir.chdir("#{Tachikoma.repos_path}/#{@build_for}") do
|
144
|
+
sh "git config user.name #{@commiter_name}"
|
145
|
+
sh "git config user.email #{@commiter_email}"
|
146
|
+
sh "git checkout -b tachikoma/update-#{@readable_time} #{@base_remote_branch}"
|
147
|
+
sh 'pods install'
|
148
|
+
sh 'pods update'
|
149
|
+
sh 'git add Podfile.lock'
|
150
|
+
sh %Q(git commit -m "Cocoapods update #{@readable_time}") do; end # ignore exitstatus
|
151
|
+
sh "git push #{@authorized_compare_url} tachikoma/update-#{@readable_time}"
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
122
155
|
def pull_request
|
123
156
|
@client = Octokit::Client.new access_token: @github_token
|
124
157
|
@client.create_pull_request(@pull_request_url, @pull_request_base, @pull_request_head, @pull_request_title, @pull_request_body)
|
data/lib/tachikoma/cli.rb
CHANGED
@@ -53,10 +53,12 @@ module Tachikoma
|
|
53
53
|
class_options_help(shell)
|
54
54
|
shell.say <<-USAGE
|
55
55
|
Tasks:
|
56
|
-
rake tachikoma:
|
57
|
-
rake tachikoma:run_carton
|
58
|
-
rake tachikoma:run_none
|
59
|
-
rake tachikoma:run_david
|
56
|
+
rake tachikoma:run_bundler # run tachikoma with bundler
|
57
|
+
rake tachikoma:run_carton # run tachikoma with carton
|
58
|
+
rake tachikoma:run_none # run tachikoma with none
|
59
|
+
rake tachikoma:run_david # run tachikoma with david
|
60
|
+
rake tachikoma:run_composer # run tachikoma with composer
|
61
|
+
rake tachikoma:run_cocoapods # run tachikoma with cocoapods
|
60
62
|
USAGE
|
61
63
|
end
|
62
64
|
|
data/lib/tachikoma/version.rb
CHANGED
data/lib/tasks/app.rake
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
require 'tachikoma/application'
|
2
2
|
|
3
3
|
namespace :tachikoma do
|
4
|
-
desc 'run tachikoma with
|
4
|
+
desc 'run tachikoma with bundler'
|
5
5
|
task :run_bundle do
|
6
|
-
|
6
|
+
warn '[DEPRECATION] `run_bundle` is deprecated. Please use `run_bundler` instead.'
|
7
|
+
Tachikoma::Application.run 'bundler'
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'run tachikoma with bundler'
|
11
|
+
task :run_bundler do
|
12
|
+
Tachikoma::Application.run 'bundler'
|
7
13
|
end
|
8
14
|
|
9
15
|
desc 'run tachikoma with carton'
|
@@ -20,4 +26,14 @@ namespace :tachikoma do
|
|
20
26
|
task :run_david do
|
21
27
|
Tachikoma::Application.run 'david'
|
22
28
|
end
|
29
|
+
|
30
|
+
desc 'run tachikoma with composer'
|
31
|
+
task :run_composer do
|
32
|
+
Tachikoma::Application.run 'composer'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'run tachikoma with cocoapods'
|
36
|
+
task :run_cocoapods do
|
37
|
+
Tachikoma::Application.run 'cocoapods'
|
38
|
+
end
|
23
39
|
end
|
@@ -33,6 +33,19 @@ YAML
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
context 'if strategy is `bundler`' do
|
37
|
+
before do
|
38
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:load)
|
39
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:fetch)
|
40
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:pull_request)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should be called `bundler` method' do
|
44
|
+
expect_any_instance_of(Tachikoma::Application).to receive(:bundler)
|
45
|
+
Tachikoma::Application.run 'bundler'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
36
49
|
context 'if strategy is `carton`' do
|
37
50
|
before do
|
38
51
|
allow_any_instance_of(Tachikoma::Application).to receive(:load)
|
@@ -72,6 +85,32 @@ YAML
|
|
72
85
|
end
|
73
86
|
end
|
74
87
|
|
88
|
+
context 'if strategy is `composer`' do
|
89
|
+
before do
|
90
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:load)
|
91
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:fetch)
|
92
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:pull_request)
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should be called `composer` method' do
|
96
|
+
expect_any_instance_of(Tachikoma::Application).to receive(:composer)
|
97
|
+
Tachikoma::Application.run 'composer'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'if strategy is `cocoapods`' do
|
102
|
+
before do
|
103
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:load)
|
104
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:fetch)
|
105
|
+
allow_any_instance_of(Tachikoma::Application).to receive(:pull_request)
|
106
|
+
end
|
107
|
+
|
108
|
+
it 'should be called `cocoapods` method' do
|
109
|
+
expect_any_instance_of(Tachikoma::Application).to receive(:cocoapods)
|
110
|
+
Tachikoma::Application.run 'cocoapods'
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
75
114
|
describe '#bundler_parallel_option' do
|
76
115
|
subject { described_class.new }
|
77
116
|
|
data/tachikoma.gemspec
CHANGED
@@ -8,7 +8,7 @@ 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(Interval pull requester with bundler/carton/david/none update.)
|
11
|
+
spec.description = %q(Interval pull requester with bundler/carton/david/cocoapods/composer/none update.)
|
12
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'
|
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.2.
|
4
|
+
version: 4.2.1
|
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-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: safe_yaml
|
@@ -134,7 +134,8 @@ dependencies:
|
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: 3.0.0
|
137
|
-
description: Interval pull requester with bundler/carton/david/none
|
137
|
+
description: Interval pull requester with bundler/carton/david/cocoapods/composer/none
|
138
|
+
update.
|
138
139
|
email:
|
139
140
|
- o.gata.ken@gmail.com
|
140
141
|
executables:
|