space2underscore 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/space2underscore/version.rb +1 -1
- data/lib/space2underscore.rb +2 -2
- data/spec/space2underscore_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d55bd9a4925605c87db837084d00b583577ac8ec
|
4
|
+
data.tar.gz: fb25088ff078acb7a9485b1a68a503f51218c994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a85fa8ebbb5b3a1a2edc80a7c09833e99d76938171bcb97bc656bf20c6b1a3db8340e8ea7df2e503ea39e42763c1a790360006a9d551d2c19bec8b6f8f53d63
|
7
|
+
data.tar.gz: 615aab230fa3a084b974f49e9d5e7f2a38702afc061a5f5d4a13681ac58e8ee42d0b402e8cf99724ef1b52917819f3242db30c9b6e9fca1acc6f3637ae715bca
|
data/README.md
CHANGED
@@ -16,11 +16,11 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install space2underscore
|
18
18
|
|
19
|
-
If your computer is Ubuntu
|
19
|
+
If your computer is Ubuntu then
|
20
20
|
|
21
21
|
$ sudo apt-get install xsel
|
22
22
|
|
23
|
-
If your computer is CentOS
|
23
|
+
If your computer is CentOS then
|
24
24
|
|
25
25
|
$ sudo yum -y install xsel
|
26
26
|
|
@@ -33,12 +33,12 @@ From the terminal:
|
|
33
33
|
|
34
34
|
# Example of use
|
35
35
|
|
36
|
-
![example of use](http://i.imgur.com/
|
36
|
+
![example of use](http://i.imgur.com/1teIk4j.png)
|
37
37
|
|
38
38
|
From the terminal:
|
39
39
|
|
40
|
-
$ space2underscore add stock function to user
|
41
|
-
$ git checkout -b
|
40
|
+
$ space2underscore add stock function to user feed # underscore included branch name is copied to clipboard
|
41
|
+
$ git checkout -b add_stock_function_to_user_feed # paste
|
42
42
|
|
43
43
|
## Contributing
|
44
44
|
|
data/lib/space2underscore.rb
CHANGED
@@ -6,8 +6,8 @@ module Space2underscore
|
|
6
6
|
argv.length == 1 ? argv[0].strip.gsub(/\s/, '_') : argv.join('_')
|
7
7
|
end
|
8
8
|
|
9
|
-
def generate_command(
|
10
|
-
"echo #{
|
9
|
+
def generate_command(underscore_include_sentence)
|
10
|
+
"echo #{underscore_include_sentence} | ruby -pe 'chomp' | #{copy_cmd}"
|
11
11
|
end
|
12
12
|
|
13
13
|
def copy_cmd
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Space2underscore do
|
4
|
-
it 'Successful execution' do
|
4
|
+
it 'should be Successful execution' do
|
5
5
|
expect(Space2underscore.convert(['fuga hoge foo'])).to include('_') # String case
|
6
6
|
expect(Space2underscore.convert(%w(fuga hoge foo))).to include('_') # Array case
|
7
7
|
end
|
8
8
|
|
9
|
-
it 'Successful copied' do
|
9
|
+
it 'should be Successful copied' do
|
10
10
|
expect(Space2underscore.generate_command('fuga_hoge_foo')).to eq("echo fuga_hoge_foo | ruby -pe 'chomp' | pbcopy")
|
11
11
|
end
|
12
12
|
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.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sachin21
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-14 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.
|
110
|
+
rubygems_version: 2.2.2
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: change the space into underscore
|