socketlabs-injectionapi 0.0.1.pre.Dev → 1.0.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: e2d10f6c8471fe7999410e8fafeb16c5d7faa4da
4
- data.tar.gz: e3bd681b0dac628cc859b68aee63ef8edd0cfb8c
3
+ metadata.gz: bc4a83cfd5b9e5639573ae5cfd732d7b0e164596
4
+ data.tar.gz: fe93f85997eca9c953ce918e33574a8560d5d31b
5
5
  SHA512:
6
- metadata.gz: a4241bc6bdf59617954e1555bab44299690908244b883180082b589c8e13df0b1ed586b369bb18cae6f8e55a4b0c5acdf0a151d6b9d34b6b56c484a07a1bb4fe
7
- data.tar.gz: 327a96a042b30e4724290697a3ec408c9521c11c1247c93f9014bf5afcd43117a678d6419f38ede1c4f91f8464ed256125d9fae70bd356ab89b87bbcf09b3c61
6
+ metadata.gz: a8d0166c49ed549e8287cac0e0172a615216ee895cfb4dd2619fb39a0b0da4882dafc1736128c6bea740e5e02145f5a56fc43d3dfd64ec80bb3e9b524d4af396
7
+ data.tar.gz: 8062a669ec443aa0042bcb6e1bf5b2598661222aca22f6a3171a7c1169d39f9a7461d6e5fd3fdaeb7ffcafafabc3db334b8878abe6869c18f960b698b0347f7a
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.zip
3
4
  /.config
4
5
  /coverage/
5
6
  /InstalledFiles
data/.idea/workspace.xml CHANGED
@@ -5,10 +5,7 @@
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
7
  <list default="true" id="85d88e06-b233-47b5-8542-3cede01dcf1c" name="Default Changelist" comment="">
8
- <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/gemfile.lock" beforeDir="false" afterPath="$PROJECT_DIR$/gemfile.lock" afterDir="false" />
10
8
  <change beforePath="$PROJECT_DIR$/lib/socketlabs/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/socketlabs/version.rb" afterDir="false" />
11
- <change beforePath="$PROJECT_DIR$/socketlabs-injectionapi.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/socketlabs-injectionapi.gemspec" afterDir="false" />
12
9
  </list>
13
10
  <option name="SHOW_DIALOG" value="false" />
14
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -61,7 +58,7 @@
61
58
  </component>
62
59
  <component name="PropertiesComponent">
63
60
  <property name="WebServerToolWindowFactoryState" value="false" />
64
- <property name="last_opened_file_path" value="$PROJECT_DIR$/examples/basic/basic_send_with_ascii_charset.rb" />
61
+ <property name="last_opened_file_path" value="$PROJECT_DIR$/../TestApps/Ruby-Test" />
65
62
  <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
66
63
  </component>
67
64
  <component name="RecentsManager">
@@ -355,7 +352,7 @@
355
352
  <workItem from="1579285524030" duration="11653000" />
356
353
  <workItem from="1579527438339" duration="228000" />
357
354
  <workItem from="1579529396526" duration="17580000" />
358
- <workItem from="1579786700388" duration="31749000" />
355
+ <workItem from="1579786700388" duration="35438000" />
359
356
  </task>
360
357
  <servers />
361
358
  </component>
@@ -371,10 +368,10 @@
371
368
  <screen x="0" y="0" width="1920" height="1040" />
372
369
  </state>
373
370
  <state width="759" height="466" key="DebuggerActiveHint/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580218533395" />
374
- <state x="740" y="279" key="FileChooserDialogImpl" timestamp="1580303716707">
371
+ <state x="740" y="279" key="FileChooserDialogImpl" timestamp="1580317883075">
375
372
  <screen x="0" y="0" width="1920" height="1040" />
376
373
  </state>
377
- <state x="740" y="279" key="FileChooserDialogImpl/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580303716707" />
374
+ <state x="740" y="279" key="FileChooserDialogImpl/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580317883075" />
378
375
  <state width="1877" height="302" key="GridCell.Tab.0.bottom" timestamp="1580247104039">
379
376
  <screen x="0" y="0" width="1920" height="1040" />
380
377
  </state>
@@ -419,10 +416,10 @@
419
416
  <screen x="-1920" y="0" width="1920" height="1040" />
420
417
  </state>
421
418
  <state x="-1599" y="0" width="1615" height="720" key="dock-window-1/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580240990139" />
422
- <state x="667" y="276" width="586" height="488" key="find.popup" timestamp="1580230741250">
419
+ <state x="667" y="276" width="586" height="488" key="find.popup" timestamp="1580317019024">
423
420
  <screen x="0" y="0" width="1920" height="1040" />
424
421
  </state>
425
- <state x="667" y="276" width="586" height="488" key="find.popup/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580230741250" />
422
+ <state x="667" y="276" width="586" height="488" key="find.popup/0.0.1920.1040/-1920.0.1920.1040@0.0.1920.1040" timestamp="1580317019024" />
426
423
  </component>
427
424
  <component name="XDebuggerManager">
428
425
  <watches-manager>
data/README.MD CHANGED
@@ -35,9 +35,9 @@ Install it yourself as:
35
35
  $ gem install socketlabs-injectionapi
36
36
 
37
37
  Or From git
38
- ```
39
- gem "socketlabs-injectionapi", :git => "git://github.com:socketlabs/socketlabs-ruby.git"
40
- ```
38
+
39
+ $ gem 'socketlabs-injectionapi', :git => "https://github.com/socketlabs/socketlabs-ruby.git"
40
+
41
41
 
42
42
  For more information please see the [Installing Gems](https://guides.rubygems.org/rubygems-basics/) tutorial
43
43
 
data/gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- socketlabs-injectionapi (0.0.1.pre.Dev)
4
+ socketlabs-injectionapi (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -35,9 +35,15 @@ module SocketLabs
35
35
  end
36
36
  end
37
37
 
38
+ def response_name
39
+ unless @result.nil?
40
+ @result[:name]
41
+ end
42
+ end
43
+
38
44
  # Represents the SendResponse as a str.
39
45
  def to_s
40
- "#{@result}: #{response_message}"
46
+ "#{response_name}: #{response_message}"
41
47
  end
42
48
 
43
49
  # build json hash for SendResponse
@@ -15,6 +15,9 @@ module SocketLabs
15
15
  include SocketLabs::InjectionApi::Message
16
16
 
17
17
  public
18
+ attr_reader :request_json
19
+ attr_reader :response_json
20
+
18
21
  def initialize (
19
22
  server_id,
20
23
  api_key,
@@ -45,6 +48,9 @@ module SocketLabs
45
48
 
46
49
  end
47
50
 
51
+ def to_s
52
+ "#{@endpoint}::#{@server_id}:#{@api_key}"
53
+ end
48
54
 
49
55
  private
50
56
  # Your SocketLabs ServerId number.
@@ -76,10 +82,11 @@ module SocketLabs
76
82
  # debug
77
83
  request_hash = request.to_hash
78
84
  debug_json = request_hash.to_json
79
- puts debug_json
85
+ @request_json = debug_json
80
86
 
81
87
  http_request = HttpRequest.new(http_method, { :http_endpoint => @endpoint, :proxy => @proxy })
82
- http_request.send_request(request)
88
+ response = http_request.send_request(request)
89
+ @response_json = response.to_json
83
90
 
84
91
  end
85
92
 
@@ -99,10 +106,11 @@ module SocketLabs
99
106
  # debug
100
107
  request_hash = request.to_hash
101
108
  debug_json = request_hash.to_json
102
- puts debug_json
109
+ @request_json = debug_json
103
110
 
104
111
  http_request = HttpRequest.new(http_method, { :http_endpoint => @endpoint, :proxy => @proxy })
105
- http_request.send_request(request)
112
+ response = http_request.send_request(request)
113
+ @response_json = response.to_json
106
114
 
107
115
  end
108
116
 
@@ -1,5 +1,5 @@
1
1
  module SocketLabs
2
2
  module InjectionApi
3
- VERSION = '0.0.1-Dev'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socketlabs-injectionapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.Dev
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Schrenker
@@ -73,9 +73,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  version: '2.4'
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">"
76
+ - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 1.3.1
78
+ version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
81
  rubygems_version: 2.6.14.3