dead_mans_snitch 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dead_mans_snitch.rb +11 -8
  2. metadata +20 -39
@@ -5,13 +5,16 @@ require 'uri'
5
5
 
6
6
  class DeadMansSnitch
7
7
  def self.report snitch_id, message=nil
8
- dead_mans_snitch_url = "https://nosnch.in/#{snitch_id}"
9
- uri = URI.parse(dead_mans_snitch_url)
10
- http = Net::HTTP.new(uri.host, uri.port)
11
- http.use_ssl = true
12
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
13
- request = Net::HTTP::Post.new(uri.request_uri)
14
- request.set_form_data( "m" => message )
15
- response = http.request(request)
8
+ begin
9
+ dead_mans_snitch_url = "https://nosnch.in/#{snitch_id}"
10
+ uri = URI.parse(dead_mans_snitch_url)
11
+ http = Net::HTTP.new(uri.host, uri.port)
12
+ http.use_ssl = true
13
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
14
+ request = Net::HTTP::Post.new(uri.request_uri)
15
+ request.set_form_data( "m" => message )
16
+ response = http.request(request)
17
+ rescue Exception => e
18
+ end
16
19
  end
17
20
  end
metadata CHANGED
@@ -1,67 +1,48 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dead_mans_snitch
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 2
10
- version: 1.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kyle Burton <kyle.burton@gmail.com>
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-10-07 00:00:00 Z
12
+ date: 2012-10-07 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: A gem to make using https://deadmanssnitch.com simple.
22
- email:
15
+ email:
23
16
  - kburton@gmail.com
24
17
  executables: []
25
-
26
18
  extensions: []
27
-
28
- extra_rdoc_files:
19
+ extra_rdoc_files:
29
20
  - README.textile
30
- files:
21
+ files:
31
22
  - README.textile
32
23
  - lib/dead_mans_snitch.rb
33
24
  homepage: https://github.com/kyleburton/dead-mans-snitch
34
25
  licenses: []
35
-
36
26
  post_install_message:
37
27
  rdoc_options: []
38
-
39
- require_paths:
28
+ require_paths:
40
29
  - lib
41
- required_ruby_version: !ruby/object:Gem::Requirement
30
+ required_ruby_version: !ruby/object:Gem::Requirement
42
31
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 3
47
- segments:
48
- - 0
49
- version: "0"
50
- required_rubygems_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
37
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- hash: 3
56
- segments:
57
- - 0
58
- version: "0"
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
59
42
  requirements: []
60
-
61
43
  rubyforge_project:
62
- rubygems_version: 1.8.15
44
+ rubygems_version: 1.8.19
63
45
  signing_key:
64
46
  specification_version: 3
65
47
  summary: A gem to make using https://deadmanssnitch.com simple.
66
48
  test_files: []
67
-