bigkeeper 0.9.8 → 0.9.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e35ab8c916429eae6491c920c562d0ab6fa0defd431e8c1b7a4db84381ecb2d
4
- data.tar.gz: d0d89ee1e0a75c55dfb5fb0dd0429aada8a842e1c6f2505930eeb91f849aef84
3
+ metadata.gz: 212d55ed7b40a20cb064b7e44aec4d64f626f544cf58317a5e7282fdc6997c21
4
+ data.tar.gz: a70529b65ad54fab0c0095e72cfc4b99cfae34523ccf47dce639a704d5c12046
5
5
  SHA512:
6
- metadata.gz: 5843c7b600a1ec3f917f2a24b498fada7f7b94f415bea94bbd3b08c11afe59902a1ec37e9310689cf546d5a49ddaa17914c226dbf6df09fa129d168a1f90d983
7
- data.tar.gz: 991b6e47428b65ab45200abb60cd72314acc8f0ff710d102d1947a25d80b86e75837c4310c9a9199ec2f39f9643fc46dd02b763bb02c8f5001692414e20e8e74
6
+ metadata.gz: e3e6bd0cfe8f8addaa70d46481ee4e29ebae75f39e4fc7986d18ee566f2f7a1db5f1fd3d1599d6df9a3ed6512e9ba54cc8fb84ea5245fbf4ad5e5c7e68b8237b
7
+ data.tar.gz: 981001593e44d3bbf4e1e787c389c85f54816b9ae6e88ffaa433a84a37a73612a8234d64fcf0cf0ccad9d9a37b010827f666fb02f7ebc7bb0493463af25cfb67
data/Gemfile CHANGED
@@ -8,3 +8,8 @@ gemspec
8
8
  group :test do
9
9
  gem 'rake'
10
10
  end
11
+
12
+ if RUBY_VERSION =~ /1.9/
13
+ Encoding.default_external = Encoding::UTF_8
14
+ Encoding.default_internal = Encoding::UTF_8
15
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bigkeeper (0.9.7)
4
+ bigkeeper (0.9.9)
5
5
  big_resources
6
6
  big_stash (~> 0.1)
7
7
  cocoapods
data/lib/big_keeper.rb CHANGED
@@ -40,12 +40,16 @@ module BigKeeper
40
40
  exit
41
41
  end
42
42
 
43
- pre do |global_options,command,options,args|
43
+ pre do |global_options, command, options, args|
44
44
  LeanCloudLogger.instance.start_log(global_options, args)
45
45
  end
46
46
 
47
- post do |global_options,command,options,args|
48
- LeanCloudLogger.instance.end_log(true, global_options[:log] == "true")
47
+ post do |global_options, command, options, args|
48
+ is_show_log = true
49
+ if global_options[:log] == 'false'
50
+ is_show_log = false
51
+ end
52
+ LeanCloudLogger.instance.end_log(true, is_show_log)
49
53
  end
50
54
 
51
55
  feature_and_hotfix_command(GitflowType::FEATURE)
@@ -50,7 +50,7 @@ module BigKeeper
50
50
 
51
51
  Logger.error("Can't find a Bigkeeper file in current directory.") if !FileOperator.definitely_exists?(bigkeeper)
52
52
 
53
- content = File.read bigkeeper
53
+ content = File.read(bigkeeper, :encoding => 'UTF-8')
54
54
  content.gsub!(/version\s/, 'BigKeeper::version ')
55
55
  content.gsub!(/user\s/, 'BigKeeper::user ')
56
56
  content.gsub!(/home\s/, 'BigKeeper::home ')
@@ -33,7 +33,7 @@ module BigKeeper
33
33
 
34
34
  if File.exist?("#{@cache_path}/module.cache")
35
35
  file = File.open("#{@cache_path}/module.cache", 'r')
36
- @modules = JSON.load(file.read())
36
+ @modules = JSON.load(file.read(), :encoding => 'UTF-8')
37
37
  file.close
38
38
  else
39
39
  @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []}}
@@ -69,7 +69,10 @@ module BigKeeper
69
69
  req = Net::HTTP::Post.new(uri.path, header)
70
70
  req.body = parameter.to_json
71
71
  res = https.request(req)
72
- Logger.highlight("Send LeanCloud success, response #{res.body}") unless !is_show_log
72
+
73
+ if is_show_log == true
74
+ Logger.highlight("Send LeanCloud success, response #{res.body}")
75
+ end
73
76
  end
74
77
 
75
78
  def assemble_request
@@ -6,7 +6,7 @@ module BigKeeper
6
6
  #generate tree print throught console
7
7
  def self.generate_tree(file_path, home_branches, version)
8
8
  module_branches_dic = {}
9
- json_data = File.read(file_path)
9
+ json_data = File.read(file_path, :encoding => 'UTF-8')
10
10
  module_branches_dic = JSON.parse(json_data)
11
11
  to_tree(module_branches_dic, home_branches, version)
12
12
  File.delete(file_path)
@@ -15,7 +15,7 @@ module BigKeeper
15
15
  #generate json print throught console
16
16
  def self.generate_json(file_path, home_branches, version)
17
17
  module_branches_dic = {}
18
- json_data = File.read(file_path)
18
+ json_data = File.read(file_path, :encoding => 'UTF-8')
19
19
  module_branches_dic = JSON.parse(json_data)
20
20
  json = to_json(home_branches, module_branches_dic, version)
21
21
  puts JSON.pretty_generate(json)
@@ -17,7 +17,7 @@ module BigKeeper
17
17
  def parse(main_path)
18
18
  self.main_path = main_path
19
19
  $mode = 'PODS'
20
- podfile_lock_lines = File.readlines("#{main_path}/Podfile.lock")
20
+ podfile_lock_lines = File.readlines("#{main_path}/Podfile.lock", :encoding => 'UTF-8')
21
21
  Logger.highlight("Analyzing Podfile.lock...")
22
22
  podfile_lock_lines.each do |sentence|
23
23
  if sentence.include?('PODS')
@@ -17,7 +17,7 @@ class PodfileParser
17
17
 
18
18
  def parse(path)
19
19
  @main_path = path
20
- podfile_lines = File.readlines("#{@main_path}/Podfile")
20
+ podfile_lines = File.readlines("#{@main_path}/Podfile", :encoding => 'UTF-8')
21
21
  Logger.highlight("Analyzing Podfile...") unless podfile_lines.size.zero?
22
22
  podfile_lines.collect do |sentence|
23
23
  if /pod / =~ sentence
@@ -28,7 +28,7 @@ class PodfileParser
28
28
  end
29
29
 
30
30
  def get_unlock_pod_list
31
- podfile_lines = File.readlines("#{@main_path}/Podfile")
31
+ podfile_lines = File.readlines("#{@main_path}/Podfile", :encoding => 'UTF-8')
32
32
  #Logger.highlight("Analyzing Podfile...") unless podfile_lines.size.zero?
33
33
  podfile_lines.collect do |sentence|
34
34
  deal_podfile_line(sentence) unless sentence =~(/'(\d+.){1,2}\d+'/)
@@ -37,7 +37,7 @@ class PodfileModuleDetector
37
37
  end
38
38
 
39
39
  def deal_module_info
40
- podfile_lines = File.readlines("#{@main_path}/bigKeeperPodInfo.tmp")
40
+ podfile_lines = File.readlines("#{@main_path}/bigKeeperPodInfo.tmp", :encoding => 'UTF-8')
41
41
  Logger.highlight("Analyzing modules info...") unless podfile_lines.size.zero?
42
42
  podfile_lines.collect do |sentence|
43
43
  if sentence =~(/pod/)
@@ -1,3 +1,3 @@
1
1
  module BigKeeper
2
- VERSION = "0.9.8"
2
+ VERSION = "0.9.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmoaay