devcheck 0.3.3 → 0.4.0
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/README.md +1 -1
- data/devcheck +28 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5261525f11e3d3219943815605bdd5ef4e8c51e56317668b0f88cfdea066c2b
|
|
4
|
+
data.tar.gz: a12aec97e39efaf2ae385717bf0dd5ba4ae0fbd342893bd5f7f08562654f8019
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6bed7325b21fd46b56ffc89192dfc4e0c739dd81446d5a9608e770dcf84deda6b12d8d0d74df27576d4a25409cc39e4dae48933253dd2677f6a1c73a6c1b106
|
|
7
|
+
data.tar.gz: a759c287ccc0543eacb5b95bfd1b8de65b9da999b01b75265c27e2c1cd7b0c39414b0dc5099e538418f36c91d847d94c608a04bfe0d796f5de24c5f253df5a18
|
data/README.md
CHANGED
data/devcheck
CHANGED
|
@@ -13,9 +13,26 @@ $commands = []
|
|
|
13
13
|
$files = []
|
|
14
14
|
$project_name = ""
|
|
15
15
|
$project_id = ""
|
|
16
|
+
$environment = ""
|
|
17
|
+
$argument = ""
|
|
16
18
|
|
|
17
19
|
require 'rubygems'
|
|
18
20
|
# Define Functions
|
|
21
|
+
|
|
22
|
+
def get_argv
|
|
23
|
+
if ARGV.empty?
|
|
24
|
+
$argument = ""
|
|
25
|
+
else
|
|
26
|
+
$argument = ARGV[0]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def environment(environment = "")
|
|
31
|
+
$environment = environment
|
|
32
|
+
yield
|
|
33
|
+
$environment = ""
|
|
34
|
+
end
|
|
35
|
+
|
|
19
36
|
def name(name = "devcheck")
|
|
20
37
|
$project_name = name
|
|
21
38
|
end
|
|
@@ -24,11 +41,11 @@ def id(id = "devcheck")
|
|
|
24
41
|
end
|
|
25
42
|
|
|
26
43
|
def command(name)
|
|
27
|
-
$commands << name
|
|
44
|
+
$commands << [name, $environment]
|
|
28
45
|
end
|
|
29
46
|
|
|
30
47
|
def file(name)
|
|
31
|
-
$files << name
|
|
48
|
+
$files << [name, $environment]
|
|
32
49
|
end
|
|
33
50
|
|
|
34
51
|
def get_version
|
|
@@ -54,7 +71,6 @@ def command_exists?(cmd)
|
|
|
54
71
|
end
|
|
55
72
|
end
|
|
56
73
|
|
|
57
|
-
|
|
58
74
|
def file_exists?(file)
|
|
59
75
|
if File.exist?(file)
|
|
60
76
|
puts "\e[32m✓ #{file}\e[0m"
|
|
@@ -74,6 +90,7 @@ end
|
|
|
74
90
|
|
|
75
91
|
|
|
76
92
|
# Main Function
|
|
93
|
+
get_argv
|
|
77
94
|
version = get_version
|
|
78
95
|
|
|
79
96
|
puts "devcheck v#{version}"
|
|
@@ -87,8 +104,10 @@ if $commands.empty?
|
|
|
87
104
|
puts "No Commands Specified."
|
|
88
105
|
else
|
|
89
106
|
puts "Commands:"
|
|
90
|
-
$commands.each do |cmd|
|
|
91
|
-
|
|
107
|
+
$commands.each do |cmd, env|
|
|
108
|
+
if env == $argument or env == "" or $argument == ""
|
|
109
|
+
command_exists?(cmd)
|
|
110
|
+
end
|
|
92
111
|
end
|
|
93
112
|
end
|
|
94
113
|
|
|
@@ -98,8 +117,10 @@ if $files.empty?
|
|
|
98
117
|
puts "No Files Specified."
|
|
99
118
|
else
|
|
100
119
|
puts "Files:"
|
|
101
|
-
$files.each do |file|
|
|
102
|
-
|
|
120
|
+
$files.each do |file, env|
|
|
121
|
+
if env == $argument or env == "" or $argument == ""
|
|
122
|
+
file_exists?(file)
|
|
123
|
+
end
|
|
103
124
|
end
|
|
104
125
|
end
|
|
105
126
|
|