post_pusher 1.2.0 → 1.2.1

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: 88b13e063b6a0196082c4876ca4764e34982c0f65f84855d31ca79348fc03433
4
- data.tar.gz: 3b5cda06a6144ff2da9467aaf9b87c186c83a63f3b05d5f09b42daadf6eaa39e
3
+ metadata.gz: c8c075270ea055b6c37e28f6bd4e5f4d04c2ea444d7e5fd778e7e383872a7af8
4
+ data.tar.gz: 17a834e02031b085ca403a82d9d1ae5266633460d450de239f64c09ae0dcdac0
5
5
  SHA512:
6
- metadata.gz: 3a218b8411decc9a12ac5821e072b915485a54ca636930e3ae5e54ce83a6e39a0c927e16f22873eccee487d4d72225369981e81bb9c8f126770e287e29dc7125
7
- data.tar.gz: 53e96f5be2cc6f623ff5026d5ee49d6dd6bda36782e38d6e33c6dd1611db3b3d386726bd2bc2383606f521999b675c3405719593819a4021f27dffdffce07c59
6
+ metadata.gz: 2dcfca7ce58d41fbc3275ad2363b0ca5fbd7228bf5625daa0b6aac51d49a8950a59a90e2404a7617ff731bdd2e4970b8f7bda3b96f47771df2b255107f871559
7
+ data.tar.gz: df616fa091701d274f76022233d35d0ba2aeaa8c025bdfd9671ee9763e5603e71564f2a316d1dc75d4f76277e922de95aa6141cb3899c7b9d357b1f1d325207b
@@ -34,7 +34,7 @@ class RakeTaskRunner
34
34
 
35
35
  def log_file_path
36
36
  logs = File.join(Rails.root, "log", "post_push")
37
- Dir.mkdir(logs) unless Dir.exist?(logs)
37
+ FileUtils.mkdir_p(logs) unless Dir.exist?(logs)
38
38
  File.join(logs, "#{log_file_name}.log")
39
39
  end
40
40
 
@@ -1,4 +1,4 @@
1
1
  module PostPusher
2
- VERSION = "1.2.0".freeze
2
+ VERSION = "1.2.1".freeze
3
3
  end
4
4
 
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PatientsLikeMe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -177,11 +177,7 @@ files:
177
177
  - test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
178
178
  - test/dummy/db/migrate/20160620190743_create_post_push_status.rb
179
179
  - test/dummy/db/schema.rb
180
- - test/dummy/db/test.sqlite3
181
180
  - test/dummy/lib/tasks/dummy_tasks.rake
182
- - test/dummy/log/post_push/1_broken_task.log
183
- - test/dummy/log/post_push/3_runnable_task.log
184
- - test/dummy/log/test.log
185
181
  - test/dummy/public/404.html
186
182
  - test/dummy/public/422.html
187
183
  - test/dummy/public/500.html
@@ -194,7 +190,7 @@ homepage: https://www.patientslikeme.com
194
190
  licenses:
195
191
  - MIT
196
192
  metadata: {}
197
- post_install_message:
193
+ post_install_message:
198
194
  rdoc_options: []
199
195
  require_paths:
200
196
  - lib
@@ -209,56 +205,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
205
  - !ruby/object:Gem::Version
210
206
  version: '0'
211
207
  requirements: []
212
- rubyforge_project:
213
- rubygems_version: 2.7.6
214
- signing_key:
208
+ rubygems_version: 3.2.0
209
+ signing_key:
215
210
  specification_version: 4
216
211
  summary: A tool to run a set of tasks after deploys
217
212
  test_files:
218
- - test/post_push_exe_test.rb
219
- - test/dummy/Rakefile
220
213
  - test/dummy/app/controllers/application_controller.rb
221
- - test/dummy/app/helpers/application_helper.rb
222
214
  - test/dummy/app/views/layouts/application.html.erb
223
215
  - test/dummy/app/assets/javascripts/application.js
224
216
  - test/dummy/app/assets/stylesheets/application.css
225
- - test/dummy/lib/tasks/dummy_tasks.rake
226
- - test/dummy/README.rdoc
227
- - test/dummy/public/500.html
228
- - test/dummy/public/422.html
229
- - test/dummy/public/404.html
230
- - test/dummy/public/favicon.ico
231
- - test/dummy/log/test.log
232
- - test/dummy/log/post_push/1_broken_task.log
233
- - test/dummy/log/post_push/3_runnable_task.log
234
- - test/dummy/bin/rails
235
- - test/dummy/bin/bundle
236
- - test/dummy/bin/setup
217
+ - test/dummy/app/helpers/application_helper.rb
237
218
  - test/dummy/bin/rake
238
- - test/dummy/db/test.sqlite3
239
- - test/dummy/db/migrate/20150618161222_create_user.rb
240
- - test/dummy/db/migrate/20160620190743_create_post_push_status.rb
241
- - test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
242
- - test/dummy/db/schema.rb
243
- - test/dummy/config/boot.rb
244
- - test/dummy/config/application.rb
245
- - test/dummy/config/routes.rb
219
+ - test/dummy/bin/setup
220
+ - test/dummy/bin/bundle
221
+ - test/dummy/bin/rails
246
222
  - test/dummy/config/secrets.yml
223
+ - test/dummy/config/routes.rb
224
+ - test/dummy/config/locales/en.yml
225
+ - test/dummy/config/environments/production.rb
226
+ - test/dummy/config/environments/development.rb
227
+ - test/dummy/config/environments/test.rb
228
+ - test/dummy/config/environment.rb
229
+ - test/dummy/config/application.rb
247
230
  - test/dummy/config/database.yml
231
+ - test/dummy/config/boot.rb
232
+ - test/dummy/config/initializers/backtrace_silencers.rb
248
233
  - test/dummy/config/initializers/mime_types.rb
249
234
  - test/dummy/config/initializers/filter_parameter_logging.rb
250
235
  - test/dummy/config/initializers/session_store.rb
251
- - test/dummy/config/initializers/assets.rb
252
236
  - test/dummy/config/initializers/wrap_parameters.rb
253
- - test/dummy/config/initializers/backtrace_silencers.rb
254
- - test/dummy/config/initializers/inflections.rb
237
+ - test/dummy/config/initializers/assets.rb
255
238
  - test/dummy/config/initializers/cookies_serializer.rb
256
- - test/dummy/config/environment.rb
257
- - test/dummy/config/locales/en.yml
258
- - test/dummy/config/environments/production.rb
259
- - test/dummy/config/environments/development.rb
260
- - test/dummy/config/environments/test.rb
239
+ - test/dummy/config/initializers/inflections.rb
261
240
  - test/dummy/config.ru
262
- - test/rake_task_runner_test.rb
241
+ - test/dummy/Rakefile
242
+ - test/dummy/public/favicon.ico
243
+ - test/dummy/public/422.html
244
+ - test/dummy/public/500.html
245
+ - test/dummy/public/404.html
246
+ - test/dummy/lib/tasks/dummy_tasks.rake
247
+ - test/dummy/db/schema.rb
248
+ - test/dummy/db/migrate/20151229195418_create_soft_deletables.rb
249
+ - test/dummy/db/migrate/20160620190743_create_post_push_status.rb
250
+ - test/dummy/db/migrate/20150618161222_create_user.rb
251
+ - test/dummy/README.rdoc
263
252
  - test/test_helper.rb
253
+ - test/post_push_exe_test.rb
264
254
  - test/generators/post_pusher/install/install_generator_test.rb
255
+ - test/rake_task_runner_test.rb
Binary file
@@ -1,7 +0,0 @@
1
- rake aborted!
2
- NoMethodError: undefined method `shit_the_bed' for main:Object
3
- /home/balves/src/post_pusher/test/dummy/lib/tasks/dummy_tasks.rake:19:in `block (3 levels) in <top (required)>'
4
- /home/balves/.rbenv/versions/2.5.3/bin/bundle:23:in `load'
5
- /home/balves/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
6
- Tasks: TOP => post_push:1:broken_task
7
- (See full trace by running task with --trace)
@@ -1 +0,0 @@
1
- I'm wicked runnable, bro
@@ -1,127 +0,0 @@
1
-  (0.0ms) SELECT sqlite_version(*)
2
-  (9.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
-  (8.7ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
- Migrating to CreateUser (20150618161222)
6
-  (0.0ms) begin transaction
7
-  (0.2ms) CREATE TABLE "users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
8
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150618161222"]]
9
-  (8.9ms) commit transaction
10
- Migrating to CreateSoftDeletables (20151229195418)
11
-  (0.0ms) begin transaction
12
-  (0.1ms) CREATE TABLE "soft_deletables" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "user_deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
13
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151229195418"]]
14
-  (8.7ms) commit transaction
15
- Migrating to CreatePostPushStatus (20160620190743)
16
-  (0.0ms) begin transaction
17
-  (0.2ms) CREATE TABLE "post_push_statuses" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "task_name" varchar NOT NULL)
18
-  (0.1ms) CREATE INDEX "index_post_push_statuses_on_task_name" ON "post_push_statuses" ("task_name")
19
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160620190743"]]
20
-  (8.7ms) commit transaction
21
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
22
-  (0.0ms) begin transaction
23
- ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2020-07-07 17:55:53.234467"], ["updated_at", "2020-07-07 17:55:53.234467"]]
24
-  (6.2ms) commit transaction
25
- ------------------------------------------------------
26
- happy path: test_0001_should log the rake tasks output
27
- ------------------------------------------------------
28
- -----------------------------------------------------------------------
29
- #runnable_tasks: test_0002_should run the tasks in alphanumerical order
30
- -----------------------------------------------------------------------
31
-  (12.4ms) DELETE FROM post_push_statuses
32
-  (6.3ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
33
-  (0.1ms) SELECT task_name from post_push_statuses
34
- --------------------------------------------------------------------------
35
- #runnable_tasks: test_0001_should only return tasks that have not been run
36
- --------------------------------------------------------------------------
37
-  (6.6ms) DELETE FROM post_push_statuses
38
-  (6.6ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
39
-  (0.1ms) SELECT task_name from post_push_statuses
40
- --------------------------------------------------------------------------------------------------
41
- #task_complete!: test_0001_should insert the rake task name into post_push_statuses when completed
42
- --------------------------------------------------------------------------------------------------
43
-  (6.9ms) DELETE FROM post_push_statuses
44
-  (6.3ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
45
-  (6.2ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:the_new_rake_task')
46
-  (0.1ms) SELECT task_name from post_push_statuses
47
- -------------------------------------------------------------------------------
48
- #post_push_tasks: test_0001_should only return tasks that start with post_push:
49
- -------------------------------------------------------------------------------
50
-  (6.2ms) DELETE FROM post_push_statuses
51
-  (6.3ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
52
- ----------------------------------------------------------------------------------
53
- PostPusher::Generators::InstallGeneratorTest: test_0001_creates the migration file
54
- ----------------------------------------------------------------------------------
55
- -----------------------------------------------------------------------------------------------------
56
- PostPusher::Generators::InstallGeneratorTest: test_0002_skips the migration file if it already exists
57
- -----------------------------------------------------------------------------------------------------
58
- ---------------------------------------------------------
59
- #work: test_0001_should not mark failed tasks as finished
60
- ---------------------------------------------------------
61
-  (6.1ms) DELETE FROM post_push_statuses
62
-  (6.2ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
63
-  (0.1ms) SELECT task_name from post_push_statuses
64
-  (12.0ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:3:runnable_task')
65
- ----------------------------------------------------
66
- broken tasks: test_0001_should also log busted tasks
67
- ----------------------------------------------------
68
- ---------------------------------------------------------------------
69
- #completed_tasks: test_0001_should return tasks we know are completed
70
- ---------------------------------------------------------------------
71
-  (7.0ms) DELETE FROM post_push_statuses
72
-  (6.5ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
73
-  (0.1ms) SELECT task_name from post_push_statuses
74
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
75
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
76
-  (0.1ms) begin transaction
77
-  (0.0ms) commit transaction
78
- -------------------------------------------------------------------------------
79
- #post_push_tasks: test_0001_should only return tasks that start with post_push:
80
- -------------------------------------------------------------------------------
81
-  (6.8ms) DELETE FROM post_push_statuses
82
-  (6.5ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
83
- ----------------------------------------------------------------------------------
84
- PostPusher::Generators::InstallGeneratorTest: test_0001_creates the migration file
85
- ----------------------------------------------------------------------------------
86
- -----------------------------------------------------------------------------------------------------
87
- PostPusher::Generators::InstallGeneratorTest: test_0002_skips the migration file if it already exists
88
- -----------------------------------------------------------------------------------------------------
89
- ---------------------------------------------------------------------
90
- #completed_tasks: test_0001_should return tasks we know are completed
91
- ---------------------------------------------------------------------
92
-  (6.3ms) DELETE FROM post_push_statuses
93
-  (6.6ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
94
-  (0.1ms) SELECT task_name from post_push_statuses
95
- ---------------------------------------------------------
96
- #work: test_0001_should not mark failed tasks as finished
97
- ---------------------------------------------------------
98
-  (6.1ms) DELETE FROM post_push_statuses
99
-  (6.4ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
100
-  (0.1ms) SELECT task_name from post_push_statuses
101
-  (12.0ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:3:runnable_task')
102
-  (0.2ms) SELECT task_name from post_push_statuses
103
- ----------------------------------------------------
104
- broken tasks: test_0001_should also log busted tasks
105
- ----------------------------------------------------
106
- ------------------------------------------------------
107
- happy path: test_0001_should log the rake tasks output
108
- ------------------------------------------------------
109
- --------------------------------------------------------------------------
110
- #runnable_tasks: test_0001_should only return tasks that have not been run
111
- --------------------------------------------------------------------------
112
-  (11.3ms) DELETE FROM post_push_statuses
113
-  (6.3ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
114
-  (0.1ms) SELECT task_name from post_push_statuses
115
- -----------------------------------------------------------------------
116
- #runnable_tasks: test_0002_should run the tasks in alphanumerical order
117
- -----------------------------------------------------------------------
118
-  (9.9ms) DELETE FROM post_push_statuses
119
-  (18.5ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
120
-  (0.1ms) SELECT task_name from post_push_statuses
121
- --------------------------------------------------------------------------------------------------
122
- #task_complete!: test_0001_should insert the rake task name into post_push_statuses when completed
123
- --------------------------------------------------------------------------------------------------
124
-  (10.3ms) DELETE FROM post_push_statuses
125
-  (6.4ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:2:completed_task')
126
-  (6.4ms) INSERT INTO post_push_statuses (task_name) VALUES ('post_push:the_new_rake_task')
127
-  (0.1ms) SELECT task_name from post_push_statuses