react-native-logcat 0.2.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 +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +20 -0
- data/Rakefile +1 -0
- data/bin/react-native-logcat +16 -0
- data/extras/screenshot.png +0 -0
- data/lib/react-native-logcat.rb +33 -0
- data/lib/react-native-logcat/version.rb +3 -0
- data/react-native-logcat.gemspec +30 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0737ce239e4b87c83ecb63a0144fa3c954ad9b39
|
4
|
+
data.tar.gz: 35c59da9a4a741e3e0b0d2fb856d7998eb5f6bc0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 866dc0fd108d612ca95eabd0f5e358a7ba308fc99e8d224f33a9542077f40fbacba2f80e2c7e889473579a852b5f14291381986529afae92a66fa6d8bdd0faa2
|
7
|
+
data.tar.gz: 0a44a37bc6fd263ef3548095befb8ea909ddfeaa1be3ac478b26506b23c426020da7a4cabb61d45db881bdc2aa1cb2a6d83b25ab2cb237b829f30c6b4616cb70
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 César Ferreira
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# react-native logcat [](http://badge.fury.io/rb/react-native-logcat)
|
2
|
+
|
3
|
+
> filter only the react native logcat
|
4
|
+
|
5
|
+
<p align="center">
|
6
|
+
<img src="https://raw.githubusercontent.com/cesarferreira/react-native-logcat/master/extras/screenshot.png" width="100%" />
|
7
|
+
</p>
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
$ gem install react-native-logcat
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
> react-native-logcat
|
16
|
+
|
17
|
+
## Contributing
|
18
|
+
|
19
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cesarferreira/react-native-logcat.
|
20
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "react-native-logcat"
|
5
|
+
|
6
|
+
trap("SIGINT") { throw :ctrl_c }
|
7
|
+
|
8
|
+
catch :ctrl_c do
|
9
|
+
begin
|
10
|
+
ReactNativeLogCat.start
|
11
|
+
rescue SystemExit, Interrupt
|
12
|
+
raise
|
13
|
+
rescue Exception => e
|
14
|
+
puts "Ok, i'll go!"
|
15
|
+
end
|
16
|
+
end
|
Binary file
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'open3'
|
2
|
+
require 'colorize'
|
3
|
+
|
4
|
+
module ReactNativeLogCat
|
5
|
+
|
6
|
+
def self.get_type(str)
|
7
|
+
|
8
|
+
if str[0..1] == "D/"
|
9
|
+
return str.green
|
10
|
+
end
|
11
|
+
|
12
|
+
if str[0..1] == "W/"
|
13
|
+
return str.yellow
|
14
|
+
end
|
15
|
+
|
16
|
+
return str
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.start
|
20
|
+
cmd='
|
21
|
+
adb logcat *:S ReactNative:V ReactNativeJS:V | {
|
22
|
+
while IFS= read -r line
|
23
|
+
do
|
24
|
+
echo "$line"
|
25
|
+
done
|
26
|
+
}'
|
27
|
+
|
28
|
+
IO.popen(cmd).each do |line|
|
29
|
+
puts self.get_type(line.chomp)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'react-native-logcat/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "react-native-logcat"
|
8
|
+
spec.version = ReactNativeLogCat::VERSION
|
9
|
+
spec.authors = ["cesar ferreira"]
|
10
|
+
spec.email = ["cesar.manuel.ferreira@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Colored logcat for react native}
|
13
|
+
spec.description = %q{Colored logcat for react native}
|
14
|
+
spec.homepage = "https://github.com/cesarferreira/react-native-logcat"
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.bindir = 'bin'
|
20
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.required_ruby_version = '>= 2.0.0'
|
24
|
+
|
25
|
+
|
26
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
27
|
+
spec.add_development_dependency 'rake', '~> 10.4'
|
28
|
+
|
29
|
+
spec.add_dependency 'colorize', '~> 0.7'
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: react-native-logcat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- cesar ferreira
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.4'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.4'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: colorize
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.7'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.7'
|
55
|
+
description: Colored logcat for react native
|
56
|
+
email:
|
57
|
+
- cesar.manuel.ferreira@gmail.com
|
58
|
+
executables:
|
59
|
+
- react-native-logcat
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/react-native-logcat
|
70
|
+
- extras/screenshot.png
|
71
|
+
- lib/react-native-logcat.rb
|
72
|
+
- lib/react-native-logcat/version.rb
|
73
|
+
- react-native-logcat.gemspec
|
74
|
+
homepage: https://github.com/cesarferreira/react-native-logcat
|
75
|
+
licenses:
|
76
|
+
- MIT
|
77
|
+
metadata: {}
|
78
|
+
post_install_message:
|
79
|
+
rdoc_options: []
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: 2.0.0
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 2.4.5.1
|
95
|
+
signing_key:
|
96
|
+
specification_version: 4
|
97
|
+
summary: Colored logcat for react native
|
98
|
+
test_files: []
|