clipsy 1.9.0__tar.gz → 1.9.1__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 (27) hide show
  1. {clipsy-1.9.0/src/clipsy.egg-info → clipsy-1.9.1}/PKG-INFO +4 -2
  2. {clipsy-1.9.0 → clipsy-1.9.1}/README.md +3 -1
  3. {clipsy-1.9.0 → clipsy-1.9.1}/pyproject.toml +1 -1
  4. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/__init__.py +1 -1
  5. {clipsy-1.9.0 → clipsy-1.9.1/src/clipsy.egg-info}/PKG-INFO +4 -2
  6. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_main.py +65 -1
  7. {clipsy-1.9.0 → clipsy-1.9.1}/LICENSE +0 -0
  8. {clipsy-1.9.0 → clipsy-1.9.1}/setup.cfg +0 -0
  9. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/__main__.py +0 -0
  10. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/app.py +0 -0
  11. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/config.py +0 -0
  12. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/models.py +0 -0
  13. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/monitor.py +0 -0
  14. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/redact.py +0 -0
  15. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/storage.py +0 -0
  16. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy/utils.py +0 -0
  17. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy.egg-info/SOURCES.txt +0 -0
  18. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy.egg-info/dependency_links.txt +0 -0
  19. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy.egg-info/entry_points.txt +0 -0
  20. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy.egg-info/requires.txt +0 -0
  21. {clipsy-1.9.0 → clipsy-1.9.1}/src/clipsy.egg-info/top_level.txt +0 -0
  22. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_app.py +0 -0
  23. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_config.py +0 -0
  24. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_monitor.py +0 -0
  25. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_redact.py +0 -0
  26. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_storage.py +0 -0
  27. {clipsy-1.9.0 → clipsy-1.9.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clipsy
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: Lightweight clipboard history manager for macOS
5
5
  Author-email: Brendan Conrad <brendan.conrad@gmail.com>
6
6
  License: MIT
@@ -107,7 +107,9 @@ Then just use your Mac normally. Every time you copy something, it shows up in t
107
107
  ├── ──────────────────
108
108
  ├── 📌 Pinned ►
109
109
  │ ├── "my-api-endpoint.com/v1..."
110
- └── "SELECT * FROM users..."
110
+ ├── "SELECT * FROM users..."
111
+ │ ├── ──────────────────
112
+ │ └── Clear Pinned
111
113
  ├── ──────────────────
112
114
  ├── "Meeting notes for Q3 plan..."
113
115
  ├── "https://github.com/example..."
@@ -76,7 +76,9 @@ Then just use your Mac normally. Every time you copy something, it shows up in t
76
76
  ├── ──────────────────
77
77
  ├── 📌 Pinned ►
78
78
  │ ├── "my-api-endpoint.com/v1..."
79
- └── "SELECT * FROM users..."
79
+ ├── "SELECT * FROM users..."
80
+ │ ├── ──────────────────
81
+ │ └── Clear Pinned
80
82
  ├── ──────────────────
81
83
  ├── "Meeting notes for Q3 plan..."
82
84
  ├── "https://github.com/example..."
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "clipsy"
7
- version = "1.9.0"
7
+ version = "1.9.1"
8
8
  description = "Lightweight clipboard history manager for macOS"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -1,2 +1,2 @@
1
- __version__ = "1.9.0"
1
+ __version__ = "1.9.1"
2
2
  __app_name__ = "Clipsy"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clipsy
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: Lightweight clipboard history manager for macOS
5
5
  Author-email: Brendan Conrad <brendan.conrad@gmail.com>
6
6
  License: MIT
@@ -107,7 +107,9 @@ Then just use your Mac normally. Every time you copy something, it shows up in t
107
107
  ├── ──────────────────
108
108
  ├── 📌 Pinned ►
109
109
  │ ├── "my-api-endpoint.com/v1..."
110
- └── "SELECT * FROM users..."
110
+ ├── "SELECT * FROM users..."
111
+ │ ├── ──────────────────
112
+ │ └── Clear Pinned
111
113
  ├── ──────────────────
112
114
  ├── "Meeting notes for Q3 plan..."
113
115
  ├── "https://github.com/example..."
@@ -5,7 +5,6 @@ from unittest.mock import MagicMock, patch
5
5
  import pytest
6
6
 
7
7
  from clipsy.__main__ import (
8
- PLIST_NAME,
9
8
  check_status,
10
9
  create_plist,
11
10
  get_clipsy_path,
@@ -157,3 +156,68 @@ class TestCLIParsing:
157
156
  with patch("sys.argv", ["clipsy", "run"]):
158
157
  main()
159
158
  mock_run.assert_called_once()
159
+
160
+
161
+ class TestRunApp:
162
+ @patch("clipsy.app.ClipsyApp")
163
+ @patch("clipsy.__main__.logging.StreamHandler")
164
+ @patch("clipsy.__main__.logging.FileHandler")
165
+ @patch("clipsy.__main__.logging.basicConfig")
166
+ @patch("clipsy.__main__.ensure_dirs")
167
+ def test_run_app_initializes_and_runs(
168
+ self, mock_dirs, mock_logging, mock_file_handler, mock_stream_handler, mock_app_class
169
+ ):
170
+ from clipsy.__main__ import run_app
171
+
172
+ mock_app = MagicMock()
173
+ mock_app_class.return_value = mock_app
174
+
175
+ run_app()
176
+
177
+ mock_dirs.assert_called_once()
178
+ mock_logging.assert_called_once()
179
+ mock_app_class.assert_called_once()
180
+ mock_app.run.assert_called_once()
181
+
182
+ @patch("clipsy.app.ClipsyApp")
183
+ @patch("clipsy.__main__.logging.StreamHandler")
184
+ @patch("clipsy.__main__.logging.FileHandler")
185
+ @patch("clipsy.__main__.logging.basicConfig")
186
+ @patch("clipsy.__main__.ensure_dirs")
187
+ def test_run_app_configures_logging(
188
+ self, mock_dirs, mock_logging, mock_file_handler, mock_stream_handler, mock_app_class
189
+ ):
190
+ from clipsy.__main__ import run_app
191
+
192
+ mock_app_class.return_value = MagicMock()
193
+
194
+ run_app()
195
+
196
+ call_kwargs = mock_logging.call_args[1]
197
+ assert call_kwargs["level"] == 20 # logging.INFO
198
+ assert "%(asctime)s" in call_kwargs["format"]
199
+ assert len(call_kwargs["handlers"]) == 2
200
+
201
+
202
+ class TestModuleEntryPoint:
203
+ def test_module_entry_point(self):
204
+ import importlib.util
205
+ import sys
206
+ from pathlib import Path
207
+
208
+ main_file = Path(__file__).parent.parent / "src" / "clipsy" / "__main__.py"
209
+
210
+ spec = importlib.util.spec_from_file_location("__main__", main_file)
211
+ module = importlib.util.module_from_spec(spec)
212
+
213
+ with patch("sys.argv", ["clipsy"]):
214
+ with patch.object(module, "install_launchagent", return_value=0, create=True):
215
+ old_modules = sys.modules.copy()
216
+ try:
217
+ sys.modules["__main__"] = module
218
+ spec.loader.exec_module(module)
219
+ except SystemExit as e:
220
+ assert e.code == 0
221
+ finally:
222
+ sys.modules.clear()
223
+ sys.modules.update(old_modules)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes