pullbox 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -11
- data/exe/mailmate_beta +10 -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: 704dbc2ce08220f64f5c46caecad73f98fb986bec284ec507099f3fcf2688e01
|
4
|
+
data.tar.gz: 8853fabf879798c38158463b3e5a041de9159d3e8d82b2188bab735c1bda5ac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27c6c08219200580429a73563593d974d0b9e63e0be2ef11022a6c6dd5b7e2877c858d3d73576a235e9aa05f7168ad8c207a93489810d5f4b49470d37fcce615
|
7
|
+
data.tar.gz: 8d611f37b963edb5bf7f5966345a5805cb1095831c1dc9d826a05b282f8824b353ef3383953e1405442b42476078045064765ea4406c4929ca003f49999f99da
|
data/CHANGELOG.md
CHANGED
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,15 @@ 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
|
+
regexp = /(?<number>\d+)/
|
14
16
|
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"
|
17
|
+
version = long_version.match(regexp)
|
18
18
|
|
19
|
-
|
19
|
+
doc = Nokogiri::HTML(Net::HTTP.get(URI("https://updates.mailmate-app.com/archives/")))
|
20
|
+
doc.xpath("(//table//tr//td/a)[last()]").each do |current_release|
|
21
|
+
current_version = current_release.content.match(regexp)
|
20
22
|
|
21
|
-
if
|
22
|
-
|
23
|
+
if current_version[:number].to_i > version[:number].to_i
|
24
|
+
Pullbox::AppleScript.display_dialog "Update available.\nVersion: #{current_version}", "MailMate"
|
25
|
+
end
|
23
26
|
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.5
|
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
|