joe_utils 0.0.8 → 0.0.9
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/bin/project_utility.rb +4 -1
- data/joe_utils.gemspec +1 -1
- data/lib/joe_utils/cli_helper.rb +3 -2
- data/lib/joe_utils/regexp_helper.rb +3 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f42a2d8433880e06d52ee3125d18693bf076ce65
|
|
4
|
+
data.tar.gz: 7eb5b0ea719e6936b19ec419e5bef1669d44c095
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 09d834b456880b68972c5b3ff1ed589fad0ff5f6c65bd85ce8689212de7b21f09c3866e6be48b3bf36be53bc055a951f0080c303a6efe3731466bff5139ddc41
|
|
7
|
+
data.tar.gz: d175474e062ac443a6f76e0212ef6dc1a2c78286d2d19dcbea09fe1405a5bbaf3895353c5249e363e054b58f64e87af9eeb9b7669b53fb3ef83039f2e444ead8
|
data/bin/project_utility.rb
CHANGED
|
@@ -5,6 +5,7 @@ require 'joe_utils'
|
|
|
5
5
|
class ProjectUtility
|
|
6
6
|
|
|
7
7
|
include CLIHelper
|
|
8
|
+
include RegExpHelper
|
|
8
9
|
|
|
9
10
|
HELP_TEXT = 'Provide me with the name of the gem, you also can add options:
|
|
10
11
|
i for installing the gem locally, p for pushing the gem to rubygems.org, h for help.',
|
|
@@ -29,6 +30,8 @@ class ProjectUtility
|
|
|
29
30
|
exit
|
|
30
31
|
when '-ip'
|
|
31
32
|
options[:install] = options[:push] = true
|
|
33
|
+
when CLI_MESSAGE_INPUT
|
|
34
|
+
options[:message] = arg
|
|
32
35
|
else
|
|
33
36
|
options[:gem_name] = arg
|
|
34
37
|
end
|
|
@@ -38,7 +41,7 @@ class ProjectUtility
|
|
|
38
41
|
|
|
39
42
|
def run
|
|
40
43
|
options = process_input(ARGV)
|
|
41
|
-
commit_git
|
|
44
|
+
commit_git(options[:message])
|
|
42
45
|
commit_github if options[:github]
|
|
43
46
|
deploy_heroku if options[:heroku]
|
|
44
47
|
build_gem(options[:gem_name], options) if options[:gem_name]
|
data/joe_utils.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'joe_utils'
|
|
3
|
-
s.version = '0.0.
|
|
3
|
+
s.version = '0.0.9'
|
|
4
4
|
s.executables = %w(project_utility.rb)
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
|
6
6
|
s.authors = ['Josef Erneker']
|
data/lib/joe_utils/cli_helper.rb
CHANGED
|
@@ -8,14 +8,15 @@ module CLIHelper
|
|
|
8
8
|
build_gem_failed: 'The gem build failed. Please confirm the gem name and try again.',
|
|
9
9
|
deploy_heroku: 'Deploying to heroku.',
|
|
10
10
|
commit_github: 'Commiting to github.',
|
|
11
|
+
default_message: 'Commit by script'
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
# Commits to git
|
|
14
15
|
# @return [nil]
|
|
15
|
-
def commit_git
|
|
16
|
+
def commit_git(message)
|
|
16
17
|
puts MESSAGES[:commit_git]
|
|
17
18
|
puts `git add -u`
|
|
18
|
-
puts `git commit -m "
|
|
19
|
+
puts `git commit -m "#{message || MESSAGES[:default_message]}"`
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
# Builds the named gem locally, in case of provided options pushes and installs the gem
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: joe_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josef Erneker
|
|
@@ -49,6 +49,7 @@ files:
|
|
|
49
49
|
- lib/joe_utils/console_helper.rb
|
|
50
50
|
- lib/joe_utils/files_helper.rb
|
|
51
51
|
- lib/joe_utils/name_helper.rb
|
|
52
|
+
- lib/joe_utils/regexp_helper.rb
|
|
52
53
|
- lib/joe_utils/script_editor_helper.rb
|
|
53
54
|
- lib/joe_utils/script_renderer.rb
|
|
54
55
|
- lib/joe_utils/socket_helper.rb
|