seeder 1.3.0 → 1.4.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
  SHA256:
3
- metadata.gz: 9ea65dfd79d4cec471d7647fca069f0832fb20440ecadd49a98b6bf6c2eda4c7
4
- data.tar.gz: f23fef0a61436474b44d974ff4405b444a636923fdcac6acb049273666824850
3
+ metadata.gz: 336b81eaac4d8959171c8e2c5ebf1fda4f7980b73fa0e89bb0ccf8c7cdb73fbe
4
+ data.tar.gz: 1e827ab5913fcaa5c287fc13e32e218a0ed8c03ffeac80007679209f61c244a4
5
5
  SHA512:
6
- metadata.gz: c9f31951b96c3a15eac31938527c350122e2c4d6cc1ff0864bdd2d359588121f434c5cff71811cbd4052eac662624c94a64b059375d004801c9d8feb6ab10379
7
- data.tar.gz: 5ddd997b90e114659d2082480f38d2c2d29790ab0f604f708d66316420a61a8dac07b3310974389b2fcf3debb3981f349530cdcc7b1374fcbc1b1ce1b8659276
6
+ metadata.gz: 0c2c960bafe9c4beee8aede30bebf163cf856865451c1885b2747b3b9e9a6e44de6e49641efe3ab3ffdcf368f5c674358b749b48ca17d5b43bf3fdc5f307721e
7
+ data.tar.gz: a53e13705521a6633e137ddd2ca58065f72636c8b55ad117a392c10cc1b0aa7af45149962906921707035e9d08be41e8ae6384fdd7539e84de232a1d5c4d1783
@@ -0,0 +1,61 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ services:
13
+ mysql:
14
+ image: mysql:5.7
15
+ env:
16
+ MYSQL_ALLOW_EMPTY_PASSWORD: yes
17
+ MYSQL_DATABASE: seeder_test
18
+ ports:
19
+ - 3306:3306
20
+ options: >-
21
+ --health-cmd="mysqladmin ping"
22
+ --health-interval=10s
23
+ --health-timeout=5s
24
+ --health-retries=3
25
+
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ gemfile: ['5.2', '6.0', '6.1', '7.0']
30
+ ruby-version: ['2.6', '2.7', '3.0']
31
+ exclude:
32
+ - gemfile: '5.2'
33
+ ruby-version: '2.7'
34
+ - gemfile: '5.2'
35
+ ruby-version: '3.0'
36
+ - gemfile: '7.0'
37
+ ruby-version: '2.6'
38
+
39
+ env:
40
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
41
+
42
+ steps:
43
+ - name: Checkout Repository
44
+ uses: actions/checkout@v2
45
+
46
+ - name: Setup test database
47
+ run: mysql --host 127.0.0.1 --port 3306 --user root -e 'CREATE DATABASE IF NOT EXISTS seeder_test;'
48
+
49
+ - name: Set up Ruby
50
+ uses: ruby/setup-ruby@v1
51
+ with:
52
+ ruby-version: ${{ matrix.ruby-version }}
53
+ bundler-cache: true
54
+
55
+ - name: Run tests
56
+ env:
57
+ DB_PORT: 3306
58
+ DB_USER: root
59
+ DB_PASSWORD: ""
60
+ DB_NAME: seeder_test
61
+ run: bundle exec rspec spec
data/Appraisals CHANGED
@@ -1,13 +1,3 @@
1
- appraise '5.0' do
2
- gem 'activerecord', '~> 5.0.0'
3
- gem 'mysql2', '~> 0.4.0'
4
- end
5
-
6
- appraise '5.1' do
7
- gem 'activerecord', '~>5.1.0'
8
- gem 'mysql2', '~> 0.4.0'
9
- end
10
-
11
1
  appraise '5.2' do
12
2
  gem 'activerecord', '~> 5.2.0'
13
3
  gem 'mysql2', '~> 0.4.0'
@@ -17,3 +7,13 @@ appraise '6.0' do
17
7
  gem 'activerecord', '~> 6.0.3.3'
18
8
  gem 'mysql2', '~> 0.4.0'
19
9
  end
10
+
11
+ appraise '6.1' do
12
+ gem 'activerecord', '~> 6.1.0'
13
+ gem 'mysql2', '~> 0.5.3'
14
+ end
15
+
16
+ appraise '7.0' do
17
+ gem 'activerecord', '~> 7.0.0'
18
+ gem 'mysql2', '~> 0.5.3'
19
+ end
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "activerecord", "~> 5.0.0"
7
- gem "mysql2", "~> 0.4.0"
6
+ gem "activerecord", "~> 6.1.0"
7
+ gem "mysql2", "~> 0.5.3"
8
8
 
9
9
  gemspec path: "../"
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "activerecord", "~>5.1.0"
7
- gem "mysql2", "~> 0.4.0"
6
+ gem "activerecord", "~> 7.0.0"
7
+ gem "mysql2", "~> 0.5.3"
8
8
 
9
9
  gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  class Seeder
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
data/seeder.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.extra_rdoc_files = ["README.md", "LICENSE.txt"]
16
16
  s.license = 'MIT'
17
17
 
18
- s.add_dependency('activerecord', '>= 5.0', '< 6.1')
18
+ s.add_dependency('activerecord', '>= 5.2', '< 7.1')
19
19
 
20
20
  s.add_development_dependency('mysql2', '>= 0.4.4', '< 0.6.0')
21
21
  s.add_development_dependency('rspec', '~> 3.0')
data/spec/seeder_spec.rb CHANGED
@@ -1,6 +1,4 @@
1
- require 'active_record'
2
- require 'support/setup'
3
- require 'seeder'
1
+ require 'spec_helper'
4
2
 
5
3
  describe Seeder do
6
4
  before(:each) { Grade.delete_all }
@@ -0,0 +1,32 @@
1
+ require 'active_record'
2
+ require 'seeder'
3
+
4
+ ActiveRecord::Base.establish_connection(
5
+ adapter: 'mysql2',
6
+ database: ENV.fetch('DB_NAME', 'polymorpheus_test'),
7
+ host: ENV.fetch('DB_HOST', '127.0.0.1'),
8
+ password: ENV.fetch('DB_PASSWORD', ''),
9
+ port: ENV.fetch('DB_PORT', '3306'),
10
+ username: ENV.fetch('DB_USERNAME', 'root')
11
+ )
12
+
13
+ RSpec.configure do |config|
14
+ config.before(:suite) do
15
+ ActiveRecord::Schema.define do
16
+ create_table :grades do |t|
17
+ t.integer :student_id
18
+ t.integer :course_id
19
+ t.integer :grade
20
+ end
21
+ end
22
+ end
23
+
24
+ config.after(:suite) do
25
+ ActiveRecord::Base.connection.tables.each do |table|
26
+ ActiveRecord::Base.connection.drop_table table
27
+ end
28
+ end
29
+ end
30
+
31
+ class Grade < ActiveRecord::Base
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seeder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barun Singh
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-23 00:00:00.000000000 Z
11
+ date: 2022-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '7.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '5.0'
29
+ version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '7.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: mysql2
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -86,29 +86,29 @@ extra_rdoc_files:
86
86
  - README.md
87
87
  - LICENSE.txt
88
88
  files:
89
+ - ".github/workflows/ruby.yml"
89
90
  - ".gitignore"
90
- - ".travis.yml"
91
91
  - Appraisals
92
92
  - CHANGELOG.txt
93
93
  - Gemfile
94
94
  - LICENSE.txt
95
95
  - README.md
96
96
  - Rakefile
97
- - gemfiles/5.0.gemfile
98
- - gemfiles/5.1.gemfile
99
97
  - gemfiles/5.2.gemfile
100
98
  - gemfiles/6.0.gemfile
99
+ - gemfiles/6.1.gemfile
100
+ - gemfiles/7.0.gemfile
101
101
  - lib/seeder.rb
102
102
  - lib/seeder/version.rb
103
103
  - seeder.gemspec
104
104
  - spec/seeder_spec.rb
105
+ - spec/spec_helper.rb
105
106
  - spec/support/active_record/connection_adapters/abstract_mysql_adapter.rb
106
- - spec/support/setup.rb
107
107
  homepage: http://github.com/wegowise/seeder
108
108
  licenses:
109
109
  - MIT
110
110
  metadata: {}
111
- post_install_message:
111
+ post_install_message:
112
112
  rdoc_options: []
113
113
  require_paths:
114
114
  - lib
@@ -123,8 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.3.6
125
125
  requirements: []
126
- rubygems_version: 3.1.2
127
- signing_key:
126
+ rubygems_version: 3.1.6
127
+ signing_key:
128
128
  specification_version: 4
129
129
  summary: Manage seed data for your Rails app
130
130
  test_files: []
data/.travis.yml DELETED
@@ -1,45 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- services:
4
- - mysql
5
- rvm:
6
- - 2.1.10
7
- - 2.2.7
8
- - 2.3.4
9
- - 2.4.1
10
- - 2.5.8
11
- - 2.6.6
12
- - 2.7.1
13
- gemfile:
14
- - gemfiles/5.0.gemfile
15
- - gemfiles/5.1.gemfile
16
- - gemfiles/5.2.gemfile
17
- - gemfiles/6.0.gemfile
18
- matrix:
19
- exclude:
20
- - rvm: 2.2.7
21
- gemfile: gemfiles/6.0.gemfile
22
-
23
- - rvm: 2.1.10
24
- gemfile: gemfiles/5.0.gemfile
25
- - rvm: 2.1.10
26
- gemfile: gemfiles/5.1.gemfile
27
- - rvm: 2.1.10
28
- gemfile: gemfiles/5.2.gemfile
29
- - rvm: 2.1.10
30
- gemfile: gemfiles/6.0.gemfile
31
-
32
- - rvm: 2.3.4
33
- gemfile: gemfiles/6.0.gemfile
34
-
35
- - rvm: 2.4.1
36
- gemfile: gemfiles/6.0.gemfile
37
-
38
- - rvm: 2.7.1
39
- gemfile: gemfiles/5.0.gemfile
40
- - rvm: 2.7.1
41
- gemfile: gemfiles/5.1.gemfile
42
- - rvm: 2.7.1
43
- gemfile: gemfiles/5.2.gemfile
44
- before_script:
45
- - mysql -e 'create database seeder_test;'
@@ -1,24 +0,0 @@
1
- require 'support/active_record/connection_adapters/abstract_mysql_adapter'
2
-
3
- ActiveRecord::Base.establish_connection({
4
- adapter: 'mysql2',
5
- username: 'travis',
6
- database: 'seeder_test'
7
- })
8
-
9
- tables_method = ActiveRecord::VERSION::MAJOR >= 5 ? :data_sources : :tables
10
-
11
- ActiveRecord::Base.connection.public_send(tables_method).each do |table|
12
- ActiveRecord::Base.connection.drop_table table
13
- end
14
-
15
- ActiveRecord::Schema.define do
16
- create_table :grades do |t|
17
- t.integer :student_id
18
- t.integer :course_id
19
- t.integer :grade
20
- end
21
- end
22
-
23
- class Grade < ActiveRecord::Base
24
- end