anticuado 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anticuado/github.rb +8 -6
- data/lib/anticuado/ios/carthage.rb +3 -3
- data/lib/anticuado/ios/cocoapods.rb +3 -3
- data/lib/anticuado/ruby/bundler.rb +12 -10
- data/lib/anticuado/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0a654f19a82077dc3131cf16acc8487f046d9ef
|
4
|
+
data.tar.gz: 4ae6db0f9d00609de171af9cb957ca016e8c1b92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98542b15b59bff2ca1405e70dd8ef64fd9cfe5a75b8815eb3af2c2180e2cc42390d66aae2b080f3b3d320e8c14d32e210deda3c3ff5475b87d29829ef3229037
|
7
|
+
data.tar.gz: c966d6bae2ee914506542c312ea9353647d4e991aea826cd9ec0c0f98d32452a6f08fcbd7948f39f7239d201e487da40ae4d829e3f7122189e7b57277276be71
|
data/lib/anticuado/github.rb
CHANGED
@@ -16,7 +16,7 @@ module Anticuado
|
|
16
16
|
else
|
17
17
|
::Octokit::Client.new(:access_token => ENV['GITHUB_TOKEN'])
|
18
18
|
end
|
19
|
-
@repo_uri = "git@#{URI.parse(
|
19
|
+
@repo_uri = "git@#{URI.parse(@client.web_endpoint).host}:#{@repo_name}.git"
|
20
20
|
end
|
21
21
|
|
22
22
|
def clone_or_open_to(target_path)
|
@@ -32,7 +32,9 @@ module Anticuado
|
|
32
32
|
def create_a_new_pull_request(base_branch:, head_branch: (Time.now.strftime '%Y%m%d-%H%M%S'), update_libraries: nil)
|
33
33
|
remote_name = 'origin'
|
34
34
|
|
35
|
-
|
35
|
+
@git.checkout base_branch
|
36
|
+
|
37
|
+
if !@git.status.changed.empty?
|
36
38
|
create_a_branch_local head_branch
|
37
39
|
commit_all_changes
|
38
40
|
|
@@ -40,8 +42,8 @@ module Anticuado
|
|
40
42
|
create_pull_request(base_branch: base_branch, head_branch: head_branch, title: github_pr_title(head_branch), body: github_pr_body(update_libraries))
|
41
43
|
|
42
44
|
delete_a_branch_local head_branch
|
43
|
-
|
44
|
-
puts "no changes
|
45
|
+
else
|
46
|
+
puts "no changes"
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
@@ -71,7 +73,7 @@ module Anticuado
|
|
71
73
|
end
|
72
74
|
|
73
75
|
def delete_a_branch_local(branch_name)
|
74
|
-
@git.checkout # We should change current branch first
|
76
|
+
@git.branch(branch_name).checkout # We should change current branch first
|
75
77
|
@git.branch(branch_name).delete
|
76
78
|
end
|
77
79
|
|
@@ -83,4 +85,4 @@ module Anticuado
|
|
83
85
|
@client.create_pull_request @repo_name, base_branch, head_branch, title, body
|
84
86
|
end
|
85
87
|
end
|
86
|
-
end # module Anticuado
|
88
|
+
end # module Anticuado
|
@@ -56,10 +56,10 @@ module Anticuado
|
|
56
56
|
def do_update_lock(target_names = nil)
|
57
57
|
if target_names.nil?
|
58
58
|
`carthage update --project-directory=#{@project_dir}`
|
59
|
-
else
|
60
|
-
raise ArgumentError, "An argument should be Array like ['Result']" unless target_names.is_a? Array
|
61
|
-
`carthage update #{target_names.join(' ')} --project-directory=#{@project_dir}`
|
62
59
|
end
|
60
|
+
|
61
|
+
raise ArgumentError, "An argument should be Array like ['Result']" unless target_names.is_a? Array
|
62
|
+
`carthage update #{target_names.join(' ')} --project-directory=#{@project_dir}`
|
63
63
|
end
|
64
64
|
end # class Carthage
|
65
65
|
end # module IOS
|
@@ -60,10 +60,10 @@ module Anticuado
|
|
60
60
|
def do_update_lock(target_names = nil)
|
61
61
|
if target_names.nil?
|
62
62
|
`pod update --project-directory=#{@project_dir}`
|
63
|
-
else
|
64
|
-
raise ArgumentError, "An argument should be Array like ['PromisesObjC']" unless target_names.is_a? Array
|
65
|
-
`pod update #{target_names.join(' ')} --project-directory=#{@project_dir}`
|
66
63
|
end
|
64
|
+
|
65
|
+
raise ArgumentError, "An argument should be Array like ['PromisesObjC']" unless target_names.is_a? Array
|
66
|
+
`pod update #{target_names.join(' ')} --project-directory=#{@project_dir}`
|
67
67
|
end
|
68
68
|
|
69
69
|
def update_with_prefix(pod_file_in:, pod_file_out: nil, libraries:, prefix:)
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module Anticuado
|
2
2
|
module Ruby
|
3
3
|
class Bundler < Anticuado::Base
|
4
|
-
def outdated
|
4
|
+
def outdated
|
5
5
|
return puts "have no bundle command" if `which bundle`.empty?
|
6
6
|
|
7
7
|
if @project_dir
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
current_dir = Anticuado.current_dir
|
9
|
+
Dir.chdir Anticuado.project_dir(@project_dir)
|
10
|
+
@outdated_libraries = run_outdated
|
11
|
+
Dir.chdir current_dir
|
11
12
|
else
|
12
|
-
@outdated_libraries = run_outdated
|
13
|
+
@outdated_libraries = run_outdated
|
13
14
|
end
|
14
15
|
@outdated_libraries
|
15
16
|
end
|
@@ -53,14 +54,15 @@ module Anticuado
|
|
53
54
|
def do_update_lock(target_names = nil)
|
54
55
|
if target_names.nil?
|
55
56
|
`bundle update`
|
56
|
-
else
|
57
|
-
raise ArgumentError, "An argument should be Array like ['cocoapod']" unless target_names.is_a? Array
|
58
|
-
`bundle update #{target_names.join(' ')}`
|
59
57
|
end
|
58
|
+
|
59
|
+
raise ArgumentError, "An argument should be Array like ['cocoapod']" unless target_names.is_a? Array
|
60
|
+
|
61
|
+
`bundle update #{target_names.join(' ')}`
|
60
62
|
end
|
61
63
|
|
62
|
-
def run_outdated
|
63
|
-
`bundle install
|
64
|
+
def run_outdated
|
65
|
+
`bundle install`
|
64
66
|
`bundle outdated`
|
65
67
|
end
|
66
68
|
end # class Bundler
|
data/lib/anticuado/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anticuado
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|