to_fixture 0.2.0 → 0.3.0

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
  SHA1:
3
- metadata.gz: 352bd039056465b6ad1d143cc9af72bc5468a585
4
- data.tar.gz: 28ed1e57265ba4f6c16d69abb5c929efc897e933
3
+ metadata.gz: 37c88f2b16917b273c6a6d55602838f91f3ca5f7
4
+ data.tar.gz: fb9f1689b98c0d40e029a7a6b3a5c1b523ee2c84
5
5
  SHA512:
6
- metadata.gz: 9d53a3fa2e543e43e16c1cc86a8f4b7f05301325aa5477bf31578f093020fcc2a1865e0d1a31c33ee6e8e7518a29800ecfebefd9773e77f22f01975fec311ae5
7
- data.tar.gz: 88101085a388806eb3cf768ece645d3230c0c5ef418b766ba2e4a17b96b512a61560e5632fcd44df9c4ab292e254529a928157e521791e337679884647d9daf9
6
+ metadata.gz: 2253cb7fdf1fcc8500a8fd59b911f14ab39af24a2a3620a8a7ec1703ec931805220bed0dd41d7ebfd9a29f2f7422796e7e4f4502f6f02a965d712a4920c0795b
7
+ data.tar.gz: 58a6e97e0ce9215a7737c538fb0064cc3a2a49ba9ce272bea42c9cf04cfa68f96e46fe6552d4c3851ac31bb181555b83bfa9ad1adedddde54104f9fbd8b13397
@@ -1,11 +1,14 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.5
5
- - 2.3.1
4
+ - 2.2.7
5
+ - 2.3.4
6
+ - 2.4.1
6
7
 
7
8
  gemfile:
8
9
  - gemfiles/active_record_42.gemfile
9
10
  - gemfiles/active_record_50.gemfile
11
+ - gemfiles/active_record_51.gemfile
12
+ - gemfiles/active_record_master.gemfile
10
13
 
11
14
  before_install: gem install bundler -v 1.12.5
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.3.0 (2017-10-25)](https://github.com/y-yagi/to_fixture/tree/HEAD)
4
+
5
+ **Implemented enhancements:**
6
+
7
+ * Add support for Rails 5.1.
8
+
3
9
  ## [v0.2.0 (2016-09-17)](https://github.com/y-yagi/to_fixture/tree/HEAD)
4
10
 
5
11
  **Implemented enhancements:**
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'sqlite3'
5
+ gem 'activesupport', '~> 5.1.0'
6
+ gem 'activerecord', '~> 5.1.0'
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'sqlite3'
5
+ gem 'arel', github: 'rails/arel'
6
+ gem 'activesupport', github: 'rails/rails'
7
+ gem 'activerecord', github: 'rails/rails'
@@ -19,7 +19,12 @@ module ToFixture
19
19
  end
20
20
 
21
21
  def columns_for_fixture
22
- self.class.column_names - all_timestamp_attributes.map(&:to_s) - %w(id)
22
+ timestamp_attributes = if respond_to?(:all_timestamp_attributes_in_model, true)
23
+ all_timestamp_attributes_in_model
24
+ else
25
+ all_timestamp_attributes
26
+ end
27
+ self.class.column_names - timestamp_attributes.map(&:to_s) - %w(id)
23
28
  end
24
29
  end
25
30
 
@@ -1,3 +1,3 @@
1
1
  module ToFixture
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_fixture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Yaginuma
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-16 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -113,6 +113,8 @@ files:
113
113
  - bin/setup
114
114
  - gemfiles/active_record_42.gemfile
115
115
  - gemfiles/active_record_50.gemfile
116
+ - gemfiles/active_record_51.gemfile
117
+ - gemfiles/active_record_master.gemfile
116
118
  - lib/to_fixture.rb
117
119
  - lib/to_fixture/version.rb
118
120
  - to_fixture.gemspec
@@ -136,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
138
  version: '0'
137
139
  requirements: []
138
140
  rubyforge_project:
139
- rubygems_version: 2.5.1
141
+ rubygems_version: 2.6.13
140
142
  signing_key:
141
143
  specification_version: 4
142
144
  summary: Add to_fixture method to Active Record object