desktop-boom 0.4.0 → 0.5.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 +2 -0
  3. data/bin/boom +27 -0
  4. data/lib/boom/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15dca0c7b23ef97d864a6b9f51a2c0a3d5227902
4
- data.tar.gz: 3eb45bd240fc9676b6e7c6dc99e53f35d8f5cf02
3
+ metadata.gz: 1357906463eae7f81629ae5db78a06631bf0af09
4
+ data.tar.gz: c568bbad5ed80183b8b6a1a9d681c25ba1542396
5
5
  SHA512:
6
- metadata.gz: 8db873b51bf32ef6a36c5ea00087433d3373d06fc50f552e55933df34fa5102ed68df8b54e864108341947a0e5f76b2694424083e8051ad10fcb380f3b4bdc2a
7
- data.tar.gz: 4bc3d0f18a1bc8d8e8ff0adcded204effa60714381991b80782283cb59ac1ffa2e00664e792345d99229f8d07c379b94d24d7314dd7a3199b41f286eb99b2587
6
+ metadata.gz: 73a3a824b449b60d12e2ca4e7829aec0ccafb31d8efc9f24389636a769d598241295671f639f5cae840d75403cc7bbc9dd866eafe48946b72ec185488ff4d633
7
+ data.tar.gz: ad9a5889519c7822989fc98bbaad361b6476e6c78ff774d743701ecde6686777a72a403b5ccf3ecca9aefe291006766ada4be67052ae0055f78610f13cb6755e
data/README.md CHANGED
@@ -4,6 +4,8 @@ The (OS X) desktop is very handy for storing files and folders you are currently
4
4
 
5
5
  Enter `boom`. `boom` is a simple tool. You classify your files and folders into "projects" and `boom` helps maintain your OS X desktop by making it contain files and folders for the current project you are working on.
6
6
 
7
+ [![Gem Version](https://badge.fury.io/rb/desktop-boom.svg)](http://badge.fury.io/rb/ruby_motion_query)
8
+
7
9
  Usage
8
10
  ---
9
11
  A project in `boom` is just a name.
data/bin/boom CHANGED
@@ -79,6 +79,10 @@ or for help:
79
79
  new_project = args[0]
80
80
  create_configuration_file unless File.file? config_path
81
81
  with_config do |mapping, projects_directory, current_project|
82
+ say_error "Project `#{new_project}` does not exist. Create with:
83
+
84
+ #{APP_NAME} create #{new_project}
85
+ " and abort unless (projects + [current_project]).include? new_project
82
86
  if new_project == current_project
83
87
  say "Already at project '#{current_project}'"
84
88
  break
@@ -90,6 +94,29 @@ or for help:
90
94
  end
91
95
  end
92
96
 
97
+ command :create do |c|
98
+ c.syntax = "#{APP_NAME} create <project name>"
99
+ c.summary = 'Create project'
100
+ c.description = c.summary
101
+ c.example 'Run command', "$ #{APP_NAME} create <project name>"
102
+ c.action do |args, options|
103
+ say_error "Specify the name of the project you want to create:
104
+
105
+ #{APP_NAME} create <project name>
106
+
107
+ or for help:
108
+
109
+ #{APP_NAME} --help
110
+ " and abort if args.empty?
111
+ new_project = args[0]
112
+ create_configuration_file unless File.file? config_path
113
+ with_config do |mapping, projects_directory, current_project|
114
+ say_error "Project already exist: `#{new_project}`" and abort if (projects + [current_project]).include? new_project
115
+ FileUtils.mkdir_p(File.expand_path(new_project, projects_directory))
116
+ end
117
+ end
118
+ end
119
+
93
120
  command :current do |c|
94
121
  c.syntax = "#{APP_NAME} current"
95
122
  c.summary = 'Show the current project name'
data/lib/boom/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DesktopBoom
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: desktop-boom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hwee-Boon Yar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-23 00:00:00.000000000 Z
11
+ date: 2016-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander