telepathy 0.1.4 → 0.1.5

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: 43dd602e569e914f3c715be9712b1e39758d6516
4
- data.tar.gz: 628381af811fea9c1ed914b68b3a11ee0298d798
3
+ metadata.gz: f835f27d26e1ced895afe4724e18fc370d069614
4
+ data.tar.gz: 2b07d8e1c05977ff8229ae9b57d8ed5fe82557e9
5
5
  SHA512:
6
- metadata.gz: 516f2886f6f936e4e150365bc085946b36e8038cf8d8f9032d21211102d817eb9a7594c2bcbb4ea884a69c25cc55bfb48c1150159c7f1b40210e6dbf51458a9a
7
- data.tar.gz: dab26bc43433e2b75e670e819c19d501f003d21d9256279cdb6c449b64a7251c0326502e24fb2f2f297ac464ba6bc1d3b36a3e923e75f71e486a7e92f1515091
6
+ metadata.gz: c93f450bb0dd5e1e448db8f63899044aa43a4ebc2eb0df308fc444e16c34f428f7869fc65cfa05efa8ea53cd85ee73d700f6475e37ac4f8bb1ba22def530519f
7
+ data.tar.gz: 05a4201bf049a0d9ac27111cac9a0517c3d932e35bbd827107f8b21ef72db99085b2ffd869fb2e267ba6a92a32b6adb82316d14aa93728311079e40a150cc988
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Telepathy
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/telepathy`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A proxy and javascript injector in one. Combined with [Spyglass](https://github.com/avecchio/spyglass). You can do DOM inspection in a proxy!
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,11 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ```
24
+ require 'telepathy'
25
+ scripts = ['/assets/js/spyglass.js']
26
+ @page = Telepathy.bridge(params['url'], params['shadow'], scripts).html_safe
27
+ ```
26
28
 
27
29
  ## Development
28
30
 
@@ -38,4 +40,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
38
40
  ## License
39
41
 
40
42
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -1,9 +1,10 @@
1
1
  require "telepathy/version"
2
2
 
3
+ require 'rest-client'
3
4
  module Telepathy
4
5
  def self.bridge(url, xss, scripts)
5
6
  ghost_page = Net::HTTP.get_response(URI.parse(url)).body
6
- if xss
7
+ if xss.eql?('true')
7
8
  scripts.each do | script |
8
9
  ghost_page += "<script type='application/javascript' src='#{script}'></script>"
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module Telepathy
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -14,19 +14,12 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/avecchio/telepathy"
15
15
  spec.license = "MIT"
16
16
 
17
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
- # delete this section to allow pushing this gem to any host.
19
- if spec.respond_to?(:metadata)
20
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
21
- else
22
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
- end
24
-
25
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
18
  spec.bindir = "exe"
27
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
20
  spec.require_paths = ["lib"]
29
21
 
22
+ spec.add_dependency "rest-client", "~> 1.8"
30
23
  spec.add_development_dependency "bundler", "~> 1.10"
31
24
  spec.add_development_dependency "rake", "~> 10.0"
32
25
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telepathy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Vecchio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-29 00:00:00.000000000 Z
11
+ date: 2016-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.8'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,8 +74,7 @@ files:
60
74
  homepage: https://github.com/avecchio/telepathy
61
75
  licenses:
62
76
  - MIT
63
- metadata:
64
- allowed_push_host: 'TODO: Set to ''http://mygemserver.com'''
77
+ metadata: {}
65
78
  post_install_message:
66
79
  rdoc_options: []
67
80
  require_paths:
@@ -78,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
91
  version: '0'
79
92
  requirements: []
80
93
  rubyforge_project:
81
- rubygems_version: 2.0.14
94
+ rubygems_version: 2.5.1
82
95
  signing_key:
83
96
  specification_version: 4
84
97
  summary: A simple http proxy for DOM inspection