csv_row_model 0.3.5 → 0.3.6

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: 3116cc6b8ed4e2f36de325327d4602b29e230ce3
4
- data.tar.gz: 480c895b0dcfdd158cc45bd8e3a5208174ef33bc
3
+ metadata.gz: ec97dd8731aef2c4f7ff28c2458e0a2b0a2d2386
4
+ data.tar.gz: dae0f044ff3ec2564c074d290fa0027954f88322
5
5
  SHA512:
6
- metadata.gz: 2e7fcd7365c3b5bc20eed4db84a9ee8d4772d7d4225a210ca25c34cfda857c99d899c18e4d9d185ac74a65e6b9e9819e90aebf6f1f21cdfdc16ddee9ab92c8d5
7
- data.tar.gz: b78045699ad15eeacb70acf42359f5f4650f02b0f24b627a4e0aa31cfedd091f871257252f070f58c59e83305dc87024fba08822ce3b092dd15ff0efa5e5557a
6
+ metadata.gz: e1f8b44b5079a08edef1d04b7df4149106a235a8600e93474f83f23961f507ed9945194b51932cd37e968a5215de142a325ebd7e8cdf60cbd715d04c3174b837
7
+ data.tar.gz: 9c51f8678d243e14a51ddf90321070f9eb4f7ce1a3386b6e4435f7f793f641e807de3f7b9dc47013edf9b5f7549574d6e82ef9b1a683011af9c1ba17c3b0051f
@@ -6,8 +6,8 @@ require 'csv_row_model/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "csv_row_model"
8
8
  spec.version = CsvRowModel::VERSION
9
- spec.authors = ["Steve Chung"]
10
- spec.email = ["hello@stevenchung.ca"]
9
+ spec.authors = ["Steve Chung", 'Joel AZEMAR']
10
+ spec.email = ["hello@stevenchung.ca", 'joel.azemar@gmail.com']
11
11
 
12
12
  spec.summary = "Import and export your custom CSVs with a intuitive shared Ruby interface."
13
13
  spec.homepage = "https://github.com/s12chung/csv_row_model"
@@ -1,9 +1,12 @@
1
+ require 'csv_row_model/model/comparison'
2
+
1
3
  module CsvRowModel
2
4
  module Export
3
5
  module Attributes
4
6
  extend ActiveSupport::Concern
5
7
 
6
8
  included do
9
+ include Model::Comparison
7
10
  self.column_names.each { |*args| define_attribute_method(*args) }
8
11
  end
9
12
 
@@ -1,9 +1,15 @@
1
1
  require 'csv_row_model/validators/boolean_format'
2
+ require 'csv_row_model/model/comparison'
2
3
 
3
4
  module CsvRowModel
4
5
  module Import
5
6
  module Attributes
6
7
  extend ActiveSupport::Concern
8
+
9
+ included do
10
+ include Model::Comparison
11
+ end
12
+
7
13
  # Classes with a validations associated with them in csv_row_model/validators
8
14
  PARSE_VALIDATION_CLASSES = [Boolean, Integer, Float, Date].freeze
9
15
 
@@ -0,0 +1,15 @@
1
+ module CsvRowModel
2
+ module Model
3
+ module Comparison
4
+ extend ActiveSupport::Concern
5
+
6
+ def eql?(other)
7
+ other.attributes == attributes
8
+ end
9
+
10
+ def hash
11
+ attributes.hash
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module CsvRowModel
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_row_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Chung
8
+ - Joel AZEMAR
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
12
+ date: 2016-01-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activemodel
@@ -41,6 +42,7 @@ dependencies:
41
42
  description:
42
43
  email:
43
44
  - hello@stevenchung.ca
45
+ - joel.azemar@gmail.com
44
46
  executables: []
45
47
  extensions: []
46
48
  extra_rdoc_files: []
@@ -81,6 +83,7 @@ files:
81
83
  - lib/csv_row_model/model.rb
82
84
  - lib/csv_row_model/model/children.rb
83
85
  - lib/csv_row_model/model/columns.rb
86
+ - lib/csv_row_model/model/comparison.rb
84
87
  - lib/csv_row_model/model/csv_string_model.rb
85
88
  - lib/csv_row_model/model/dynamic_columns.rb
86
89
  - lib/csv_row_model/model/file_model.rb
@@ -112,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
115
  version: '0'
113
116
  requirements: []
114
117
  rubyforge_project:
115
- rubygems_version: 2.4.5
118
+ rubygems_version: 2.4.6
116
119
  signing_key:
117
120
  specification_version: 4
118
121
  summary: Import and export your custom CSVs with a intuitive shared Ruby interface.