bootstrap_builders 0.0.46 → 0.0.47
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc9a6be5ed87301fdd1ded3bccb58339c2a20d2
|
4
|
+
data.tar.gz: 066ef998eada4f5902a78731b971df6d3482f55b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368ecff76af0c94c38dc0ac12fcaa2edd9a6cbefc5f4e2fdf1edc44d65c0438ba0f7382057e73cbaa738bc9a870e05d78ddfa72fce3ff04125b41bcbab38c080
|
7
|
+
data.tar.gz: 65a25a2ff804354d8ca7853f848e07607f0b4831291836f261deb209b22787b64f7f5dff39f98f8bef113dcfa42666386eaf9382d5316c18b2f35ef066e55069
|
@@ -4,24 +4,24 @@
|
|
4
4
|
|
5
5
|
Start by making a new object with any given URL
|
6
6
|
|
7
|
-
```
|
8
|
-
urlb = new UrlBuilder.new(window.location.href)
|
7
|
+
```js
|
8
|
+
var urlb = new UrlBuilder.new(window.location.href)
|
9
9
|
```
|
10
10
|
|
11
11
|
### Manipulate a query parameter
|
12
12
|
|
13
|
-
```
|
13
|
+
```js
|
14
14
|
urlb.queryParameters["someParameter"] = "newValue"
|
15
15
|
```
|
16
16
|
|
17
17
|
### Generate a new URL
|
18
18
|
|
19
|
-
```
|
19
|
+
```js
|
20
20
|
urlb.generateFullUrl() #=> "http://localhost:3000/?someParameter=newValue"
|
21
21
|
```
|
22
22
|
|
23
23
|
### Generate the path with query parameters
|
24
24
|
|
25
|
-
```
|
25
|
+
```js
|
26
26
|
urlb.pathWithQueryParameters #=> "/?someParameter=newValue"
|
27
27
|
```
|
@@ -9,7 +9,6 @@ class UrlBuilder {
|
|
9
9
|
var match = this.matchAndRemove(/^([A-z\d-\.]+)(|:(\d+))($|\/)/)
|
10
10
|
|
11
11
|
if (match) {
|
12
|
-
alert("MATCHED HOST")
|
13
12
|
this.host = match[1]
|
14
13
|
|
15
14
|
if (match[3]) {
|
@@ -68,8 +67,6 @@ class UrlBuilder {
|
|
68
67
|
}
|
69
68
|
|
70
69
|
generateFullUrl() {
|
71
|
-
alert("Protocol: " + this.protocol + "\nHost: " + this.host + "\nPort: " + this.port + "\nPortSpecified: " + this.portSpecified + "\nPath: " + this.path)
|
72
|
-
|
73
70
|
url = this.protocol + "://" + this.host
|
74
71
|
|
75
72
|
if (this.portSpecified) {
|
@@ -87,7 +84,7 @@ class UrlBuilder {
|
|
87
84
|
}
|
88
85
|
|
89
86
|
pathWithQueryParameters() {
|
90
|
-
generatedPath = this.path
|
87
|
+
var generatedPath = this.path
|
91
88
|
|
92
89
|
if (this.hasQueryParameters()) {
|
93
90
|
generatedPath += "?"
|