notifications_opener 1.0.0 → 1.1.0

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: cbe997acbef7f55540dfe1e8742d55924d090b0e
4
- data.tar.gz: 477e395a0513975bb2c8d2ae34aec3a47ce9f1c8
3
+ metadata.gz: 53f7a8824a8109b91fce064cc6f974cfcb3b14ab
4
+ data.tar.gz: 673c7042eea4350d275d22046db58b716b602ee3
5
5
  SHA512:
6
- metadata.gz: f2015ace7ef91a4ad247068a8ab3584f8bf84af5612b97a19b4b0ddb1e7a1f7a87573c427511fb3e253ac12d7e78d465fb13aa79cad4a12cc192936419fbe88f
7
- data.tar.gz: 8b490c37b4d2579874adff4f07953c6c41bfef3088397fbe552aee7775e40589c8f773edff5580f100e9fb54c0d051b07bf9be60cb7a639c52fb22af65990e86
6
+ metadata.gz: 1c8d877b583341e5e6687a627a64dc2b6b95ee1faa098ffc1943f465ee2f2096d92d64d09c762c52f948af6c81b6b1338b4e759d6522fc6aff4c6206ecd8f39c
7
+ data.tar.gz: b399066e4c77c431596a63fd135bb37789da4092c8b53ec9c64f6a0d04505f93b4b897a2bfcd4b3ee51a3f7c11a3a444560cad01e70781560a10a2922641197c
@@ -1,16 +1,20 @@
1
1
  require 'webmock'
2
2
  require 'rack'
3
+
3
4
  ##
4
5
  # On requiring webmock it disables HTTP connections by default
5
6
  # so we need to call this method after requiring it, since we only
6
7
  # want stub the url that has been passed in the configuration
7
- WebMock.allow_net_connect!
8
8
 
9
9
  module NotificationsOpener
10
10
  ##
11
11
  # This class represents as an interceptor for the HTTP requests to the
12
12
  # specified URL
13
13
  class Interceptor
14
+ include WebMock::API
15
+ WebMock.enable!
16
+ WebMock.allow_net_connect!
17
+
14
18
  attr_accessor :config,
15
19
  :response_handler,
16
20
  :type
@@ -27,7 +31,7 @@ module NotificationsOpener
27
31
  # out the sender, receiver and the message so we
28
32
  # pass it on a rack application
29
33
  def intercept_and_redirect_to_rack_app
30
- WebMock.stub_request(:any, config[:url]).to_rack(response_handler)
34
+ stub_request(:any, config[:url]).to_rack(response_handler)
31
35
  end
32
36
  end
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module NotificationsOpener
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_development_dependency 'bundler', '~> 1.11'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
- spec.add_development_dependency 'pry'
25
- spec.add_development_dependency 'httparty'
24
+ spec.add_development_dependency 'pry', '~> 0'
25
+ spec.add_development_dependency 'httparty', '~> 0'
26
26
 
27
- spec.add_dependency 'webmock', '>= 1.0'
28
- spec.add_dependency 'rack'
27
+ spec.add_dependency 'webmock', '~> 2.1'
28
+ spec.add_dependency 'rack', '~> 0'
29
29
  spec.add_dependency 'launchy', '~> 2.2'
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifications_opener
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - abhisheksarka
@@ -42,56 +42,56 @@ dependencies:
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: httparty
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: '2.1'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: '2.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rack
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency