auto_strip_attributes 2.0.6 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile +4 -4
- data/README.md +2 -3
- data/auto_strip_attributes.gemspec +1 -1
- data/lib/auto_strip_attributes.rb +1 -2
- data/lib/auto_strip_attributes/version.rb +1 -1
- data/script/package +8 -0
- data/script/release +18 -0
- data/test/auto_strip_attributes_test.rb +7 -0
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bd8eadb5f2deb62f0fb5b0b0fbe62296865465c
|
4
|
+
data.tar.gz: 72fd859cbcc3cb6fae5d5b8fd2c58e1bb91d98fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cb7ed37fa4a3f86e20c47b00c7dad36999a994850bc58d73c627c789520486a2cbf10f24607c580053ae05032959bf1e4f556f672d33937820bdf1f28aa6e79
|
7
|
+
data.tar.gz: b1ebe7f5bd4f4265573b549e180ed91064c86c294e4a73ef6a7b44ef8b0cc50c0c636173a19fa96466d4f277ba24842460e50c5d44050e2741e8f575139beda0
|
data/.travis.yml
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
+
language: ruby
|
2
|
+
sudo: false
|
3
|
+
cache: bundler
|
1
4
|
rvm:
|
2
|
-
- 1.9
|
3
|
-
- 2.
|
5
|
+
- 2.1.9
|
6
|
+
- 2.2.5
|
7
|
+
- 2.3.1
|
4
8
|
env:
|
5
|
-
- "RAILS_VERSION=
|
6
|
-
- "RAILS_VERSION=4.
|
9
|
+
- "RAILS_VERSION=4.0"
|
10
|
+
- "RAILS_VERSION=4.1"
|
11
|
+
- "RAILS_VERSION=4.2"
|
12
|
+
- "RAILS_VERSION=5.0"
|
13
|
+
matrix:
|
14
|
+
exclude:
|
15
|
+
- rvm: 2.1.9
|
16
|
+
env: "RAILS_VERSION=5.0"
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
## [Master]
|
2
|
+
|
3
|
+
## [2.1] - 2016-07-28
|
4
|
+
|
5
|
+
- Drop support for ruby 1.9.3
|
6
|
+
|
7
|
+
## [2.0.6] - 2014-07-29
|
8
|
+
|
9
|
+
- Some file permission issues
|
10
|
+
|
11
|
+
## [2.0.5] - 2014-06-03
|
12
|
+
|
13
|
+
- Added :convert_non_breaking_spaces filter (https://github.com/holli/auto_strip_attributes/pull/12)
|
14
|
+
|
15
|
+
## [2.0] - 2011-11-23
|
16
|
+
|
17
|
+
- Includes config for extra filters (thnks to [@dadittoz](https://github.com/holli/auto_strip_attributes/issues/1))
|
18
|
+
|
19
|
+
## [1.0] - 2011-08-26
|
20
|
+
|
21
|
+
- Only basic filters
|
data/Gemfile
CHANGED
@@ -8,11 +8,11 @@ gemspec
|
|
8
8
|
# http://schneems.com/post/50991826838/testing-against-multiple-rails-versions
|
9
9
|
rails_version = ENV["RAILS_VERSION"] || "default"
|
10
10
|
|
11
|
-
|
11
|
+
case rails_version
|
12
12
|
when "default"
|
13
|
-
|
13
|
+
gem "rails"
|
14
14
|
else
|
15
|
-
"~> #{rails_version}"
|
15
|
+
gem "rails", "~> #{rails_version}"
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
|
data/README.md
CHANGED
@@ -91,13 +91,12 @@ AutoStripAttributes::Config.setup accepts following options
|
|
91
91
|
|
92
92
|
# Versions
|
93
93
|
|
94
|
-
-
|
95
|
-
- 2.x : Includes config for extra filters (thnks to [@dadittoz](https://github.com/holli/auto_strip_attributes/issues/1))
|
94
|
+
- see https://github.com/holli/auto_strip_attributes/blob/master/CHANGELOG.md
|
96
95
|
|
97
96
|
|
98
97
|
# Requirements
|
99
98
|
|
100
|
-
Gem has been tested with
|
99
|
+
Gem has been tested with newest Ruby & Rails combination and it probably works also with older versions. See test matrix at https://github.com/holli/auto_strip_attributes/blob/master/.travis.yml
|
101
100
|
|
102
101
|
[<img src="https://secure.travis-ci.org/holli/auto_strip_attributes.png" />](http://travis-ci.org/holli/auto_strip_attributes)
|
103
102
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency "activerecord", ">= 3.0"
|
24
24
|
|
25
25
|
#s.add_development_dependency "activerecord", ">= 3.0"
|
26
|
-
|
26
|
+
s.add_development_dependency "minitest", ">= 2.8.1"
|
27
27
|
s.add_development_dependency "mocha", "~> 0.14"
|
28
28
|
s.add_development_dependency 'rake'
|
29
29
|
|
@@ -62,7 +62,7 @@ class AutoStripAttributes::Config
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
instance_eval
|
65
|
+
instance_eval(&block) if block_given?
|
66
66
|
end
|
67
67
|
|
68
68
|
def self.set_filter(filter,&block)
|
@@ -83,4 +83,3 @@ end
|
|
83
83
|
ActiveRecord::Base.send(:extend, AutoStripAttributes) if defined? ActiveRecord
|
84
84
|
AutoStripAttributes::Config.setup
|
85
85
|
#ActiveModel::Validations::HelperMethods.send(:include, AutoStripAttributes) if defined? ActiveRecord
|
86
|
-
|
data/script/package
ADDED
data/script/release
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
# Usage: script/release
|
3
|
+
# Build the package, tag a commit, push it to origin, and then release the
|
4
|
+
# package publicly.
|
5
|
+
|
6
|
+
set -e
|
7
|
+
|
8
|
+
version="$(script/package | grep Version: | awk '{print $2}')"
|
9
|
+
[ -n "$version" ] || exit 1
|
10
|
+
|
11
|
+
echo $version
|
12
|
+
git commit --allow-empty -a -m "Release $version"
|
13
|
+
git tag "v$version"
|
14
|
+
git push origin
|
15
|
+
git push origin "v$version"
|
16
|
+
echo "NOT YET PUSHING GEM AUTOMATICALLY, RUN: gem push pkg/*-${version}.gem"
|
17
|
+
echo "NOT YET PUSHING GEM AUTOMATICALLY, RUN: gem push pkg/*-${version}.gem"
|
18
|
+
# gem push pkg/*-${version}.gem
|
@@ -38,6 +38,13 @@ describe AutoStripAttributes do
|
|
38
38
|
@init_params = {:foo => "\tfoo ", :bar => " bar bar "}
|
39
39
|
end
|
40
40
|
|
41
|
+
def teardown
|
42
|
+
AutoStripAttributes::Config.filters = {}
|
43
|
+
AutoStripAttributes::Config.filters_enabled = {}
|
44
|
+
AutoStripAttributes::Config.filters_order = []
|
45
|
+
AutoStripAttributes::Config.setup
|
46
|
+
end
|
47
|
+
|
41
48
|
it "should have defined AutoStripAttributes" do
|
42
49
|
assert Object.const_defined?(:AutoStripAttributes)
|
43
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_strip_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olli Huotari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.8.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.8.1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: mocha
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,12 +78,15 @@ extra_rdoc_files: []
|
|
64
78
|
files:
|
65
79
|
- ".gitignore"
|
66
80
|
- ".travis.yml"
|
81
|
+
- CHANGELOG.md
|
67
82
|
- Gemfile
|
68
83
|
- README.md
|
69
84
|
- Rakefile
|
70
85
|
- auto_strip_attributes.gemspec
|
71
86
|
- lib/auto_strip_attributes.rb
|
72
87
|
- lib/auto_strip_attributes/version.rb
|
88
|
+
- script/package
|
89
|
+
- script/release
|
73
90
|
- test/auto_strip_attributes_test.rb
|
74
91
|
homepage: https://github.com/holli/auto_strip_attributes
|
75
92
|
licenses:
|
@@ -91,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
108
|
version: '0'
|
92
109
|
requirements: []
|
93
110
|
rubyforge_project: auto_strip_attributes
|
94
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.5.1
|
95
112
|
signing_key:
|
96
113
|
specification_version: 4
|
97
114
|
summary: Removes unnecessary whitespaces in attributes. Extension to ActiveRecord
|