dirty_url 0.0.4 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/LICENSE.txt +1 -1
- data/lib/dirty_url/default_url_options.rb +14 -0
- data/lib/dirty_url/patches/feature_example_group.rb +15 -0
- data/lib/dirty_url/railtie.rb +9 -11
- data/lib/dirty_url/version.rb +3 -1
- data/lib/dirty_url.rb +2 -0
- data.tar.gz.sig +0 -0
- metadata +45 -33
- metadata.gz.sig +0 -0
- data/Rakefile +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 61c0fe56876378177d0298b9b21371b19fb0276a11b3e0b5f88774c49f8a3117
|
4
|
+
data.tar.gz: 768ab5dc3e7838907836a4901bd2eb029245d49f26732c641f64749096424e6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 861be5284bb2a3866c9573728f0e7c20470a5a3d5d70293de272f979fd7e9cab61801bba5461ad4fcd7fc81d2196a1572f95c4c4c5b0c403e8e02c3e517d48c4
|
7
|
+
data.tar.gz: a154651e7cd8b77cc2ac99a6906a8f6e38c0844827684bb1627a03a3548542347579e18a1598a1594b9f7bc073358bdb3d88903880b929cf70eab30bf9d76359
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/LICENSE.txt
CHANGED
@@ -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.dig!(: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
|
data/lib/dirty_url/railtie.rb
CHANGED
@@ -1,21 +1,19 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dirty_url/default_url_options'
|
2
4
|
|
3
5
|
module DirtyUrl
|
4
6
|
class Railtie < Rails::Railtie
|
5
7
|
initializer 'dirty_url.load', after: :load_environment_config do |application|
|
6
|
-
|
7
|
-
Chamber.env.http.url_components.symbolize_keys
|
8
|
-
else
|
9
|
-
settings_file = application.root.join('config', 'dirty_url.yml')
|
10
|
-
YAML.load(File.read(settings_file)).symbolize_keys
|
11
|
-
end
|
8
|
+
default_url_options ||= ::DirtyUrl::DefaultUrlOptions.fetch
|
12
9
|
|
13
|
-
application.config.
|
14
|
-
application.config.
|
15
|
-
application.
|
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
|
16
14
|
|
17
15
|
if ActionMailer::Base.respond_to?(:'default_url_options=')
|
18
|
-
ActionMailer::Base.default_url_options =
|
16
|
+
ActionMailer::Base.default_url_options = default_url_options
|
19
17
|
end
|
20
18
|
end
|
21
19
|
end
|
data/lib/dirty_url/version.rb
CHANGED
data/lib/dirty_url.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jfelchner
|
@@ -10,49 +10,53 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEdjCCAt6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAyMTAwLgYDVQQDDCdhY2Nv
|
14
|
+
dW50c19ydWJ5Z2Vtcy9EQz10aGVrb21wYW5lZS9EQz1jb20wHhcNMjIwMzA2MTkx
|
15
|
+
NDM1WhcNMjMwMzA2MTkxNDM1WjAyMTAwLgYDVQQDDCdhY2NvdW50c19ydWJ5Z2Vt
|
16
|
+
cy9EQz10aGVrb21wYW5lZS9EQz1jb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAw
|
17
|
+
ggGKAoIBgQD0Z84PxtE0iiWCMTQbnit6D4w55GGBQZnhpWUCJwC0SpQ/jnT0Fsma
|
18
|
+
g8oAIdDclLvLC9jzqSAmkOujlpkJMb5NabgkhKFwHi6cVW/gz/cVnISAv8LQTIM5
|
19
|
+
c1wyhwX/YhVFaNYNzMizB//kZOeXnv6x0tqV9NY7urHcT6mCwyLeNJIgf44i1Ut+
|
20
|
+
mKtXxEyXNbfWQLVY95bVoVg3GOCkycerZN4Oh3zSJM1s+cZRBFlg7GR1AE3Xqs6k
|
21
|
+
RhE7yp8ufeghC3bbxgnQrkk8W8Fkkl0/+2JAENpdE4OUepC6dFzDlLZ3UvSk7VHf
|
22
|
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daYNJFZ4ioYxVtABnSKTIPpS
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
38
|
+
date: 2022-03-06 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: rails
|
38
42
|
requirement: !ruby/object:Gem::Requirement
|
39
43
|
requirements:
|
40
|
-
- - "<"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '5.0'
|
43
44
|
- - ">="
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '3.1'
|
47
|
+
- - "<"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '7.0'
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
49
53
|
requirements:
|
50
|
-
- - "<"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '5.0'
|
53
54
|
- - ">="
|
54
55
|
- !ruby/object:Gem::Version
|
55
56
|
version: '3.1'
|
57
|
+
- - "<"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '7.0'
|
56
60
|
- !ruby/object:Gem::Dependency
|
57
61
|
name: rspec
|
58
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,21 +75,30 @@ 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:
|
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
|
86
92
|
licenses:
|
87
93
|
- MIT
|
88
|
-
metadata:
|
94
|
+
metadata:
|
95
|
+
allowed_push_host: https://rubygems.org
|
96
|
+
bug_tracker_uri: https://github.com/thekompanee/dirty_url/issues
|
97
|
+
changelog_uri: https://github.com/thekompanee/dirty_url/blob/master/CHANGELOG.md
|
98
|
+
documentation_uri: https://github.com/thekompanee/dirty_url/tree/releases/v#{::DirtyUrl::VERSION}
|
99
|
+
homepage_uri: https://github.com/thekompanee/dirty_url
|
100
|
+
source_code_uri: https://github.com/thekompanee/dirty_url
|
101
|
+
wiki_uri: https://github.com/thekompanee/dirty_url/wiki
|
89
102
|
post_install_message:
|
90
103
|
rdoc_options: []
|
91
104
|
require_paths:
|
@@ -101,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
114
|
- !ruby/object:Gem::Version
|
102
115
|
version: '0'
|
103
116
|
requirements: []
|
104
|
-
|
105
|
-
rubygems_version: 2.5.1
|
117
|
+
rubygems_version: 3.1.6
|
106
118
|
signing_key:
|
107
119
|
specification_version: 4
|
108
120
|
summary: Make URLs work properly in Rails mailers and controllers.
|
metadata.gz.sig
CHANGED
Binary file
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|