flycal-cli 1.2 → 1.2.2

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: 55605292daf7d56f71dc210b4c607ebceeb0aa1be1bc464ba73d82ce26583c4a
4
- data.tar.gz: 256c9dd132265a9d7b36ac7a144c516b06d5c298f9a8e8fb8ac29e1fe2a7bc53
3
+ metadata.gz: 6064a63fa2be20ee1ae485a098fe48a4b0d8a754b7be3ab592870a4f1c3ff647
4
+ data.tar.gz: 9161662c7b7ab8a794095260df2a2b2f7b7fc0b7f53ba35e2d72d7c9005e46c5
5
5
  SHA512:
6
- metadata.gz: b7a93a60e2cfd438b9b9ef9b52bf1c1a06e07c329bf3e86d3e8ef2253a5bf96c8bbbb390c5258b5250d71e0f87d6669b1088c1b7d10a3bebac0ad9809dc4f638
7
- data.tar.gz: 5fc7e9f8a1d202e84caf771498a5758023a8aa16a240e6490108eb31d73507889857ca40a2db00309a78f7c15de34f16db1a334037bc44cd684531bac8d73053
6
+ metadata.gz: 759574c5c165b1e0b0fec5a95de8c62fc2f61975cad1d3aa4550c8d4fb58a9fd74d5c22826e45cc043a7b4d081a187f25985016d04e993568fbf0025806c829a
7
+ data.tar.gz: fbc3abe2cefa03f601be32798d13b6bf451baff99e23564659fffc8325972a1835340b7a0d781eb33c328e1f530b0eaf9f81766cd95fe3aaf39cdcdaf89bb12f
@@ -3,6 +3,7 @@
3
3
  require "thor"
4
4
  require "time"
5
5
  require "date"
6
+ require "active_support"
6
7
  require "active_support/core_ext/date"
7
8
  require "active_support/core_ext/integer"
8
9
  require "active_support/core_ext/time"
@@ -23,7 +24,7 @@ module Cli
23
24
 
24
25
  desc "login", "Connect to your Google account"
25
26
  option :client, type: :string,
26
- desc: "OAuth client: flycal (Flycal Desktop app) or json (~/.flycal/credentials.json)"
27
+ desc: "OAuth client: flycal (Flycal Desktop app) or json (~/.flycal/credentials.json, advanced)"
27
28
  def login
28
29
  apply_locale_override
29
30
  if Auth.logged_in?
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "date"
4
4
  require "time"
5
+ require "active_support"
5
6
  require "active_support/core_ext/time"
6
7
  require "active_support/core_ext/date"
7
8
 
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support"
3
4
  require "active_support/core_ext/numeric/time"
4
5
  require "active_support/core_ext/integer/time"
5
6
 
data/lib/flycal/locale.rb CHANGED
@@ -34,8 +34,8 @@ module Flycal
34
34
  end
35
35
 
36
36
  def format_long_date(date_or_time)
37
- t = date_or_time.respond_to?(:to_time) ? date_or_time.to_time : date_or_time
38
- d = t.to_date
37
+ # Calendar date in the value's own zone — not TimeWithZone#to_time (system TZ / AS 8.1).
38
+ d = Date.new(date_or_time.year, date_or_time.month, date_or_time.day)
39
39
  "#{day_abbr(d).downcase} #{d.day} #{month_name(d)} #{d.year}"
40
40
  end
41
41
 
@@ -2,6 +2,10 @@
2
2
 
3
3
  require "time"
4
4
  require "date"
5
+ # Full ActiveSupport, not only active_support/time: AS 8.1 reads
6
+ # ActiveSupport.utc_to_local_returns_utc_offset_times in TimeZone#utc_to_local,
7
+ # and that accessor lives on the main active_support.rb.
8
+ require "active_support"
5
9
  require "active_support/time"
6
10
 
7
11
  module Flycal
data/lib/flycal.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # Under Rails, Zeitwerk autoloads lib/flycal/*.
5
5
  # The CLI gem entrypoint (flycal_cli/lib/flycal_cli.rb) eager-requires what it needs.
6
6
  module Flycal
7
- VERSION = "1.2"
7
+ VERSION = "1.2.2"
8
8
 
9
9
  def self.connect(credentials:)
10
10
  Client.new(credentials: credentials)
data/locales/en.json CHANGED
@@ -31,8 +31,8 @@
31
31
  "login": {
32
32
  "prompt": "How do you want to sign in?",
33
33
  "options": {
34
- "flycal": "Google account (Flycal)",
35
- "json": "Your own Google Cloud client JSON (~/.flycal/credentials.json)"
34
+ "flycal": "Google account, via Flycal (default)",
35
+ "json": "Your own Google Cloud client JSON (advanced)"
36
36
  },
37
37
  "already_connected": "✓ You are already connected to your Google account.",
38
38
  "next_config": "Run 'flycal config' to set the default calendar.",
data/locales/it.json CHANGED
@@ -31,8 +31,8 @@
31
31
  "login": {
32
32
  "prompt": "Come vuoi accedere?",
33
33
  "options": {
34
- "flycal": "Account Google (Flycal)",
35
- "json": "Il tuo client JSON di Google Cloud (~/.flycal/credentials.json)"
34
+ "flycal": "Account Google, tramite Flycal (predefinito)",
35
+ "json": "Il tuo client JSON di Google Cloud (avanzato)"
36
36
  },
37
37
  "already_connected": "✓ Sei già connesso al tuo account Google.",
38
38
  "next_config": "Esegui 'flycal config' per impostare il calendario predefinito.",
data/mcp/tools.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "path": "~/.flycal/config.yml",
83
83
  "credentials_path": "~/.flycal/credentials.json",
84
84
  "tokens_path": "~/.flycal/tokens.yml",
85
- "credentials_note": "flycal login offers two clients: (1) Flycal Desktop OAuth, no Google Cloud project needed; (2) optional ~/.flycal/credentials.json from your own Desktop app. Non-interactive default is flycal (`flycal login --client flycal`). For your own JSON: `flycal login --client json`.",
85
+ "credentials_note": "flycal login offers two clients: (1) Flycal Desktop OAuth, no Google Cloud project needed; (2) advanced: your own ~/.flycal/credentials.json. Browser login is required for both. Non-interactive default is flycal (`flycal login --client flycal`). For your own JSON: `flycal login --client json`.",
86
86
  "keys": {
87
87
  "calendar_default": {
88
88
  "type": ["string", "null"],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flycal-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - flycal-cli