stringex 2.8.1 → 2.8.2

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
2
  SHA1:
3
- metadata.gz: e6497f7dbab40eab8690ca60783e0073f071b114
4
- data.tar.gz: 48a8dcc461843b47e35a1244f9c493507bcfdb85
3
+ metadata.gz: 23d323c095b108323bdc5739ff783e24c18352a1
4
+ data.tar.gz: ab9462fc5ca596a254da010fa33f801543dcc6c0
5
5
  SHA512:
6
- metadata.gz: 46aae29f9bd8a1049bfe8e0558fd228749f56132a0898d3ab362750d2a74db2be0127b6188f2566d635ee5dbf9c7cbd1fa987e9f6b4570dd547870a94167e92f
7
- data.tar.gz: c04aa5e8a2ad1a3bf03141c68b7e08a6ca7f004a25a060b1a864f0a187db99fecce1c373357fe013e532879f95be0bc09eb77517e433fa38fea8b2f926c04a2b
6
+ metadata.gz: eee3ac2e5eef121f444465b987dd520e2fcad918afd4b3568ee2509c56d4fba9ac5c041c96a06410bc93bdb72c3e12d2c51ad8364a161a74500d4d9f7be10314
7
+ data.tar.gz: f48e8eca03bee646879639054c71b792d806af3ce95c9a5511fd6470b9212cf295f08f671322b03838318ead65c113f8c999f97b09414585bb30046657a6eb37
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.1
1
+ 2.8.2
@@ -4,7 +4,7 @@ require "stringex/acts_as_url/adapter"
4
4
  module Stringex
5
5
  module ActsAsUrl # :nodoc:
6
6
  def self.configure(&block)
7
- Stringex::Configuration::ActsAsUrl.configure &block
7
+ Stringex::Configuration::ActsAsUrl.configure(&block)
8
8
  end
9
9
 
10
10
  def self.unconfigure!
@@ -40,10 +40,6 @@ module Stringex
40
40
  instance.class.key.first.instance_variable_get '@name'
41
41
  end
42
42
 
43
- def read_attribute(instance, attribute)
44
- instance.attributes[attribute]
45
- end
46
-
47
43
  def url_owners
48
44
  @url_owners ||= url_owners_class.all(conditions: url_owner_conditions)
49
45
  end
@@ -83,7 +83,7 @@ module Stringex
83
83
 
84
84
  def convert(string, options = {}, &block)
85
85
  converter = Converter.new(string, options)
86
- converter.instance_exec &block
86
+ converter.instance_exec(&block)
87
87
  converter.smart_strip!
88
88
  converter.string
89
89
  end
@@ -47,7 +47,6 @@ module Stringex
47
47
 
48
48
  def load_translations(locale = nil)
49
49
  locale ||= self.locale
50
- path = Dir[File.join(LOAD_PATH_BASE, "#{locale}.yml")]
51
50
  ::I18n.load_path |= Dir[File.join(LOAD_PATH_BASE, "#{locale}.yml")]
52
51
  ::I18n.backend.load_translations
53
52
  reset_translations_cache
@@ -91,7 +91,7 @@ module Stringex
91
91
  }.call
92
92
 
93
93
  HTML_TAG = Proc.new(){
94
- name = /[\w:_-]+/
94
+ name = /[\w:-]+/
95
95
  value = /([A-Za-z0-9]+|('[^']*?'|"[^"]*?"))/
96
96
  attr = /(#{name}(\s*=\s*#{value})?)/
97
97
  /<[!\/?\[]?(#{name}|--)(\s+(#{attr}(\s+#{attr})*))?\s*([!\/?\]]+|--)?>/
@@ -37,7 +37,7 @@ module Stringex
37
37
  end
38
38
 
39
39
  def normalize_currency!
40
- string.gsub! /(\d+),(\d+)/, '\1\2'
40
+ string.gsub!(/(\d+),(\d+)/, '\1\2')
41
41
  end
42
42
 
43
43
  def smart_strip!
@@ -3,7 +3,7 @@
3
3
  module Stringex
4
4
  module StringExtensions
5
5
  def self.configure(&block)
6
- Stringex::Configuration::StringExtensions.configure &block
6
+ Stringex::Configuration::StringExtensions.configure(&block)
7
7
  end
8
8
 
9
9
  def self.unconfigure!
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: stringex 2.8.1 ruby lib
5
+ # stub: stringex 2.8.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "stringex".freeze
9
- s.version = "2.8.1"
9
+ s.version = "2.8.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Russell Norris".freeze]
14
- s.date = "2017-12-08"
14
+ s.date = "2017-12-21"
15
15
  s.description = "Some [hopefully] useful extensions to Ruby's String class. Stringex is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to ASCII transliteration], and StringExtensions [miscellaneous helper methods for the String class].".freeze
16
16
  s.email = "rsl@luckysneaks.com".freeze
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Norris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-08 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeweler