desktop-boom 0.1.1 → 0.2.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 +6 -0
- data/bin/boom +3 -16
- data/lib/boom/version.rb +1 -1
- 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: 547d447776351c8de974b75d424e32efd1ec6e76
|
4
|
+
data.tar.gz: 4d439cecb4cc7bc8a3a79070b6c6283f56fc129a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a641c607de91bfbf4e1e7bf415b42799349233e24d6d8306379db1d19c9273c1de3bdf691a002d02aa3b212043a9f29b6b2e71aee71f72c9f23f70b016ed36a9
|
7
|
+
data.tar.gz: e69695c049a3e9f7c3fe488f09e431a2699ba047c8dcf859418b3b34a08f3a6f3c83b5a07c9e5bf1e009acfedb0dc77e666cd31c58e0069e108c719deff278ea
|
data/README.md
CHANGED
data/bin/boom
CHANGED
@@ -126,9 +126,8 @@ command :rename do |c|
|
|
126
126
|
c.description = c.summary
|
127
127
|
c.example 'Run command', "$ #{APP_NAME} rename <source> <target>"
|
128
128
|
c.action do |args, options|
|
129
|
-
puts "args: #{args}"
|
130
129
|
say_error "You must specify both the original project name and the new project name
|
131
|
-
$ #{APP_NAME}
|
130
|
+
$ #{APP_NAME} rename <source> <target>
|
132
131
|
" and abort unless args.size == 2
|
133
132
|
File.open(config_path) do |f|
|
134
133
|
mapping = Psych.load(f.read)
|
@@ -137,22 +136,10 @@ command :rename do |c|
|
|
137
136
|
projects = Dir.entries(File.expand_path(projects_directory)).reject {|e| e == '.' || e == '..' || !File.directory?(File.expand_path(e, projects_directory))}
|
138
137
|
source = args[0]
|
139
138
|
destination = args[1]
|
140
|
-
puts "current project: #{current_project}"
|
141
|
-
puts "projects: #{projects}"
|
142
|
-
puts "rename #{source} -> #{destination}"
|
143
|
-
#kkk check if source does not exist
|
144
139
|
say_error "Project does not exist: `#{source}`" and abort unless (projects + [current_project]).include? source
|
145
|
-
#kkk check if clash
|
146
140
|
say_error "There is an existing project with the name: `#{destination}`" and abort if (projects + [current_project]).include? destination
|
147
|
-
if current_project == source
|
148
|
-
|
149
|
-
#kkk rename current
|
150
|
-
#switch_to(mapping, destination)
|
151
|
-
else
|
152
|
-
say "rename not current"
|
153
|
-
#kkk rename not current
|
154
|
-
#FileUtils.mv(File.expand_path(source, projects_directory), File.expand_path(destination, projects_directory))
|
155
|
-
end
|
141
|
+
switch_to(mapping, destination) if current_project == source
|
142
|
+
FileUtils.mv(File.expand_path(source, projects_directory), File.expand_path(destination, projects_directory))
|
156
143
|
end
|
157
144
|
end
|
158
145
|
end
|
data/lib/boom/version.rb
CHANGED