Skip to content

Commit

Permalink
Added missing UniqueID to my actions
Browse files Browse the repository at this point in the history
  • Loading branch information
atika committed Nov 13, 2017
1 parent 522c31c commit ec0b67b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
9 changes: 5 additions & 4 deletions Boxcar.dzbundle/action.rb
Expand Up @@ -5,19 +5,20 @@
# URL: https://inspira.io
# Events: Clicked, Dragged
# SkipConfig: No
# RunsSandboxed: Yes
# Version: 1.0
# MinDropzoneVersion: 3.0
# Handles: Text
# OptionsNIB: APIKey
# LoginTitle: Boxcar User API Key
# RunsSandboxed: Yes
# MinDropzoneVersion: 3.0
# Version: 1.0
# UniqueID: 7000

require 'notification'

def send(data)

$dz.begin("Sending message via Boxcar")

notification = Notification.new('boxcar', ENV['api_key'])
notification.message = data.chomp
notification.sound = 'beep-soft'
Expand Down
3 changes: 2 additions & 1 deletion File Sort.dzbundle/action.rb
Expand Up @@ -8,8 +8,9 @@
# Events: Clicked, Dragged
# SkipConfig: No
# RunsSandboxed: No
# Version: 1.1
# MinDropzoneVersion: 3.0
# Version: 1.1
# UniqueID: 7001

require 'FileUtils'

Expand Down
11 changes: 6 additions & 5 deletions Pushover.dzbundle/action.rb
@@ -1,17 +1,18 @@
# Dropzone Action Info
# Name: Pushover
# Description: Send message via a Pushover notification (https://pushover.net/). Hold Alt Key to select a device or Shift Key to refresh devices list.
# Description: Send message via a Pushover notification (https://pushover.net/). Hold Alt Key to select a device or Shift Key to refresh devices list.
# Creator: Dominique Da Silva
# URL: https://inspira.io
# Events: Clicked, Dragged
# KeyModifiers: Option, Shift
# SkipConfig: No
# RunsSandboxed: Yes
# Version: 1.1
# MinDropzoneVersion: 3.0
# Handles: Text
# OptionsNIB: APIKey
# LoginTitle: Pushover User API Key
# RunsSandboxed: Yes
# MinDropzoneVersion: 3.0
# Version: 1.1
# UniqueID: 7002

require 'notification'

Expand Down Expand Up @@ -55,7 +56,7 @@ def send(data)
puts "Selected device: "+device
notification.device = device
end

notification.push # send the message

$dz.finish("Message sent via Pushover")
Expand Down
21 changes: 11 additions & 10 deletions SparseImage.dzbundle/action.rb
Expand Up @@ -8,8 +8,9 @@
# KeyModifiers: Option
# SkipConfig: No
# RunsSandboxed: No
# Version: 1.0
# MinDropzoneVersion: 3.0
# Version: 1.0
# UniqueID: 7003

$tmpDir = $dz.temp_folder + '/dztmp-' + Time.now.usec.to_s

Expand All @@ -22,9 +23,9 @@ def dragged
# set the output file and volume name
imageName = fileName + '.sparseimage'
volumeName = fileName

tmpSrcDir = "#{$tmpDir}/src";

# set the output files
tmpSparseImage = "#{$tmpDir}/#{imageName}"
destination = ENV['HOME'] + '/Desktop'
Expand All @@ -34,7 +35,7 @@ def dragged
$dz.error("Directory Error.", "Unable to find the destination directory")
return
end

# create the tmp directories and copy the files across
begin
# check to see if the file is a directory (and not an app), and if so then only copy the contents of that folder and not the parent dir like DropDMG
Expand All @@ -45,10 +46,10 @@ def dragged
# get the full path to the directory
files.push($items[0] + '/' + file)
end
end
end
end

# create the tmp dir where we will do all the work
# create the tmp dir where we will do all the work
system("/bin/mkdir -p \"#{tmpSrcDir}\"")

# if we have passed in a directory and there are files in it, then copy those otherwise just copy the dragged src
Expand All @@ -69,25 +70,25 @@ def dragged

# create the image file, copy to the desktop and do some cleaning up
begin

# create an encrypted sparse image if a modifier key is held down
if ENV["KEY_MODIFIERS"] != "Option"
$dz.determinate(false)
$dz.begin("Creating Sparse Image...")
system("hdiutil create -srcfolder \"#{tmpSrcDir}\" -format UDSP -size 1g -volname \"#{volumeName}\" \"#{tmpSparseImage}\" >& /dev/null")
system("hdiutil create -srcfolder \"#{tmpSrcDir}\" -format UDSP -size 1g -volname \"#{volumeName}\" \"#{tmpSparseImage}\" >& /dev/null")
else
# get the password
output = $dz.cocoa_dialog('secure-standard-inputbox --float --title "Enter a new password to secure ' + imageName + '" --e --informative-text "If you forget this password you will not be able to access the files stored on this image.' + "\n\n" + 'Enter the password:" --button1 "Ok" --button2 "Cancel"')
button, password = output.split("\n")

# stop on cancel
if button == "2"
cleanup
$dz.finish("Cancelled")
$dz.url(false)
return
end

$dz.determinate(false)
$dz.begin("Creating Encrypted Sparse Image...")

Expand Down

0 comments on commit ec0b67b

Please sign in to comment.