dtracer 0.0.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35633957f1d2837f8e43d24ad211683ebb434dee
4
- data.tar.gz: fe3d29ee7ff8ead9e2f3da297bb3649fb8c371ae
3
+ metadata.gz: 615a6ebb2694accfce6866e83f5a6fe5b970af7d
4
+ data.tar.gz: 65e6b3632bfe2883b5234d88df07498a4fba4fe8
5
5
  SHA512:
6
- metadata.gz: 348da84583a7df13c9cc386147b99b241470b273fd6a49aae8b9e06db25b6b02328ffa4d0907cb9537870f462972aedd435113059992d5efc19167eda2f7a662
7
- data.tar.gz: e1d2210e72e66253d3be0aa5a3bcfd5b98d99355ae37bd4f7eecf5b8e52ae078fe725e625228ee00b7c2e417e5429010ad756f3d3a88b9406af5ce6bbe57578e
6
+ metadata.gz: 33ccbcfefdeea9ed1510811076115eabcdba0189551cf91031e98248c1188beb8cec81ca838ae08a4c05414dad50d714d8b8fe2dd0417798f6c45391df53a785
7
+ data.tar.gz: 833d13ddf2425f3bb1f7a85e6eb8f31360d937024784bc89d8d7fc6f25994ec2d8b857e1b3966cd543891c4d4656f8df4ae0e8c72f06deb9faf9251635d68528
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # DTracer
2
2
 
3
+ [![Build Status](https://travis-ci.org/oarrabi/dtracer.svg?branch=master)](https://travis-ci.org/oarrabi/dtracer)
4
+
3
5
  DTracer is part ruby gem, part iOS pod, that helps the sending and receiving of DTrace commands.
4
6
  The `dtracer` gem will listen to the DTrace commands that are sent from the [OADTraceSender]() pod.
5
7
 
@@ -35,6 +37,7 @@ Note: registering a probe using DTrace requires admin privileges, running any dt
35
37
  One good usage of DTrace is to log the network communicate instead of polluting the Xcode console.
36
38
 
37
39
  Using DTrace to log network communication has the following benefits:
40
+
38
41
  - Avoids Xcode console pollution with network logs.
39
42
  - Extremely cheap; probes that are not being listened do not add any overhead.
40
43
 
@@ -44,15 +47,34 @@ Using `dtracer` command you can register 3 types of tracers.
44
47
 
45
48
  #### Request probes
46
49
  These are probes that listens to dtrace command sent from `[OADTracer traceRequest:]` objc method.
47
- - `tracer curl`: outputs the the `NSURLRequest` send with the dtrace event as a curl command.
48
- - `tracer details`: outputs the the `NSURLRequest` send with the dtrace event as a formatted string. You can pass it multiple flags to decide what to print from the request.
49
50
 
50
- Using the `-r` flag with both of the above will add a response probe tee.
51
+ ##### Curl
52
+
53
+ dtracer curl
54
+
55
+ Outputs the the `NSURLRequest` send with the dtrace event as a curl command.
56
+
57
+ ##### Details
58
+
59
+ dtracer details
60
+
61
+ Outputs the the `NSURLRequest` send with the dtrace event as a formatted string. You can pass it multiple flags to decide what to print from the request.
62
+
63
+ run `dtracer help details` to check how to customize the output.
64
+
65
+
66
+ Using the `-r` flag with both of the above commands will add a response probe output.
51
67
 
52
68
  #### Response probes
53
- `dtracer response` adds a probe that outputs the `NSURLResponse`, `NSData` and `NSError` combination, sent using `[OADTracer traceResponse:data:error:]` objc method.
69
+
70
+ dtracer response
71
+
72
+ dtracer response adds a probe that outputs the `NSURLResponse`, `NSData` and `NSError` combination, sent using `[OADTracer traceResponse:data:error:]` objc method.
54
73
 
55
74
  #### String probes
75
+
76
+ dtracer custom
77
+
56
78
  In case you have the need to send any arbitrary string, then use `dtracer custom`; This command adds a probe that prints any string sent using `[OADTracer traceString:]` objc method.
57
79
 
58
80
  ## Contributing
data/Rakefile CHANGED
@@ -4,4 +4,6 @@ require 'rspec/core/rake_task'
4
4
  RSpec::Core::RakeTask.new :test do |task|
5
5
  task.verbose = false
6
6
  task.rspec_opts = ['--color', '--format', 'doc']
7
- end
7
+ end
8
+
9
+ task :default => :test
@@ -19,7 +19,7 @@ The `dtracer` gem will listen to the DTrace commands that are sent from the [OAD
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec"
25
25
  spec.add_dependency "thor"
@@ -33,9 +33,8 @@ class DTracer::CLI < Thor
33
33
  option :b, :aliases => ["--body"], :type => :boolean, desc: "show the http body"
34
34
  option :m, :aliases => ["--method"], :type => :boolean, desc: "show the http method"
35
35
  option :u, :aliases => ["--url"], :type => :boolean, desc: "show the http url"
36
- option :h, :aliases => ["--headers"], :type => :boolean, desc: "show the http url"
37
- option :c, :aliases => ["--cookies"], :type => :boolean, desc: "show the http url"
38
- option :q, :aliases => ["--quiet"], :type => :boolean, desc: "show the http url"
36
+ option :h, :aliases => ["--headers"], :type => :boolean, desc: "show the http headers"
37
+ option :c, :aliases => ["--cookies"], :type => :boolean, desc: "show the http cookies"
39
38
  option :r, :aliases => ["--response"], :type => :boolean, desc: "include the request response"
40
39
  desc "details", "register a curl probe"
41
40
 
@@ -1,5 +1,5 @@
1
1
  require "open3"
2
-
2
+ require 'dtracer/builder'
3
3
  class ProbeListener
4
4
 
5
5
  def initialize(name, is_hash)
@@ -1,3 +1,3 @@
1
1
  module DTracer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omar Abdelhafith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-20 00:00:00.000000000 Z
11
+ date: 2014-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -77,6 +77,7 @@ extensions: []
77
77
  extra_rdoc_files: []
78
78
  files:
79
79
  - .gitignore
80
+ - .travis.yml
80
81
  - Gemfile
81
82
  - LICENSE.txt
82
83
  - README.md