space2underscore 0.4.1 → 0.4.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 +4 -4
- data/.rubocop.yml +3 -4
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/bin/s2u +1 -0
- data/bin/space2underscore +9 -9
- data/lib/space2underscore.rb +2 -1
- data/lib/space2underscore/version.rb +2 -2
- data/post_install_message.txt +18 -0
- data/space2underscore.gemspec +3 -21
- data/spec/space2underscore_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +4 -3
- data/bin/s2u +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e357586324c08baa28395476f812e1391d7201
|
4
|
+
data.tar.gz: e020d3661885e69bc2b39726b0d1d3115f4cf306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 662880f8447d00d6fb8a5fd7ade246e7480438924cb0ddd5525cc2459788c33f1e0883dba4b0feff8568983feb65b485312dc3aaa064b9cefdd336bf532cb8d5
|
7
|
+
data.tar.gz: 331ba5b073c387e45dda81004b91896a33c898793fcfb7991f877789b91e3ad46ea25f834e0dcb3f6a696516d2c81cf357a0679547a53c738f2d04a3202a01f6
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/s2u
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
space2underscore
|
data/bin/space2underscore
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
#
|
2
|
+
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require 'space2underscore'
|
5
|
+
require 'pry'
|
5
6
|
|
6
|
-
CREATE_FLAGS = %w(-c --create)
|
7
|
+
CREATE_FLAGS = %w(-c --create).freeze
|
7
8
|
|
8
9
|
args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
|
10
|
+
convert_flag = ARGV.select { |arg| CREATE_FLAGS.include?(arg) }
|
9
11
|
underscore_include_sentence = Space2underscore.convert(args)
|
10
12
|
|
11
|
-
if ARGV.empty?
|
12
|
-
|
13
|
+
return puts Space2underscore.usage if ARGV.empty?
|
14
|
+
|
15
|
+
if convert_flag.emtpy?
|
16
|
+
puts underscore_include_sentence
|
13
17
|
else
|
14
|
-
|
15
|
-
Space2underscore.create_new_branch(underscore_include_sentence)
|
16
|
-
else
|
17
|
-
puts underscore_include_sentence
|
18
|
-
end
|
18
|
+
Space2underscore.create_new_branch(underscore_include_sentence)
|
19
19
|
end
|
data/lib/space2underscore.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
..........................................................
|
2
|
+
__________________________________________________________
|
3
|
+
|
4
|
+
Thank you for installing space2underscore.
|
5
|
+
|
6
|
+
************************* Usage **************************
|
7
|
+
|
8
|
+
From the command line:
|
9
|
+
|
10
|
+
$ s2u new branch -c
|
11
|
+
=> Switched to a new branch 'new_branch’
|
12
|
+
|
13
|
+
Or
|
14
|
+
|
15
|
+
$ git branch -m $(s2u renamed branch)
|
16
|
+
|
17
|
+
----------------------------------------------------------
|
18
|
+
..........................................................
|
data/space2underscore.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'space2underscore/version'
|
@@ -18,26 +19,7 @@ Gem::Specification.new do |spec|
|
|
18
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
20
|
spec.require_paths = ['lib']
|
20
21
|
|
21
|
-
spec.post_install_message =
|
22
|
-
..........................................................
|
23
|
-
__________________________________________________________
|
24
|
-
|
25
|
-
Thank you for installing space2underscore.
|
26
|
-
|
27
|
-
************************* Usage **************************
|
28
|
-
|
29
|
-
From the command line:
|
30
|
-
|
31
|
-
$ s2u new branch -c
|
32
|
-
=> Switched to a new branch 'new_branch’
|
33
|
-
|
34
|
-
Or
|
35
|
-
|
36
|
-
$ git branch -m $(s2u renamed branch)
|
37
|
-
|
38
|
-
----------------------------------------------------------
|
39
|
-
..........................................................
|
40
|
-
EOF
|
22
|
+
spec.post_install_message = File.read('post_install_message.txt')
|
41
23
|
|
42
24
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
43
25
|
spec.add_development_dependency 'rake'
|
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 0.4.2
|
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: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- bin/space2underscore
|
103
103
|
- lib/space2underscore.rb
|
104
104
|
- lib/space2underscore/version.rb
|
105
|
+
- post_install_message.txt
|
105
106
|
- space2underscore.gemspec
|
106
107
|
- spec/space2underscore_spec.rb
|
107
108
|
- spec/spec_helper.rb
|
@@ -143,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
144
|
version: '0'
|
144
145
|
requirements: []
|
145
146
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.2
|
147
|
+
rubygems_version: 2.5.2
|
147
148
|
signing_key:
|
148
149
|
specification_version: 4
|
149
150
|
summary: Change the space into underscore
|
data/bin/s2u
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
require 'space2underscore'
|
5
|
-
|
6
|
-
CREATE_FLAGS = %w(-c --create)
|
7
|
-
|
8
|
-
args = ARGV.reject { |arg| CREATE_FLAGS.include?(arg) }
|
9
|
-
underscore_include_sentence = Space2underscore.convert(args)
|
10
|
-
|
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)
|
16
|
-
else
|
17
|
-
puts underscore_include_sentence
|
18
|
-
end
|
19
|
-
end
|