obsideo-cli 0.2.1__tar.gz → 0.2.2__tar.gz

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.
Files changed (24) hide show
  1. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/PKG-INFO +1 -1
  2. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo/cli.py +1 -1
  3. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/PKG-INFO +1 -1
  4. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/pyproject.toml +1 -1
  5. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/tests/test_cli.py +77 -77
  6. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/README.md +0 -0
  7. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo/__init__.py +0 -0
  8. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo/__main__.py +0 -0
  9. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo/manifest.py +0 -0
  10. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo/sync.py +0 -0
  11. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/SOURCES.txt +0 -0
  12. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/dependency_links.txt +0 -0
  13. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/entry_points.txt +0 -0
  14. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/requires.txt +0 -0
  15. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_cli.egg-info/top_level.txt +0 -0
  16. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/__init__.py +0 -0
  17. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/config.py +0 -0
  18. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/crypto.py +0 -0
  19. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/identity.py +0 -0
  20. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/login.py +0 -0
  21. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/names.py +0 -0
  22. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/obsideo_core/storage.py +0 -0
  23. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/setup.cfg +0 -0
  24. {obsideo_cli-0.2.1 → obsideo_cli-0.2.2}/tests/test_core.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: obsideo-cli
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Obsideo Cloud - encrypted storage we can't read. Save, browse, and sync whatever you want, from your terminal.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://obsideo.io
@@ -112,7 +112,7 @@ def show_notices() -> None:
112
112
  _BANNER = r"""
113
113
  /\
114
114
  / \ OBSIDEO DRIVE
115
- \ / encrypted storage we can't read
115
+ \ / encrypted storage not even we can read
116
116
  \/
117
117
  """
118
118
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: obsideo-cli
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Obsideo Cloud - encrypted storage we can't read. Save, browse, and sync whatever you want, from your terminal.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://obsideo.io
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "obsideo-cli"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "Obsideo Cloud - encrypted storage we can't read. Save, browse, and sync whatever you want, from your terminal."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -151,80 +151,80 @@ def test_put_folder_into_cwd(shell, tmp_path):
151
151
  sh.do_cd("backup")
152
152
  sh.do_put(str(folder))
153
153
  assert "backup/docs/x.txt" in fake.objs
154
-
155
-
156
- # ── Banner + update check (0.2.1) ─────────────────────────────────────────────
157
-
158
- def test_banner_tty_gated_once(monkeypatch, capsys):
159
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
160
- monkeypatch.delenv("OBSIDEO_NO_BANNER", raising=False)
161
- monkeypatch.delenv("NO_COLOR", raising=False)
162
- cli._BANNER_SHOWN = False
163
- cli.show_banner()
164
- assert "OBSIDEO DRIVE" in capsys.readouterr().err
165
- cli.show_banner() # once per process
166
- assert capsys.readouterr().err == ""
167
- # non-tty: silent
168
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: False, raising=False)
169
- cli._BANNER_SHOWN = False
170
- cli.show_banner()
171
- assert capsys.readouterr().err == ""
172
-
173
-
174
- def test_parse_version_ordering():
175
- assert cli._parse_version("0.2.10") > cli._parse_version("0.2.9")
176
- assert cli._parse_version("0.3.0") > cli._parse_version("0.2.99")
177
- assert cli._parse_version("0.2.1") == cli._parse_version("0.2.1")
178
- assert not (cli._parse_version("0.2.0") > cli._parse_version("0.2.1"))
179
-
180
-
181
- def test_update_check_silent_when_not_tty(monkeypatch, capsys):
182
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: False, raising=False)
183
- called = []
184
- monkeypatch.setattr(cli, "_latest_pypi_version", lambda: called.append(1) or "9.9.9")
185
- cli.check_for_update()
186
- assert capsys.readouterr().err == ""
187
- assert called == [] # short-circuits before any network call
188
-
189
-
190
- def test_update_check_noop_when_current(monkeypatch, capsys):
191
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
192
- monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
193
- monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
194
- monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.1") # not newer
195
- asked = []
196
- monkeypatch.setattr("builtins.input", lambda *a: asked.append(1) or "y")
197
- cli.check_for_update()
198
- assert asked == [] # never prompts when already current
199
- assert "Update available" not in capsys.readouterr().err
200
-
201
-
202
- def test_update_check_prompts_and_respects_no(monkeypatch, capsys):
203
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
204
- monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
205
- monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
206
- monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.2")
207
- monkeypatch.setattr("builtins.input", lambda *a: "n")
208
- ran = []
209
- monkeypatch.setattr(cli.subprocess, "run", lambda *a, **k: ran.append(a))
210
- cli.check_for_update()
211
- err = capsys.readouterr().err
212
- assert "Update available: 0.2.1 -> 0.2.2" in err
213
- assert ran == [] # declined -> no pip invocation
214
-
215
-
216
- def test_update_check_runs_pip_on_yes(monkeypatch, capsys):
217
- monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
218
- monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
219
- monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
220
- monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.2")
221
- monkeypatch.setattr("builtins.input", lambda *a: "y")
222
-
223
- class _R:
224
- returncode = 0
225
- calls = []
226
- monkeypatch.setattr(cli.subprocess, "run", lambda *a, **k: calls.append(a[0]) or _R())
227
- with pytest.raises(SystemExit) as e:
228
- cli.check_for_update()
229
- assert e.value.code == 0
230
- assert calls and calls[0][1:] == ["-m", "pip", "install", "-U", "obsideo-cli"]
154
+
155
+
156
+ # ── Banner + update check (0.2.1) ─────────────────────────────────────────────
157
+
158
+ def test_banner_tty_gated_once(monkeypatch, capsys):
159
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
160
+ monkeypatch.delenv("OBSIDEO_NO_BANNER", raising=False)
161
+ monkeypatch.delenv("NO_COLOR", raising=False)
162
+ cli._BANNER_SHOWN = False
163
+ cli.show_banner()
164
+ assert "OBSIDEO DRIVE" in capsys.readouterr().err
165
+ cli.show_banner() # once per process
166
+ assert capsys.readouterr().err == ""
167
+ # non-tty: silent
168
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: False, raising=False)
169
+ cli._BANNER_SHOWN = False
170
+ cli.show_banner()
171
+ assert capsys.readouterr().err == ""
172
+
173
+
174
+ def test_parse_version_ordering():
175
+ assert cli._parse_version("0.2.10") > cli._parse_version("0.2.9")
176
+ assert cli._parse_version("0.3.0") > cli._parse_version("0.2.99")
177
+ assert cli._parse_version("0.2.1") == cli._parse_version("0.2.1")
178
+ assert not (cli._parse_version("0.2.0") > cli._parse_version("0.2.1"))
179
+
180
+
181
+ def test_update_check_silent_when_not_tty(monkeypatch, capsys):
182
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: False, raising=False)
183
+ called = []
184
+ monkeypatch.setattr(cli, "_latest_pypi_version", lambda: called.append(1) or "9.9.9")
185
+ cli.check_for_update()
186
+ assert capsys.readouterr().err == ""
187
+ assert called == [] # short-circuits before any network call
188
+
189
+
190
+ def test_update_check_noop_when_current(monkeypatch, capsys):
191
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
192
+ monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
193
+ monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
194
+ monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.1") # not newer
195
+ asked = []
196
+ monkeypatch.setattr("builtins.input", lambda *a: asked.append(1) or "y")
197
+ cli.check_for_update()
198
+ assert asked == [] # never prompts when already current
199
+ assert "Update available" not in capsys.readouterr().err
200
+
201
+
202
+ def test_update_check_prompts_and_respects_no(monkeypatch, capsys):
203
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
204
+ monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
205
+ monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
206
+ monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.2")
207
+ monkeypatch.setattr("builtins.input", lambda *a: "n")
208
+ ran = []
209
+ monkeypatch.setattr(cli.subprocess, "run", lambda *a, **k: ran.append(a))
210
+ cli.check_for_update()
211
+ err = capsys.readouterr().err
212
+ assert "Update available: 0.2.1 -> 0.2.2" in err
213
+ assert ran == [] # declined -> no pip invocation
214
+
215
+
216
+ def test_update_check_runs_pip_on_yes(monkeypatch, capsys):
217
+ monkeypatch.setattr(cli.sys.stdout, "isatty", lambda: True, raising=False)
218
+ monkeypatch.delenv("OBSIDEO_NO_UPDATE_CHECK", raising=False)
219
+ monkeypatch.setattr(cli.config, "VERSION", "0.2.1")
220
+ monkeypatch.setattr(cli, "_latest_pypi_version", lambda: "0.2.2")
221
+ monkeypatch.setattr("builtins.input", lambda *a: "y")
222
+
223
+ class _R:
224
+ returncode = 0
225
+ calls = []
226
+ monkeypatch.setattr(cli.subprocess, "run", lambda *a, **k: calls.append(a[0]) or _R())
227
+ with pytest.raises(SystemExit) as e:
228
+ cli.check_for_update()
229
+ assert e.value.code == 0
230
+ assert calls and calls[0][1:] == ["-m", "pip", "install", "-U", "obsideo-cli"]
File without changes
File without changes
File without changes