dirty_url 0.0.5 → 0.0.6

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
- SHA1:
3
- metadata.gz: 3d04d5f42e3d4c95eec7d3f7951e1da51784fc47
4
- data.tar.gz: 67d8b8b7e9f098e7da858b20019bae1614a61bec
2
+ SHA256:
3
+ metadata.gz: 4f6015a53bcec392fa9d0c26106b07c80f576ac65f29a6f82d13d503456aceaf
4
+ data.tar.gz: 50a56ce4a87bd1f31d75bb49455a14e05704b8c6299f2cfd52b5a856e0920a28
5
5
  SHA512:
6
- metadata.gz: 9e45f9a933953e50c46316bf28f519fe812a832206391aec8174ab79550b68648cb5cdbe81f945281e45a6f92bd43c5526c88de2ec03b31b4431ad3b313a1d1a
7
- data.tar.gz: bc4e0611aa0b830b4472d7b35d38bdd239a1184ad60e76bd3dec9fe40963277d276ad705aee445d1f03b63d9bdb56a8faa2237f1b0f19616f09483a9c2f31440
6
+ metadata.gz: 24dd89bee266daae15232e7cd9288ec7de3bb024b421da4bf328194a573c45653d24140e05686e9046e675b1bf49f8f1816ddb9e1ed0bdc2e2ca37277740c234
7
+ data.tar.gz: f2cd5bc596f082895b5989715d3deda8bd0ecb602669b18a31432272d0c735b9582187634f15707adec229b70a63c106c06f2fd0405ba9311607c65b498453b2
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'dirty_url/version'
3
4
  require 'dirty_url/railtie' if defined?(Rails)
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+
5
+ module DirtyUrl
6
+ class DefaultUrlOptions
7
+ def self.fetch
8
+ return Chamber.env.http.url_components.symbolize_keys if defined?(Chamber)
9
+
10
+ settings_file = application.root.join('config', 'dirty_url.yml')
11
+ YAML.safe_load(File.read(settings_file)).symbolize_keys
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # https://github.com/rspec/rspec-rails/issues/1275
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require 'dirty_url/default_url_options'
6
+
7
+ module RSpec
8
+ module Rails
9
+ module FeatureExampleGroup
10
+ def default_url_options
11
+ @default_url_options ||= ::DirtyUrl::DefaultUrlOptions.fetch
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,22 +1,19 @@
1
1
  # frozen_string_literal: true
2
- require 'yaml'
2
+
3
+ require 'dirty_url/default_url_options'
3
4
 
4
5
  module DirtyUrl
5
6
  class Railtie < Rails::Railtie
6
7
  initializer 'dirty_url.load', after: :load_environment_config do |application|
7
- url_components = if defined?(Chamber)
8
- Chamber.env.http.url_components.symbolize_keys
9
- else
10
- settings_file = application.root.join('config', 'dirty_url.yml')
11
- YAML.load(File.read(settings_file)).symbolize_keys
12
- end
8
+ default_url_options ||= ::DirtyUrl::DefaultUrlOptions.fetch
13
9
 
14
- application.config.action_dispatch.default_url_options = url_components
15
- application.config.action_mailer.default_url_options = url_components
16
- application.routes.default_url_options = url_components
10
+ application.config.action_controller.default_url_options = default_url_options
11
+ application.config.action_dispatch.default_url_options = default_url_options
12
+ application.config.action_mailer.default_url_options = default_url_options
13
+ application.routes.default_url_options = default_url_options
17
14
 
18
15
  if ActionMailer::Base.respond_to?(:'default_url_options=')
19
- ActionMailer::Base.default_url_options = url_components
16
+ ActionMailer::Base.default_url_options = default_url_options
20
17
  end
21
18
  end
22
19
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module DirtyUrl
3
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
4
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirty_url
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfelchner
@@ -10,28 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICAT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Ey5XBeZ1+I2v4+ozio/cqOFz9UTarQryCf0e
25
+ 2uJLFPBPkzcCAwEAAaOBljCBkzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
26
+ HQ4EFgQUUTthhLkcr6+8JU1/B/dxKYaYnKUwLAYDVR0RBCUwI4EhYWNjb3VudHMr
27
+ cnVieWdlbXNAdGhla29tcGFuZWUuY29tMCwGA1UdEgQlMCOBIWFjY291bnRzK3J1
28
+ YnlnZW1zQHRoZWtvbXBhbmVlLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAED2U/MD3
29
+ PHRHyeh9Ge3JTKJ/bjZLYquJWQr+ei4rsNk8oO2O6CcoiC84oNEnpnENHX9KiZu8
30
+ h7ylKO7u6vKJl9p9IV2YR0uOnXbSApYr5olDDlEz7HNGL3xUCJJhJBf09C4AkaAn
31
+ kfaOv9Nkko0izYPpKsGlyKvbWBIzT3urBMRNbv95DzhBdNI6RF0q13eCePPqXPGe
32
+ RaikE1dUWcVsW29XzO/RINmuMcKU6k0caC7X4kTD657Nf74oGUXHxYPmfUmYmppg
33
+ uAF3jK5824uMvxofLysxqXhrUlTuCVndaexDm3bYK+YrTnZJEu6CimpMYa2u6JEE
34
+ sWLZKmDLUxEUs/5jVGuypZbSBJBDb6VnmCkoEr3Fmh4O/FH4IZ+Gd3QdYCohLoKd
35
+ 09JNgxpgZHCDuKwoycU+wXdWVSzMtchMQygnEu6th1SY5qHj4ISipBEBtKG0MdgB
36
+ L3AbMAHTztj5YI+gvmpuV1B4Zv1QZjZWOeNSnLZdrnOQbyyDBzJyXmNV
33
37
  -----END CERTIFICATE-----
34
- date: 2016-08-06 00:00:00.000000000 Z
38
+ date: 2018-08-08 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: rails
@@ -71,15 +75,17 @@ description: By 'default', Rails has a difficult time figuring out when it is su
71
75
  to show relative URLs in mailers and even when doing comparisons in specs, the URL
72
76
  returned tends to be non-deterministic. Using this gem, Rails will always return
73
77
  the proper URL based on the environment you are executing in.
74
- email: accounts+git@thekompanee.com
78
+ email:
79
+ - accounts+git@thekompanee.com
75
80
  executables: []
76
81
  extensions: []
77
82
  extra_rdoc_files: []
78
83
  files:
79
84
  - LICENSE.txt
80
85
  - README.md
81
- - Rakefile
82
86
  - lib/dirty_url.rb
87
+ - lib/dirty_url/default_url_options.rb
88
+ - lib/dirty_url/patches/feature_example_group.rb
83
89
  - lib/dirty_url/railtie.rb
84
90
  - lib/dirty_url/version.rb
85
91
  homepage: https://github.com/thekompanee/dirty_url
@@ -103,9 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
109
  version: '0'
104
110
  requirements: []
105
111
  rubyforge_project:
106
- rubygems_version: 2.5.1
112
+ rubygems_version: 2.7.7
107
113
  signing_key:
108
114
  specification_version: 4
109
115
  summary: Make URLs work properly in Rails mailers and controllers.
110
116
  test_files: []
111
- has_rdoc:
metadata.gz.sig CHANGED
@@ -1,2 +1,5 @@
1
- ٲ�H`?�h
2
- �^Gr.�y���>�h� �:,(&�*6� �6?���N����K�,C�aPc �Z2,�jī �
1
+ �o����L�+�y���I]�� �n*�Z��t�9�� ���}����_�5Ĉ��bN4����b��F}���
2
+ ض�H�#1]A^�A5}5
3
+ ����?Ύ���#��-�)]�l�u�E�ؑ��6��
4
+ �~�n�.�+=J�P~G=�+���(��� &_��7ǫz)<lq{6�\�n%�������^�"a��n���9���F=w�i���^N
5
+ ��?��Qv@vŜ��K���ȯ�c�3�-�
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'bundler/gem_tasks'