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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2d3e10257fb112cedd2543d1b3ba027e2137a06b
4
- data.tar.gz: 8804a6556647288f893ea2db6a38aed01992a0f3
2
+ SHA256:
3
+ metadata.gz: 61c0fe56876378177d0298b9b21371b19fb0276a11b3e0b5f88774c49f8a3117
4
+ data.tar.gz: 768ab5dc3e7838907836a4901bd2eb029245d49f26732c641f64749096424e6f
5
5
  SHA512:
6
- metadata.gz: 68ab28475e758f37eb55a52af3d8c7028938537b0e326ecc3caa4bb399812ce4025198846c7c54a6ac6b8315d3602f99cdd45141d5474b4dd96cd51edd47b142
7
- data.tar.gz: 90daaa13aff714010433c9185fd0da8abbaa5ec0d795d080b6bb0584f66db2d5c4b5c448ce13a7b4445d66b0e168b367455d6f454cc73076449fcf90fa620f84
6
+ metadata.gz: 861be5284bb2a3866c9573728f0e7c20470a5a3d5d70293de272f979fd7e9cab61801bba5461ad4fcd7fc81d2196a1572f95c4c4c5b0c403e8e02c3e517d48c4
7
+ data.tar.gz: a154651e7cd8b77cc2ac99a6906a8f6e38c0844827684bb1627a03a3548542347579e18a1598a1594b9f7bc073358bdb3d88903880b929cf70eab30bf9d76359
checksums.yaml.gz.sig CHANGED
Binary file
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2016 The Kompanee, Ltd
1
+ Copyright (c) 2010-2019 The Kompanee, Ltd
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -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
@@ -1,21 +1,19 @@
1
- require 'yaml'
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
- url_components = if defined?(Chamber)
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.action_dispatch.default_url_options = url_components
14
- application.config.action_mailer.default_url_options = url_components
15
- 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
16
14
 
17
15
  if ActionMailer::Base.respond_to?(:'default_url_options=')
18
- ActionMailer::Base.default_url_options = url_components
16
+ ActionMailer::Base.default_url_options = default_url_options
19
17
  end
20
18
  end
21
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DirtyUrl
2
- VERSION = '0.0.4'.freeze
4
+ VERSION = '0.0.7'
3
5
  end
data/lib/dirty_url.rb CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'dirty_url/version'
2
4
  require 'dirty_url/railtie' if defined?(Rails)
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
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
- MIIDrjCCApagAwIBAgIBATANBgkqhkiG9w0BAQUFADBOMRowGAYDVQQDDBFhY2Nv
14
- dW50c19ydWJ5Z2VtczEbMBkGCgmSJomT8ixkARkWC3RoZWtvbXBhbmVlMRMwEQYK
15
- CZImiZPyLGQBGRYDY29tMB4XDTE2MDQyNDAyNTEyM1oXDTE3MDQyNDAyNTEyM1ow
16
- TjEaMBgGA1UEAwwRYWNjb3VudHNfcnVieWdlbXMxGzAZBgoJkiaJk/IsZAEZFgt0
17
- aGVrb21wYW5lZTETMBEGCgmSJomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEB
18
- BQADggEPADCCAQoCggEBANklzdaVeHtut6LTe/hrl6Krz2Z60InEbNb+TMG43tww
19
- jBpWZrdU/SBkR3EYbTAQv/yGTuMHoVKGK2kDlFvdofW2hX0d14qPyYJUNYt+7VWE
20
- 3UhPSxw1i6MxeU1QwfkIyaN8A5lj0225+rwI/mbplv+lSXPlJEroCQ9EfniZD4jL
21
- URlrHWl/UejcQ32C1IzBwth3+nacrO1197v5nSdozFzQwm4groaggXn9F/WpThu+
22
- MhcE4bfttwEjAfU3zAThyzOFoVPpACP+SwOuyPJSl02+9BiwzeAnFJDfge7+rsd5
23
- 64W/VzBIklEKUZMmxZwr5DwpSXLrknBDtHLABG9Nr3cCAwEAAaOBljCBkzAJBgNV
24
- HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUP7v0f/qfa0LMrhkzHRI3l10X
25
- LYIwLAYDVR0RBCUwI4EhYWNjb3VudHMrcnVieWdlbXNAdGhla29tcGFuZWUuY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pS
33
37
  -----END CERTIFICATE-----
34
- date: 2016-05-20 00:00:00.000000000 Z
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: 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
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
- rubyforge_project:
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'