atk_toolbox 0.0.74 → 0.0.77
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/atk/file_sys.rb +2 -2
- data/lib/atk/version.rb +14 -1
- data/lib/atk/yaml_info_parser.rb +3 -4
- data/lib/atk_toolbox/version.rb +1 -1
- 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: 29735664d5cc0f00e2cf8c1ff98bf127e87b5c5c2828e7bd0d792ee1e91e46c8
|
4
|
+
data.tar.gz: 6b44a438173c7bdcae246965ca79d66e589792e8ce4decd77d28f1c311c85be2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17cc61f128ff06e10f51cfbb35a032afc992ef9dd02301c5a111da3778c66e3fb85bae21b46d5802a060e0f20cbab2ba8e1c0981286b508cd9880da74f8365c9
|
7
|
+
data.tar.gz: 823fbe66a961d9869e5714728399f4267c2f5afa51cf9ca745099cb3f859d076aa64f6d17b5cd6622b1e7f83988a19a0bd7d20f6d62333811a7f09fa4b5c6054
|
data/lib/atk/file_sys.rb
CHANGED
@@ -199,10 +199,10 @@ class FileSys
|
|
199
199
|
Dir.glob(path, File::FNM_DOTMATCH) - %w[. ..]
|
200
200
|
end
|
201
201
|
def self.list_files(path=".")
|
202
|
-
Dir.children(path).map{|each|
|
202
|
+
Dir.children(path).map{|each| path/each }.select {|each| FileSys.file?(each)}
|
203
203
|
end
|
204
204
|
def self.list_folders(path=".")
|
205
|
-
Dir.children(path).map{|each|
|
205
|
+
Dir.children(path).map{|each| path/each }.select {|each| FileSys.directory?(each)}
|
206
206
|
end
|
207
207
|
def self.ls(path=".")
|
208
208
|
Dir.children(path)
|
data/lib/atk/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# create a variable for the current ruby version
|
2
2
|
|
3
3
|
class Version
|
4
|
-
attr_accessor :
|
4
|
+
attr_accessor :levels
|
5
5
|
|
6
6
|
def initialize(version_as_string)
|
7
7
|
@levels = version_as_string.split('.')
|
@@ -17,6 +17,19 @@ class Version
|
|
17
17
|
@major, @minor, @patch, *_ = @levels
|
18
18
|
end
|
19
19
|
|
20
|
+
def patch() @patch end
|
21
|
+
def patch=(new_value)
|
22
|
+
@levels[2] = new_value
|
23
|
+
end
|
24
|
+
def minor() @minor end
|
25
|
+
def minor=(new_value)
|
26
|
+
@levels[1] = new_value
|
27
|
+
end
|
28
|
+
def major() @major end
|
29
|
+
def major=(new_value)
|
30
|
+
@levels[0] = new_value
|
31
|
+
end
|
32
|
+
|
20
33
|
def comparable?
|
21
34
|
return @comparable
|
22
35
|
end
|
data/lib/atk/yaml_info_parser.rb
CHANGED
@@ -226,12 +226,11 @@ class Info
|
|
226
226
|
begin
|
227
227
|
@@data = YAML.load_file(Info.source_path)
|
228
228
|
rescue => exception
|
229
|
-
puts "\n\nI'm having trouble loading the info.yaml file. Here's the error
|
230
|
-
|
229
|
+
puts "\n\nI'm having trouble loading the info.yaml file. Here's the error:\n"
|
230
|
+
raise exception
|
231
231
|
end
|
232
232
|
else
|
233
|
-
|
234
|
-
exit
|
233
|
+
raise "Couldn't find an info.yaml file in #{Dir.pwd}"
|
235
234
|
end
|
236
235
|
@@project = @@data['(project)']
|
237
236
|
if @@project == nil
|
data/lib/atk_toolbox/version.rb
CHANGED