dirty_url 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f1c1b81431ab25f6f5be419c29091d1c79dd0e30
4
+ data.tar.gz: 0d42b942eba09afdc22ec18e88d5cec52ae01528
5
+ SHA512:
6
+ metadata.gz: 17ce57be64c128f3172bc36b5eefa35aacef884cb0a8d771a449c407095227563e0e481de2d6d709413f02d5fc25a7f60b98b0e5af416c827d6a38f4e5b61a34
7
+ data.tar.gz: 5e43ceddb1fc35ec70add2c23590df7ba24bc13eb9ca073cda35ced39c839c613251f660aba426a8fc628c0ceb096651768729cc8273da0f9fcb64cfd4a391b3
@@ -0,0 +1,29 @@
1
+ # DirtyUrl
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'dirty_url'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install dirty_url
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( http://github.com/<my-github-username>/dirty_url/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,2 @@
1
+ require 'dirty_url/version'
2
+ require 'dirty_url/railtie' if defined?(Rails)
@@ -0,0 +1,21 @@
1
+ require 'yaml'
2
+
3
+ module DirtyUrl
4
+ class Railtie < Rails::Railtie
5
+ 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
12
+
13
+ application.config.action_dispatch.default_url_options = url_components
14
+ application.config.action_mailer.default_url_options = url_components
15
+
16
+ if ActionMailer::Base.respond_to?(:'default_url_options=')
17
+ ActionMailer::Base.default_url_options = url_components
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ module DirtyUrl
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dirty_url
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - jfelchner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
33
+ description: |
34
+ By 'default', Rails has a difficult time figuring out when it is supposed to
35
+ show relative URLs in mailers and even when doing comparisons in specs, the URL
36
+ returned tends to be non-deterministic. Using this gem, Rails will always return
37
+ the proper URL based on the environment you are executing in.
38
+ email: accounts+git@thekompanee.com
39
+ executables: []
40
+ extensions: []
41
+ extra_rdoc_files:
42
+ - README.md
43
+ files:
44
+ - README.md
45
+ - Rakefile
46
+ - lib/dirty_url.rb
47
+ - lib/dirty_url/railtie.rb
48
+ - lib/dirty_url/version.rb
49
+ homepage: https://github.com/thekompanee/dirty_url
50
+ licenses: []
51
+ metadata: {}
52
+ post_install_message:
53
+ rdoc_options:
54
+ - "--charset = UTF-8"
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubyforge_project: dirty_url
69
+ rubygems_version: 2.2.2
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: Make URLs work properly in Rails mailers and controllers.
73
+ test_files: []
74
+ has_rdoc: