tol 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70fd2c1ea503bd16b608273c0662441ae383aa1b
4
- data.tar.gz: 2d272bac07655d4b56f39f28d3140ad90e847421
3
+ metadata.gz: 337b281f6d28600057e8180c11d1e723c7efd898
4
+ data.tar.gz: 3e66cd2582d098401acb0d85877a7e7cf1005ed5
5
5
  SHA512:
6
- metadata.gz: 5dab403ff5621cc575a2590d1468403203cb01f3b7b97ad4f3f46f7bd95cc93c4b81f0024505da5ad35c846433df9581de44e9ba0f6b527f2f45face17e4b9ed
7
- data.tar.gz: 555b599f4219ee5d5e5a52b51ae3289e2f5043b42c17952cb668df53f7cd4608789c44d1c2b8f69da443aefe0303a88a8692e0f93a2ecb1d0cb5b07520ed85db
6
+ metadata.gz: 4f122af8a64bf3f8594e567cf988ecfc4f8211881b96ddac7cf13d88334ce5e37528b2eb8fd8f32a985a2d7f6a9f54257e2bc761483192f53c3b70ecbdb99837
7
+ data.tar.gz: 328e63860d65aa94af51512aeae595b38564d874550b3a1d1c16b35c2121bd0a842a276bb23d0a3e6cc64c3c0220ab9f28adf83c91e9246b228cf6e5aa0821f3
data/lib/tol/cli.rb CHANGED
@@ -2,6 +2,7 @@ require 'tol/database'
2
2
  require 'tol/codecheck'
3
3
  require 'tol/newapp'
4
4
  require 'tol/heroku'
5
+ require 'tol/git'
5
6
 
6
7
  module Tol
7
8
  class CLI
@@ -14,6 +15,8 @@ class CLI
14
15
  case ARGV.first
15
16
  when "db"
16
17
  Tol::Database.new.run
18
+ when "cm"
19
+ Tol::Git.new.commit
17
20
  when "codecheck"
18
21
  Tol::Codecheck.new.run
19
22
  when "newapp:aws"
@@ -35,6 +38,7 @@ class CLI
35
38
  "#{Rainbow("A collection of useful tools for Rails development").underline}\n\n"
36
39
 
37
40
  database_help
41
+ git_help
38
42
  codecheck_help
39
43
  newapp_help
40
44
  heroku_help
@@ -44,6 +48,10 @@ class CLI
44
48
  def database_help
45
49
  puts " #{Rainbow("tol db").foreground(:red)} \# Copies the latest version of the database from Heroku to the local development system."
46
50
  end
51
+
52
+ def git_help
53
+ puts " #{Rainbow("tol cm").foreground(:red)} \# Quick commit and push."
54
+ end
47
55
 
48
56
  def codecheck_help
49
57
  puts " #{Rainbow("tol codecheck").foreground(:red)} \# Checks the code for left over binding.pry or console.log."
@@ -63,4 +71,4 @@ class CLI
63
71
  puts " #{Rainbow("tol help").foreground(:red)} \# Displays this help message."
64
72
  end
65
73
  end
66
- end
74
+ end
data/lib/tol/git.rb ADDED
@@ -0,0 +1,72 @@
1
+ require 'tol/heroku'
2
+
3
+ module Tol
4
+ class Git
5
+ require 'rainbow'
6
+ require 'highline/import'
7
+
8
+ attr_accessor :terminal_columns
9
+
10
+ def initialize
11
+ size = HighLine::SystemExtensions.terminal_size
12
+ self.terminal_columns = size[0]
13
+ end
14
+
15
+ def commit
16
+ puts Rainbow("Committing").foreground(:green)
17
+
18
+ category = nil
19
+ icon = nil
20
+ choose do |menu|
21
+ menu.prompt = "Category:"
22
+
23
+ menu.choice "Bug" do
24
+ category = "bug"
25
+ icon = ":heavy_exclamation_mark:"
26
+ end
27
+
28
+ menu.choice "Enhancement" do
29
+ category = "enhancement"
30
+ icon = ":lipstick:"
31
+ end
32
+
33
+ menu.choice "Feature" do
34
+ category = "feature"
35
+ icon = ":rocket:"
36
+ end
37
+
38
+ menu.choice "WIP" do
39
+ category = "wip"
40
+ icon = ":construction:"
41
+ end
42
+
43
+ menu.choice "Performance" do
44
+ category = "performance"
45
+ icon = ":racehorse:"
46
+ end
47
+
48
+ menu.choice "Housekeeping" do
49
+ category = "housekeeping"
50
+ icon = ":wrench:"
51
+ end
52
+
53
+ menu.choice "Cleanup (Code Deletion)" do
54
+ category = "cleanup"
55
+ icon = ":bathtub:"
56
+ end
57
+ end
58
+
59
+ puts "Message: "
60
+ message = STDIN.gets.gsub("\n", "")
61
+
62
+ branch = `git rev-parse --abbrev-ref HEAD`.gsub("\n", "")
63
+
64
+ message = "#{icon} #{message}"
65
+
66
+ `git add -u .`
67
+ `git commit -m '#{message}'`
68
+ `git push origin #{branch}`
69
+ end
70
+
71
+ end
72
+ end
data/lib/tol/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tol
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Tandrau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-08 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
@@ -42,28 +42,28 @@ dependencies:
42
42
  name: highline
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aws-sdk
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: A collection of tools used at Take Off Labs for Rails development
@@ -74,7 +74,7 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .gitignore
77
+ - ".gitignore"
78
78
  - Gemfile
79
79
  - LICENSE
80
80
  - README.md
@@ -86,6 +86,7 @@ files:
86
86
  - lib/tol/codecheck.rb
87
87
  - lib/tol/config.rb
88
88
  - lib/tol/database.rb
89
+ - lib/tol/git.rb
89
90
  - lib/tol/heroku.rb
90
91
  - lib/tol/newapp.rb
91
92
  - lib/tol/rails_app.rb
@@ -100,12 +101,12 @@ require_paths:
100
101
  - lib
101
102
  required_ruby_version: !ruby/object:Gem::Requirement
102
103
  requirements:
103
- - - '>='
104
+ - - ">="
104
105
  - !ruby/object:Gem::Version
105
106
  version: '0'
106
107
  required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  requirements:
108
- - - '>='
109
+ - - ">="
109
110
  - !ruby/object:Gem::Version
110
111
  version: '0'
111
112
  requirements: []