enhance 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,10 @@
1
1
  require 'utilities'
2
2
  require 'fileutils'
3
3
 
4
+ require File.join(File.dirname(__FILE__), 'enhance/urlhelper')
5
+
4
6
  module Enhance
5
7
  %w( Enhancer ).each do |class_name|
6
8
  autoload class_name.to_sym, File.join(File.dirname(__FILE__), "enhance/#{class_name.downcase}")
7
9
  end
8
-
9
10
  end
@@ -0,0 +1,7 @@
1
+ module ActionView::Helpers::UrlHelper
2
+ def enhance url, geometry
3
+ matches = url.match /(?<url>.*)\??(?<get>.*)?/
4
+ [[matches['url'], geometry].compact.join("/"), matches['get']].compact.reject(&:empty?).join("?")
5
+ end
6
+ alias_method :enhance!, :enhance
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Enhance
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhance
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Guillaume Malette
@@ -73,6 +73,7 @@ files:
73
73
  - enhance.gemspec
74
74
  - lib/enhance.rb
75
75
  - lib/enhance/enhancer.rb
76
+ - lib/enhance/urlhelper.rb
76
77
  - lib/enhance/version.rb
77
78
  has_rdoc: true
78
79
  homepage: ""