post_pusher 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/generators/post_push_task/templates/post_push_task.rake.erb +8 -1
- data/lib/post_pusher/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/post_push/1_broken_task.log +3 -3
- data/test/dummy/log/test.log +37 -971
- metadata +37 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1cb2b3a3d39546700f96ab597b7f9132fc9d73
|
4
|
+
data.tar.gz: 327c9072e80ca1778b9f1fe9318054d5f2ddbb17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98cdd0101e5985b86782c47bf19bc959bd8cab0552bc45bebe7acf3790d69bad1ae873334953ec4e55b0a515b2ce07f419d9cf51782d2e952984fc653341aa59
|
7
|
+
data.tar.gz: a27c3daddd42bd825df2bd0138d79c40d29bf38b692c3adca662f6b35c6ed735c5cc298a7a6dd38b395aec316d1befe9cced4280c04b877aeddb02b0f94ab7b9
|
data/README.md
CHANGED
@@ -41,8 +41,10 @@ Running the tasks:
|
|
41
41
|
|
42
42
|
- Add PostPusher to your gemfile
|
43
43
|
- `bundle`
|
44
|
+
- `rails g post_pusher:install` (generate migration to create post_push_statuses table)
|
44
45
|
- Run migrations (creates records table)
|
45
46
|
- `bundle binstub post_pusher` (this enables you to be able to run `bin/post_push` by putting the post_push file in your bin directory)
|
47
|
+
- `bundle binstubs bundler --force` (this replaces `bin/bundle` so `bin/post_push` commands work properly)
|
46
48
|
- Commit your changes
|
47
49
|
|
48
50
|
## Running Tests
|
@@ -5,7 +5,7 @@ full_name = "post_push:#{timestamp}:#{task_name}"
|
|
5
5
|
# When writing your task, be sure to:
|
6
6
|
# * Print out useful information at startup and on completion
|
7
7
|
# * Use a progress bar if the task will take a while
|
8
|
-
# *
|
8
|
+
# * Skip lengthy tasks unless we're in prod or the task is run with FORCE
|
9
9
|
|
10
10
|
namespace :post_push do
|
11
11
|
namespace "<%=timestamp%>" do
|
@@ -15,6 +15,13 @@ namespace :post_push do
|
|
15
15
|
puts "---------------------------------------------------------"
|
16
16
|
puts "Starting <%=full_name%> at #{DateTime.now}"
|
17
17
|
|
18
|
+
# If your task takes more than a minute or two to run, consider
|
19
|
+
# uncommenting this section so dev and stage environments can skip it
|
20
|
+
# unless Rails.env.production? || ENV['FORCE']
|
21
|
+
# puts "Skipping <%=task_name%> in #{Rails.env}; to run this specify FORCE=1"
|
22
|
+
# next
|
23
|
+
# end
|
24
|
+
|
18
25
|
total_records = YourModel.count
|
19
26
|
next if total_records.zero?
|
20
27
|
progress_bar = ProgressBar.new(total_records)
|
data/lib/post_pusher/version.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
rake aborted!
|
2
2
|
NoMethodError: undefined method `shit_the_bed' for main:Object
|
3
|
-
/
|
4
|
-
/
|
5
|
-
/
|
3
|
+
/home/sagotsky/repos/post_pusher/test/dummy/lib/tasks/dummy_tasks.rake:19:in `block (3 levels) in <top (required)>'
|
4
|
+
/home/sagotsky/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
|
5
|
+
/home/sagotsky/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
|
6
6
|
Tasks: TOP => post_push:1:broken_task
|
7
7
|
(See full trace by running task with --trace)
|