pushie 0.1.1 → 0.1.2

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: 3d1ac6d13409cb22f838c4e7a23fad72d037a230
4
- data.tar.gz: 12e2709d62f4bb02db60e2563122cdac7aa24487
3
+ metadata.gz: 3122c8cb7b1d5d5d1b095ecf1c486cad6522764f
4
+ data.tar.gz: cd10c0e2c5bdb561fbab06d1933df84e0d4cd3aa
5
5
  SHA512:
6
- metadata.gz: 0eff39894fcd2d1f1ade2ccf0d0ac6a3242c9464ab6a86b39991e0c871cac4beb1d71a53cf6ee456e8bf386096c9f406341d110dcb7886c7f5c88bf821d1b4ff
7
- data.tar.gz: e2b0dcc8e632d19a47bb16e9aa81f96d780c1a66ec33bdfde5b7c4c24d5d0cef83eeef70a0868d16231505d8fad1a6cbddc148323745c90d661496e04786d48c
6
+ metadata.gz: e2b38d1c4d7a6e438f046256200d6d949c1fd4857c5f9f9a5a700d1851aca4d6a9d599ee336f77273ab49ead23433e7bfd8ad3ff3568a3e9d6249146fe6ea32a
7
+ data.tar.gz: 3c566cd913249427faea07ace823ada5dbcb1b9c88e340b964e5c0c8db1675d2d7733115a322286b4a012c509cd144b29674ec24779bf49125fdf164dd64ccf8
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in pushie.gemspec
4
- gemspec
4
+ gemspec
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Pushie
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pushie`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Pushie is a simple gem which makes it easier to rapidly push to heroku production, using 2 rake tasks and rails_12factor to speed the process up.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,15 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Simply run:
24
+
25
+ $ rake pushie:ready
26
+
27
+ to get ready for production, followed by:
28
+
29
+ $ rake pushie:push
30
+
31
+ to send it to heroku production!
26
32
 
27
33
  ## Development
28
34
 
@@ -1,3 +1,3 @@
1
1
  module Pushie
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,15 +1,28 @@
1
+
1
2
  desc 'Run all the processes for pushing to production'
2
3
  namespace :pushie do
3
4
 
4
5
  task :ready do
5
- system("bundle exec rake assets:clobber RAILS_ENV=production")
6
- puts "\nAssets have been clobbered for production\n\n"
7
- system("bundle exec rake assets:precompile RAILS_ENV=production")
8
- puts "\nAssets have been preompiled for production\n\n"
6
+ branch_name = `git rev-parse --abbrev-ref HEAD`
7
+ if branch_name.strip.chomp != "master"
8
+ puts "\n[Pushie]: You must be on branch master\n\n"
9
+ else
10
+ system("bundle exec rake assets:clobber RAILS_ENV=production")
11
+ puts "\n[Pushie]: Assets have been clobbered for production, precompiling...\n\n"
12
+ system("bundle exec rake assets:precompile RAILS_ENV=production")
13
+ puts "\n[Pushie]: Assets have been precompiled for production, readying git...\n\n"
14
+ system("git add -A")
15
+ system("git commit -m 'pushie ~ set up for production'")
16
+ system("git push origin master")
17
+ puts "\n[Pushie]: Pushing to git origin master...\n\n"
18
+ system("git push origin master")
19
+ puts "\n[Pushie]: Assets have been precompiled for production\n\n"
20
+ end
9
21
  end
10
22
 
11
23
  task :push do
12
24
  system("git push heroku master")
25
+ puts "\n[Pushie]: You pushed to heroku master\n\n"
13
26
  end
14
27
 
15
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Sargent