space2underscore 0.1.1 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.magnum.yml +43 -0
- data/README.md +19 -8
- data/bin/space2underscore +1 -1
- data/img/screenshot.png +0 -0
- data/lib/space2underscore/version.rb +1 -1
- data/lib/space2underscore.rb +1 -1
- data/space2underscore.gemspec +3 -4
- data/spec/space2underscore_spec.rb +3 -3
- metadata +8 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b48f8b8172a0d708313689805c8f865d16dc7bd7
|
4
|
+
data.tar.gz: 6337561f3fdbfd81278378e2386181fc5bcd85af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c2404b5fc754d2e5a38c4137d6e4c9f1713938161f1f668347458014e61bdde534e11ebf9e9669c962108b5b4224e9c652a8da0da1a14220ed4720848de2ac
|
7
|
+
data.tar.gz: 5a6785d4ca32474ea9ffbe393dd40f625dace275f483ca93fc3cca35db02e07ea33579c58b211553cc52d4266f7dd1c4f92cdb2efcd87605f70fb71809314090
|
data/.magnum.yml
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
ruby: 2.1.2
|
2
|
+
ruby: 2.1.1
|
3
|
+
ruby: 2.1.0
|
4
|
+
ruby: 1.9.3-p547
|
5
|
+
ruby: 1.9.3-p392
|
6
|
+
ruby: 1.9.3-p429
|
7
|
+
ruby: 1.9.3-p448
|
8
|
+
ruby: 1.9.3-p484
|
9
|
+
ruby: 1.9.3-p545
|
10
|
+
|
11
|
+
before_install:
|
12
|
+
- rvm install 2.1.2
|
13
|
+
- rvm install 2.1.1
|
14
|
+
- rvm install 2.1.0
|
15
|
+
- rvm install 1.9.3-p547
|
16
|
+
- rvm install 1.9.3-p392
|
17
|
+
- rvm install 1.9.3-p429
|
18
|
+
- rvm install 1.9.3-p448
|
19
|
+
- rvm install 1.9.3-p484
|
20
|
+
- rvm install 1.9.3-p545
|
21
|
+
|
22
|
+
install:
|
23
|
+
- bundle install --path=./vendor/bundle
|
24
|
+
|
25
|
+
script:
|
26
|
+
- bundle exec rspec
|
27
|
+
- rvm use 2.1.2
|
28
|
+
- bundle exec rspec
|
29
|
+
- rvm use 2.1.1
|
30
|
+
- bundle exec rspec
|
31
|
+
- rvm use 2.1.0
|
32
|
+
- bundle exec rspec
|
33
|
+
- rvm use 1.9.3-p547
|
34
|
+
- bundle exec rspec
|
35
|
+
- rvm use 1.9.3-p392
|
36
|
+
- bundle exec rspec
|
37
|
+
- rvm use 1.9.3-p429
|
38
|
+
- bundle exec rspec
|
39
|
+
- rvm use 1.9.3-p448
|
40
|
+
- bundle exec rspec
|
41
|
+
- rvm use 1.9.3-p484
|
42
|
+
- bundle exec rspec
|
43
|
+
- rvm use 1.9.3-p545
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Space2underscore
|
2
2
|
## What
|
3
|
-
|
3
|
+
Change the space into underscore.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -16,23 +16,34 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
$ gem install space2underscore
|
18
18
|
|
19
|
-
If your computer is
|
19
|
+
If your computer is Ubuntu
|
20
20
|
|
21
|
-
$ sudo apt-get install
|
21
|
+
$ sudo apt-get install xsel
|
22
22
|
|
23
|
-
|
23
|
+
If your computer is CentOS
|
24
24
|
|
25
|
-
$
|
26
|
-
|
27
|
-
$ alias pbpaste='xclip -selection clipboard -o'
|
25
|
+
$ sudo yum -y install xsel
|
28
26
|
|
29
|
-
|
27
|
+
You need to alias
|
28
|
+
|
29
|
+
$ alias pbcopy='xsel --clipboard --input'
|
30
|
+
|
31
|
+
## Usage
|
30
32
|
|
31
33
|
From the terminal:
|
32
34
|
|
33
35
|
$ space2underscore target sentence
|
34
36
|
=> target_sentence # copied to the clipboard
|
35
37
|
|
38
|
+
# Example of use
|
39
|
+
|
40
|
+
![example of use](https://raw.githubusercontent.com/sachin21/space2underscore/master/img/screenshot.png)
|
41
|
+
|
42
|
+
From the terminal:
|
43
|
+
|
44
|
+
$ space2underscore add stock function to user feeed # underscore included branch name is copied to clipboard
|
45
|
+
$ git checkout -b add_stock_function_to_user_feeed # paste
|
46
|
+
|
36
47
|
## Contributing
|
37
48
|
|
38
49
|
1. Fork it
|
data/bin/space2underscore
CHANGED
data/img/screenshot.png
ADDED
Binary file
|
data/lib/space2underscore.rb
CHANGED
@@ -6,7 +6,7 @@ module Space2underscore
|
|
6
6
|
argv.length == 1 ? argv[0].strip.gsub(/\s/, '_') : argv.join('_')
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def generate_command(space_include_sentence)
|
10
10
|
"echo #{space_include_sentence} | ruby -pe 'chomp' | pbcopy"
|
11
11
|
end
|
12
12
|
end
|
data/space2underscore.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Space2underscore::VERSION
|
9
9
|
spec.authors = ['sachin21']
|
10
10
|
spec.email = ['sachin21.developer@gmail.com']
|
11
|
-
spec.description = '
|
12
|
-
spec.summary = '
|
13
|
-
spec.homepage = ''
|
11
|
+
spec.description = 'change the space into underscore'
|
12
|
+
spec.summary = 'change the space into underscore'
|
13
|
+
spec.homepage = 'http://github.com/sachin21/space2underscore'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -22,5 +22,4 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency 'rake'
|
23
23
|
spec.add_development_dependency 'rspec'
|
24
24
|
spec.add_development_dependency 'pry'
|
25
|
-
spec.add_development_dependency 'pry-byebug'
|
26
25
|
end
|
@@ -2,11 +2,11 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Space2underscore do
|
4
4
|
it 'Successful execution' do
|
5
|
-
expect(Space2underscore.convert(['fuga hoge foo'])).to
|
6
|
-
expect(Space2underscore.convert(%w(fuga hoge foo))).to
|
5
|
+
expect(Space2underscore.convert(['fuga hoge foo'])).to include('_') # String case
|
6
|
+
expect(Space2underscore.convert(%w(fuga hoge foo))).to include('_') # Array case
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'Successful copied' do
|
10
|
-
expect(Space2underscore.
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sachin21
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,21 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
|
70
|
-
name: pry-byebug
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
description: Convert to underscore the space
|
69
|
+
description: change the space into underscore
|
84
70
|
email:
|
85
71
|
- sachin21.developer@gmail.com
|
86
72
|
executables:
|
@@ -89,18 +75,20 @@ extensions: []
|
|
89
75
|
extra_rdoc_files: []
|
90
76
|
files:
|
91
77
|
- ".gitignore"
|
78
|
+
- ".magnum.yml"
|
92
79
|
- ".rspec"
|
93
80
|
- Gemfile
|
94
81
|
- LICENSE.txt
|
95
82
|
- README.md
|
96
83
|
- Rakefile
|
97
84
|
- bin/space2underscore
|
85
|
+
- img/screenshot.png
|
98
86
|
- lib/space2underscore.rb
|
99
87
|
- lib/space2underscore/version.rb
|
100
88
|
- space2underscore.gemspec
|
101
89
|
- spec/space2underscore_spec.rb
|
102
90
|
- spec/spec_helper.rb
|
103
|
-
homepage:
|
91
|
+
homepage: http://github.com/sachin21/space2underscore
|
104
92
|
licenses:
|
105
93
|
- MIT
|
106
94
|
metadata: {}
|
@@ -120,10 +108,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
108
|
version: '0'
|
121
109
|
requirements: []
|
122
110
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.4.5
|
124
112
|
signing_key:
|
125
113
|
specification_version: 4
|
126
|
-
summary:
|
114
|
+
summary: change the space into underscore
|
127
115
|
test_files:
|
128
116
|
- spec/space2underscore_spec.rb
|
129
117
|
- spec/spec_helper.rb
|