timingapp 0.1.0
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 +7 -0
- data/.rubocop.yml +21 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/README.md +89 -0
- data/Rakefile +10 -0
- data/lib/timingapp/database.rb +23 -0
- data/lib/timingapp/models/app_activity.rb +22 -0
- data/lib/timingapp/models/app_activity_with_strings.rb +8 -0
- data/lib/timingapp/models/application.rb +8 -0
- data/lib/timingapp/models/device.rb +8 -0
- data/lib/timingapp/models/event.rb +8 -0
- data/lib/timingapp/models/event_source.rb +8 -0
- data/lib/timingapp/models/event_source_task_activity.rb +8 -0
- data/lib/timingapp/models/filter.rb +8 -0
- data/lib/timingapp/models/integration.rb +8 -0
- data/lib/timingapp/models/integration_log_result.rb +8 -0
- data/lib/timingapp/models/path.rb +8 -0
- data/lib/timingapp/models/project.rb +8 -0
- data/lib/timingapp/models/schema_migration.rb +8 -0
- data/lib/timingapp/models/task_activity.rb +8 -0
- data/lib/timingapp/models/title.rb +8 -0
- data/lib/timingapp/timing_record.rb +15 -0
- data/lib/timingapp/version.rb +5 -0
- data/lib/timingapp.rb +17 -0
- data/schema.rb +172 -0
- data/sig/timingapp.rbs +3 -0
- metadata +112 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6a79de69ccb24a1e5c35a69207a219f1fe55b45ed4235b9754672d0092d7810d
|
|
4
|
+
data.tar.gz: 6c231d00516bf4fa9e6469e2dc845993ad36403fddd5fa791c8981b890b4cae6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a7534b16516f60eaa05099ce33fc7462692228d447e11dafd02cedc25f80a9ab2bfef349c1cead89c0ceab8da578c68a68bfcf4a2d4431c7915f55a23bacf24b
|
|
7
|
+
data.tar.gz: 8ed80e54333c6dcdcb8c313e36ebed9592ba35eb075b4f9c9bf121f7780a0b078c9b2a603f4c6b882bc0baacc8384300d5dc96889d822a403313fcbf303e023e
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 3.1
|
|
3
|
+
NewCops: enable
|
|
4
|
+
SuggestExtensions: false
|
|
5
|
+
|
|
6
|
+
Style/StringLiterals:
|
|
7
|
+
EnforcedStyle: double_quotes
|
|
8
|
+
|
|
9
|
+
Style/StringLiteralsInInterpolation:
|
|
10
|
+
EnforcedStyle: double_quotes
|
|
11
|
+
|
|
12
|
+
Style/Documentation:
|
|
13
|
+
Enabled: false
|
|
14
|
+
|
|
15
|
+
Naming/MethodName:
|
|
16
|
+
Exclude:
|
|
17
|
+
- lib/timingapp/models/**
|
|
18
|
+
|
|
19
|
+
Metrics/BlockLength:
|
|
20
|
+
Exclude:
|
|
21
|
+
- schema.rb
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.1
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[INSERT CONTACT METHOD].
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Timingapp
|
|
2
|
+
|
|
3
|
+
Ruby client for the database of the [Timing](https://timingapp.com) macOS application. It allows you to read the Timing SQLite database from your local disk and gives you an interface to query it's data.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the gem and add to the application's `Gemfile` by executing:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bundle add timingapp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
gem install timingapp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
To utilize the `timingapp` gem, `require` it in your project:
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require "timingapp"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Next, initiate database access using:
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
Timingapp.load!
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> [!NOTE]
|
|
34
|
+
> The `Timingapp.load!` method accepts an optional `path` parameter specifying the location of the SQLite database file.
|
|
35
|
+
> It defaults to `"~/Library/Application Support/info.eurocomp.Timing2/SQLite.db"`.
|
|
36
|
+
```ruby
|
|
37
|
+
Timingapp.load!("path/to/other/timingapp/database.db")
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
After successfully loading the database, you get access to all the models exposed by the gem. Currently, these models are read-only and are all instances of `ActiveRecord::Base`.
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
irb(main):001> Timingapp::AppActivity.all
|
|
44
|
+
# =>
|
|
45
|
+
[
|
|
46
|
+
#<Timingapp::AppActivity:0x000000012131c960 id: 3626854634616737793, localDeviceID: 3, startDate: 1688885798.0, ...>,
|
|
47
|
+
#<Timingapp::AppActivity:0x000000012131c820 id: 3626854892682944513, localDeviceID: 3, startDate: 1688885918.0, ...>,
|
|
48
|
+
#...
|
|
49
|
+
]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Consequently, you can leverage the ActiveRecord DSL for querying and traversing the models.
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
irb(main):002> activity = Timingapp::AppActivity.find(3686251181653903872)
|
|
56
|
+
=> #<Timingapp::AppActivity:0x000000037c09fa18 ...>
|
|
57
|
+
|
|
58
|
+
irb(main):003> activity.project
|
|
59
|
+
=> #<Timingapp::Project:0x000000038831d220
|
|
60
|
+
id: 3627848804833985024,
|
|
61
|
+
title: "StimulusReflex",
|
|
62
|
+
parentID: 3627712234116683008,
|
|
63
|
+
listPosition: 9,
|
|
64
|
+
isSample: false,
|
|
65
|
+
color: "#2D7FFFFF",
|
|
66
|
+
productivityScore: 1.0,
|
|
67
|
+
...
|
|
68
|
+
>
|
|
69
|
+
|
|
70
|
+
irb(main):004> activity.project.title
|
|
71
|
+
=> "StimulusReflex"
|
|
72
|
+
|
|
73
|
+
irb(main):005> activity.project.parent.title
|
|
74
|
+
=> "Open Source"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
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.
|
|
80
|
+
|
|
81
|
+
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).
|
|
82
|
+
|
|
83
|
+
## Contributing
|
|
84
|
+
|
|
85
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/timingapp-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/marcoroth/timingapp-ruby/blob/main/CODE_OF_CONDUCT.md).
|
|
86
|
+
|
|
87
|
+
## Code of Conduct
|
|
88
|
+
|
|
89
|
+
Everyone interacting in the Timingapp project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/marcoroth/timingapp-rubyblob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "singleton"
|
|
4
|
+
require "active_record"
|
|
5
|
+
require "sqlite3"
|
|
6
|
+
|
|
7
|
+
module Timingapp
|
|
8
|
+
class Database
|
|
9
|
+
include Singleton
|
|
10
|
+
|
|
11
|
+
attr_reader :path, :connection
|
|
12
|
+
|
|
13
|
+
def open(path)
|
|
14
|
+
@path = path
|
|
15
|
+
|
|
16
|
+
@connection = ActiveRecord::Base.establish_connection(
|
|
17
|
+
adapter: "sqlite3",
|
|
18
|
+
database: path,
|
|
19
|
+
flags: SQLite3::Constants::Open::READONLY
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Timingapp
|
|
4
|
+
class AppActivity < TimingRecord
|
|
5
|
+
self.table_name = "AppActivity"
|
|
6
|
+
self.primary_key = "id"
|
|
7
|
+
|
|
8
|
+
belongs_to :application, foreign_key: "applicationID"
|
|
9
|
+
belongs_to :localDevice, foreign_key: "localDeviceID", primary_key: "localID", class_name: "Timingapp::Device"
|
|
10
|
+
belongs_to :project, foreign_key: "projectID"
|
|
11
|
+
belongs_to :title, foreign_key: "titleID"
|
|
12
|
+
belongs_to :path, foreign_key: "pathID"
|
|
13
|
+
|
|
14
|
+
def startDate
|
|
15
|
+
Time.at(super)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def endDate
|
|
19
|
+
Time.at(super)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Timingapp
|
|
4
|
+
class TimingRecord < ActiveRecord::Base
|
|
5
|
+
self.abstract_class = true
|
|
6
|
+
|
|
7
|
+
def self.readonly?
|
|
8
|
+
true
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def before_destroy
|
|
12
|
+
raise ActiveRecord::ReadOnlyRecord, "Cannot delete a read-only record"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/timingapp.rb
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "zeitwerk"
|
|
4
|
+
|
|
5
|
+
loader = Zeitwerk::Loader.for_gem
|
|
6
|
+
loader.collapse("#{__dir__}/timingapp/models")
|
|
7
|
+
loader.setup
|
|
8
|
+
|
|
9
|
+
module Timingapp
|
|
10
|
+
DEFAULT_DATABASE_PATH = "#{Dir.home}/Library/Application Support/info.eurocomp.Timing2/SQLite.db".freeze
|
|
11
|
+
|
|
12
|
+
def self.load!(path = DEFAULT_DATABASE_PATH)
|
|
13
|
+
Database.instance.open(path)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
loader.eager_load
|
data/schema.rb
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
4
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
5
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
6
|
+
#
|
|
7
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
8
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
9
|
+
# be faster and is potentially less error prone than running all of your
|
|
10
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
11
|
+
# migrations use external dependencies or application code.
|
|
12
|
+
#
|
|
13
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
14
|
+
|
|
15
|
+
ActiveRecord::Schema[8.0].define(version: 202_301_121_209) do
|
|
16
|
+
# Could not dump table "AppActivity" because of following StandardError
|
|
17
|
+
# Unknown type 'REAL' for column 'startDate'
|
|
18
|
+
|
|
19
|
+
create_table "Application", force: :cascade do |t|
|
|
20
|
+
t.text "bundleIdentifier"
|
|
21
|
+
t.text "executable"
|
|
22
|
+
t.text "title"
|
|
23
|
+
t.text "property_bag"
|
|
24
|
+
t.index %w[bundleIdentifier executable title], name: "index_application_on_bundleidentifier_executable_title"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
create_table "Device", primary_key: "localID", force: :cascade do |t|
|
|
28
|
+
t.integer "globalID", null: false
|
|
29
|
+
t.binary "macAddress"
|
|
30
|
+
t.text "displayName"
|
|
31
|
+
t.text "property_bag"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Could not dump table "Event" because of following StandardError
|
|
35
|
+
# Unknown type 'REAL' for column 'start_date'
|
|
36
|
+
|
|
37
|
+
# Could not dump table "EventSource" because of following StandardError
|
|
38
|
+
# Unknown type 'BOOL' for column 'is_template'
|
|
39
|
+
|
|
40
|
+
# Could not dump table "EventSourceTaskActivity" because of following StandardError
|
|
41
|
+
# Unknown type 'REAL' for column 'deleted_at'
|
|
42
|
+
|
|
43
|
+
create_table "Filter", force: :cascade do |t|
|
|
44
|
+
t.integer "parentID"
|
|
45
|
+
t.integer "listPosition", null: false
|
|
46
|
+
t.text "title", null: false
|
|
47
|
+
t.binary "predicate"
|
|
48
|
+
t.boolean "isSample", default: false, null: false
|
|
49
|
+
t.text "property_bag"
|
|
50
|
+
t.index %w[parentID listPosition], name: "index_filter_on_parentid_listposition"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Could not dump table "Integration" because of following StandardError
|
|
54
|
+
# Unknown type 'REAL' for column 'enabled_at'
|
|
55
|
+
|
|
56
|
+
# Could not dump table "IntegrationProject" because of following StandardError
|
|
57
|
+
# Unknown type 'REAL' for column 'last_modified_origin'
|
|
58
|
+
|
|
59
|
+
create_table "Path", force: :cascade do |t|
|
|
60
|
+
t.text "stringValue", null: false
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Could not dump table "Project" because of following StandardError
|
|
64
|
+
# Unknown type 'REAL' for column 'productivityScore'
|
|
65
|
+
|
|
66
|
+
# Could not dump table "TaskActivity" because of following StandardError
|
|
67
|
+
# Unknown type 'REAL' for column 'startDate'
|
|
68
|
+
|
|
69
|
+
create_table "Title", force: :cascade do |t|
|
|
70
|
+
t.text "stringValue", null: false
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Could not dump table "integration_log_result" because of following StandardError
|
|
74
|
+
# Unknown type 'REAL' for column 'timestamp'
|
|
75
|
+
|
|
76
|
+
add_foreign_key "AppActivity", "Application", column: "applicationID"
|
|
77
|
+
add_foreign_key "AppActivity", "Device", column: "localDeviceID", primary_key: "localID"
|
|
78
|
+
add_foreign_key "AppActivity", "Path", column: "pathID"
|
|
79
|
+
add_foreign_key "AppActivity", "Project", column: "projectID", on_update: :cascade
|
|
80
|
+
add_foreign_key "AppActivity", "Title", column: "titleID"
|
|
81
|
+
add_foreign_key "Event", "Integration", column: "integration_id"
|
|
82
|
+
add_foreign_key "EventSource", "Integration", column: "integration_id"
|
|
83
|
+
add_foreign_key "Filter", "Filter", column: "parentID", on_update: :cascade
|
|
84
|
+
add_foreign_key "IntegrationProject", "Integration", column: "integration_id"
|
|
85
|
+
add_foreign_key "Project", "Project", column: "parentID", on_update: :cascade
|
|
86
|
+
add_foreign_key "TaskActivity", "Project", column: "projectID", on_update: :cascade
|
|
87
|
+
end
|
|
88
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
89
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
90
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
91
|
+
#
|
|
92
|
+
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
93
|
+
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
94
|
+
# be faster and is potentially less error prone than running all of your
|
|
95
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
96
|
+
# migrations use external dependencies or application code.
|
|
97
|
+
#
|
|
98
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
99
|
+
|
|
100
|
+
ActiveRecord::Schema[8.0].define(version: 202_301_121_209) do
|
|
101
|
+
# Could not dump table "AppActivity" because of following StandardError
|
|
102
|
+
# Unknown type 'REAL' for column 'startDate'
|
|
103
|
+
|
|
104
|
+
create_table "Application", force: :cascade do |t|
|
|
105
|
+
t.text "bundleIdentifier"
|
|
106
|
+
t.text "executable"
|
|
107
|
+
t.text "title"
|
|
108
|
+
t.text "property_bag"
|
|
109
|
+
t.index %w[bundleIdentifier executable title], name: "index_application_on_bundleidentifier_executable_title"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
create_table "Device", primary_key: "localID", force: :cascade do |t|
|
|
113
|
+
t.integer "globalID", null: false
|
|
114
|
+
t.binary "macAddress"
|
|
115
|
+
t.text "displayName"
|
|
116
|
+
t.text "property_bag"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Could not dump table "Event" because of following StandardError
|
|
120
|
+
# Unknown type 'REAL' for column 'start_date'
|
|
121
|
+
|
|
122
|
+
# Could not dump table "EventSource" because of following StandardError
|
|
123
|
+
# Unknown type 'BOOL' for column 'is_template'
|
|
124
|
+
|
|
125
|
+
# Could not dump table "EventSourceTaskActivity" because of following StandardError
|
|
126
|
+
# Unknown type 'REAL' for column 'deleted_at'
|
|
127
|
+
|
|
128
|
+
create_table "Filter", force: :cascade do |t|
|
|
129
|
+
t.integer "parentID"
|
|
130
|
+
t.integer "listPosition", null: false
|
|
131
|
+
t.text "title", null: false
|
|
132
|
+
t.binary "predicate"
|
|
133
|
+
t.boolean "isSample", default: false, null: false
|
|
134
|
+
t.text "property_bag"
|
|
135
|
+
t.index %w[parentID listPosition], name: "index_filter_on_parentid_listposition"
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Could not dump table "Integration" because of following StandardError
|
|
139
|
+
# Unknown type 'REAL' for column 'enabled_at'
|
|
140
|
+
|
|
141
|
+
# Could not dump table "IntegrationProject" because of following StandardError
|
|
142
|
+
# Unknown type 'REAL' for column 'last_modified_origin'
|
|
143
|
+
|
|
144
|
+
create_table "Path", force: :cascade do |t|
|
|
145
|
+
t.text "stringValue", null: false
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Could not dump table "Project" because of following StandardError
|
|
149
|
+
# Unknown type 'REAL' for column 'productivityScore'
|
|
150
|
+
|
|
151
|
+
# Could not dump table "TaskActivity" because of following StandardError
|
|
152
|
+
# Unknown type 'REAL' for column 'startDate'
|
|
153
|
+
|
|
154
|
+
create_table "Title", force: :cascade do |t|
|
|
155
|
+
t.text "stringValue", null: false
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Could not dump table "integration_log_result" because of following StandardError
|
|
159
|
+
# Unknown type 'REAL' for column 'timestamp'
|
|
160
|
+
|
|
161
|
+
add_foreign_key "AppActivity", "Application", column: "applicationID"
|
|
162
|
+
add_foreign_key "AppActivity", "Device", column: "localDeviceID", primary_key: "localID"
|
|
163
|
+
add_foreign_key "AppActivity", "Path", column: "pathID"
|
|
164
|
+
add_foreign_key "AppActivity", "Project", column: "projectID", on_update: :cascade
|
|
165
|
+
add_foreign_key "AppActivity", "Title", column: "titleID"
|
|
166
|
+
add_foreign_key "Event", "Integration", column: "integration_id"
|
|
167
|
+
add_foreign_key "EventSource", "Integration", column: "integration_id"
|
|
168
|
+
add_foreign_key "Filter", "Filter", column: "parentID", on_update: :cascade
|
|
169
|
+
add_foreign_key "IntegrationProject", "Integration", column: "integration_id"
|
|
170
|
+
add_foreign_key "Project", "Project", column: "parentID", on_update: :cascade
|
|
171
|
+
add_foreign_key "TaskActivity", "Project", column: "projectID", on_update: :cascade
|
|
172
|
+
end
|
data/sig/timingapp.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: timingapp
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Marco Roth
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2025-01-26 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: activerecord
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: sqlite3
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: zeitwerk
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
54
|
+
description: Ruby client for the database of the Timingapp.com macOS application.
|
|
55
|
+
email:
|
|
56
|
+
- marco.roth@intergga.ch
|
|
57
|
+
executables: []
|
|
58
|
+
extensions: []
|
|
59
|
+
extra_rdoc_files: []
|
|
60
|
+
files:
|
|
61
|
+
- ".rubocop.yml"
|
|
62
|
+
- ".ruby-version"
|
|
63
|
+
- CHANGELOG.md
|
|
64
|
+
- CODE_OF_CONDUCT.md
|
|
65
|
+
- README.md
|
|
66
|
+
- Rakefile
|
|
67
|
+
- lib/timingapp.rb
|
|
68
|
+
- lib/timingapp/database.rb
|
|
69
|
+
- lib/timingapp/models/app_activity.rb
|
|
70
|
+
- lib/timingapp/models/app_activity_with_strings.rb
|
|
71
|
+
- lib/timingapp/models/application.rb
|
|
72
|
+
- lib/timingapp/models/device.rb
|
|
73
|
+
- lib/timingapp/models/event.rb
|
|
74
|
+
- lib/timingapp/models/event_source.rb
|
|
75
|
+
- lib/timingapp/models/event_source_task_activity.rb
|
|
76
|
+
- lib/timingapp/models/filter.rb
|
|
77
|
+
- lib/timingapp/models/integration.rb
|
|
78
|
+
- lib/timingapp/models/integration_log_result.rb
|
|
79
|
+
- lib/timingapp/models/path.rb
|
|
80
|
+
- lib/timingapp/models/project.rb
|
|
81
|
+
- lib/timingapp/models/schema_migration.rb
|
|
82
|
+
- lib/timingapp/models/task_activity.rb
|
|
83
|
+
- lib/timingapp/models/title.rb
|
|
84
|
+
- lib/timingapp/timing_record.rb
|
|
85
|
+
- lib/timingapp/version.rb
|
|
86
|
+
- schema.rb
|
|
87
|
+
- sig/timingapp.rbs
|
|
88
|
+
homepage: https://github.com/marcoroth/timingapp-ruby
|
|
89
|
+
licenses: []
|
|
90
|
+
metadata:
|
|
91
|
+
homepage_uri: https://github.com/marcoroth/timingapp-ruby
|
|
92
|
+
source_code_uri: https://github.com/marcoroth/timingapp-ruby
|
|
93
|
+
changelog_uri: https://github.com/marcoroth/timingapp-ruby/releases
|
|
94
|
+
rubygems_mfa_required: 'true'
|
|
95
|
+
rdoc_options: []
|
|
96
|
+
require_paths:
|
|
97
|
+
- lib
|
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: 3.1.0
|
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '0'
|
|
108
|
+
requirements: []
|
|
109
|
+
rubygems_version: 3.6.2
|
|
110
|
+
specification_version: 4
|
|
111
|
+
summary: Ruby client for the database of the Timingapp.com macOS application.
|
|
112
|
+
test_files: []
|