post_pusher 1.0.1 → 1.1.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 +4 -4
- data/lib/generators/post_pusher/install/install_generator.rb +27 -0
- data/{db/migrate/20160620190743_create_post_push_status.rb → lib/generators/post_pusher/install/templates/create_post_push_status.rb} +0 -0
- data/lib/post_pusher/version.rb +1 -1
- data/lib/post_pusher.rb +0 -15
- data/test/dummy/config/application.rb +0 -1
- data/test/dummy/db/migrate/20160620190743_create_post_push_status.rb +7 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/post_push/1_broken_task.log +7 -0
- data/test/dummy/log/post_push/3_runnable_task.log +1 -0
- data/test/dummy/log/test.log +1008 -0
- data/test/generators/post_pusher/install/install_generator_test.rb +27 -0
- data/test/test_helper.rb +7 -2
- metadata +40 -28
- data/lib/post_pusher/engine.rb +0 -13
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'rails/generators'
|
4
|
+
require 'generators/post_pusher/install/install_generator'
|
5
|
+
|
6
|
+
class PostPusher::Generators::InstallGeneratorTest < ::Rails::Generators::TestCase
|
7
|
+
TEMP_DIR = File.expand_path("../../../../tmp", __dir__)
|
8
|
+
tests PostPusher::Generators::InstallGenerator
|
9
|
+
destination TEMP_DIR
|
10
|
+
|
11
|
+
setup :prepare_destination
|
12
|
+
|
13
|
+
it 'creates the migration file' do
|
14
|
+
run_generator
|
15
|
+
assert_migration "db/migrate/create_post_push_status.rb"
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'skips the migration file if it already exists' do
|
19
|
+
run_generator
|
20
|
+
run_generator
|
21
|
+
|
22
|
+
files = Dir.entries("#{TEMP_DIR}/db/migrate").reject { |f| f == '.' || f == '..' }
|
23
|
+
|
24
|
+
assert_equal 1, files.length
|
25
|
+
assert_migration "db/migrate/create_post_push_status.rb"
|
26
|
+
end
|
27
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -2,7 +2,9 @@ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
|
2
2
|
|
3
3
|
require "active_support"
|
4
4
|
require File.expand_path("dummy/config/environment.rb", __dir__)
|
5
|
+
|
5
6
|
ActiveSupport::TestCase.test_order = :random # if we don't set this, active_support gives a warning
|
7
|
+
|
6
8
|
require "minitest/autorun"
|
7
9
|
require 'minitest/reporters'
|
8
10
|
require "post_pusher"
|
@@ -27,5 +29,8 @@ class ActiveSupport::TestCase
|
|
27
29
|
extend MiniTest::Spec::DSL
|
28
30
|
end
|
29
31
|
|
30
|
-
ActiveRecord::
|
31
|
-
ActiveRecord::
|
32
|
+
if defined?(ActiveRecord::MigrationContext)
|
33
|
+
ActiveRecord::MigrationContext.new(File.expand_path("dummy/db/migrate", __dir__)).up
|
34
|
+
else
|
35
|
+
ActiveRecord::Migrator.migrate File.expand_path("dummy/db/migrate", __dir__)
|
36
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: post_pusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PatientsLikeMe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -104,15 +104,15 @@ extra_rdoc_files: []
|
|
104
104
|
files:
|
105
105
|
- README.md
|
106
106
|
- Rakefile
|
107
|
-
- db/migrate/20160620190743_create_post_push_status.rb
|
108
107
|
- exe/post_push
|
109
108
|
- lib/generators/post_push_invoke/post_push_invoke_generator.rb
|
110
109
|
- lib/generators/post_push_invoke/templates/post_push_invoke.rake.erb
|
111
110
|
- lib/generators/post_push_task/post_push_task_generator.rb
|
112
111
|
- lib/generators/post_push_task/templates/post_push_task.rake.erb
|
112
|
+
- lib/generators/post_pusher/install/install_generator.rb
|
113
|
+
- lib/generators/post_pusher/install/templates/create_post_push_status.rb
|
113
114
|
- lib/post_push_cli.rb
|
114
115
|
- lib/post_pusher.rb
|
115
|
-
- lib/post_pusher/engine.rb
|
116
116
|
- lib/post_pusher/rake_task_runner.rb
|
117
117
|
- lib/post_pusher/version.rb
|
118
118
|
- test/dummy/README.rdoc
|
@@ -147,12 +147,18 @@ files:
|
|
147
147
|
- test/dummy/config/secrets.yml
|
148
148
|
- test/dummy/db/migrate/20150618161222_create_user.rb
|
149
149
|
- test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
|
150
|
+
- test/dummy/db/migrate/20160620190743_create_post_push_status.rb
|
150
151
|
- test/dummy/db/schema.rb
|
152
|
+
- test/dummy/db/test.sqlite3
|
151
153
|
- test/dummy/lib/tasks/dummy_tasks.rake
|
154
|
+
- test/dummy/log/post_push/1_broken_task.log
|
155
|
+
- test/dummy/log/post_push/3_runnable_task.log
|
156
|
+
- test/dummy/log/test.log
|
152
157
|
- test/dummy/public/404.html
|
153
158
|
- test/dummy/public/422.html
|
154
159
|
- test/dummy/public/500.html
|
155
160
|
- test/dummy/public/favicon.ico
|
161
|
+
- test/generators/post_pusher/install/install_generator_test.rb
|
156
162
|
- test/post_push_exe_test.rb
|
157
163
|
- test/rake_task_runner_test.rb
|
158
164
|
- test/test_helper.rb
|
@@ -181,44 +187,50 @@ signing_key:
|
|
181
187
|
specification_version: 4
|
182
188
|
summary: A tool to run a set of tasks after deploys
|
183
189
|
test_files:
|
184
|
-
- test/dummy/app/controllers/application_controller.rb
|
185
|
-
- test/dummy/app/views/layouts/application.html.erb
|
186
190
|
- test/dummy/app/assets/javascripts/application.js
|
187
191
|
- test/dummy/app/assets/stylesheets/application.css
|
192
|
+
- test/dummy/app/controllers/application_controller.rb
|
188
193
|
- test/dummy/app/helpers/application_helper.rb
|
189
|
-
- test/dummy/
|
190
|
-
- test/dummy/bin/setup
|
194
|
+
- test/dummy/app/views/layouts/application.html.erb
|
191
195
|
- test/dummy/bin/bundle
|
192
196
|
- test/dummy/bin/rails
|
193
|
-
- test/dummy/
|
194
|
-
- test/dummy/
|
195
|
-
- test/dummy/config/locales/en.yml
|
196
|
-
- test/dummy/config/environments/production.rb
|
197
|
-
- test/dummy/config/environments/development.rb
|
198
|
-
- test/dummy/config/environments/test.rb
|
199
|
-
- test/dummy/config/environment.rb
|
197
|
+
- test/dummy/bin/rake
|
198
|
+
- test/dummy/bin/setup
|
200
199
|
- test/dummy/config/application.rb
|
201
|
-
- test/dummy/config/database.yml
|
202
200
|
- test/dummy/config/boot.rb
|
201
|
+
- test/dummy/config/database.yml
|
202
|
+
- test/dummy/config/environment.rb
|
203
|
+
- test/dummy/config/environments/development.rb
|
204
|
+
- test/dummy/config/environments/production.rb
|
205
|
+
- test/dummy/config/environments/test.rb
|
206
|
+
- test/dummy/config/initializers/assets.rb
|
203
207
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
204
|
-
- test/dummy/config/initializers/
|
208
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
205
209
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
210
|
+
- test/dummy/config/initializers/inflections.rb
|
211
|
+
- test/dummy/config/initializers/mime_types.rb
|
206
212
|
- test/dummy/config/initializers/session_store.rb
|
207
213
|
- test/dummy/config/initializers/wrap_parameters.rb
|
208
|
-
- test/dummy/config/
|
209
|
-
- test/dummy/config/
|
210
|
-
- test/dummy/config/
|
214
|
+
- test/dummy/config/locales/en.yml
|
215
|
+
- test/dummy/config/routes.rb
|
216
|
+
- test/dummy/config/secrets.yml
|
211
217
|
- test/dummy/config.ru
|
212
|
-
- test/dummy/
|
213
|
-
- test/dummy/
|
218
|
+
- test/dummy/db/migrate/20150618161222_create_user.rb
|
219
|
+
- test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
|
220
|
+
- test/dummy/db/migrate/20160620190743_create_post_push_status.rb
|
221
|
+
- test/dummy/db/schema.rb
|
222
|
+
- test/dummy/db/test.sqlite3
|
223
|
+
- test/dummy/lib/tasks/dummy_tasks.rake
|
224
|
+
- test/dummy/log/post_push/1_broken_task.log
|
225
|
+
- test/dummy/log/post_push/3_runnable_task.log
|
226
|
+
- test/dummy/log/test.log
|
227
|
+
- test/dummy/public/404.html
|
214
228
|
- test/dummy/public/422.html
|
215
229
|
- test/dummy/public/500.html
|
216
|
-
- test/dummy/public/
|
217
|
-
- test/dummy/
|
218
|
-
- test/dummy/db/schema.rb
|
219
|
-
- test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
|
220
|
-
- test/dummy/db/migrate/20150618161222_create_user.rb
|
230
|
+
- test/dummy/public/favicon.ico
|
231
|
+
- test/dummy/Rakefile
|
221
232
|
- test/dummy/README.rdoc
|
222
|
-
- test/
|
233
|
+
- test/generators/post_pusher/install/install_generator_test.rb
|
223
234
|
- test/post_push_exe_test.rb
|
224
235
|
- test/rake_task_runner_test.rb
|
236
|
+
- test/test_helper.rb
|
data/lib/post_pusher/engine.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
module PostPusher
|
2
|
-
class Engine < ::Rails::Engine
|
3
|
-
engine_name "post_pusher"
|
4
|
-
|
5
|
-
initializer :append_migrations do |app|
|
6
|
-
unless app.root.to_s.match root.to_s
|
7
|
-
config.paths["db/migrate"].expanded.each do |expanded_path|
|
8
|
-
app.config.paths["db/migrate"] << expanded_path
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|