pullbox 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -11
- data/exe/mailmate_beta +12 -7
- data/lib/pullbox/version.rb +1 -1
- data/pullbox.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 358733a3bf57bb1cd42f72b8c4fa34821ae0b2c25e694bfbb037dff2af6f668b
|
4
|
+
data.tar.gz: 47285aab38740f81d09681e75821562052f66ccd33088598f9b56dae8d06e7f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dcad83519180818cc4814d03594bce3617ca17fd4b4960fbde97fa8cbc2fd0c6cbfa12fb5a8287086db78f6115a31b96015118d96614205659906dbeb8bb057
|
7
|
+
data.tar.gz: 439fe304ce3e36286ee8b3149eb4b459c6a77fd7c541838cc3f4ef02c90c0e1eb895c251244d6f47de33d7601a89d199bf5cbb6c9e61a3c322e686b346f4129c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.1.6] - 2023-02-08
|
4
|
+
|
5
|
+
- Fix issue with regex in `mailmate_beta`
|
6
|
+
|
7
|
+
## [0.1.5] - 2023-02-08
|
8
|
+
|
9
|
+
- Refactor of `mailmate_beta` to make it more robust
|
10
|
+
|
11
|
+
## [0.1.1] - [0.1.4] - 2023-01-24
|
12
|
+
|
13
|
+
- Refactoring
|
14
|
+
|
3
15
|
## [0.1.0] - 2022-12-22
|
4
16
|
|
5
17
|
- Initial release
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Pullbox
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Describe gem in detail
|
3
|
+
![Status](https://github.com/the-pulli/pullbox/actions/workflows/main.yml/badge.svg)
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -16,14 +14,6 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
16
14
|
|
17
15
|
## Usage
|
18
16
|
|
19
|
-
TODO: Write usage instructions
|
20
|
-
|
21
|
-
## Development
|
22
|
-
|
23
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
24
|
-
|
25
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
26
|
-
|
27
17
|
## Contributing
|
28
18
|
|
29
19
|
Bug reports and pull requests are welcome on GitHub at https://github.com/the-pulli/pullbox.
|
data/exe/mailmate_beta
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require "
|
4
|
+
require "net/http"
|
5
|
+
require "nokogiri"
|
5
6
|
require "plist"
|
6
7
|
require_relative "../lib/pullbox/applescript"
|
7
8
|
|
@@ -11,13 +12,17 @@ raise "MailMate not installed." unless File.exist? mailmate
|
|
11
12
|
result = Plist.parse_xml(mailmate)
|
12
13
|
raise "MailMate not properly installed." if result.nil?
|
13
14
|
|
15
|
+
regexp1 = /\(r(?<number>\d+)\)/i
|
16
|
+
regexp2 = /(?<number>\d+)/
|
14
17
|
long_version = result["CFBundleGetInfoString"]
|
15
|
-
version = long_version.match(
|
16
|
-
following_release = version[:number].to_i.next
|
17
|
-
search_string = "MailMate_r#{following_release}.tbz"
|
18
|
+
version = long_version.match(regexp1)
|
18
19
|
|
19
|
-
|
20
|
+
doc = Nokogiri::HTML(Net::HTTP.get(URI("https://updates.mailmate-app.com/archives/")))
|
21
|
+
doc.xpath("(//table//tr//td/a)[last()]").each do |current_release|
|
22
|
+
current_version = current_release.content.match(regexp2)
|
20
23
|
|
21
|
-
|
22
|
-
|
24
|
+
p version[:number]
|
25
|
+
if current_version[:number].to_i > version[:number].to_i
|
26
|
+
Pullbox::AppleScript.display_dialog "Update available.\nVersion: #{current_version}", "MailMate"
|
27
|
+
end
|
23
28
|
end
|
data/lib/pullbox/version.rb
CHANGED
data/pullbox.gemspec
CHANGED
@@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.require_paths = ["lib"]
|
33
33
|
|
34
34
|
# Uncomment to register a new dependency of your gem
|
35
|
+
spec.add_dependency "nokogiri", "~> 1.12"
|
35
36
|
spec.add_dependency "plist", "~> 3.6"
|
36
37
|
|
37
38
|
# For more information and examples about making a new gem, check out our
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PuLLi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: plist
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|