opening_act 0.1.1 → 0.1.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/lib/opening_act/output.rb +5 -5
- data/lib/opening_act/templates/Gemfile_Spec +7 -2
- data/lib/opening_act/templates/Gemfile_Test +1 -1
- data/lib/opening_act/templates/Rakefile_Test +0 -1
- data/lib/opening_act/templates/spec/new_app_spec.rb +1 -1
- data/lib/opening_act/templates/test/test_helper.rb +2 -2
- data/lib/opening_act/version.rb +1 -1
- data/lib/opening_act.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d783f768ba97656f6ced7c890d503f8c93f816c
|
4
|
+
data.tar.gz: b14f23a6cda8fe36364241215f734bfc58350166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1606615e06889b25399d0a6be7dae4e360550bfe9bbeac054940d95613c826756c7d9e6d2c08797c254d3cfa58f8aabfa3a5c6ee18e4ed1d9a011c7cf9c707
|
7
|
+
data.tar.gz: 92d7807243d93c0c42677a7ef11568dabff9bc2643276686b3ae9f7169a7a6ed3d5382034409939636656e029a0e26b643fb640365ce8a72cbc86ab6745bdb1b
|
data/lib/opening_act/output.rb
CHANGED
@@ -22,7 +22,7 @@ module Outputable
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def take_the_stage
|
25
|
-
puts '> The Opening Act has begun to
|
25
|
+
puts '> The Opening Act has begun to perform. This may take a moment.'
|
26
26
|
end
|
27
27
|
|
28
28
|
def add_confirmation
|
@@ -39,9 +39,9 @@ module Outputable
|
|
39
39
|
puts "> Your project has been renamed to '#{template.name}'."
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
43
|
-
puts '>
|
44
|
-
puts
|
45
|
-
puts '> Type
|
42
|
+
def nested_git_confirmation
|
43
|
+
puts '> A git project already exists in this directory.'
|
44
|
+
puts '> Running OpeningAct will create a nested git.'
|
45
|
+
puts '> Type CONTINUE if you wish to continue. Otherwise, press Enter.'
|
46
46
|
end
|
47
47
|
end
|
@@ -4,8 +4,8 @@ source "https://rubygems.org"
|
|
4
4
|
gem 'sinatra'
|
5
5
|
gem 'sinatra-contrib'
|
6
6
|
gem 'erubis'
|
7
|
-
gem '
|
8
|
-
gem '
|
7
|
+
gem 'rake'
|
8
|
+
gem 'dotenv'
|
9
9
|
|
10
10
|
group :production do
|
11
11
|
gem "puma"
|
@@ -15,3 +15,8 @@ group :development do
|
|
15
15
|
gem 'pry'
|
16
16
|
gem 'rubocop'
|
17
17
|
end
|
18
|
+
|
19
|
+
group :test do
|
20
|
+
gem 'rspec', :require => 'spec'
|
21
|
+
gem 'rack-test'
|
22
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
Dir.glob(File.expand_path('
|
3
|
-
|
2
|
+
Dir.glob(File.expand_path('../../*.rb', __FILE__)).each do |file|
|
3
|
+
require_relative file
|
4
4
|
end
|
5
5
|
|
6
6
|
require 'minitest/autorun'
|
data/lib/opening_act/version.rb
CHANGED
data/lib/opening_act.rb
CHANGED
@@ -12,7 +12,7 @@ class OpeningAct
|
|
12
12
|
extend Verifiable
|
13
13
|
|
14
14
|
def self.perform(name, test_name)
|
15
|
-
return leave_the_stage
|
15
|
+
return leave_the_stage if nested_git? && quit_playing?
|
16
16
|
|
17
17
|
setup(name, test_name)
|
18
18
|
add_overwrite_rename_or_quit while directory_exists?
|
@@ -58,16 +58,20 @@ class OpeningAct
|
|
58
58
|
test_type[0] == '-'
|
59
59
|
end
|
60
60
|
|
61
|
+
def self.nested_git?
|
62
|
+
File.exists? '.git'
|
63
|
+
end
|
64
|
+
|
61
65
|
def self.overwrite_existing_dir
|
62
66
|
FileUtils.rm_rf(template.name)
|
63
67
|
|
64
68
|
overwrite_confirmation
|
65
69
|
end
|
66
70
|
|
67
|
-
def self.
|
68
|
-
|
71
|
+
def self.quit_playing?
|
72
|
+
nested_git_confirmation
|
69
73
|
|
70
|
-
|
74
|
+
user_input.downcase != 'continue'
|
71
75
|
end
|
72
76
|
|
73
77
|
def self.rename_project
|