pullbox 0.1.0 → 0.1.1
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 +3 -3
- data/exe/mailmate_beta +20 -0
- data/lib/pullbox/applescript.rb +2 -2
- data/lib/pullbox/devonthink.rb +1 -1
- data/lib/pullbox/version.rb +1 -1
- data/lib/pullbox.rb +1 -1
- data/pullbox.gemspec +40 -0
- metadata +25 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea371944eac7d4d47ece3f3932696e6c786e66115a022916361e828edb673228
|
4
|
+
data.tar.gz: dd9f473f57cfa7996e8f16a3d31198f15867c6a6417b7e10ebfeb2cb4ea81e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c269ed5af6653c5a57bcc9436386872b00596ec25a9c4d421c7dbc7f34ff116519ae93b15646151116bfc9fd71eba5d7ad237e21ded430836b91b258790f66ad
|
7
|
+
data.tar.gz: a30b0cde3a70d4f99eeb5f63ab22923733899b8e5ec7ce9bf3ed4be3be4be15a33654ca94ed149b369f6ad8101dd44c7cb66f57728088308fb325917425032a7
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pullbox`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
TODO:
|
5
|
+
TODO: Describe gem in detail
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -16,7 +16,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
19
|
-
TODO: Write usage instructions
|
19
|
+
TODO: Write usage instructions
|
20
20
|
|
21
21
|
## Development
|
22
22
|
|
@@ -26,7 +26,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
26
26
|
|
27
27
|
## Contributing
|
28
28
|
|
29
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/the-pulli/pullbox.
|
30
30
|
|
31
31
|
## License
|
32
32
|
|
data/exe/mailmate_beta
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "english"
|
5
|
+
require "plist"
|
6
|
+
require "pullbox/applescript"
|
7
|
+
|
8
|
+
result = Plist.parse_xml("/Applications/MailMate.app/Contents/Info.plist")
|
9
|
+
raise "MailMate not installed." if result.nil?
|
10
|
+
|
11
|
+
long_version = result["CFBundleGetInfoString"]
|
12
|
+
version = long_version.match(/\(r(?<number>\d+)\)/i)
|
13
|
+
following_release = version[:number].to_i.next
|
14
|
+
search_string = "MailMate_r#{following_release}.tbz"
|
15
|
+
|
16
|
+
content = `curl -s https://updates.mailmate-app.com/archives/ | grep #{search_string}`
|
17
|
+
|
18
|
+
if !content.empty? && $CHILD_STATUS.zero?
|
19
|
+
Pullbox::AppleScript.display_dialog "Update available.\nVersion: #{following_release}", "MailMate"
|
20
|
+
end
|
data/lib/pullbox/applescript.rb
CHANGED
@@ -22,7 +22,7 @@ module Pullbox
|
|
22
22
|
|
23
23
|
def self.display_dialog(message, title, defaults = {})
|
24
24
|
defaults = { answer: false, buttons: %w[OK] }.merge(defaults)
|
25
|
-
answer = defaults[:answer] == true ? ' default answer ""' :
|
25
|
+
answer = defaults[:answer] == true ? ' default answer ""' : ""
|
26
26
|
buttons = 'buttons {"'
|
27
27
|
buttons << defaults[:buttons].join('", "')
|
28
28
|
buttons << "\"} default button \"#{defaults[:buttons].last}\""
|
@@ -38,7 +38,7 @@ module Pullbox
|
|
38
38
|
APS
|
39
39
|
answer = `osascript -e '#{apple_script}'`.strip
|
40
40
|
|
41
|
-
exit! if answer ==
|
41
|
+
exit! if answer == ""
|
42
42
|
|
43
43
|
answer
|
44
44
|
end
|
data/lib/pullbox/devonthink.rb
CHANGED
data/lib/pullbox/version.rb
CHANGED
data/lib/pullbox.rb
CHANGED
data/pullbox.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/pullbox/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "pullbox"
|
7
|
+
spec.version = Pullbox::VERSION
|
8
|
+
spec.authors = ["PuLLi"]
|
9
|
+
spec.email = ["the@pulli.dev"]
|
10
|
+
|
11
|
+
spec.summary = "Just a small toolbox for AppleScript, DEVONthink and MailMate"
|
12
|
+
spec.description = "Enables you to write ruby code for AppleScript, DEVONthink and MailMate features."
|
13
|
+
spec.homepage = "https://github.com/the-pulli/pullbox"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/the-pulli/pullbox"
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/the-pulli/pullbox/blob/main/CHANGELOG.md"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(__dir__) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
# Uncomment to register a new dependency of your gem
|
35
|
+
spec.add_dependency "plist", "~> 3.6"
|
36
|
+
|
37
|
+
# For more information and examples about making a new gem, check out our
|
38
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
39
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
40
|
+
end
|
metadata
CHANGED
@@ -1,19 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pullbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PuLLi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2022-12-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: plist
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.6'
|
27
|
+
description: Enables you to write ruby code for AppleScript, DEVONthink and MailMate
|
28
|
+
features.
|
14
29
|
email:
|
15
30
|
- the@pulli.dev
|
16
|
-
executables:
|
31
|
+
executables:
|
32
|
+
- mailmate_beta
|
17
33
|
extensions: []
|
18
34
|
extra_rdoc_files: []
|
19
35
|
files:
|
@@ -22,10 +38,12 @@ files:
|
|
22
38
|
- LICENSE.txt
|
23
39
|
- README.md
|
24
40
|
- Rakefile
|
41
|
+
- exe/mailmate_beta
|
25
42
|
- lib/pullbox.rb
|
26
43
|
- lib/pullbox/applescript.rb
|
27
44
|
- lib/pullbox/devonthink.rb
|
28
45
|
- lib/pullbox/version.rb
|
46
|
+
- pullbox.gemspec
|
29
47
|
- sig/pullbox.rbs
|
30
48
|
homepage: https://github.com/the-pulli/pullbox
|
31
49
|
licenses:
|
@@ -34,7 +52,7 @@ metadata:
|
|
34
52
|
allowed_push_host: https://rubygems.org
|
35
53
|
homepage_uri: https://github.com/the-pulli/pullbox
|
36
54
|
source_code_uri: https://github.com/the-pulli/pullbox
|
37
|
-
changelog_uri: https://github.com/the-pulli/pullbox/CHANGELOG.md
|
55
|
+
changelog_uri: https://github.com/the-pulli/pullbox/blob/main/CHANGELOG.md
|
38
56
|
rubygems_mfa_required: 'true'
|
39
57
|
post_install_message:
|
40
58
|
rdoc_options: []
|
@@ -54,5 +72,5 @@ requirements: []
|
|
54
72
|
rubygems_version: 3.3.26
|
55
73
|
signing_key:
|
56
74
|
specification_version: 4
|
57
|
-
summary: Just a small toolbox for AppleScript and
|
75
|
+
summary: Just a small toolbox for AppleScript, DEVONthink and MailMate
|
58
76
|
test_files: []
|