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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbaae26c3b7cec867e92ac5ec56e4d2191b23cc9
4
- data.tar.gz: 15e27ef073616f47d2b0d0fc422e61c2eb63270b
3
+ metadata.gz: 4bd8eadb5f2deb62f0fb5b0b0fbe62296865465c
4
+ data.tar.gz: 72fd859cbcc3cb6fae5d5b8fd2c58e1bb91d98fc
5
5
  SHA512:
6
- metadata.gz: b4820011495aa09cc0a93ddab23e3ca0b4ee749cc6d727650cdb162c967156227c161098e1e78015e9cd7aea29b6d86176c1bf90f956fbdbc000db7f1c6927da
7
- data.tar.gz: 824e26bcf91c5a04ceb5fd5503755466662602e9dc716d212fce40c161ec497ba503fc5aabb8be5d237d990df2f4d59e5db09a07b6451a4f6e7caee1f2dc9627
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
3
- - 2.1
5
+ - 2.1.9
6
+ - 2.2.5
7
+ - 2.3.1
4
8
  env:
5
- - "RAILS_VERSION=3.2.16"
6
- - "RAILS_VERSION=4.0.2"
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
- rails = case rails_version
11
+ case rails_version
12
12
  when "default"
13
- ">= 3.2"
13
+ gem "rails"
14
14
  else
15
- "~> #{rails_version}"
15
+ gem "rails", "~> #{rails_version}"
16
16
  end
17
17
 
18
- gem "rails", rails
18
+
data/README.md CHANGED
@@ -91,13 +91,12 @@ AutoStripAttributes::Config.setup accepts following options
91
91
 
92
92
  # Versions
93
93
 
94
- - 1.x : Had only basic filters
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 Ruby 1.9.3, Ruby 2.1, Rails 3.2 and Rails 4.0. Although it should also work with previous versions of rails.
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
- #s.add_development_dependency "minitest", ">= 2.8.1"
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 &block if block_given?
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
-
@@ -1,3 +1,3 @@
1
1
  module AutoStripAttributes
2
- VERSION = "2.0.6"
2
+ VERSION = "2.1.0"
3
3
  end
data/script/package ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ # Usage: script/package
3
+ # Updates the gemspec and builds a new gem in the pkg directory.
4
+
5
+ mkdir -p pkg
6
+ chmod -R a+r *
7
+ gem build *.gemspec
8
+ mv *.gem pkg
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.6
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: 2014-07-29 00:00:00.000000000 Z
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.3.0
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