space2underscore 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +4 -0
- data/CHANGELOG.md +1 -1
- data/bin/s2u +7 -14
- data/bin/space2underscore +7 -14
- data/lib/space2underscore.rb +1 -1
- data/lib/space2underscore/version.rb +1 -1
- data/space2underscore.gemspec +1 -1
- data/spec/space2underscore_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d49b214eaa29c5138354cdeb568350d845c7640
|
4
|
+
data.tar.gz: d470a4a7bfd2225b1359bd87693cee0319555901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be3f4ded6e33d9c09b4a4be95af561b6bb4b9dcc6ab846b945be1df6ff71377801edeb853b0860f45db0dd5a1de27238c8fe339aa94ed4039869896bfdb4fd0b
|
7
|
+
data.tar.gz: c9d10d930d88734cbcec994a7a3c2aa4df728caf6ff715fddfb604ece274fc0a84d06d88e2441ab935cd230199166f9611c8e4a34883af110ad2dd7ced788a67
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
rvm:
|
4
|
+
- ruby-2.3.0
|
4
5
|
- 2.1.2
|
5
6
|
- 2.1.1
|
6
7
|
- 2.1.0
|
@@ -8,6 +9,9 @@ rvm:
|
|
8
9
|
- 1.9.3-p429
|
9
10
|
- 1.9.3-p448
|
10
11
|
|
12
|
+
before_install:
|
13
|
+
- gem install bundler || gem update bundler
|
14
|
+
|
11
15
|
script: "bundle exec rake spec:with_coveralls"
|
12
16
|
|
13
17
|
notifications:
|
data/CHANGELOG.md
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
- Wrote configurations for COVERALLS and SimpleCov.
|
19
19
|
- Hid git command's result.
|
20
20
|
- Modified methods specifications.
|
21
|
-
- Wrote spec for
|
21
|
+
- Wrote spec for `.create_new_branch` and `.usage`.
|
22
22
|
- Changed print method from print to puts.
|
23
23
|
- Added badges.
|
24
24
|
- Fixed typos.
|
data/bin/s2u
CHANGED
@@ -8,19 +8,12 @@ CREATE_FLAGS = %w(-c --create)
|
|
8
8
|
args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
|
9
9
|
underscore_include_sentence = Space2underscore.convert(args)
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
if ARGV.empty?
|
12
|
+
puts Space2underscore.usage
|
13
|
+
else
|
14
|
+
if ARGV.include?('-c') || ARGV.include?('--create')
|
15
|
+
Space2underscore.create_new_branch(underscore_include_sentence)
|
14
16
|
else
|
15
|
-
|
16
|
-
if Space2underscore.create_new_branch(underscore_include_sentence)
|
17
|
-
"Switched to a new branch '#{underscore_include_sentence}'"
|
18
|
-
else
|
19
|
-
"fatal: A branch named '#{underscore_include_sentence}' already exists."
|
20
|
-
end
|
21
|
-
else
|
22
|
-
underscore_include_sentence
|
23
|
-
end
|
17
|
+
puts underscore_include_sentence
|
24
18
|
end
|
25
|
-
|
26
|
-
puts result
|
19
|
+
end
|
data/bin/space2underscore
CHANGED
@@ -8,19 +8,12 @@ CREATE_FLAGS = %w(-c --create)
|
|
8
8
|
args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
|
9
9
|
underscore_include_sentence = Space2underscore.convert(args)
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
if ARGV.empty?
|
12
|
+
puts Space2underscore.usage
|
13
|
+
else
|
14
|
+
if ARGV.include?('-c') || ARGV.include?('--create')
|
15
|
+
Space2underscore.create_new_branch(underscore_include_sentence)
|
14
16
|
else
|
15
|
-
|
16
|
-
if Space2underscore.create_new_branch(underscore_include_sentence)
|
17
|
-
"Switched to a new branch '#{underscore_include_sentence}'"
|
18
|
-
else
|
19
|
-
"fatal: A branch named '#{underscore_include_sentence}' already exists."
|
20
|
-
end
|
21
|
-
else
|
22
|
-
underscore_include_sentence
|
23
|
-
end
|
17
|
+
puts underscore_include_sentence
|
24
18
|
end
|
25
|
-
|
26
|
-
puts result
|
19
|
+
end
|
data/lib/space2underscore.rb
CHANGED
data/space2underscore.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
|
34
34
|
Or
|
35
35
|
|
36
|
-
$ git branch -m $(
|
36
|
+
$ git branch -m $(s2u renamed branch)
|
37
37
|
|
38
38
|
----------------------------------------------------------
|
39
39
|
..........................................................
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
require 'bundler/setup'
|
4
|
-
require 'coveralls'
|
5
4
|
require 'space2underscore'
|
6
5
|
|
7
|
-
|
6
|
+
if ENV['COVERALLS']
|
7
|
+
require 'coveralls'
|
8
|
+
Coveralls.wear!
|
9
|
+
end
|
10
|
+
|
8
11
|
Bundler.setup
|
9
12
|
|
10
13
|
RSpec.configure do |config|
|
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.
|
4
|
+
version: 0.4.0
|
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-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -124,7 +124,7 @@ post_install_message: |
|
|
124
124
|
|
125
125
|
Or
|
126
126
|
|
127
|
-
$ git branch -m $(
|
127
|
+
$ git branch -m $(s2u renamed branch)
|
128
128
|
|
129
129
|
----------------------------------------------------------
|
130
130
|
..........................................................
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.4.5
|
146
|
+
rubygems_version: 2.4.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Change the space into underscore
|