rack-logs 0.0.6 → 0.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
- SHA1:
3
- metadata.gz: 4575e0bb12c3a7a40a4944d6cb483cbc9196556d
4
- data.tar.gz: cb3292da057263b3cd8600c91d26d64658319ed6
2
+ SHA256:
3
+ metadata.gz: f165531a8b147d8292d9b6d9f77c6f36fdd573c68ef5c6a9b16adcfcfa6efc84
4
+ data.tar.gz: 0b2ad287b0f3da84ef9d0353639736aca56b1ba0e9c0da3ace5ced8a2d1688f5
5
5
  SHA512:
6
- metadata.gz: 3a28d2a3abba0c9db176b4cf233a2461de374bfda155f1ddcef5eb181986ba3b9421c63cdc0784cf8d5d5ab16a2a587cf2fd1ae57c24e447b60e5455c8b3700f
7
- data.tar.gz: 0c05f19d7a8c5aefad001c6fb37187139620363b2804db4aca6bfbc3251a93d44d698f9b77f7a63dc1efd54c3a6e2983c83d1eead834b9675dfa0e6b2d900805
6
+ metadata.gz: 7f590f556b8de25962951ef9efe48f59d5940786527e14dc67288c7aaf4c9d90a87dc99644d6101c3d21b2c97cc6f952a2b05699dca72ca4d7d667bdf70f1575
7
+ data.tar.gz: 7da61b166d037e69d08e2f7102ee74a080a60473e023879e9c8504ce01a6ad78051f1ebfc233941c3cf5719665edb36dddd0db3c3fa77c81289e048bd1af4a7e
@@ -1,12 +1,15 @@
1
+ # In order to install old Rubies, we need to use old Ubuntu distibution.
2
+ dist: trusty
1
3
  language: ruby
2
4
  bundler_args: "--standalone --binstubs"
3
5
  rvm:
4
6
  - 1.9.2
5
7
  - 1.9.3
6
- - jruby-19mode
7
- - rbx-2.2.1
8
8
  - 2.0.0
9
- - 2.1.0
10
- matrix:
11
- allow_failures:
12
- - rvm: rbx-2.2.1
9
+ - 2.1
10
+ - 2.2.10
11
+ - 2.3.8
12
+ - 2.4.10
13
+ - 2.5.8
14
+ - 2.6.6
15
+ - 2.7.1
@@ -1,5 +1,9 @@
1
1
  require "rack/logs/version"
2
2
 
3
+ if RUBY_VERSION.to_f < 2
4
+ require 'rack/logs/backport'
5
+ end
6
+
3
7
  module Rack
4
8
  module Logs
5
9
  module_function
@@ -0,0 +1,7 @@
1
+ class String
2
+
3
+ def prepend other
4
+ insert 0, other
5
+ end
6
+
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Logs
3
- VERSION = "0.0.6"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -66,7 +66,7 @@ module Rack
66
66
  buffer = file.read
67
67
  end
68
68
 
69
- buffer.lines.pop n
69
+ buffer.lines.to_a.pop n
70
70
  end
71
71
 
72
72
  end
@@ -18,10 +18,23 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
  spec.required_ruby_version = '> 1.9'
20
20
 
21
- spec.add_runtime_dependency "rack", "~> 1.5.2"
21
+ if RUBY_VERSION.to_f < 2.3
22
+ spec.add_runtime_dependency "rack", "~> 1.6.12"
23
+ else
24
+ spec.add_runtime_dependency "rack", "~> 2.2.3"
25
+ end
22
26
 
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
27
+ if RUBY_VERSION.to_f < 1.9 || RUBY_VERSION == '1.9.2'
28
+ spec.add_development_dependency "rake", "~> 10.0.0"
29
+ elsif RUBY_VERSION.to_f < 2
30
+ spec.add_development_dependency "rake", "~> 11.0.0"
31
+ elsif RUBY_VERSION.to_f < 2.3
32
+ spec.add_development_dependency "rake", "~> 12.3.2"
33
+ else
34
+ spec.add_development_dependency "rake", "~> 13.0.0"
35
+ end
36
+
37
+ spec.add_development_dependency "bundler"
25
38
  spec.add_development_dependency "rack-test"
26
- spec.add_development_dependency "rspec", "~> 3.0.0.beta1"
39
+ spec.add_development_dependency "rspec", "~> 3.9.0"
27
40
  end
@@ -26,8 +26,15 @@ describe 'Rack::Logs::Viewer' do
26
26
  end
27
27
 
28
28
  shared_examples_for "a rack logs response" do
29
+ integer_const =
30
+ if ENV["RUBY_VERSION"].to_f >= 2.4
31
+ Integer
32
+ else
33
+ Fixnum
34
+ end
35
+
29
36
  it 'returns a rack response' do
30
- expect(response[0]).to be_a Fixnum
37
+ expect(response[0]).to be_a integer_const
31
38
  expect(response[1]).to be_a Hash
32
39
  expect(response[1].keys).to include 'Content-Type'
33
40
  expect(response[2].respond_to? :each).to be true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Rowe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-06 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -16,30 +16,30 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.5.2
19
+ version: 2.2.3
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.5.2
26
+ version: 2.2.3
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
33
+ version: 13.0.0
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
- version: '1.3'
40
+ version: 13.0.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 3.0.0.beta1
75
+ version: 3.9.0
76
76
  type: :development
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: 3.0.0.beta1
82
+ version: 3.9.0
83
83
  description: Simple rack based log viewer
84
84
  email:
85
85
  - hello@jonrowe.co.uk
@@ -96,6 +96,7 @@ files:
96
96
  - Rakefile
97
97
  - lib/rack-logs.rb
98
98
  - lib/rack/logs.rb
99
+ - lib/rack/logs/backport.rb
99
100
  - lib/rack/logs/config.rb
100
101
  - lib/rack/logs/version.rb
101
102
  - lib/rack/logs/viewer.rb
@@ -133,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
134
  - !ruby/object:Gem::Version
134
135
  version: '0'
135
136
  requirements: []
136
- rubyforge_project:
137
- rubygems_version: 2.2.0
137
+ rubygems_version: 3.1.3
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: Simple rack based log viewer