space2hyphen 0.0.1 → 0.0.2

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: 13e6a2da8a7d297aec1004d2cc32bc8604923711
4
- data.tar.gz: 4c82023d3d06f441e52f37c92fcedd9900f64ab7
3
+ metadata.gz: 8a44a0ea459518571525e7013af43a8c0706418f
4
+ data.tar.gz: 0f0a62efe05821245c088674a3b2df19f23e06f7
5
5
  SHA512:
6
- metadata.gz: 037f76cffcf6421442dddb8c8dbcddf526afa9887bf891adc1488823ae6f3b9dd4f51de734f36bbdab67833aab47cc8723ce96cfce9b12a60229ca7a81fcbb12
7
- data.tar.gz: b38751e108f68e737480d33136929c1184981980090b7e69f090ab32e3da59e0fd4a4c78cff5042e4393ac6640b702b7ca4c3f0eed7410c0e159a9a9640d1b41
6
+ metadata.gz: a435f8cb87fb129e25dd34e694e0ee6ddf1eb48525e5ea09e2b985581d620441836986661262313cd42cd7fad466fd1bf334010209935bd0485e5c5acd84ef0b
7
+ data.tar.gz: 786dbed497e2f62a161b11be8829f330c0712081594054b46d194ed44527b3d0945bff8b93a749fbd9700cffbe5f16755801b20e51cffba9e039bb7b636d9356
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
+ - ruby-2.3.0
5
+ - 2.1.4
4
6
  - 2.1.2
5
7
  - 2.1.1
6
8
  - 2.1.0
@@ -11,6 +13,9 @@ rvm:
11
13
  - 1.9.3-p484
12
14
  - 1.9.3-p545
13
15
 
16
+ before_install:
17
+ - gem install bundler
18
+
14
19
  script: "bundle exec rspec spec"
15
20
 
16
21
  notifications:
data/bin/s2h CHANGED
@@ -8,15 +8,12 @@ CREATE_FLAGS = %w(-c --create)
8
8
  args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
9
9
  hyphen_include_sentence = Space2hyphen.convert(args)
10
10
 
11
- result =
11
+ if ARGV.empty?
12
+ puts Space2hyphen.usage
13
+ else
12
14
  if ARGV.include?('-c') || ARGV.include?('--create')
13
- if Space2hyphen.create_new_branch(hyphen_include_sentence)
14
- "Switched to a new branch '#{hyphen_include_sentence}'"
15
- else
16
- "fatal: A branch named '#{hyphen_include_sentence}' already exists."
17
- end
15
+ Space2hyphen.create_new_branch(hyphen_include_sentence)
18
16
  else
19
- hyphen_include_sentence
17
+ puts hyphen_include_sentence
20
18
  end
21
-
22
- puts result
19
+ end
data/bin/space2hyphen CHANGED
@@ -8,15 +8,12 @@ CREATE_FLAGS = %w(-c --create)
8
8
  args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
9
9
  hyphen_include_sentence = Space2hyphen.convert(args)
10
10
 
11
- result =
11
+ if ARGV.empty?
12
+ puts Space2hyphen.usage
13
+ else
12
14
  if ARGV.include?('-c') || ARGV.include?('--create')
13
- if Space2hyphen.create_new_branch(hyphen_include_sentence)
14
- "Switched to a new branch '#{hyphen_include_sentence}'"
15
- else
16
- "fatal: A branch named '#{hyphen_include_sentence}' already exists."
17
- end
15
+ Space2hyphen.create_new_branch(hyphen_include_sentence)
18
16
  else
19
- hyphen_include_sentence
17
+ puts hyphen_include_sentence
20
18
  end
21
-
22
- puts result
19
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This module holds the Space2hyphen version information.
4
4
  module Space2hyphen
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
data/lib/space2hyphen.rb CHANGED
@@ -9,6 +9,6 @@ module Space2hyphen
9
9
  end
10
10
 
11
11
  def self.create_new_branch(hyphen_include_sentence)
12
- system "git checkout -b #{hyphen_include_sentence} &> /dev/null"
12
+ system "git checkout -b #{hyphen_include_sentence}"
13
13
  end
14
14
  end
data/space2hyphen.gemspec CHANGED
@@ -28,12 +28,12 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  From the command line:
30
30
 
31
- $ space2hyphen new branch -c
31
+ $ s2h new branch -c
32
32
  => Switched to the new branch 'new-branch’
33
33
 
34
34
  Or
35
35
 
36
- $ git branch -m $(space2hyphen renamed branch)
36
+ $ git branch -m $(s2h renamed branch)
37
37
 
38
38
  ----------------------------------------------------------
39
39
  ..........................................................
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: space2hyphen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sachin21
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,12 +118,12 @@ post_install_message: |
118
118
 
119
119
  From the command line:
120
120
 
121
- $ space2hyphen new branch -c
121
+ $ s2h new branch -c
122
122
  => Switched to the new branch 'new-branch’
123
123
 
124
124
  Or
125
125
 
126
- $ git branch -m $(space2hyphen renamed branch)
126
+ $ git branch -m $(s2h renamed branch)
127
127
 
128
128
  ----------------------------------------------------------
129
129
  ..........................................................
@@ -142,10 +142,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.5.1
145
+ rubygems_version: 2.4.5
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Change the space into hyphen
149
149
  test_files:
150
150
  - spec/space2dash_spec.rb
151
151
  - spec/spec_helper.rb
152
+ has_rdoc: