jets 1.1.4 → 1.1.5
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/CHANGELOG.md +4 -0
- data/Gemfile.lock +18 -18
- data/lib/jets/route.rb +12 -8
- data/lib/jets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20fa97bccfb5b99e19a2edcf301bf31e53cd433a13862114fcb9648880e11fcc
|
4
|
+
data.tar.gz: 124710223a460aed3a74a7498e2d2a15e5227c820d20a59db639ce83bdf2fb73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6ce23cf7b443de33af876d2ac178eaaa2faca79eb5b70188cedd726861478cb030f4dbcab3d03a894f271878a7d4b1923e9bef1555db97faebc4b34aa5cfb36
|
7
|
+
data.tar.gz: b415939caba3f43bd03a5c10e47263ca2cd5adb0ebd01c7e76e495b3d09d25228863f51c83b9ece4eee865a0aa6ce5b64f1de3c6ac29234f55c0cde2d3ee0581
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [1.1.5]
|
7
|
+
- Support multiple path parameters. Also allow path parameters to hold any value other than '/'.
|
8
|
+
- Merge pull request #82 from adam-harwood/master
|
9
|
+
|
6
10
|
## [1.1.4]
|
7
11
|
- Fully qualify bundle install path, to fix issue when building on CodeBuild. Fixes #80.
|
8
12
|
- Merge pull request #81 from adam-harwood/master
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: .
|
13
13
|
specs:
|
14
|
-
jets (1.1.
|
14
|
+
jets (1.1.5)
|
15
15
|
actionpack (>= 5.2.1)
|
16
16
|
actionview (>= 5.2.1)
|
17
17
|
activerecord (>= 5.2.1)
|
@@ -39,40 +39,40 @@ PATH
|
|
39
39
|
GEM
|
40
40
|
remote: https://rubygems.org/
|
41
41
|
specs:
|
42
|
-
actionpack (5.2.1)
|
43
|
-
actionview (= 5.2.1)
|
44
|
-
activesupport (= 5.2.1)
|
42
|
+
actionpack (5.2.1.1)
|
43
|
+
actionview (= 5.2.1.1)
|
44
|
+
activesupport (= 5.2.1.1)
|
45
45
|
rack (~> 2.0)
|
46
46
|
rack-test (>= 0.6.3)
|
47
47
|
rails-dom-testing (~> 2.0)
|
48
48
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
49
|
-
actionview (5.2.1)
|
50
|
-
activesupport (= 5.2.1)
|
49
|
+
actionview (5.2.1.1)
|
50
|
+
activesupport (= 5.2.1.1)
|
51
51
|
builder (~> 3.1)
|
52
52
|
erubi (~> 1.4)
|
53
53
|
rails-dom-testing (~> 2.0)
|
54
54
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
55
|
-
activemodel (5.2.1)
|
56
|
-
activesupport (= 5.2.1)
|
57
|
-
activerecord (5.2.1)
|
58
|
-
activemodel (= 5.2.1)
|
59
|
-
activesupport (= 5.2.1)
|
55
|
+
activemodel (5.2.1.1)
|
56
|
+
activesupport (= 5.2.1.1)
|
57
|
+
activerecord (5.2.1.1)
|
58
|
+
activemodel (= 5.2.1.1)
|
59
|
+
activesupport (= 5.2.1.1)
|
60
60
|
arel (>= 9.0)
|
61
|
-
activesupport (5.2.1)
|
61
|
+
activesupport (5.2.1.1)
|
62
62
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
63
63
|
i18n (>= 0.7, < 2)
|
64
64
|
minitest (~> 5.1)
|
65
65
|
tzinfo (~> 1.1)
|
66
66
|
arel (9.0.0)
|
67
67
|
aws-eventstream (1.0.1)
|
68
|
-
aws-partitions (1.
|
68
|
+
aws-partitions (1.118.0)
|
69
69
|
aws-sdk-cloudformation (1.13.0)
|
70
70
|
aws-sdk-core (~> 3, >= 3.39.0)
|
71
71
|
aws-sigv4 (~> 1.0)
|
72
|
-
aws-sdk-cloudwatchlogs (1.
|
72
|
+
aws-sdk-cloudwatchlogs (1.12.0)
|
73
73
|
aws-sdk-core (~> 3, >= 3.39.0)
|
74
74
|
aws-sigv4 (~> 1.0)
|
75
|
-
aws-sdk-core (3.
|
75
|
+
aws-sdk-core (3.41.0)
|
76
76
|
aws-eventstream (~> 1.0)
|
77
77
|
aws-partitions (~> 1.0)
|
78
78
|
aws-sigv4 (~> 1.0)
|
@@ -131,9 +131,9 @@ GEM
|
|
131
131
|
nokogiri (>= 1.6)
|
132
132
|
rails-html-sanitizer (1.0.4)
|
133
133
|
loofah (~> 2.2, >= 2.2.2)
|
134
|
-
railties (5.2.1)
|
135
|
-
actionpack (= 5.2.1)
|
136
|
-
activesupport (= 5.2.1)
|
134
|
+
railties (5.2.1.1)
|
135
|
+
actionpack (= 5.2.1.1)
|
136
|
+
activesupport (= 5.2.1.1)
|
137
137
|
method_source
|
138
138
|
rake (>= 0.8.7)
|
139
139
|
thor (>= 0.19.0, < 2.0)
|
data/lib/jets/route.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# to: "posts#index",
|
5
5
|
# )
|
6
6
|
class Jets::Route
|
7
|
-
CAPTURE_REGEX = "([
|
7
|
+
CAPTURE_REGEX = "([^/]*)" # as string
|
8
8
|
|
9
9
|
def initialize(options)
|
10
10
|
@options = options
|
@@ -105,19 +105,23 @@ class Jets::Route
|
|
105
105
|
def extract_parameters_capture(actual_path)
|
106
106
|
# changes path to a string used for a regexp
|
107
107
|
# posts/:id/edit => posts\/(.*)\/edit
|
108
|
+
labels = []
|
108
109
|
regexp_string = path.split('/').map do |s|
|
109
|
-
s.
|
110
|
+
if s.start_with?(':')
|
111
|
+
labels << s.delete_prefix(':')
|
112
|
+
CAPTURE_REGEX
|
113
|
+
else
|
114
|
+
s
|
115
|
+
end
|
110
116
|
end.join('\/')
|
111
117
|
# make sure beginning and end of the string matches
|
112
118
|
regexp_string = "^#{regexp_string}$"
|
113
119
|
regexp = Regexp.new(regexp_string)
|
114
|
-
value = regexp.match(actual_path)[1]
|
115
120
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
{ key => value }
|
121
|
+
values = regexp.match(actual_path).captures
|
122
|
+
labels.map do |next_label|
|
123
|
+
[next_label, values.delete_at(0)]
|
124
|
+
end.to_h
|
121
125
|
end
|
122
126
|
|
123
127
|
def authorization_type
|
data/lib/jets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|