normalize_line_endings 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 111500040a787c75f435a4815c10c724217e5bd616eccbfed0cd57f55dabcf54
4
- data.tar.gz: e4724b49e12cec206123697d5f3384324a8a4405b07f2dd8ac77f394c5f8ac5d
3
+ metadata.gz: 125fcca2797d26cc01f65ef12984b98e07c0282e76e9a936a07934ec6f3d30ff
4
+ data.tar.gz: 1568682831e63835edc3f42af6ea5e7b67a665df9cdf0e4a2b26334a648de1c3
5
5
  SHA512:
6
- metadata.gz: 0c25b1cf2efbe484a3d7168c0f6da28e5c3c00189962d04d5d81c77d1bc07687c2b0fb59c9880d6c54c6f2e604dabc85eaaf26364d3e44b5d7e49a833910bf71
7
- data.tar.gz: d392596f8bed83b093226d473d3d583b872ce0bf5bfd2880d06791bf3e2f3490dce70aff6513e59cbfa5b5b3b3d47fbe839462288d90d8f42e775d4d36b3964c
6
+ metadata.gz: b57e98d49cf25dd9a029e2019fc29cc3eeb4fad73beb23aa514414f6d2e70fa5b25a9b6d3af30b40b7b13ae52d9fe18f9cfce3fadb7bc2bb3989896cd2fe23c7
7
+ data.tar.gz: 85695fb6c868744a8a4fda8f5c3703e9e9dd82464a433b5f8e5b942369ac45a5e7afffd88431585e1d760e72a568a0072ee0eb69d840811c22095be60d9121a4
data/.gitignore CHANGED
@@ -8,4 +8,4 @@
8
8
  /tmp/
9
9
 
10
10
  # rspec failure tracking
11
- .rspec_status
11
+ /spec/examples.txt
@@ -0,0 +1,100 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.5
5
+
6
+ Layout/EmptyLinesAroundAttributeAccessor:
7
+ Enabled: true
8
+
9
+ Layout/SpaceAroundMethodCallOperator:
10
+ Enabled: false
11
+
12
+ Lint/DeprecatedOpenSSLConstant:
13
+ Enabled: true
14
+
15
+ Lint/RaiseException:
16
+ Enabled: false
17
+
18
+ Lint/StructNewOverride:
19
+ Enabled: false
20
+
21
+ Metrics/AbcSize:
22
+ Enabled: false
23
+
24
+ Metrics/BlockLength:
25
+ Enabled: false
26
+
27
+ Metrics/LineLength:
28
+ Max: 120
29
+
30
+ Metrics/MethodLength:
31
+ Enabled: false
32
+
33
+ Metrics/ModuleLength:
34
+ Enabled: false
35
+
36
+ RSpec/AnyInstance:
37
+ Enabled: false
38
+
39
+ RSpec/DescribedClass:
40
+ Enabled: false
41
+
42
+ RSpec/ExampleLength:
43
+ Max: 20
44
+
45
+ RSpec/MultipleExpectations:
46
+ Max: 5
47
+
48
+ RSpec/LeadingSubject:
49
+ Enabled: false
50
+
51
+ RSpec/MessageSpies:
52
+ Enabled: false
53
+
54
+ RSpec/NotToNot:
55
+ EnforcedStyle: to_not
56
+
57
+ Style/SlicingWithRange:
58
+ Enabled: true
59
+
60
+ Style/ExponentialNotation:
61
+ Enabled: false
62
+
63
+ Style/HashEachMethods:
64
+ Enabled: false
65
+
66
+ Style/HashTransformKeys:
67
+ Enabled: false
68
+
69
+ Style/HashTransformValues:
70
+ Enabled: false
71
+
72
+ Style/Documentation:
73
+ Enabled: false
74
+
75
+ Style/EmptyMethod:
76
+ Enabled: false
77
+
78
+ Style/ExpandPathArguments:
79
+ Enabled: false
80
+
81
+ Style/FrozenStringLiteralComment:
82
+ Enabled: false
83
+
84
+ Style/MutableConstant:
85
+ Enabled: false
86
+
87
+ Style/StringLiterals:
88
+ EnforcedStyle: double_quotes
89
+
90
+ Style/SymbolArray:
91
+ Enabled: false
92
+
93
+ Style/RescueModifier:
94
+ Enabled: false
95
+
96
+ Style/RescueStandardError:
97
+ EnforcedStyle: implicit
98
+
99
+ Style/WordArray:
100
+ Enabled: false
@@ -0,0 +1,10 @@
1
+ # Change log
2
+
3
+ ## master (unreleased)
4
+
5
+ ## 0.0.2 (2020-05-30)
6
+
7
+ * Add CHANGELOG
8
+ * Add metadata to gemspec
9
+ * Bump runtime and development dependencies
10
+
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in normalize_line_endings.gemspec
6
6
  gemspec
@@ -0,0 +1,75 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ normalize_line_endings (0.0.2)
5
+ activesupport (~> 5.2.4.3, < 6.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (5.2.4.3)
11
+ activesupport (= 5.2.4.3)
12
+ activesupport (5.2.4.3)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ ast (2.4.0)
18
+ concurrent-ruby (1.1.6)
19
+ diff-lcs (1.3)
20
+ i18n (1.8.2)
21
+ concurrent-ruby (~> 1.0)
22
+ minitest (5.14.1)
23
+ parallel (1.19.1)
24
+ parser (2.7.1.3)
25
+ ast (~> 2.4.0)
26
+ rainbow (3.0.0)
27
+ rake (13.0.1)
28
+ rexml (3.2.4)
29
+ rspec (3.9.0)
30
+ rspec-core (~> 3.9.0)
31
+ rspec-expectations (~> 3.9.0)
32
+ rspec-mocks (~> 3.9.0)
33
+ rspec-core (3.9.2)
34
+ rspec-support (~> 3.9.3)
35
+ rspec-expectations (3.9.2)
36
+ diff-lcs (>= 1.2.0, < 2.0)
37
+ rspec-support (~> 3.9.0)
38
+ rspec-mocks (3.9.1)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.9.0)
41
+ rspec-support (3.9.3)
42
+ rubocop (0.84.0)
43
+ parallel (~> 1.10)
44
+ parser (>= 2.7.0.1)
45
+ rainbow (>= 2.2.2, < 4.0)
46
+ rexml
47
+ rubocop-ast (>= 0.0.3)
48
+ ruby-progressbar (~> 1.7)
49
+ unicode-display_width (>= 1.4.0, < 2.0)
50
+ rubocop-ast (0.0.3)
51
+ parser (>= 2.7.0.1)
52
+ rubocop-performance (1.6.0)
53
+ rubocop (>= 0.71.0)
54
+ rubocop-rspec (1.39.0)
55
+ rubocop (>= 0.68.1)
56
+ ruby-progressbar (1.10.1)
57
+ thread_safe (0.3.6)
58
+ tzinfo (1.2.7)
59
+ thread_safe (~> 0.1)
60
+ unicode-display_width (1.7.0)
61
+
62
+ PLATFORMS
63
+ ruby
64
+
65
+ DEPENDENCIES
66
+ activemodel (~> 5.2.4.3, < 6.0)
67
+ normalize_line_endings!
68
+ rake (~> 13.0)
69
+ rspec (~> 3.9)
70
+ rubocop (~> 0.84)
71
+ rubocop-performance (~> 1.6)
72
+ rubocop-rspec (~> 1.39)
73
+
74
+ BUNDLED WITH
75
+ 2.1.4
data/README.md CHANGED
@@ -20,12 +20,4 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- Run tests by cd'ing to the root of the gem directory and running `rake test`
24
-
25
- ```
26
- class Post < ApplicationRecord
27
- normalize_line_endings :only => [:foo, :bar, :biz]
28
- end
29
- ```
30
-
31
- See the tests for more example usages.
23
+ Run tests by cd'ing to the root of the gem directory and running `rake`
data/Rakefile CHANGED
@@ -1,23 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "rubocop/rake_task"
2
4
 
3
- require "rake"
4
- require "rake/testtask"
5
- require "rdoc/task"
5
+ RuboCop::RakeTask.new
6
+ RSpec::Core::RakeTask.new(:spec)
6
7
 
7
- desc "Default: run unit tests."
8
- task default: :test
9
-
10
- desc "Test the stripattributes plugin."
11
- Rake::TestTask.new(:test) do |t|
12
- t.libs << "lib"
13
- t.pattern = "test/**/*_test.rb"
14
- end
15
-
16
- desc "Generate documentation for the stripattributes plugin."
17
- Rake::RDocTask.new(:rdoc) do |rdoc|
18
- rdoc.rdoc_dir = "rdoc"
19
- rdoc.title = "Stripattributes"
20
- rdoc.options << "--line-numbers" << "--inline-source"
21
- rdoc.rdoc_files.include("README.rdoc")
22
- rdoc.rdoc_files.include("lib/**/*.rb")
23
- end
8
+ task default: [:rubocop, :spec]
@@ -5,14 +5,15 @@ require "active_support"
5
5
  module NormalizeLineEndings
6
6
  extend ActiveSupport::Concern
7
7
 
8
- module ClassMethods
8
+ class_methods do
9
9
  def normalize_line_endings(*opts)
10
10
  @normalize_line_endings_options = opts.first.is_a?(Hash) ? opts.first : { only: opts } unless opts.empty?
11
11
 
12
12
  class << self; attr_reader :normalize_line_endings_options; end
13
13
 
14
- before_validation { |record| record.normalize_line_endings }
14
+ before_validation { |record| record.normalize_line_endings } # rubocop:disable Style/SymbolProc
15
15
  end
16
+
16
17
  alias_method :normalize_line_endings_for, :normalize_line_endings
17
18
  end
18
19
 
@@ -1,3 +1,3 @@
1
1
  module NormalizeLineEndings
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,31 +1,39 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "normalize_line_endings/version"
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "normalize_line_endings"
8
- spec.version = NormalizeLineEndings::VERSION
9
- spec.authors = ["Matt Briggs","Alistair McKinnell"]
10
- spec.email = ["alistairm@nulogy.com"]
6
+ spec.name = "normalize_line_endings"
7
+ spec.version = NormalizeLineEndings::VERSION
8
+ spec.authors = ["Matt Briggs", "Alistair McKinnell"]
9
+ spec.email = ["alistairm@nulogy.com"]
10
+
11
+ spec.summary = %q(Converts \r\n characters to \n for attributes on ActiveModel-like entities.)
12
+ spec.homepage = "https://github.com/nulogy/normalize_line_endings"
13
+ spec.license = "MIT"
11
14
 
12
- spec.summary = %q(Converts \r\n characters to \n for attributes on ActiveModel-like entities.)
13
- spec.description = %q(Converts \r\n characters to \n for attributes on ActiveModel-like entities.)
14
- spec.homepage = "https://github.com/nulogy/normalize_line_endings"
15
- spec.license = "MIT"
15
+ spec.metadata = {
16
+ "homepage_uri" => "https://github.com/nulogy/normalize_line_endings",
17
+ "changelog_uri" => "https://github.com/nulogy/normalize_line_endings/blob/master/CHANGELOG.md",
18
+ "source_code_uri" => "https://github.com/nulogy/normalize_line_endings",
19
+ "bug_tracker_uri" => "https://github.com/nulogy/normalize_line_endings/issues"
20
+ }
16
21
 
17
22
  # Specify which files should be added to the gem when it is released.
18
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
25
  `git ls-files -z`.split("\x0").reject { |f| f.match(/^spec/) }
21
26
  end
22
- spec.bindir = "exe"
23
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
29
  spec.require_paths = ["lib"]
25
30
 
26
- spec.add_dependency "activesupport", ">= 5.0", "< 6.0"
31
+ spec.add_dependency "activesupport", "~> 5.2.4.3", "< 6.0"
27
32
 
28
- spec.add_development_dependency "activemodel", ">= 5.0", "< 6.0"
29
- spec.add_development_dependency "rake", "~> 10.0"
30
- spec.add_development_dependency "rspec", "~> 3.0"
33
+ spec.add_development_dependency "activemodel", "~> 5.2.4.3", "< 6.0"
34
+ spec.add_development_dependency "rake", "~> 13.0"
35
+ spec.add_development_dependency "rspec", "~> 3.9"
36
+ spec.add_development_dependency "rubocop", "~> 0.84"
37
+ spec.add_development_dependency "rubocop-performance", "~> 1.6"
38
+ spec.add_development_dependency "rubocop-rspec", "~> 1.39"
31
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: normalize_line_endings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Briggs
@@ -9,15 +9,15 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-01-02 00:00:00.000000000 Z
12
+ date: 2020-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '5.0'
20
+ version: 5.2.4.3
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: '6.0'
@@ -25,9 +25,9 @@ dependencies:
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ">="
28
+ - - "~>"
29
29
  - !ruby/object:Gem::Version
30
- version: '5.0'
30
+ version: 5.2.4.3
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '6.0'
@@ -35,9 +35,9 @@ dependencies:
35
35
  name: activemodel
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.0'
40
+ version: 5.2.4.3
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '6.0'
@@ -45,9 +45,9 @@ dependencies:
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ">="
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '5.0'
50
+ version: 5.2.4.3
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '6.0'
@@ -57,29 +57,71 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '10.0'
60
+ version: '13.0'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '10.0'
67
+ version: '13.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: rspec
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.0'
74
+ version: '3.9'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.9'
82
+ - !ruby/object:Gem::Dependency
83
+ name: rubocop
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0.84'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.84'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rubocop-performance
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.6'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.6'
110
+ - !ruby/object:Gem::Dependency
111
+ name: rubocop-rspec
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '1.39'
75
117
  type: :development
76
118
  prerelease: false
77
119
  version_requirements: !ruby/object:Gem::Requirement
78
120
  requirements:
79
121
  - - "~>"
80
122
  - !ruby/object:Gem::Version
81
- version: '3.0'
82
- description: Converts \r\n characters to \n for attributes on ActiveModel-like entities.
123
+ version: '1.39'
124
+ description:
83
125
  email:
84
126
  - alistairm@nulogy.com
85
127
  executables: []
@@ -88,8 +130,11 @@ extra_rdoc_files: []
88
130
  files:
89
131
  - ".gitignore"
90
132
  - ".rspec"
133
+ - ".rubocop.yml"
134
+ - CHANGELOG.md
91
135
  - CODE_OF_CONDUCT.md
92
136
  - Gemfile
137
+ - Gemfile.lock
93
138
  - README.md
94
139
  - Rakefile
95
140
  - bin/console
@@ -100,7 +145,11 @@ files:
100
145
  homepage: https://github.com/nulogy/normalize_line_endings
101
146
  licenses:
102
147
  - MIT
103
- metadata: {}
148
+ metadata:
149
+ homepage_uri: https://github.com/nulogy/normalize_line_endings
150
+ changelog_uri: https://github.com/nulogy/normalize_line_endings/blob/master/CHANGELOG.md
151
+ source_code_uri: https://github.com/nulogy/normalize_line_endings
152
+ bug_tracker_uri: https://github.com/nulogy/normalize_line_endings/issues
104
153
  post_install_message:
105
154
  rdoc_options: []
106
155
  require_paths:
@@ -116,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
165
  - !ruby/object:Gem::Version
117
166
  version: '0'
118
167
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.7.7
168
+ rubygems_version: 3.1.3
121
169
  signing_key:
122
170
  specification_version: 4
123
171
  summary: Converts \r\n characters to \n for attributes on ActiveModel-like entities.