post_pusher 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 050f7c314e5d0370a8cb168e52d8294915a20613
|
4
|
+
data.tar.gz: c79fcfafb97b9880fb491027ea32ae9f8da5186b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939a06e90ef02b8b2e79ecb9b43751ac899a7aa941146c799b89dd5651350e230d71a506b374e0249c420e1b365ad8f36db879e44df14f9854ac45b03c9990dd
|
7
|
+
data.tar.gz: d789b4cdbdfa4f31e1d263adf6c08ae4d2b2bb57c7c1ab6aa5d89f1a8322693ff308d0c6ce9fb0bacc4c454d2dff31cd2a650fa85c5c38d4a07142ce967aa922
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module PostPusher
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < ::Rails::Generators::Base
|
4
|
+
include Rails::Generators::Migration
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
desc "add the post_pusher migrations"
|
7
|
+
|
8
|
+
def self.next_migration_number(path)
|
9
|
+
Time.now.utc.to_s(:number)
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_migrations
|
13
|
+
copy_migration "create_post_push_status"
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
|
18
|
+
def copy_migration(filename)
|
19
|
+
if self.class.migration_exists?("db/migrate", "#{filename}")
|
20
|
+
say_status("skipped", "Migration #{filename}.rb already exists")
|
21
|
+
else
|
22
|
+
migration_template "#{filename}.rb", "db/migrate/#{filename}.rb"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
File without changes
|
data/lib/post_pusher/version.rb
CHANGED
data/lib/post_pusher.rb
CHANGED
@@ -1,16 +1 @@
|
|
1
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2
|
-
# STEP 1
|
3
|
-
# Load all dependent gems.
|
4
|
-
|
5
|
-
# require 'a_dependent_gem'
|
6
|
-
# require 'another_dependent_gem'
|
7
|
-
# require 'a_dependent_local_gem'
|
8
|
-
# ...
|
9
|
-
|
10
|
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
11
|
-
# STEP 2
|
12
|
-
# Load this gem's code.
|
13
1
|
require "rails"
|
14
|
-
require "rails/engine"
|
15
|
-
|
16
|
-
require "post_pusher/engine"
|
Binary file
|
@@ -0,0 +1,7 @@
|
|
1
|
+
rake aborted!
|
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>'
|
6
|
+
Tasks: TOP => post_push:1:broken_task
|
7
|
+
(See full trace by running task with --trace)
|
@@ -0,0 +1 @@
|
|
1
|
+
I'm wicked runnable, bro
|