space2dot 0.0.3 → 0.1.1

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: 47da8f3ded44d86847efe29b5661b98916cfbe01
4
- data.tar.gz: 385774c2cf493f27d7c4278df9f608627f6958d6
3
+ metadata.gz: 964e1b346ea243d0c641b074684c850af5c47aaf
4
+ data.tar.gz: 628f1413c4e3005103bbaedc3cf342a51eebf0b1
5
5
  SHA512:
6
- metadata.gz: 7c110e568467a26a932893a61fabbde539187c18741149d7a5404e132181abf843ad2aa8eeecc4451cb89a0e96611b484e2e0e9b57a659de9664f779628401a1
7
- data.tar.gz: d58330ff4e711a32d59e8771cfabfb234bed6231c94f5d36c7381c635fafbb87840a66fcfd013586fe005990e840cdbe093ddee06278e0b80b61fb8407aadb9b
6
+ metadata.gz: 2948899e37b0c9a4e6235810332449bbba32646e37d6c07aeb023714b288a3effae8828cef6dc8655e26e216c9395ad1188e8d06b4b1358d90e6f3f5304d755a
7
+ data.tar.gz: 94f12e9ea8b35e63ff529d395197cb143c6a6ebceb3c2b896d5ae40adb083657cf332dcfb2cf56aca980870aaec073daf5928ad5f76d884e6c53c4d2d0fb40d2
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in space2dot.gemspec
4
3
  gemspec
data/README.md CHANGED
@@ -1,39 +1,26 @@
1
1
  # Space2dot
2
- ## What
2
+ ## What is space2dot
3
3
  Change the space into dot.
4
4
 
5
5
  ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'space2dot'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
6
+ Install it yourself as:
16
7
 
17
8
  $ gem install space2dot
18
9
 
19
- If your computer is Ubuntu
20
-
21
- $ sudo apt-get install xsel
22
-
23
- If your computer is CentOS
24
-
25
- $ sudo yum -y install xsel
10
+ ## Usage
26
11
 
27
- You need to alias
12
+ From the terminal:
28
13
 
29
- $ alias pbcopy='xsel --clipboard --input'
14
+ $ space2dot style sheet
15
+ => .style.sheet # Output to the standard output
30
16
 
31
- ## Usage
17
+ ## Shorthand
32
18
 
33
- From the terminal:
19
+ A shorthand alias for space2dot can also be used.
34
20
 
35
- $ space2dot target sentence
36
- => .target.sentence # copied to the clipboard
21
+ ```
22
+ s2. new branch
23
+ ```
37
24
 
38
25
  ## Contributing
39
26
 
@@ -42,4 +29,3 @@ From the terminal:
42
29
  3. Commit your changes (`git commit -am 'Add some feature'`)
43
30
  4. Push to the branch (`git push origin my-new-feature`)
44
31
  5. Create new Pull Request
45
-
data/Rakefile CHANGED
@@ -1,7 +1,9 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
3
2
 
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
3
+ Bundler.setup
4
+ require 'rspec/core/rake_task'
7
5
 
6
+ desc 'run spec'
7
+ RSpec::Core::RakeTask.new(:spec) do |t|
8
+ t.rspec_opts = ['-c', '-fs']
9
+ end
data/bin/s2. ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ require 'space2dot'
3
+
4
+ result = Space2dot.convert(ARGV)
5
+
6
+ print result
data/bin/space2dot CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require 'space2dot'
4
3
 
5
- result = Space2dot.convert(ARGV)
6
- command = Space2dot.copy_command(result)
7
- puts result; system(command)
4
+ result = Space2dot.convert(ARGV)
5
+
6
+ print result
@@ -1,3 +1,3 @@
1
1
  module Space2dot
2
- VERSION = "0.0.3"
2
+ VERSION = '0.1.1'
3
3
  end
data/lib/space2dot.rb CHANGED
@@ -3,11 +3,7 @@ require 'space2dot/version'
3
3
  module Space2dot
4
4
  class << self
5
5
  def convert(argv)
6
- argv.length == 1 ? argv[0].strip.gsub(/\s/, '.').insert(0, '.') : argv.join('.').insert(0, '.')
7
- end
8
-
9
- def copy_command(dot_include_sentence)
10
- "echo #{dot_include_sentence} | ruby -pe 'chomp' | pbcopy"
6
+ argv.length == 1 ? argv[0].strip.gsub(/\s/, '.') : argv.join('.')
11
7
  end
12
8
  end
13
9
  end
data/space2dot.gemspec CHANGED
@@ -4,21 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'space2dot/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "space2dot"
7
+ spec.name = 'space2dot'
8
8
  spec.version = Space2dot::VERSION
9
- spec.authors = ["sachin21"]
10
- spec.email = ["sachin21.developer@gmail.com"]
11
- spec.description = "Convert to space the dot"
12
- spec.summary = "Convert to space the dot"
13
- spec.homepage = "https://github.com/sachin21/space2dot"
14
- spec.license = "MIT"
9
+ spec.authors = ['sachin21']
10
+ spec.email = ['sachin21.developer@gmail.com']
11
+ spec.description = 'change the space into dot'
12
+ spec.summary = 'change the space into dot'
13
+ spec.homepage = 'http://github.com/sachin21/space2dot'
14
+ spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = `git ls-files`.split($/)
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
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rspec"
21
+ spec.add_development_dependency 'bundler', '~> 1.3'
22
+ spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'rspec'
24
+ spec.add_development_dependency 'pry'
24
25
  end
@@ -1,12 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe Space2dot do
4
- it 'Successful execution' do
5
- expect(Space2dot.convert(['fuga hoge foo'])).to eq('.fuga.hoge.foo') # String case
6
- expect(Space2dot.convert(%w(fuga hoge foo))).to eq('.fuga.hoge.foo') # Array case
7
- end
8
-
9
- it 'Successful copied' do
10
- expect(Space2dot.copy_command('.fuga.hoge.foo')).to eq("echo .fuga.hoge.foo | ruby -pe 'chomp' | pbcopy")
4
+ it 'returns dot included in string' do
5
+ expect(Space2dot.convert(['fuga hoge foo'])).to include('.') # String case
6
+ expect(Space2dot.convert(%w(fuga hoge foo))).to include('.') # Array case
11
7
  end
12
8
  end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,10 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ require 'bundler/setup'
2
2
  require 'space2dot'
3
+ Bundler.setup
4
+
5
+ RSpec.configure do |config|
6
+ config.order = 'random'
7
+ config.expect_with :rspec do |rspec|
8
+ rspec.syntax = :expect
9
+ end
10
+ end
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.0.3
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sachin21
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-20 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,10 +52,25 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Convert to space the dot
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: change the space into dot
56
70
  email:
57
71
  - sachin21.developer@gmail.com
58
72
  executables:
73
+ - s2.
59
74
  - space2dot
60
75
  extensions: []
61
76
  extra_rdoc_files: []
@@ -66,13 +81,14 @@ files:
66
81
  - LICENSE.txt
67
82
  - README.md
68
83
  - Rakefile
84
+ - bin/s2.
69
85
  - bin/space2dot
70
86
  - lib/space2dot.rb
71
87
  - lib/space2dot/version.rb
72
88
  - space2dot.gemspec
73
89
  - spec/space2dot_spec.rb
74
90
  - spec/spec_helper.rb
75
- homepage: https://github.com/sachin21/space2dot
91
+ homepage: http://github.com/sachin21/space2dot
76
92
  licenses:
77
93
  - MIT
78
94
  metadata: {}
@@ -92,10 +108,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
108
  version: '0'
93
109
  requirements: []
94
110
  rubyforge_project:
95
- rubygems_version: 2.4.5
111
+ rubygems_version: 2.2.3
96
112
  signing_key:
97
113
  specification_version: 4
98
- summary: Convert to space the dot
114
+ summary: change the space into dot
99
115
  test_files:
100
116
  - spec/space2dot_spec.rb
101
117
  - spec/spec_helper.rb