space2dot 0.1.2 → 0.1.3

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: 0d2daf257ae4f91f5983513446579236cfb19dcc
4
- data.tar.gz: 229c9abb80809fbad0751fcdcae6e8094ce8eb39
3
+ metadata.gz: 0f3d9fefb937a40d0a7862d1819595f8c6053702
4
+ data.tar.gz: 2cd91cf6643b14c9d9160c69d03f7f4ba8adec33
5
5
  SHA512:
6
- metadata.gz: 37ca247d3c91346e57e1ff50f7e07737a914b96951a74da33d1628436e084cc4ad0736870e1163822eb6d561a7042162d165082a333cded192a60e9165171fd8
7
- data.tar.gz: 87be1920ab73acb9bf6450266fdadbc76ca0ed8d4b1379564352a3c0f429efc70664a9cd2066c5985318fc5b8a007942a2f2a370ac11c44322e0583596bbdedf
6
+ metadata.gz: a92af99827dc76f5283deb34d65b00deb96cddba1774ae648a0ed71a0461ce67f43cb1f697a89143f12cfbfb4dc467ad5ece06574cbb6a2a904514a2d1b028d0
7
+ data.tar.gz: 03cefc32690f03bd2d597a802453120527751780dc5c769f0a416e937c5935d058a0cf96edbb3cc4e9c5ae80a229870baaf93bd707db7641b2662f96feffde67
data/.rubocop.yml ADDED
@@ -0,0 +1,6 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'vendor/**/*'
4
+
5
+ Style/Encoding:
6
+ Enabled: true
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.1.2
5
+ - 2.1.1
6
+ - 2.1.0
7
+
8
+ before_install:
9
+ - gem install bundler
10
+ - rm -f .git/index.lock
11
+
12
+ script: "bundle exec rspec spec"
13
+
14
+ notifications:
15
+ slack: sachin21dev:c8WF8GEXwbWxzKnfqC4nBhsu
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
+ # coding: utf-8
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
6
+
7
+ gem 'coveralls', require: false
8
+ gem 'simplecov', require: false
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 sachin21
1
+ Copyright (c) 2014 Satoshi Ohmori
2
2
 
3
3
  MIT License
4
4
 
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
- $ gem install space2dot
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
- From the terminal:
23
+ ```
24
+ $ space2dot class name | pbcopy
25
+ ```
26
+
27
+ In the case of Linux.
13
28
 
14
- $ space2dot style sheet
15
- => .style.sheet # Output to the standard output
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 branch
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
- require 'bundler/gem_tasks'
1
+ # coding: utf-8
2
2
 
3
- Bundler.setup
3
+ require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
5
5
 
6
- desc 'run spec'
7
- RSpec::Core::RakeTask.new(:spec) do |t|
8
- t.rspec_opts = ['-c', '-fs']
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
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # coding: utf-8
3
+
2
4
  require 'space2dot'
3
5
 
4
6
  result = Space2dot.convert(ARGV)
5
7
 
6
- print result
8
+ puts result
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 ? argv[0].strip.gsub(/\s/, '.').insert(0, '.') : argv.join('.').insert(0, '.')
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
@@ -1,3 +1,6 @@
1
+ # coding: utf-8
2
+
3
+ # This module holds the Space2underscore version information.
1
4
  module Space2dot
2
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
3
6
  end
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 = 'change the space into dot'
12
- spec.summary = 'change the space into dot'
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
@@ -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.2
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: 2015-09-16 00:00:00.000000000 Z
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
- description: change the space into dot
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.2.3
127
+ rubygems_version: 2.5.1
112
128
  signing_key:
113
129
  specification_version: 4
114
- summary: change the space into dot
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:
data/bin/s2. DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'space2dot'
3
-
4
- result = Space2dot.convert(ARGV)
5
-
6
- print result