desktop-boom 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/bin/boom +3 -16
  4. data/lib/boom/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b5a72ed2ea65b432a037b97d4626ea3165ea89f
4
- data.tar.gz: 3097c1e433946b9d5b987bbee3071ee2e7bf29f0
3
+ metadata.gz: 547d447776351c8de974b75d424e32efd1ec6e76
4
+ data.tar.gz: 4d439cecb4cc7bc8a3a79070b6c6283f56fc129a
5
5
  SHA512:
6
- metadata.gz: 5929abd50810d015ccfd514050d46a7cfdffde264c152fc44be80eff3d7dda4d4b7da6b51854f5d5e0980ac0310463ec08faea401e5ebc473837808778f2ad87
7
- data.tar.gz: eed0714413941c63b19a7d259cf1971a9debc12edb5cc7b5f615a75be65653b2f8b0c7c7508d46ae84515f9f426b131ea9001368c87cf695074ae756aec3d19f
6
+ metadata.gz: a641c607de91bfbf4e1e7bf415b42799349233e24d6d8306379db1d19c9273c1de3bdf691a002d02aa3b212043a9f29b6b2e71aee71f72c9f23f70b016ed36a9
7
+ data.tar.gz: e69695c049a3e9f7c3fe488f09e431a2699ba047c8dcf859418b3b34a08f3a6f3c83b5a07c9e5bf1e009acfedb0dc77e666cd31c58e0069e108c719deff278ea
data/README.md CHANGED
@@ -20,6 +20,12 @@ Files and folders in the desktop will be moved away and tagged as belonging to p
20
20
 
21
21
  If `B` doesn't exist yet, it will be created.
22
22
 
23
+ To get help:
24
+
25
+ ```
26
+ $ boom --help
27
+ ```
28
+
23
29
  Installation
24
30
  ---
25
31
  `gem install desktop-boom`
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} B
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
- say "rename current"
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
@@ -1,3 +1,3 @@
1
1
  module DesktopBoom
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desktop-boom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hwee-Boon Yar