seedbank 0.5.0.pre → 0.5.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: 6c3bc57dd874c51ca32bccb50bba4e967882bafe
4
- data.tar.gz: a836593c5f0ef3b9f678f6cca0161011121ec041
3
+ metadata.gz: e92838099b21443451e9fd5a5bfecdf5f3874e65
4
+ data.tar.gz: 31061861c8211b79dd619fb2017527d748ea2291
5
5
  SHA512:
6
- metadata.gz: 01bdcdf660b8633a6415e429cea98b3d9a35ff4a511d893d9f5f0bcca0e98df62645c27b6f9a37a738a862f005ebb978021d4a5fa53e18da9a58135e24ff1339
7
- data.tar.gz: a6a6accab1ca5d1e3ff34448f5bb9bde4efbfc2af8d062f0a692ded5e1609481bdc5cb7fb3ae997bc61d84a8fe1694e836d459e87a0ebbf17c0f1fb7d168d6be
6
+ metadata.gz: 1f9258f988c7ac6f2438a6974057c8b09e5fd6692196af040f60dcbf36c3e24c0d6427a0677d1bd670e73f9c75bc449cfab51c8481f1321da2b2fa9fd95d1968
7
+ data.tar.gz: 5e65fa43aa95cca1612a970e1fd47f11a2f66eb3aafc4ee0ee5f60669aed750f3decf570c3dfc0fb1e0664f6b3122ebaae7cf0983c13c7b47386f94eaed0b637
@@ -1,7 +1,18 @@
1
1
  inherit_from: .rubocop_todo.yml
2
+ Style/StringLiteral:
3
+ Enabled: true
4
+ EnforcedStyle: single_quotes
5
+ Style/MutableConstant:
6
+ Exclude:
7
+ - 'lib/seedbank/version.rb'
8
+ Lint/ScriptPermission:
9
+ Exclude:
10
+ - 'test/dummy/Rakefile'
2
11
  Metrics/LineLength:
3
12
  Exclude:
4
13
  - 'test/**/*'
5
14
  Max: 132
6
15
  Style/ConditionalAssignment:
7
16
  Enabled: false
17
+ Layout/EmptyLineAfterMagicComment:
18
+ Enabled: false
@@ -3,11 +3,14 @@ language: ruby
3
3
  rvm:
4
4
  - 2.1
5
5
  - 2.2
6
- - 2.3.1
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
7
9
 
8
10
  gemfile:
9
11
  - gemfiles/rake10.gemfile
10
12
  - gemfiles/rake11.gemfile
13
+ - gemfiles/rake12.gemfile
11
14
 
12
15
  before_install:
13
16
  - gem install bundler -v '~> 1.11' --no-ri --no-rdoc
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
  gem 'rubocop', group: :development
8
8
 
9
9
  # for CRuby, Rubinius, including Windows and RubyInstaller
10
- gem 'sqlite3', platform: [:ruby, :mswin, :mingw]
10
+ gem 'sqlite3', platform: %i[ruby mswin mingw]
11
11
 
12
12
  # for JRuby
13
13
  gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
data/README.md CHANGED
@@ -17,6 +17,7 @@ To achieve this slothful aim, Seedbank renames the original db:seed rake task to
17
17
  Although originally built for Rails, Seedbank can work stand alone thanks to Aleksey Ivanov.
18
18
 
19
19
  [![Build Status](https://travis-ci.org/james2m/seedbank.svg?branch=master)](https://travis-ci.org/james2m/seedbank)
20
+ [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
20
21
 
21
22
  Example
22
23
  =======
@@ -9,5 +9,4 @@ gem 'rake', '~>10.0', :group => :test
9
9
  gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
10
10
 
11
11
  # for JRuby
12
- gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
13
-
12
+ gem 'activerecord-jdbcsqlite3-adapter', '~>1.3.25', :platform => :jruby
@@ -9,5 +9,4 @@ gem 'rake', '~>11.0', :group => :test
9
9
  gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
10
10
 
11
11
  # for JRuby
12
- gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
13
-
12
+ gem 'activerecord-jdbcsqlite3-adapter', '~>1.3.25', :platform => :jruby
@@ -0,0 +1,13 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in seedbank.gemspec
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rake', '~>12.0', :group => :test
7
+
8
+ # for CRuby, Rubinius, including Windows and RubyInstaller
9
+ gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
10
+
11
+ # for JRuby
12
+ gem 'activerecord-jdbcsqlite3-adapter', '~>1.3.25', :platform => :jruby
13
+
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Seedbank
3
- VERSION = '0.5.0.pre'
3
+ VERSION = '0.5.0'
4
4
  end
@@ -12,10 +12,10 @@ Gem::Specification.new do |spec|
12
12
  spec.email = ['[james2mccarthy@gmail.com']
13
13
  spec.required_ruby_version = '>= 2.1'
14
14
  spec.summary = 'Generate seeds data for your Ruby application.'
15
- spec.description = %{
15
+ spec.description = %(
16
16
  Adds simple rake commands for seeding your database. Simple dependencies let you organise your seeds.
17
17
  If you are using Rails, Seedbank extends Rails seeds and lets you add seeds for each environment.
18
- }
18
+ )
19
19
  spec.date = `git log -1 --format="%cd" --date=short lib/seedbank/version.rb`
20
20
  spec.homepage = 'http://github.com/james2m/seedbank'
21
21
  spec.license = 'MIT'
@@ -33,6 +33,4 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'bundler', '~> 1.11'
34
34
  spec.add_development_dependency 'rails', '~> 4.2'
35
35
  spec.add_development_dependency 'minitest', '~> 5.0'
36
- spec.add_development_dependency 'm', '~> 1.5'
37
- spec.add_development_dependency 'byebug', '~> 9.0'
38
36
  end
@@ -10,7 +10,7 @@ describe Seedbank::DSL do
10
10
 
11
11
  describe 'in an environment directory' do
12
12
  let(:seed_file) { File.expand_path('development/users.seeds.rb', Seedbank.seeds_root) }
13
- let(:seed_namespace) { %w(development) }
13
+ let(:seed_namespace) { %w[development] }
14
14
 
15
15
  it 'returns the enviroment scope' do
16
16
  subject.must_equal seed_namespace
@@ -19,7 +19,7 @@ describe Seedbank::DSL do
19
19
 
20
20
  describe 'in a nested directory' do
21
21
  let(:seed_file) { File.expand_path('development/shared/accounts.seeds.rb', Seedbank.seeds_root) }
22
- let(:seed_namespace) { %w(development shared) }
22
+ let(:seed_namespace) { %w[development shared] }
23
23
 
24
24
  it 'returns the nested scope' do
25
25
  subject.must_equal seed_namespace
@@ -97,7 +97,7 @@ describe Seedbank::Runner do
97
97
 
98
98
  before { runner.let(:existing) {} }
99
99
 
100
- %w(existing let! let evaluate after extend).each do |name|
100
+ %w[existing let! let evaluate after extend].each do |name|
101
101
  it 'raises ArgumentError' do
102
102
  assert_raises(ArgumentError, Regexp.new(name)) do
103
103
  runner.let(name)
@@ -16,12 +16,12 @@ describe 'Seedbank rake.task' do
16
16
  end
17
17
 
18
18
  describe 'seeds with dependency' do
19
- subject { Rake.application.tasks_in_scope(defined?(Rake::Scope) ? Rake::Scope.new('db:seed') : %w(db seed)) }
19
+ subject { Rake.application.tasks_in_scope(defined?(Rake::Scope) ? Rake::Scope.new('db:seed') : %w[db seed]) }
20
20
 
21
21
  it 'creates all the seed tasks' do
22
- seeds = %w(db:seed:circular1 db:seed:circular2 db:seed:common db:seed:dependency db:seed:dependency2
22
+ seeds = %w[db:seed:circular1 db:seed:circular2 db:seed:common db:seed:dependency db:seed:dependency2
23
23
  db:seed:dependent db:seed:dependent_on_nested db:seed:dependent_on_several db:seed:development
24
- db:seed:development:users db:seed:no_block db:seed:original db:seed:reference_memos db:seed:with_block_memo db:seed:with_inline_memo)
24
+ db:seed:development:users db:seed:no_block db:seed:original db:seed:reference_memos db:seed:with_block_memo db:seed:with_inline_memo]
25
25
 
26
26
  subject.map(&:to_s).must_equal seeds
27
27
  end
@@ -35,7 +35,7 @@ describe 'Seedbank rake.task' do
35
35
  subject { Rake.application.lookup(['db', 'seed', seed].join(':')) }
36
36
 
37
37
  it 'is dependent on db:abort_if_pending_migrations' do
38
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations)
38
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations]
39
39
  end
40
40
  end
41
41
  end
@@ -79,7 +79,7 @@ describe 'Seedbank rake.task' do
79
79
  subject { Rake::Task['db:seed:original'] }
80
80
 
81
81
  it 'is only dependent on db:abort_if_pending_migrations' do
82
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations)
82
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations]
83
83
  end
84
84
 
85
85
  it 'runs within Seedbank::Runner' do
@@ -96,7 +96,7 @@ describe 'Seedbank rake.task' do
96
96
  end
97
97
 
98
98
  it 'is still only dependent on db:abort_if_pending_migrations' do
99
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations)
99
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations]
100
100
  end
101
101
 
102
102
  it 'still runs within Seedbank::Runner' do
@@ -122,7 +122,7 @@ describe 'Seedbank rake.task' do
122
122
  subject { Rake.application.lookup(['db', 'seed', environment, seed].join(':')) }
123
123
 
124
124
  it 'is dependent on db:abort_if_pending_migrations' do
125
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations) if subject
125
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations] if subject
126
126
  end
127
127
  end
128
128
  end
@@ -147,7 +147,7 @@ describe 'Seedbank rake.task' do
147
147
 
148
148
  describe 'when no environment seeds are defined' do
149
149
  it 'is dependent on db:seed:common' do
150
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations db:seed:common)
150
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations db:seed:common]
151
151
  end
152
152
  end
153
153
 
@@ -157,7 +157,7 @@ describe 'Seedbank rake.task' do
157
157
  Rake.application.clear
158
158
  silence_warnings { Dummy::Application.load_tasks }
159
159
 
160
- subject.prerequisites.must_equal %w(db:abort_if_pending_migrations db:seed:common db:seed:development)
160
+ subject.prerequisites.must_equal %w[db:abort_if_pending_migrations db:seed:common db:seed:development]
161
161
  end
162
162
  end
163
163
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seedbank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James McCarthy
@@ -66,34 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '5.0'
69
- - !ruby/object:Gem::Dependency
70
- name: m
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.5'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.5'
83
- - !ruby/object:Gem::Dependency
84
- name: byebug
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '9.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '9.0'
97
69
  description: "\n Adds simple rake commands for seeding your database. Simple dependencies
98
70
  let you organise your seeds.\n If you are using Rails, Seedbank extends Rails
99
71
  seeds and lets you add seeds for each environment.\n "
@@ -117,6 +89,7 @@ files:
117
89
  - TODO.txt
118
90
  - gemfiles/rake10.gemfile
119
91
  - gemfiles/rake11.gemfile
92
+ - gemfiles/rake12.gemfile
120
93
  - lib/seedbank.rb
121
94
  - lib/seedbank/dsl.rb
122
95
  - lib/seedbank/railtie.rb
@@ -173,12 +146,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
146
  version: '2.1'
174
147
  required_rubygems_version: !ruby/object:Gem::Requirement
175
148
  requirements:
176
- - - ">"
149
+ - - ">="
177
150
  - !ruby/object:Gem::Version
178
- version: 1.3.1
151
+ version: '0'
179
152
  requirements: []
180
153
  rubyforge_project:
181
- rubygems_version: 2.6.9
154
+ rubygems_version: 2.6.14
182
155
  signing_key:
183
156
  specification_version: 4
184
157
  summary: Generate seeds data for your Ruby application.