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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 050f7c314e5d0370a8cb168e52d8294915a20613
4
- data.tar.gz: c79fcfafb97b9880fb491027ea32ae9f8da5186b
3
+ metadata.gz: fc1cb2b3a3d39546700f96ab597b7f9132fc9d73
4
+ data.tar.gz: 327c9072e80ca1778b9f1fe9318054d5f2ddbb17
5
5
  SHA512:
6
- metadata.gz: 939a06e90ef02b8b2e79ecb9b43751ac899a7aa941146c799b89dd5651350e230d71a506b374e0249c420e1b365ad8f36db879e44df14f9854ac45b03c9990dd
7
- data.tar.gz: d789b4cdbdfa4f31e1d263adf6c08ae4d2b2bb57c7c1ab6aa5d89f1a8322693ff308d0c6ce9fb0bacc4c454d2dff31cd2a650fa85c5c38d4a07142ce967aa922
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
- # * Check Rails.env.development? or stage? and skip lengthy operations
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)
@@ -1,4 +1,4 @@
1
1
  module PostPusher
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
4
4
 
Binary file
@@ -1,7 +1,7 @@
1
1
  rake aborted!
2
2
  NoMethodError: undefined method `shit_the_bed' for main:Object
3
- /Users/sgarner/projects/post_pusher/test/dummy/lib/tasks/dummy_tasks.rake:19:in `block (3 levels) in <top (required)>'
4
- /Users/sgarner/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
5
- /Users/sgarner/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
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)