errawr-http 1.0.1 → 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: 2515c1f549abe744b3b4811a47a72da5f626b69b
4
- data.tar.gz: 03396466c88ac87238831103feebcfdf256ebd75
3
+ metadata.gz: be221ea8098e9074a8a4a09b79190276715b027f
4
+ data.tar.gz: 613802b32f7a44fb819c912e896f7ff1fed7c33e
5
5
  SHA512:
6
- metadata.gz: cb578af01ca5c00849a95b1898ed38416763fd9e5e5740cd88b71e30f560ee345fc53ddf8419166a28f5d7faf6a40aa897d2f68c4463468df41597ed28e6ddae
7
- data.tar.gz: 831fcbf348c4cfe714aba886c5af049ed51c2abd52ddb81f534cb398adc8bed8d00edbe5e34c7a42577c3fda75ad1d40a765df2831f0af0be4e2a99e1c0c9611
6
+ metadata.gz: 759410f2953f819a6d983663da50869cd7805b8120ff84f66dd2ec531f74f7a9c20ab310a0af790548a555b70ff04aa1ebc120a50bdfcdb596609d86cd505ad3
7
+ data.tar.gz: 35dd60fd96ca4c6ab245d659f00909be1309f116540f9a50042d27b6706d931b6b989cb1c586d0d2965a79ec53e381195a29e748e3dfa6b70c0345f5fc02cf51
@@ -2,7 +2,13 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.0
6
+ - 2.2.0
5
7
  - ruby-head
6
8
  - jruby-19mode
7
9
  - jruby-head
8
- - rbx-19mode
10
+ - rbx
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: ruby-head
14
+ - rvm: jruby-head
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in errawr-http.gemspec
4
4
  gemspec
5
5
 
6
- gem 'coveralls', require: false
6
+ gem 'coveralls', require: false
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_runtime_dependency 'errawr', '>= 1.1.3'
21
+ spec.add_runtime_dependency 'errawr', '~> 1.2.0'
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 1.3'
24
24
  spec.add_development_dependency 'rake'
@@ -6,55 +6,5 @@ module Errawr
6
6
  module HTTP
7
7
  I18n.load_path << "#{File.dirname(__FILE__)}/http/locale/en.yml"
8
8
  I18n.reload!
9
-
10
- ERRORS_4XX = [
11
- :bad_request,
12
- :unauthorized,
13
- :payment_required,
14
- :forbidden,
15
- :not_found,
16
- :method_not_allowed,
17
- :not_acceptable,
18
- :proxy_authentication_required,
19
- :request_timeout,
20
- :conflict,
21
- :gone,
22
- :length_required,
23
- :precondition_failed,
24
- :request_entity_too_large,
25
- :request_uri_too_long,
26
- :unsupported_media_type,
27
- :requested_range_not_satisfiable,
28
- :expectation_failed,
29
- :unprocessable_entity,
30
- :locked,
31
- :failed_dependency,
32
- :upgrade_required,
33
- :precondition_required,
34
- :too_many_requests,
35
- :request_header_fields_too_large
36
- ]
37
-
38
- ERRORS_5XX = [
39
- :internal_server_error,
40
- :not_implemented,
41
- :bad_gateway,
42
- :service_unavailable,
43
- :gateway_timeout,
44
- :http_version_not_supported,
45
- :variant_also_negotiates,
46
- :insufficient_storage,
47
- :loop_detected,
48
- :not_extended,
49
- :network_authentication_required
50
- ]
51
-
52
- ERRORS_4XX.each do |e|
53
- Errawr.register!(e)
54
- end
55
-
56
- ERRORS_5XX.each do |e|
57
- Errawr.register!(e)
58
- end
59
9
  end
60
10
  end
@@ -1,5 +1,5 @@
1
1
  module Errawr
2
2
  module HTTP
3
- VERSION = "1.0.1"
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -28,7 +28,7 @@ describe Errawr::HTTP do
28
28
  [429, :too_many_requests],
29
29
  [431, :request_header_fields_too_large]
30
30
  ]
31
-
31
+
32
32
  ERRORS_5XX = [
33
33
  [500, :internal_server_error],
34
34
  [501, :not_implemented],
@@ -42,24 +42,24 @@ describe Errawr::HTTP do
42
42
  [510, :not_extended],
43
43
  [511, :network_authentication_required]
44
44
  ]
45
-
45
+
46
46
  ERRORS_4XX.each do |error|
47
47
  it "should define 4XX error #{error[0]}" do
48
48
  begin
49
49
  Errawr.error!(error[1])
50
50
  rescue => e
51
- e.context[:http_status].should == error[0]
51
+ expect(e.context[:http_status]).to eq(error[0])
52
52
  end
53
53
  end
54
54
  end
55
-
55
+
56
56
  ERRORS_5XX.each do |error|
57
57
  it "should define 5XX error #{error[0]}" do
58
58
  begin
59
59
  Errawr.error!(error[1])
60
60
  rescue => e
61
- e.context[:http_status].should == error[0]
61
+ expect(e.context[:http_status]).to eq(error[0])
62
62
  end
63
63
  end
64
64
  end
65
- end
65
+ end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errawr-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-20 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: errawr
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.3
19
+ version: 1.2.0
20
20
  type: :runtime
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.1.3
26
+ version: 1.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
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: rspec
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
  description: Raise 4xx and 5xx HTTP status code errors using Errawr
@@ -73,8 +73,8 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".travis.yml"
78
78
  - Gemfile
79
79
  - LICENSE.txt
80
80
  - README.md
@@ -95,17 +95,17 @@ require_paths:
95
95
  - lib
96
96
  required_ruby_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.0.3
108
+ rubygems_version: 2.4.5
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Predefined 4xx and 5xx HTTP status codes in Errawr