rebuild 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: c8f85bfc4d94c953df138c1bf6bf7dc9c3ddb19a
4
- data.tar.gz: c3e378e68c19d3e183e84856158954e0e7056171
3
+ metadata.gz: 343b48b597539921a27a9987311d27a768e3e215
4
+ data.tar.gz: fbf1d04ef67f928035c26173f089be49f9ebf2b1
5
5
  SHA512:
6
- metadata.gz: 92d46bd2fcf3e1cb348f9a3a14cad991ff6ff4f3c12d73c9543679358bb8efdee195a49fc94a0aa8cd42b854b361918eaf3f9e56f3f826c725ecebe34deb8258
7
- data.tar.gz: dcb2ec3b2fc45a17522593a82f7bdd8501d04a0178a3ab65af6c930e63f751e0e51ff9071bef797e41ef82e1389d3b6f56bf69239a9419e6a282120ab98cd5bb
6
+ metadata.gz: a59dbc58f12a2066d0bc9889be8e2c1b9164c0854a00152ffc3a8bc4d8153367dbe9b71ef601e252aa43f9a6323b42081af53aa25c8b717baf82444a8597c888
7
+ data.tar.gz: 5fbfe3e2545d5d4f12dc612214c977d8a95514a62986fa369b559c9086a45ea87d080ed52abe0438fc859fe22cd8dd6fa7cde51c9beba4400f0d1df2728f9f48
@@ -26,7 +26,8 @@ module Rebuild
26
26
 
27
27
  # Enable Security & Privacy > Privacy > Accessibility for Terminal.app.
28
28
  def obtain_accesibility
29
- puts 'Require accessibility for terminal to click buttons'
29
+ Logger.info('Obtained accessibility for terminal to click buttons')
30
+
30
31
  SUPPORTED_TERMINALS.each do |bundle_identifier|
31
32
  sql = <<-SQL
32
33
  INSERT OR REPLACE INTO access
@@ -0,0 +1,34 @@
1
+ require 'rebuild'
2
+
3
+ module Rebuild
4
+ class Logger
5
+ COLOR_CODE = {
6
+ green: 32,
7
+ cyan: 36,
8
+ }
9
+
10
+ class << self
11
+ def info(text)
12
+ puts green(text)
13
+ end
14
+
15
+ def finish(text)
16
+ puts cyan(text)
17
+ end
18
+
19
+ private
20
+
21
+ def green(text)
22
+ color_with(text, :green)
23
+ end
24
+
25
+ def cyan(text)
26
+ color_with(text, :cyan)
27
+ end
28
+
29
+ def color_with(text, color)
30
+ "\e[#{COLOR_CODE[color]}m#{text}\e[0m"
31
+ end
32
+ end
33
+ end
34
+ end
@@ -26,6 +26,7 @@ module Rebuild
26
26
  private
27
27
 
28
28
  def clone_repository
29
+ Logger.info("Create repository to #{repo_path}...")
29
30
  FileUtils.mkdir_p(upper_directory)
30
31
  `git clone #{github_repository} #{repo_path}`
31
32
  end
@@ -12,9 +12,11 @@ module Rebuild
12
12
  return no_script_found if script_paths.empty?
13
13
 
14
14
  script_paths.each do |path|
15
- puts "Running #{path}..."
15
+ Logger.info("Running #{path}...")
16
16
  system('sh', path)
17
17
  end
18
+
19
+ Logger.finish("Finished to rebuild #{absolute_script_directory}")
18
20
  end
19
21
 
20
22
  private
@@ -1,3 +1,3 @@
1
1
  module Rebuild
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rebuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
@@ -75,6 +75,7 @@ files:
75
75
  - lib/rebuild/command_line_tools.rb
76
76
  - lib/rebuild/homebrew.rb
77
77
  - lib/rebuild/license.rb
78
+ - lib/rebuild/logger.rb
78
79
  - lib/rebuild/repository.rb
79
80
  - lib/rebuild/runner.rb
80
81
  - lib/rebuild/script.rb