pullbox 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0979fd8e25fcb2904420f92151c5c4aed13bb7cad45b82e97e8acac805f5cbd2'
4
- data.tar.gz: 4a6b446fea44edc5d9fbd8a3b963abf2250fb11709bf5e65225c1c642220c5d6
3
+ metadata.gz: 704dbc2ce08220f64f5c46caecad73f98fb986bec284ec507099f3fcf2688e01
4
+ data.tar.gz: 8853fabf879798c38158463b3e5a041de9159d3e8d82b2188bab735c1bda5ac5
5
5
  SHA512:
6
- metadata.gz: 0755bc804d2a28841290dc8ff5d3bfce5f0489cac54768e675151ea103f733330481a9cf4dabad3868ff4fbef1bdff059d497148dc5d90bafd0710a5d653060c
7
- data.tar.gz: 7b998cbe1daa77885e60adfe442800b6ea536005daf0d4bff41a36c7af13fb9cf4f1cd9f04799720f39542f8408da5bacdc4125fb5cadcdbf501f87892f07687
6
+ metadata.gz: 27c6c08219200580429a73563593d974d0b9e63e0be2ef11022a6c6dd5b7e2877c858d3d73576a235e9aa05f7168ad8c207a93489810d5f4b49470d37fcce615
7
+ data.tar.gz: 8d611f37b963edb5bf7f5966345a5805cb1095831c1dc9d826a05b282f8824b353ef3383953e1405442b42476078045064765ea4406c4929ca003f49999f99da
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.5] - 2023-02-08
4
+
5
+ - Refactor of `mailmate_beta` to make it more robust
6
+
7
+ ## [0.1.1] - [0.1.4] - 2023-01-24
8
+
9
+ - Refactoring
10
+
3
11
  ## [0.1.0] - 2022-12-22
4
12
 
5
13
  - Initial release
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Pullbox
2
2
 
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
-
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 "English"
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(/\(r(?<number>\d+)\)/i)
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
- content = `curl -s https://updates.mailmate-app.com/archives/ | grep #{search_string}`
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 !content.empty? && $CHILD_STATUS.exited?
22
- Pullbox::AppleScript.display_dialog "Update available.\nVersion: #{following_release}", "MailMate"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pullbox
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
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
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-01-24 00:00:00.000000000 Z
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