space2underscore 0.1.9 → 0.2.0

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: c8e60208d7269bb4f16ede743bdb00906299e420
4
- data.tar.gz: d6d227f75071fabccabff74d2a67337829784189
3
+ metadata.gz: d2738908178f6199a9b3237597ab4c34c13edc87
4
+ data.tar.gz: 22f3fdb477ad34dc564bcdb4d25fe324b00573bd
5
5
  SHA512:
6
- metadata.gz: 2128ffb15d4d4cec866f0ff017d7d71e90f8fbb701a6f1d259b5f97b3ebaeed73e42c997296f3044eefc70f568b8c7738a6ab834a57617ee8c3c382c9a5489c2
7
- data.tar.gz: 43387a28608867e45343e9d014fafe3408fbe85ffba35dd935ebfebc61bef340c725e19939f1a1a74b40d3c5a435359bfc5a336f48afdc554911eac79d6fddb6
6
+ metadata.gz: 23c73e4ab92821e8e32ab31714683fb1d1bb5d594f0fec68c2ffdf00221e32002f6122c9e174a325e07cd1738d20d2b763e372ce442683146c0cf53d67ca1b93
7
+ data.tar.gz: 2b833e905a46468bed9d3a0eab95d73d7bd73e293e630c9512b71a67c40b27a7b1ee19c8a549b71cdabb78dfd2f5a6bb34fdf81f450df1efc8b39cc9f87c4f28
data/bin/space2underscore CHANGED
@@ -4,4 +4,5 @@ require 'space2underscore'
4
4
 
5
5
  result = Space2underscore.convert(ARGV)
6
6
  command = Space2underscore.generate_command(result)
7
- puts result; system(command)
7
+ puts Space2underscore.create_new_branch(result)
8
+ system(command)
@@ -1,3 +1,3 @@
1
1
  module Space2underscore
2
- VERSION = '0.1.9'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -19,5 +19,17 @@ module Space2underscore
19
19
  "xclip"
20
20
  end
21
21
  end
22
+
23
+ def create_new_branch(branch)
24
+ print "Do you create the new branch? [y/Y]"
25
+ flag = $stdin.gets.chomp
26
+
27
+ if flag == "y" || flag == "Y"
28
+ system "git checkout -b #{branch}"
29
+ "Branch has been created."
30
+ else
31
+ "Branch name has been copied to clipboard."
32
+ end
33
+ end
22
34
  end
23
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: space2underscore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sachin21
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-21 00:00:00.000000000 Z
11
+ date: 2015-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5
110
+ rubygems_version: 2.2.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: change the space into underscore