uri-builder 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 79be4540f2657d7541d12a963a291725e09616a69419766c4837bce4fcf1427e
4
- data.tar.gz: 056da9654ee9d8e6ef02aa9d506875c96bf7b3e7101bff7ae7d63dcc60a57930
3
+ metadata.gz: b69f5e073f703a5a7db7f2141972fe6d5ba2563cdcec737e0e7e7d37107cd6d6
4
+ data.tar.gz: 646518f42cb158b74606820b738410f88d38718918ccd31e559b0bb76ab046ae
5
5
  SHA512:
6
- metadata.gz: 9dd79c9d2bf080139d01e3cc73b056bec41ce63328f1c5867e78f994580db79e73adec4e62aa791ac4eb8ff11886ba0bdc44e3cc1ef02c8b0dec7874ed2d9912
7
- data.tar.gz: b472b4e23463a4096ccb9d4c562f607b8057b6d476db67ca0eb904f312d570635404679c2cc3938ad580fb34c7fc9242f58c5697fc5612abb643b4c15063fc44
6
+ metadata.gz: 9ee61e1aabd9c5e95600a4a132580cb6484c8739935033dfc97304feda0fd43f1c95054be58e1ca8b6b941bd28b05bd8a17f006af39ea3a8a9af8255cb37da38
7
+ data.tar.gz: 07f70063a08dc1420631b829e5ee10b09066c08cb76e61f8907efe3613055b986a4db746d2d65cb22b9df7d0f66e3890d730231767ad35d430a6b8673ba73e8c
data/Gemfile.lock CHANGED
@@ -1,17 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uri-builder (0.1.0)
4
+ uri-builder (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- coderay (1.1.3)
10
9
  diff-lcs (1.5.0)
11
- method_source (1.0.0)
12
- pry (0.14.1)
13
- coderay (~> 1.1)
14
- method_source (~> 1.0)
15
10
  rake (13.0.6)
16
11
  rspec (3.10.0)
17
12
  rspec-core (~> 3.10.0)
@@ -28,10 +23,10 @@ GEM
28
23
  rspec-support (3.10.3)
29
24
 
30
25
  PLATFORMS
26
+ arm64-darwin-21
31
27
  x86_64-darwin-20
32
28
 
33
29
  DEPENDENCIES
34
- pry
35
30
  rake (~> 13.0)
36
31
  rspec (~> 3.0)
37
32
  uri-builder!
@@ -2,6 +2,6 @@
2
2
 
3
3
  module URI
4
4
  module Build
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
data/lib/uri/builder.rb CHANGED
@@ -14,7 +14,7 @@ module URI
14
14
  @uri = uri.clone
15
15
  end
16
16
 
17
- [:host, :scheme, :path, :query, :fragment, :port].each do |property|
17
+ [:host, :scheme, :query, :fragment, :port].each do |property|
18
18
  define_method property do |value|
19
19
  wrap property, value
20
20
  end
@@ -31,6 +31,11 @@ module URI
31
31
  wrap :query, value
32
32
  end
33
33
 
34
+ def path(value)
35
+ # Make sure there's a leading / if a non leading / is given.
36
+ wrap :path, ::File.join("/", value)
37
+ end
38
+
34
39
  def to_s
35
40
  uri.to_s
36
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uri-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-05 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Build URIs via chains
14
14
  email:
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  requirements: []
52
- rubygems_version: 3.2.3
52
+ rubygems_version: 3.3.7
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Build URIs via chains