pco-url 1.7.0 → 1.7.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
  SHA1:
3
- metadata.gz: 8cd5c1701dc11bca36cd95692deaf7890af3d5ec
4
- data.tar.gz: 5cd53a34ae90fcad2937255cdc6150d678fb9f3e
3
+ metadata.gz: 3d87bb456f542bb599ba1bda16e9694b1cab0e0b
4
+ data.tar.gz: 701d2d76861a8b78eb61c740ad3e82bc704d093c
5
5
  SHA512:
6
- metadata.gz: c1e1eaa9547e8dae3ff58e8e09d7ef7b4f5e9a114283603c99830ba80152b9b68dc8ea9c193df491a9323160d31cb8741af4f3c6488a2126d8e26c5b3906a048
7
- data.tar.gz: 6804c37316401818e169d6bddd145c12f9076289667dfb661c3a5d80d6bc5355de522c9fbd2cbae313a27c7c0505db711ac6dd41a23cead682bf53165ce09265
6
+ metadata.gz: df8630e29e718b8122e20eca714103524327291c6e8ae547e4f5b78fcd47609912743be4649cd0b222b40e93d7e3a9875075d87fa9a0fe5a399a04433a4cfe6d
7
+ data.tar.gz: ae97caeaf47755ce6750e917ed012689782245b72a641a620a213de81802619ed403b2f8c60eef7463c69688a774b7af6a50fe3fc6c5bf9d367d45b4aaa6d111
@@ -46,7 +46,7 @@ module PCO
46
46
  end
47
47
 
48
48
  def encrypted_params_regex
49
- /^_e=(?<param>[^\&]*)/
49
+ /\b_e=(?<param>[^\&]*)/
50
50
  end
51
51
  end
52
52
 
@@ -1,5 +1,5 @@
1
1
  module PCO
2
2
  class URL
3
- VERSION = "1.7.0"
3
+ VERSION = "1.7.1"
4
4
  end
5
5
  end
@@ -257,6 +257,22 @@ describe PCO::URL do
257
257
  )
258
258
  end
259
259
  end
260
+
261
+ context "when the encrypted part of the query string is not first" do
262
+ let(:url) { pco_url.to_s.sub(/\?(_e=.+)/, "?foo=bar&\\1") }
263
+
264
+ subject { PCO::URL.parse(url) }
265
+
266
+ it "decrypts the encrypted portion and includes the unencrypted portion" do
267
+ expect(subject.query).to eq("foo=bar&full_access=1&total_control=1")
268
+ end
269
+
270
+ it "returns the full url" do
271
+ expect(subject.to_s).to eq(
272
+ "https://people-staging.planningcenteronline.com/households/2.html?foo=bar&full_access=1&total_control=1"
273
+ )
274
+ end
275
+ end
260
276
  end
261
277
  end
262
278
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pco-url
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Miller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: urlcrypt
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.4.5
118
+ rubygems_version: 2.2.2
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Generate URLs for PCO apps in all environments
@@ -123,4 +123,3 @@ test_files:
123
123
  - spec/pco/url/church_center_spec.rb
124
124
  - spec/pco_url_spec.rb
125
125
  - spec/spec_helper.rb
126
- has_rdoc: