zfben_rails_rake 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in zfben_rails_rake.gemspec
4
4
  gemspec
5
+
6
+ gem 'rainbow'
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+ require 'zfben_rails_rake'
3
+ require 'rails'
4
+ require 'rainbow'
5
+ module ZfbenRailsRake
6
+ class Railtie < Rails::Railtie
7
+ railtie_name :zfben_rails_rake
8
+
9
+ rake_tasks do
10
+ Dir[File.join(File.dirname(__FILE__), '..', '..', 'tasks', '*')].each{ |f| load f }
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module ZfbenRailsRake
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module ZfbenRailsRake
2
- # Your code goes here...
2
+ require File.join(File.dirname(__FILE__), 'zfben_rails_rake', 'railtie.rb') if defined?(Rails)
3
3
  end
data/tasks/git.rb ADDED
@@ -0,0 +1,21 @@
1
+ namespace 'git' do
2
+ desc 'git pull'
3
+ task :pull do
4
+ sys 'git pull'
5
+ end
6
+
7
+ desc 'git commit with your comment'
8
+ task :commit, :comment do |task, comment|
9
+ if comment == {}
10
+ comment = 'no comment'
11
+ else
12
+ comment = comment.comment
13
+ end
14
+ sys "git commit -m '#{comment}' -a"
15
+ end
16
+
17
+ desc 'git push with your comment'
18
+ task :push, :comment, :needs => :commit do |task, comment|
19
+ sys 'git push'
20
+ end
21
+ end
data/tasks/helper.rb ADDED
@@ -0,0 +1,4 @@
1
+ def sys cmd
2
+ STDOUT.puts cmd.color(:black).background(:white)
3
+ system cmd
4
+ end
@@ -18,4 +18,5 @@ Gem::Specification.new do |s|
18
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
+ s.add_dependency 'rainbow'
21
22
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zfben_rails_rake
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben
@@ -11,8 +11,18 @@ bindir: bin
11
11
  cert_chain: []
12
12
 
13
13
  date: 2011-05-17 00:00:00 Z
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rainbow
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ type: :runtime
25
+ version_requirements: *id001
16
26
  description: ""
17
27
  email:
18
28
  - ben@zfben.com
@@ -27,7 +37,10 @@ files:
27
37
  - Gemfile
28
38
  - Rakefile
29
39
  - lib/zfben_rails_rake.rb
40
+ - lib/zfben_rails_rake/railtie.rb
30
41
  - lib/zfben_rails_rake/version.rb
42
+ - tasks/git.rb
43
+ - tasks/helper.rb
31
44
  - zfben_rails_rake.gemspec
32
45
  homepage: https://github.com/benz303/zfben_rails_rake
33
46
  licenses: []