space2underscore 0.4.1 → 0.4.2

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: 1188b6c98a2b960a9cfb0a7f02e53a752e0596ae
4
- data.tar.gz: 67eedd0a65a8a9ea94a10d814c1c99d9ae30dbdb
3
+ metadata.gz: 19e357586324c08baa28395476f812e1391d7201
4
+ data.tar.gz: e020d3661885e69bc2b39726b0d1d3115f4cf306
5
5
  SHA512:
6
- metadata.gz: 966a08e49abdb2b1fe0c0518559c2d3da213da469706c5cf1ebf194eb694fe0288b4b28d023fbc7fe46e2fed270c81300576f4ee12a56fb459df70a44a7a958f
7
- data.tar.gz: 56729c3f54006577394f0bf36dad1febc505d812e737a7936f90c9f1acb951aed7b2f454da6bd9f6c10f919a91e2764510d04e8be0b92f787d41cd73c5407f45
6
+ metadata.gz: 662880f8447d00d6fb8a5fd7ade246e7480438924cb0ddd5525cc2459788c33f1e0883dba4b0feff8568983feb65b485312dc3aaa064b9cefdd336bf532cb8d5
7
+ data.tar.gz: 331ba5b073c387e45dda81004b91896a33c898793fcfb7991f877789b91e3ad46ea25f834e0dcb3f6a696516d2c81cf357a0679547a53c738f2d04a3202a01f6
@@ -1,6 +1,5 @@
1
1
  AllCops:
2
- Exclude:
3
- - 'vendor/**/*'
2
+ TargetRubyVersion: 2.3
4
3
 
5
- Style/Encoding:
6
- Enabled: true
4
+ Exclude:
5
+ - 'vendor/bundle/**/*'
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
data/bin/s2u ADDED
@@ -0,0 +1 @@
1
+ space2underscore
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
- # coding: utf-8
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
- puts Space2underscore.usage
13
+ return puts Space2underscore.usage if ARGV.empty?
14
+
15
+ if convert_flag.emtpy?
16
+ puts underscore_include_sentence
13
17
  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
18
+ Space2underscore.create_new_branch(underscore_include_sentence)
19
19
  end
@@ -1,4 +1,5 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'space2underscore/version'
3
4
 
4
5
  # This is the main functions.
@@ -1,6 +1,6 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  # This module holds the Space2underscore version information.
4
4
  module Space2underscore
5
- VERSION = '0.4.1'
5
+ VERSION = '0.4.2'
6
6
  end
@@ -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
+ ..........................................................
@@ -1,4 +1,5 @@
1
- # coding: utf-8
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 = <<-EOF.gsub(' ', '')
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'
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
4
 
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/setup'
4
4
  require 'space2underscore'
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.1
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: 2016-03-06 00:00:00.000000000 Z
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.5
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