rake-task-migration 1.0.2 → 1.1.0.pre.beta

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
- SHA1:
3
- metadata.gz: 1fedc816f8d521fa2620ed8c677c38caa7da9290
4
- data.tar.gz: 7529a28680bd3588569e186dae14e243906f7d78
2
+ SHA256:
3
+ metadata.gz: ead5f08c9249b377ec9833107b3ed8e4c4a99350ad94d1aa303223c34baed66f
4
+ data.tar.gz: a8101a739303d711e606fa61da91935a93621de84f0ecf3a0e8528a0356377c0
5
5
  SHA512:
6
- metadata.gz: b351aeb504945039ae1e951d291a413c2087e28a99ae28cf4e52c87a0b5fe953d81594b37dfde550d0b7f622822f9277728849104593f4fc522968dc5cc979f4
7
- data.tar.gz: 7feb4fadd2a14da90a7e059d652ed36921a5fe81dc66f0dee374f00061b3dc8bd0d1e1a10cade44b5dbb05a8c779e104f3aa59ff5d79def972b71724da9a49cf
6
+ metadata.gz: '0384d0b01710df6a50d218ae753fdb1ee064c231735131401e54054ebe6d89eda36f728589a56164dc446d2e587d80ec7d017aceccd816b05904eedc681c4d10'
7
+ data.tar.gz: 1d0ef372a16a572e6b75f88097052e6737a6991c892a92248c86f46869f855a3fc7f0c8723c2ae34ed069e48136041b89fb539512ee8285ae0bc0089fc60ec08
data/README.md CHANGED
@@ -42,7 +42,7 @@ namespace :migrations do
42
42
  end
43
43
  ```
44
44
 
45
- Then run the migration for your rake tasks:
45
+ Then run the migration task:
46
46
 
47
47
  ```
48
48
  $ bundle exec rake tasks:migrate
@@ -76,6 +76,7 @@ end
76
76
 
77
77
  ```bash
78
78
  export RAILS_ENV=test
79
+ export DB=mysql # or sqlite, postgresql
79
80
  bundle exec rake app:db:create app:db:migrate
80
81
  bundle exec rspec spec
81
82
  ```
@@ -1,4 +1,4 @@
1
- class CreateRakeTaskMigrations < ActiveRecord::Migration
1
+ class CreateRakeTaskMigrations < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table Rake::TaskMigration.migration_table_name do |t|
4
4
  t.string :version
@@ -11,10 +11,10 @@ module Rake
11
11
  DEFAULT_NAMESPACE = :migrations
12
12
 
13
13
  mattr_accessor :migration_table_name
14
- @@migration_table_name = DEFAULT_TABLE_NAME
14
+ self.migration_table_name = DEFAULT_TABLE_NAME
15
15
 
16
16
  mattr_accessor :migration_namespace
17
- @@migration_namespace = DEFAULT_NAMESPACE
17
+ self.migration_namespace = DEFAULT_NAMESPACE
18
18
 
19
19
  class << self
20
20
  def config
@@ -6,18 +6,8 @@ module Rake
6
6
  new(tasks).migrate
7
7
  end
8
8
 
9
- def rake_task_migrations_table_name
10
- Rake::TaskMigration.migration_table_name
11
- end
12
-
13
- def get_all_tasks(connection = ActiveRecord::Base.connection)
14
- ActiveSupport::Deprecation.silence do
15
- if connection.table_exists?(rake_task_migrations_table_name)
16
- RakeTaskMigration.all.map { |x| x.version.to_s }.sort
17
- else
18
- []
19
- end
20
- end
9
+ def get_all_tasks
10
+ RakeTaskMigration.all.map { |x| x.version.to_s }.sort
21
11
  end
22
12
  end
23
13
 
@@ -48,11 +38,7 @@ module Rake
48
38
  migration.version = task
49
39
  migration.runtime = time.real.to_i
50
40
  migration.migrated_on = DateTime.now
51
- begin
52
- migration.save!
53
- rescue StandardError => e
54
- puts e
55
- end
41
+ migration.save!
56
42
 
57
43
  announce "#{task}: migrated (#{format('%.4fs', time.real)})"
58
44
  end
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module TaskMigration
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0-beta'
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ #:nocov:
1
2
  namespace :tasks do
2
3
  task migrate: :environment do
3
4
  Rake::TaskMigration.migrate
@@ -11,3 +12,4 @@ namespace :task_migration do
11
12
  end
12
13
  end
13
14
  end
15
+ #:nocov:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-task-migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Zaccari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: test-unit
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +72,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
72
  version: '0'
79
73
  required_rubygems_version: !ruby/object:Gem::Requirement
80
74
  requirements:
81
- - - ">="
75
+ - - ">"
82
76
  - !ruby/object:Gem::Version
83
- version: '0'
77
+ version: 1.3.1
84
78
  requirements: []
85
- rubyforge_project:
86
- rubygems_version: 2.4.5.1
79
+ rubygems_version: 3.0.4
87
80
  signing_key:
88
81
  specification_version: 4
89
82
  summary: Rake Task Migrations
90
83
  test_files: []
91
- has_rdoc: