anticuado 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/anticuado/github.rb +6 -8
- data/lib/anticuado/ios/carthage.rb +3 -3
- data/lib/anticuado/ios/cocoapods.rb +3 -3
- data/lib/anticuado/ruby/bundler.rb +10 -12
- 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: ad73735c727cc7c436a9c7d957979c9452877908
|
4
|
+
data.tar.gz: f78b81e89008e4748e95ade108af0e20c89c3589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b8c6d6be86210ba900013f47338bf3a51baf3b218c7222a6ce95165223f9830385ebf3c1d276bb34629fce38afa283bfc2a6ee27e95ac90ac394eee097b4a94
|
7
|
+
data.tar.gz: 21253f25b4e640943d5448d6ef4be133e595ac5acb1893993cd7691ddaa9e6874115c7c9256046464b62775366e9eefb2d8d930ae6a63bda2cc2065d993e7764
|
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(@client.web_endpoint).host}:#{@repo_name}.git"
|
19
|
+
@repo_uri = "git@#{URI.parse(enterprise ? @client.api_endpoint : @client.web_endpoint).host}:#{@repo_name}.git"
|
20
20
|
end
|
21
21
|
|
22
22
|
def clone_or_open_to(target_path)
|
@@ -32,9 +32,7 @@ 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
|
-
|
36
|
-
|
37
|
-
if !@git.status.changed.empty?
|
35
|
+
begin
|
38
36
|
create_a_branch_local head_branch
|
39
37
|
commit_all_changes
|
40
38
|
|
@@ -42,8 +40,8 @@ module Anticuado
|
|
42
40
|
create_pull_request(base_branch: base_branch, head_branch: head_branch, title: github_pr_title(head_branch), body: github_pr_body(update_libraries))
|
43
41
|
|
44
42
|
delete_a_branch_local head_branch
|
45
|
-
|
46
|
-
puts "no changes"
|
43
|
+
rescue Git::GitExecuteError => e
|
44
|
+
puts "no changes: #{e}, #{e.message}"
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
@@ -73,7 +71,7 @@ module Anticuado
|
|
73
71
|
end
|
74
72
|
|
75
73
|
def delete_a_branch_local(branch_name)
|
76
|
-
@git.
|
74
|
+
@git.checkout # We should change current branch first
|
77
75
|
@git.branch(branch_name).delete
|
78
76
|
end
|
79
77
|
|
@@ -85,4 +83,4 @@ module Anticuado
|
|
85
83
|
@client.create_pull_request @repo_name, base_branch, head_branch, title, body
|
86
84
|
end
|
87
85
|
end
|
88
|
-
end # module Anticuado
|
86
|
+
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}`
|
59
62
|
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}`
|
63
66
|
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,16 +1,15 @@
|
|
1
1
|
module Anticuado
|
2
2
|
module Ruby
|
3
3
|
class Bundler < Anticuado::Base
|
4
|
-
def outdated
|
4
|
+
def outdated(option = '')
|
5
5
|
return puts "have no bundle command" if `which bundle`.empty?
|
6
6
|
|
7
7
|
if @project_dir
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
Dir.chdir current_dir
|
8
|
+
Dir.chdir(@project_dir) do
|
9
|
+
@outdated_libraries = run_outdated option
|
10
|
+
end
|
12
11
|
else
|
13
|
-
@outdated_libraries = run_outdated
|
12
|
+
@outdated_libraries = run_outdated option
|
14
13
|
end
|
15
14
|
@outdated_libraries
|
16
15
|
end
|
@@ -54,15 +53,14 @@ module Anticuado
|
|
54
53
|
def do_update_lock(target_names = nil)
|
55
54
|
if target_names.nil?
|
56
55
|
`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(' ')}`
|
57
59
|
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(' ')}`
|
62
60
|
end
|
63
61
|
|
64
|
-
def run_outdated
|
65
|
-
`bundle install`
|
62
|
+
def run_outdated(option)
|
63
|
+
`bundle install #{option}`
|
66
64
|
`bundle outdated`
|
67
65
|
end
|
68
66
|
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.
|
4
|
+
version: 0.4.1
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|