http_range 1.1.1 → 1.2.0
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 +4 -4
- data/lib/http_range/parser.rb +2 -2
- data/lib/http_range/version.rb +1 -1
- data/spec/http_range_spec.rb +18 -0
- data/spec/middleware/accept_ranges_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b3a78f935e3df0d2506ce61fd577f514be04c2a
|
4
|
+
data.tar.gz: d851832a14182dec3c044d3dd604899f9c501ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ff3237e954af1b0fd8ecefc652fe2f1013e3ab1f212d529acf12eb119b85d5653a22cf024adf642dc2b0e0dfa33c1d0f1ce44fbd50c9df5014fcc581aefea4b
|
7
|
+
data.tar.gz: 0fbe6c90f0acc760a61072461d6eeb0deb34fd8326c105e15905f142ca01aec50914eafcb5ec40fa34d43179529b40f497c492ed709ab58c9c0be4c08f36580c
|
data/lib/http_range/parser.rb
CHANGED
data/lib/http_range/version.rb
CHANGED
data/spec/http_range_spec.rb
CHANGED
@@ -33,6 +33,24 @@ RSpec.describe HTTPRange do
|
|
33
33
|
it { expect(subject.order).to eq('desc') }
|
34
34
|
end
|
35
35
|
|
36
|
+
context "for a Range header with no first or last endpoints" do
|
37
|
+
let(:header) { "Range: created_at .." }
|
38
|
+
|
39
|
+
it { expect(subject.attribute).to eq('created_at') }
|
40
|
+
it { expect(subject.first).to be_nil }
|
41
|
+
it { expect(subject.last).to be_nil }
|
42
|
+
it { expect(subject.max).to be_nil }
|
43
|
+
end
|
44
|
+
|
45
|
+
context "for a Range header with ISO-8601 dates plus nanoseconds" do
|
46
|
+
let(:header) { "Range: created_at 2014-09-23T17:21:10.324562213Z..2014-09-23T17:21:10.328823821Z" }
|
47
|
+
|
48
|
+
it { expect(subject.attribute).to eq('created_at') }
|
49
|
+
it { expect(subject.first).to eq('2014-09-23T17:21:10.324562213Z') }
|
50
|
+
it { expect(subject.last).to eq('2014-09-23T17:21:10.328823821Z') }
|
51
|
+
it { expect(subject.max).to be_nil }
|
52
|
+
end
|
53
|
+
|
36
54
|
context "for a Range header with an invalid order param" do
|
37
55
|
let(:header) { "Range: purple.cycle-cleaner_knob ]1e3f..2e5a; order=true" }
|
38
56
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_range
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Fults
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|