activecleaner 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: db7af709547b9681d4d402b9e4f7d58afd93285f18699653d205d91bf2de76c7
4
- data.tar.gz: c0c308d472f8c4a47b9c0cacdb999fad674ff048fc3fe5fabd1bbd3fb381c9d3
3
+ metadata.gz: 6d8d932189c44ec82b76fc02fb6b84fbf62ccd1525b2f9f91a9c20b960e06d31
4
+ data.tar.gz: e520969ba53055c8c8f8418168237dface44749f9e2f580c9793725970ba4275
5
5
  SHA512:
6
- metadata.gz: da651be9a0a08b68d4456fe0a225602474615a6ceeea90fb32a255e5e4b82de5645cccdad40919e175d8d508a782df2c6db265be0f2ac56fd024b08ad820d503
7
- data.tar.gz: 676b0c47a6e16edea5f862fd3c89b8e35305e386a9bbedd2bdd34340fbc2788330e60ca575e547e566c218efb6aaf6f820ecb792d60a87572ba07f5349ccaaf2
6
+ metadata.gz: b8d813c80d22f2c010ea11bf3dfda091cb60052b1692506be5eea972f1e12d47e8e6948826bf622fd8a4102cd2ae01abcc6f0cf825dee6966d438393e61b444d
7
+ data.tar.gz: 93b421b66f599fd1270c84dd68cf282c65fc2c7cc5f7b839c65873b25ba0fda634b7c99c488bbd5668d5ed01e0e3b994c75244584d22b2876e9d25193f2a0c51
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/activecleaner.svg)](https://rubygems.org/gems/activecleaner)
4
4
  [![Build Status](https://travis-ci.org/maximeg/activecleaner.svg?branch=master)](https://travis-ci.org/maximeg/activecleaner)
5
- [![Dependency Status](https://gemnasium.com/maximeg/activecleaner.svg)](https://gemnasium.com/maximeg/activecleaner)
6
5
 
7
6
  `ActiveCleaner` is a set of helpers that helps you in cleaning user-typed content in your ActiveModel depending models (ActiveRecord, Mongoid...)
8
7
 
@@ -25,12 +24,10 @@ end
25
24
 
26
25
  ### Cleaners included
27
26
 
28
- * `:string` (StringCleaner, the default one) : cleans all the space characters. It turns `" A \n \t title \t "` into `"A title"`.
29
- * `:text` (TextCleaner) : like `:string`, but preserves new lines (with a max of 2 successive new lines). useful when the field is rendered with the `simple_format` Rails helper.
30
- * `:markdown` (MarkdownCleaner) : like `:text`, but preserves spaces in the beginning of lines (the indentation). useful for... markdown!
31
- * `:utf8mb3` (Utf8mb3Cleaner) : removes all 4-bytes encoded chars in UTF8 strings that mess with the `utf8` encoding in MySQL (iOS6 emojis for example).
32
-
33
-
27
+ - `:string` (StringCleaner, the default one) : cleans all the space characters. It turns `" A \n \t title \t "` into `"A title"`.
28
+ - `:text` (TextCleaner) : like `:string`, but preserves new lines (with a max of 2 successive new lines). useful when the field is rendered with the `simple_format` Rails helper.
29
+ - `:markdown` (MarkdownCleaner) : like `:text`, but preserves spaces in the beginning of lines (the indentation). useful for... markdown!
30
+ - `:utf8mb3` (Utf8mb3Cleaner) : removes all 4-bytes encoded chars in UTF8 strings that mess with the `utf8` encoding in MySQL (iOS6 emojis for example).
34
31
 
35
32
  ## Installation
36
33
 
@@ -42,8 +39,6 @@ Or install with RubyGems:
42
39
 
43
40
  $ gem install activecleaner
44
41
 
45
-
46
-
47
42
  ## Usage
48
43
 
49
44
  ### Basic usage
@@ -56,8 +51,8 @@ clean :field_1, :field_2 ... :field_n, options_1: :value, options_2: :value
56
51
 
57
52
  ### Options
58
53
 
59
- * `:as` (default is `:string`) : the symbol name of the cleaner.
60
- * `:nilify` (default is `false`) : set to `nil` when the field was or is cleaned to `""`.
54
+ - `:as` (default is `:string`) : the symbol name of the cleaner.
55
+ - `:nilify` (default is `false`) : set to `nil` when the field was or is cleaned to `""`.
61
56
 
62
57
  ### Example
63
58
 
@@ -89,12 +84,9 @@ To run the specs:
89
84
 
90
85
  You can also use `guard` to run the specs during dev.
91
86
 
92
-
93
-
94
87
  ## Credits
95
88
 
96
- * Maxime Garcia [emaxime.com](http://emaxime.com) [@maximegarcia](http://twitter.com/maximegarcia)
97
-
89
+ - Maxime Garcia [emaxime.com](http://emaxime.com) [@maximegarcia](http://twitter.com/maximegarcia)
98
90
 
99
91
  [License](https://github.com/maximeg/activecleaner/blob/master/LICENSE)
100
92
  \- [Report a bug](https://github.com/maximeg/activecleaner/issues)
@@ -5,7 +5,7 @@ module ActiveCleaner
5
5
  module Version
6
6
 
7
7
  # The version as string.
8
- STRING = "0.3.2".freeze
8
+ STRING = "0.3.3"
9
9
 
10
10
  end
11
11
  end
@@ -21,7 +21,7 @@ describe ActiveCleaner::MarkdownCleaner do
21
21
  end
22
22
 
23
23
  it "doesn't touch legit value" do
24
- body = String.new
24
+ body = +""
25
25
  body << "= Title =\n"
26
26
  body << "\n"
27
27
  body << "A first paragraph.\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activecleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-26 00:00:00.000000000 Z
11
+ date: 2019-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.2'
22
+ version: '6.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.2'
32
+ version: '6.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '4.2'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.2'
42
+ version: '6.1'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,21 @@ dependencies:
49
49
  version: '4.2'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '5.2'
52
+ version: '6.1'
53
+ - !ruby/object:Gem::Dependency
54
+ name: appraisal
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.2'
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.2'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: rspec
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -70,14 +84,28 @@ dependencies:
70
84
  requirements:
71
85
  - - '='
72
86
  - !ruby/object:Gem::Version
73
- version: 0.52.0
87
+ version: 0.75.0
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '='
93
+ - !ruby/object:Gem::Version
94
+ version: 0.75.0
95
+ - !ruby/object:Gem::Dependency
96
+ name: rubocop-performance
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - '='
100
+ - !ruby/object:Gem::Version
101
+ version: 1.5.0
74
102
  type: :development
75
103
  prerelease: false
76
104
  version_requirements: !ruby/object:Gem::Requirement
77
105
  requirements:
78
106
  - - '='
79
107
  - !ruby/object:Gem::Version
80
- version: 0.52.0
108
+ version: 1.5.0
81
109
  description: " ActiveCleaner is a set of helpers that helps you in cleaning user-typed
82
110
  content in your ActiveModel depending models (ActiveRecord, Mongoid...)\n"
83
111
  email:
@@ -118,15 +146,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
146
  requirements:
119
147
  - - ">="
120
148
  - !ruby/object:Gem::Version
121
- version: 2.2.0
149
+ version: 2.3.0
122
150
  required_rubygems_version: !ruby/object:Gem::Requirement
123
151
  requirements:
124
152
  - - ">="
125
153
  - !ruby/object:Gem::Version
126
154
  version: '0'
127
155
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.7.4
156
+ rubygems_version: 3.0.6
130
157
  signing_key:
131
158
  specification_version: 4
132
159
  summary: Clean the fields in your models