rubcat 0.4.1 → 0.5.0

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: 95ffa5fd125c4f5d8880bacd28d57d3f8a0c2601
4
- data.tar.gz: 28a4df4bea182dbfd498a8707e8002523c30e5e5
3
+ metadata.gz: 5d070fdb6a7da0d911ec0b46b1b3b69c4b1df9c2
4
+ data.tar.gz: 7281898da7aa59b18f394c3b51bae5496e1141bc
5
5
  SHA512:
6
- metadata.gz: 7999a825ff4d70fb39f52d00ed7a024ace1c28f5d729853f8ff7a3b7cc273d6b4307e07f1f3487da3bdf9a21c771e00dffb7fe3ef911537067ac44768b43f168
7
- data.tar.gz: 42459d8b8bc4263ee53ff3a435ee9331289fa3f1e6908e5f0bf025630b902d4e372ac84f6b0021fbcaac41312d7503be9d7d467a7e5cbad5728e645d415b6e84
6
+ metadata.gz: c6b6d84e6c105b5f335bfa110c89d84a50699f1f390a75804c84caed4dac3672c086a759ad73bf5ae0bd6cb3b68be70335102a2532bf5b607445127edeb11ccf
7
+ data.tar.gz: 79e9bc53d51c36ba864c0094511ca4f7d71c10a9a3fbef6407d73fac77fc0f944ef91a716eb249c6396a406725f818968008630493c2ea52e8087076ed6f7793
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /*.gem
data/{bin → exe}/rubcat RENAMED
@@ -6,12 +6,13 @@ require 'optparse'
6
6
  require 'rubcat'
7
7
 
8
8
  cmd = "adb logcat"
9
+ flags = ""
9
10
 
10
11
  opt = OptionParser.new
11
12
 
12
13
  OPTS = {}
13
14
 
14
- opt.on('-d') { |v| cmd << " -d" }
15
+ opt.on('-d') { |v| flags << " -d" }
15
16
  opt.on('-l {V,D,I,W,E,F}', '--level={V,D,I,W,E,F}', 'Minimul level to display') { |v|
16
17
  if %w{V D I W E F}.include? v
17
18
  OPTS[:min_level] = v.to_sym
@@ -19,11 +20,12 @@ opt.on('-l {V,D,I,W,E,F}', '--level={V,D,I,W,E,F}', 'Minimul level to display')
19
20
  raise OptionParser::ParseError, "Invalid choice: 'A' (choose from 'V', 'D', 'I', 'W', 'E', 'F')"
20
21
  end
21
22
  }
22
- opt.on('-s DEVICE_SERIAL', '--serial=DEVICE_SERIAL') { |v| cmd << " -s #{v}" }
23
- opt.on('-d', 'Use first device for log input (adb -d option)') { |v| cmd << " -d" }
24
- opt.on('-e', 'Use first emulator for log input (adb -e option)') { |v| cmd << " -e" }
23
+ opt.on('-s DEVICE_SERIAL', '--serial=DEVICE_SERIAL') { |v| flags << " -s #{v}" }
24
+ opt.on('-d', 'Use first device for log input (adb -d option)') { |v| flags << " -d" }
25
+ opt.on('-e', 'Use first emulator for log input (adb -e option)') { |v| flags << " -e" }
25
26
  opt.on('--tag-length=LENGTH', 'Length of tag shown in left of screen (default is 25)') { |v| OPTS[:tag_length] = Integer(v) }
26
27
  opt.on('--split-tags', 'Insert empty line between tags') { |v| OPTS[:split_tags] = true }
28
+ opt.on('--adb-command COMMAND', 'specify command to display adb logcat (default is `adb logcat`)') { |v| cmd = v }
27
29
  opt.parse!
28
30
 
29
31
  pl = Rubcat::PrettyLogcat.new OPTS
@@ -31,7 +33,7 @@ pl = Rubcat::PrettyLogcat.new OPTS
31
33
  $PROGRAM_NAME = 'rubcat'
32
34
 
33
35
  begin
34
- PTY.spawn cmd do |stdout, stdin, pid|
36
+ PTY.spawn "#{cmd}#{flags}" do |stdout, stdin, pid|
35
37
  begin
36
38
  # parse and print output
37
39
  stdout.each do |line|
@@ -1,3 +1,3 @@
1
1
  module Rubcat
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - polamjag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-17 00:00:00.000000000 Z
11
+ date: 2015-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,7 +42,8 @@ description: pidcat, pretty adb logcat in Ruby. without any dependencies. can be
42
42
  and updated with gem command!
43
43
  email:
44
44
  - s@polamjag.info
45
- executables: []
45
+ executables:
46
+ - rubcat
46
47
  extensions: []
47
48
  extra_rdoc_files: []
48
49
  files:
@@ -53,7 +54,7 @@ files:
53
54
  - LICENSE.txt
54
55
  - README.md
55
56
  - Rakefile
56
- - bin/rubcat
57
+ - exe/rubcat
57
58
  - lib/core_ext/string.rb
58
59
  - lib/rubcat.rb
59
60
  - lib/rubcat/pretty_logcat.rb