space2dot 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/.travis.yml +15 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +1 -1
- data/README.md +25 -5
- data/Rakefile +5 -6
- data/bin/s2. +1 -0
- data/bin/space2dot +3 -1
- data/lib/space2dot.rb +8 -1
- data/lib/space2dot/version.rb +4 -1
- data/space2dot.gemspec +4 -3
- data/spec/space2dot_spec.rb +7 -0
- data/spec/spec_helper.rb +16 -0
- metadata +22 -5
- data/bin/s2. +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f3d9fefb937a40d0a7862d1819595f8c6053702
|
4
|
+
data.tar.gz: 2cd91cf6643b14c9d9160c69d03f7f4ba8adec33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a92af99827dc76f5283deb34d65b00deb96cddba1774ae648a0ed71a0461ce67f43cb1f697a89143f12cfbfb4dc467ad5ece06574cbb6a2a904514a2d1b028d0
|
7
|
+
data.tar.gz: 03cefc32690f03bd2d597a802453120527751780dc5c769f0a416e937c5935d058a0cf96edbb3cc4e9c5ae80a229870baaf93bd707db7641b2662f96feffde67
|
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,27 +1,47 @@
|
|
1
1
|
# Space2dot
|
2
|
+
|
3
|
+
![Gem Version](https://badge.fury.io/rb/space2dot.svg) [![Build Status](https://travis-ci.org/sachin21/space2dot.svg?branch=master)](https://travis-ci.org/sachin21/space2dot) [![Code Climate](https://codeclimate.com/github/sachin21/space2dot/badges/gpa.svg)](https://codeclimate.com/github/sachin21/space2dot) [![Coverage Status](https://coveralls.io/repos/sachin21/space2dot/badge.svg?branch=master&service=github)](https://coveralls.io/github/sachin21/space2dot?branch=master) [![Gem](https://img.shields.io/gem/dt/space2dot.svg)]()
|
4
|
+
|
2
5
|
## What is space2dot
|
3
6
|
Change the space into dot.
|
7
|
+
space2dot is a useful command when you want to check out a branch.
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
Install it yourself as:
|
7
11
|
|
8
|
-
|
12
|
+
```
|
13
|
+
$ gem install space2dot
|
14
|
+
```
|
9
15
|
|
10
16
|
## Usage
|
17
|
+
From the command line:
|
18
|
+
|
19
|
+
### 1. e.g. Copy a string that contains the dot
|
20
|
+
|
21
|
+
In the case of OS X.
|
11
22
|
|
12
|
-
|
23
|
+
```
|
24
|
+
$ space2dot class name | pbcopy
|
25
|
+
```
|
26
|
+
|
27
|
+
In the case of Linux.
|
13
28
|
|
14
|
-
|
15
|
-
|
29
|
+
```
|
30
|
+
$ space2dot class name | xsel --input --clipboard
|
31
|
+
```
|
16
32
|
|
17
33
|
## Shorthand
|
18
34
|
|
19
35
|
A shorthand alias for space2dot can also be used.
|
20
36
|
|
21
37
|
```
|
22
|
-
s2. new
|
38
|
+
$ s2. new class name | pbcopy
|
23
39
|
```
|
24
40
|
|
41
|
+
## Credits
|
42
|
+
- Help information based on [@motemen's ghq](https://github.com/motemen/ghq)
|
43
|
+
- Installed information based on [Tmuxinator](https://github.com/tmuxinator/tmuxinator)
|
44
|
+
|
25
45
|
## Contributing
|
26
46
|
|
27
47
|
1. Fork it
|
data/Rakefile
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
1
|
+
# coding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
require 'bundler/gem_tasks'
|
4
4
|
require 'rspec/core/rake_task'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
task default: :spec
|
data/bin/s2.
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
space2dot
|
data/bin/space2dot
CHANGED
data/lib/space2dot.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
1
3
|
require 'space2dot/version'
|
2
4
|
|
5
|
+
# This is the main functions.
|
3
6
|
module Space2dot
|
4
7
|
def self.convert(argv)
|
5
|
-
argv.length == 1
|
8
|
+
if argv.length == 1
|
9
|
+
argv[0].strip.gsub(/\s/, '.').insert(0, '.')
|
10
|
+
else
|
11
|
+
argv.join('.')
|
12
|
+
end.insert(0, '.')
|
6
13
|
end
|
7
14
|
end
|
data/lib/space2dot/version.rb
CHANGED
data/space2dot.gemspec
CHANGED
@@ -8,12 +8,12 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Space2dot::VERSION
|
9
9
|
spec.authors = ['sachin21']
|
10
10
|
spec.email = ['sachin21.developer@gmail.com']
|
11
|
-
spec.description = '
|
12
|
-
spec.summary = '
|
11
|
+
spec.description = 'Change the space into dot'
|
12
|
+
spec.summary = 'Change the space into dot'
|
13
13
|
spec.homepage = 'http://github.com/sachin21/space2dot'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split(
|
16
|
+
spec.files = `git ls-files`.split($RS)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
@@ -22,4 +22,5 @@ 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 'rubocop'
|
25
26
|
end
|
data/spec/space2dot_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe Space2dot do
|
@@ -5,4 +7,9 @@ describe Space2dot do
|
|
5
7
|
expect(Space2dot.convert(['fuga hoge foo'])).to include('.') # String case
|
6
8
|
expect(Space2dot.convert(%w(fuga hoge foo))).to include('.') # Array case
|
7
9
|
end
|
10
|
+
|
11
|
+
it 'returns dot included in string in beginning of line' do
|
12
|
+
expect(Space2dot.convert(['fuga hoge foo'])[0]).to eq('.')
|
13
|
+
expect(Space2dot.convert(%w(fuga hoge foo))[0]).to eq('.')
|
14
|
+
end
|
8
15
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
1
3
|
require 'bundler/setup'
|
4
|
+
require 'coveralls'
|
5
|
+
Coveralls.wear!
|
6
|
+
|
2
7
|
require 'space2dot'
|
8
|
+
require 'simplecov'
|
9
|
+
|
10
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
11
|
+
SimpleCov::Formatter::HTMLFormatter,
|
12
|
+
Coveralls::SimpleCov::Formatter
|
13
|
+
]
|
14
|
+
|
15
|
+
SimpleCov.start do
|
16
|
+
add_filter '/vendor/'
|
17
|
+
end
|
18
|
+
|
3
19
|
Bundler.setup
|
4
20
|
|
5
21
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: space2dot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
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: 2016-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,21 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
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: Change the space into dot
|
70
84
|
email:
|
71
85
|
- sachin21.developer@gmail.com
|
72
86
|
executables:
|
@@ -77,6 +91,8 @@ extra_rdoc_files: []
|
|
77
91
|
files:
|
78
92
|
- ".gitignore"
|
79
93
|
- ".rspec"
|
94
|
+
- ".rubocop.yml"
|
95
|
+
- ".travis.yml"
|
80
96
|
- Gemfile
|
81
97
|
- LICENSE.txt
|
82
98
|
- README.md
|
@@ -108,10 +124,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
124
|
version: '0'
|
109
125
|
requirements: []
|
110
126
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.5.1
|
112
128
|
signing_key:
|
113
129
|
specification_version: 4
|
114
|
-
summary:
|
130
|
+
summary: Change the space into dot
|
115
131
|
test_files:
|
116
132
|
- spec/space2dot_spec.rb
|
117
133
|
- spec/spec_helper.rb
|
134
|
+
has_rdoc:
|