after_party 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/after_party/models/active_record/task_record.rb +1 -0
- data/lib/generators/install/install_generator.rb +13 -1
- data/lib/generators/install/templates/after_party.rb +2 -0
- data/lib/generators/install/templates/{migration.rb → migration-rails-3-4.txt.erb} +0 -0
- data/lib/generators/install/templates/migration.txt.erb +7 -0
- data/lib/generators/task/templates/deploy.txt.erb +2 -2
- data/lib/tasks/deploy_task_runner.rake +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 499bec9b25043b809f47e94020cebd5e73c86c90e2c4f7a98e3128dd75e2c571
|
4
|
+
data.tar.gz: d773680e03e580566d29bb1541f60ff249adf54f2e4894ab07fb34eeae27bdf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e63108fb11f9c2e2cd1bb75f6f9af388f9e51be8d868997459c24a5c2a953d0d1c8561c06e939a5be17e7a15c54613709d8d8a28846df859a3c4f72f0434283f
|
7
|
+
data.tar.gz: ca4d23a646bd5064a99552016569699cbe9f626691996c21915954dd2d49079f4d4002f782351aa263594894103305566d43cfa3008ac5bf3e8d53fba76f98ae
|
@@ -13,10 +13,18 @@ module AfterParty
|
|
13
13
|
|
14
14
|
def copy_migration
|
15
15
|
if requires_migration?
|
16
|
-
|
16
|
+
if requires_version_tag?
|
17
|
+
template "migration.txt.erb", "db/migrate/#{timestamp}_create_#{table_name}.rb"
|
18
|
+
else
|
19
|
+
template "migration-rails-3-4.txt.erb", "db/migrate/#{timestamp}_create_#{table_name}.rb"
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
24
|
+
def requires_version_tag?
|
25
|
+
ActiveRecord::VERSION::MAJOR >= 5
|
26
|
+
end
|
27
|
+
|
20
28
|
private
|
21
29
|
def timestamp
|
22
30
|
@timestamp ||= Time.now.utc.strftime("%Y%m%d%H%M%S")
|
@@ -28,6 +36,10 @@ module AfterParty
|
|
28
36
|
Dir.glob("#{absolute}/[0-9]*_create_#{table_name}.rb").first
|
29
37
|
end
|
30
38
|
|
39
|
+
def rails_version_for_migration
|
40
|
+
"#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"
|
41
|
+
end
|
42
|
+
|
31
43
|
def requires_migration?
|
32
44
|
orm_name == "active_record" && !migration_exists?
|
33
45
|
end
|
File without changes
|
@@ -8,5 +8,5 @@ namespace :after_party do
|
|
8
8
|
# Update task as completed. If you remove the line below, the task will
|
9
9
|
# run with every deploy (or every time you call after_party:run).
|
10
10
|
AfterParty::TaskRecord.create version: '<%= timestamp %>'
|
11
|
-
end
|
12
|
-
end
|
11
|
+
end # task :<%= file_name %>
|
12
|
+
end # namespace :after_party
|
@@ -13,7 +13,7 @@ namespace :after_party do
|
|
13
13
|
|
14
14
|
desc "Check the status of after_party deployment tasks"
|
15
15
|
task :status => :environment do
|
16
|
-
tasks = Dir[AfterParty::TaskRecorder::FILE_MASK].collect do |filename|
|
16
|
+
tasks = Dir[AfterParty::TaskRecorder::FILE_MASK].sort.collect do |filename|
|
17
17
|
recorder = AfterParty::TaskRecorder.new(filename)
|
18
18
|
{
|
19
19
|
version: recorder.timestamp,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: after_party
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: factory_bot
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: sqlite3
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.3.6
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.3.6
|
111
111
|
description: Automated post-deploy tasks for Ruby/Rails. Your deployment is the party.
|
112
112
|
This is the after party
|
113
113
|
email: thestevemitchell@gmail.com
|
@@ -125,7 +125,8 @@ files:
|
|
125
125
|
- lib/generators/install/USAGE
|
126
126
|
- lib/generators/install/install_generator.rb
|
127
127
|
- lib/generators/install/templates/after_party.rb
|
128
|
-
- lib/generators/install/templates/migration.
|
128
|
+
- lib/generators/install/templates/migration-rails-3-4.txt.erb
|
129
|
+
- lib/generators/install/templates/migration.txt.erb
|
129
130
|
- lib/generators/task/USAGE
|
130
131
|
- lib/generators/task/task_generator.rb
|
131
132
|
- lib/generators/task/templates/deploy.txt.erb
|
@@ -150,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
151
|
version: '0'
|
151
152
|
requirements: []
|
152
153
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.7.8
|
154
155
|
signing_key:
|
155
156
|
specification_version: 4
|
156
157
|
summary: A rails engine that manages deploy tasks and versions using activeRecord
|