togglv8-limitusus 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +22 -6
- data/CHANGELOG.md +3 -1
- data/README.md +3 -3
- data/lib/togglv8/connection.rb +1 -1
- data/lib/togglv8/version.rb +1 -1
- data/spec/lib/togglv8/dashboard_spec.rb +1 -1
- data/spec/lib/togglv8/time_entries_spec.rb +6 -5
- data/spec/lib/togglv8_spec.rb +1 -1
- data/spec/spec_helper.rb +10 -5
- data/togglv8.gemspec +3 -2
- metadata +20 -7
- data/.coveralls.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3cd93141fc6679bfdaa42539f8fb599201ef2a563db63add2e15573e200f60
|
4
|
+
data.tar.gz: 14fc27128ff45d0f0f32c9f90e49bfd03744493d3fd0555535c8551e3885a90a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 998090e0d6143d424fab035be808bb511518664b267b22e4527bd925a6457f05596df27a907a995edefa4c8f0142a1c6c7d510caae459ce691393875f73a0f56
|
7
|
+
data.tar.gz: bb1a17e2e0aa158d7f3a543af6a44fa80f6a73f941c1d015243b82a23ca88e040f67a688acd67cdc0f6eb53d2ff35c843ef8d34880b4a8fafad5ce56c0fbcd4b
|
data/.travis.yml
CHANGED
@@ -1,16 +1,32 @@
|
|
1
|
+
os: linux
|
2
|
+
arch: amd64
|
3
|
+
dist: focal
|
4
|
+
|
1
5
|
language: ruby
|
2
6
|
rvm:
|
3
7
|
- ruby-head
|
8
|
+
- 3.0.1
|
9
|
+
- 2.7.3
|
4
10
|
- 2.4.0
|
5
|
-
|
6
|
-
- 2.2.6
|
7
|
-
- 2.1.10
|
8
|
-
- 2.0.0-p648
|
9
|
-
script: bundle exec rspec --format documentation
|
11
|
+
script: bundle exec rspec
|
10
12
|
cache: bundler
|
11
13
|
branches:
|
12
14
|
only:
|
13
|
-
-
|
15
|
+
- main
|
14
16
|
addons:
|
15
17
|
code_climate:
|
16
18
|
repo_token: eb44970f9efc497fb68c6ec1ce051dea530776b6a5bbe75e57734625f761ac86
|
19
|
+
env:
|
20
|
+
global:
|
21
|
+
- TOGGL_EMAIL=togglv8-limitusus@mailinator.com
|
22
|
+
- TOGGL_USERNAME=Togglv8-Limitusus
|
23
|
+
- TOGGL_USER_ID=6992251
|
24
|
+
- OTHER_EMAIL=togglv8-limitusus2@mailinator.com
|
25
|
+
- OTHER_USERNAME=Togglv8-Limitusus2
|
26
|
+
- OTHER_USER_ID=6992583
|
27
|
+
# COVERALLS_TOKEN
|
28
|
+
- secure: "pypEjXOspyxJOk0g92omIUI58KH7UgFj4Sl27QjFIUcCRRmTezXR6srxJeVFtxJnFq1l/Jy0YOlE1RhMrPihqnclL1EYiO8NNquSvrkgA3P6lFvE0yIngYOxCY2G0SDRgPSnNNRZFndw7xw8rGAYbQU+M8FNTX70ekMLEBAVaX29nqh3eZhtYkwXGthJUsrTro1oZh640xZzwbWDUdjwdBUDe+gyG2qPy7xEKU97e/Ej1cFueBXK0dXsMLn2132zr0ahBVwUT10RNSuAUNxqq1jOT0yR2Nv5/N9ZfmUQF3jsjBHwRaQKm/rKpl8BQ6+V4xtC74cROtxecJvMLvjqibErkcaYtUlDi33m3WZ5zFv6XT3OIjzmAEo7W6wtI+/AcdOZlr8ysBAlRA0lZaqn57nkQK+NxI0k4uiyP6yCyoy5KNOgiIbqu0hYzQrMqZTXRxYiWbaWTB+krH9L2ZV0W7WFN4pRPzIML1WDij+lSYfoMBZADh25hEBhxmT9EhQjYezH6vfsFFyi+UEEz+ys9bwZIv9kWrbr7Vt76JIrJdK7jhLFSWigG+WaIro8qFvzcRCpxDtqFjFbEKZ6BYQu4FhT1aW0mC15oZR1ddci4ycP7PiC+dRBunyG+X7d/fQCHQTYke9ULScddxwQGAwrb8zimfU6kg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I5KbLKjuBew14Vx5dWJj8AzlklphyNivzy8hDlql9/eXq6Gwwv38u94mX+okYEuPmbU69ZlZvVVfNespIt1lMlg0WRsna04IVA4fL7hPIuB74wP7VmKP9m8rI34mFq7mBNS6JBpJLyU3TbJ5FRSkHPuZ0CnqTyZRSQ/1+9HaAO9MyL+ERg8I+IS2kVXehjU6TpBEREoAw8Ez8D7r2vsigmoyxG43ObJnvRJoHCASULiSVSLqHazoXC6lGcCIL4gKTJ/0PK/5Qs5JUV+K31bpZ/bAAOH3mciFVXakpDB7g8lS2S4N1ZSKmKI2pfn+edux90EAz947WV1Js5anxkQ6qzoH01ROzoru1TAALTIKmDH2V0+ICdeZY="
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,8 @@ Version numbers are meant to adhere to [Semantic Versioning](http://semver.org/)
|
|
9
9
|
|
10
10
|
## [Unreleased]
|
11
11
|
|
12
|
+
* Use the newer `faraday`.
|
13
|
+
|
12
14
|
|
13
15
|
## [1.2.1] - 2016-07-25
|
14
16
|
### Changed
|
@@ -98,4 +100,4 @@ Version numbers are meant to adhere to [Semantic Versioning](http://semver.org/)
|
|
98
100
|
[1.0.2]: https://github.com/kanet77/togglv8/compare/v1.0.1...v1.0.2
|
99
101
|
[1.0.1]: https://github.com/kanet77/togglv8/compare/v1.0.0...v1.0.1
|
100
102
|
[1.0.0]: https://github.com/kanet77/togglv8/compare/v0.2.0...v1.0.0
|
101
|
-
[0.2.0]: https://github.com/kanet77/togglv8/compare/a1d5cc5...v0.2.0
|
103
|
+
[0.2.0]: https://github.com/kanet77/togglv8/compare/a1d5cc5...v0.2.0
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# Toggl API v8
|
3
3
|
|
4
|
-
[![Gem Version](https://badge.fury.io/rb/togglv8.svg)](https://badge.fury.io/rb/togglv8) [![Build Status](https://
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/togglv8-limitusus.svg)](https://badge.fury.io/rb/togglv8-limitusus) [![Build Status](https://travis-ci.com/limitusus/togglv8.svg?branch=main)](https://travis-ci.com/limitusus/togglv8) [![Coverage Status](https://coveralls.io/repos/github/limitusus/togglv8/badge.svg?branch=main)](https://coveralls.io/github/limitusus/togglv8?branch=main) [![Code Climate](https://codeclimate.com/github/kanet77/togglv8/badges/gpa.svg)](https://codeclimate.com/github/kanet77/togglv8)
|
5
5
|
|
6
6
|
[Toggl](http://www.toggl.com) is a time tracking tool.
|
7
7
|
|
@@ -18,7 +18,7 @@ See [CHANGELOG](CHANGELOG.md) for a summary of notable changes in each version.
|
|
18
18
|
Add this line to your application's Gemfile:
|
19
19
|
|
20
20
|
```ruby
|
21
|
-
gem 'togglv8'
|
21
|
+
gem 'togglv8-limitusus'
|
22
22
|
```
|
23
23
|
|
24
24
|
And then execute:
|
@@ -27,7 +27,7 @@ And then execute:
|
|
27
27
|
|
28
28
|
Or install it yourself as:
|
29
29
|
|
30
|
-
$ gem install togglv8
|
30
|
+
$ gem install togglv8-limitusus
|
31
31
|
|
32
32
|
## Initialization
|
33
33
|
|
data/lib/togglv8/connection.rb
CHANGED
@@ -21,7 +21,7 @@ module TogglV8
|
|
21
21
|
faraday.response :logger, Logger.new('faraday.log') if opts[:log]
|
22
22
|
faraday.adapter Faraday.default_adapter
|
23
23
|
faraday.headers = { "Content-Type" => "application/json" }
|
24
|
-
faraday.
|
24
|
+
faraday.request :authorization, :basic, username, password
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
data/lib/togglv8/version.rb
CHANGED
@@ -41,6 +41,7 @@ describe 'Time Entries' do
|
|
41
41
|
|
42
42
|
it 'gets a time entry' do
|
43
43
|
retrieved_time_entry = @toggl.get_time_entry(@time_entry['id'])
|
44
|
+
retrieved_time_entry.delete('guid')
|
44
45
|
|
45
46
|
['start', 'stop'].each do |key|
|
46
47
|
expect(retrieved_time_entry[key]).to eq_ts @time_entry[key]
|
@@ -70,8 +71,7 @@ describe 'Time Entries' do
|
|
70
71
|
deleted_time_entry = @toggl.delete_time_entry(@time_entry['id'])
|
71
72
|
expect(deleted_time_entry).to eq "[#{ @time_entry['id'] }]"
|
72
73
|
|
73
|
-
|
74
|
-
expect(zombie_time_entry.has_key?('server_deleted_at')).to eq true
|
74
|
+
expect { @toggl.get_time_entry(@time_entry['id']) }.to raise_error(RuntimeError, 'HTTP Status: 404')
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
@@ -111,6 +111,7 @@ describe 'Time Entries' do
|
|
111
111
|
|
112
112
|
it 'gets a time entry' do
|
113
113
|
retrieved_time_entry = @toggl.get_time_entry(@time_entry['id'])
|
114
|
+
retrieved_time_entry.delete('guid')
|
114
115
|
|
115
116
|
['start', 'stop'].each do |key|
|
116
117
|
expect(retrieved_time_entry[key]).to eq_ts @time_entry[key]
|
@@ -140,8 +141,7 @@ describe 'Time Entries' do
|
|
140
141
|
deleted_time_entry = @toggl.delete_time_entry(@time_entry['id'])
|
141
142
|
expect(deleted_time_entry).to eq "[#{ @time_entry['id'] }]"
|
142
143
|
|
143
|
-
|
144
|
-
expect(zombie_time_entry.has_key?('server_deleted_at')).to eq true
|
144
|
+
expect { @toggl.get_time_entry(@time_entry['id']) }.to raise_error(RuntimeError, 'HTTP Status: 404')
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
@@ -209,6 +209,7 @@ describe 'Time Entries' do
|
|
209
209
|
time_entry_current = @toggl.get_current_time_entry
|
210
210
|
# get current time entry by id
|
211
211
|
time_entry_by_id = @toggl.get_time_entry(running_time_entry['id'])
|
212
|
+
time_entry_by_id.delete('guid')
|
212
213
|
|
213
214
|
# compare two methods of getting current time entry
|
214
215
|
expect(time_entry_current).to eq time_entry_by_id
|
@@ -422,4 +423,4 @@ describe 'Time Entries' do
|
|
422
423
|
DateTime.parse(actual) == DateTime.parse(expected)
|
423
424
|
end
|
424
425
|
end
|
425
|
-
end
|
426
|
+
end
|
data/spec/lib/togglv8_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "simplecov"
|
2
2
|
require "coveralls"
|
3
|
+
require 'pry'
|
3
4
|
|
4
5
|
SimpleCov.formatters = [
|
5
6
|
SimpleCov::Formatter::HTMLFormatter,
|
@@ -16,6 +17,10 @@ RSpec.configure do |config|
|
|
16
17
|
config.filter_run_excluding :pro_account unless ENV['TOGGL_PRO_ACCOUNT']
|
17
18
|
config.run_all_when_everything_filtered = true
|
18
19
|
|
20
|
+
config.color = true
|
21
|
+
config.tty = true
|
22
|
+
config.formatter = :documentation
|
23
|
+
|
19
24
|
config.order = :random
|
20
25
|
Kernel.srand config.seed
|
21
26
|
|
@@ -75,11 +80,11 @@ def file_is_xls(filename)
|
|
75
80
|
end
|
76
81
|
|
77
82
|
class Testing
|
78
|
-
API_TOKEN = ENV['API_TOKEN'] || '4880adbe1bee9a241fa08070d33bd49f'
|
79
|
-
EMAIL = ENV['EMAIL']
|
80
|
-
USERNAME = ENV['USERNAME']
|
81
|
-
PASSWORD = ENV['PASSWORD']
|
82
|
-
USER_ID = (ENV['USER_ID']
|
83
|
+
API_TOKEN = ENV['TOGGL_API_TOKEN'] || ENV['API_TOKEN'] || '4880adbe1bee9a241fa08070d33bd49f'
|
84
|
+
EMAIL = ENV['TOGGL_EMAIL'] || ENV['EMAIL'] || 'togglv8@mailinator.com'
|
85
|
+
USERNAME = ENV['TOGGL_USERNAME'] || ENV['USERNAME'] || 'togglv8'
|
86
|
+
PASSWORD = ENV['TOGGL_PASSWORD'] || ENV['PASSWORD'] || 'togglv8'
|
87
|
+
USER_ID = (ENV['TOGGL_USER_ID'] || ENV['USER_ID'] || 1820939).to_i
|
83
88
|
|
84
89
|
OTHER_EMAIL = ENV['OTHER_EMAIL'] || 'pr5zwux59w@snkmail.com'
|
85
90
|
OTHER_USERNAME = ENV['OTHER_USERNAME'] || 'Pr5zwux59w'
|
data/togglv8.gemspec
CHANGED
@@ -24,10 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rspec"
|
25
25
|
spec.add_development_dependency "rspec-mocks"
|
26
26
|
spec.add_development_dependency "fivemat"
|
27
|
-
spec.add_development_dependency "
|
27
|
+
spec.add_development_dependency "coveralls_reborn"
|
28
|
+
spec.add_development_dependency "pry"
|
28
29
|
# spec.add_development_dependency "awesome_print"
|
29
30
|
|
30
31
|
spec.add_dependency "logger"
|
31
|
-
spec.add_dependency "faraday"
|
32
|
+
spec.add_dependency "faraday", '>= 2.0.0'
|
32
33
|
spec.add_dependency "oj"
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togglv8-limitusus
|
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
|
- Tomoya Kabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,7 +81,21 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: coveralls_reborn
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
@@ -114,14 +128,14 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
131
|
+
version: 2.0.0
|
118
132
|
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
138
|
+
version: 2.0.0
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: oj
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +158,6 @@ extensions: []
|
|
144
158
|
extra_rdoc_files: []
|
145
159
|
files:
|
146
160
|
- ".codeclimate.yml"
|
147
|
-
- ".coveralls.yml"
|
148
161
|
- ".gitignore"
|
149
162
|
- ".rdoc_options"
|
150
163
|
- ".rspec"
|
@@ -203,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
216
|
version: '0'
|
204
217
|
requirements:
|
205
218
|
- A Toggl account (https://toggl.com/)
|
206
|
-
rubygems_version: 3.1.
|
219
|
+
rubygems_version: 3.1.2
|
207
220
|
signing_key:
|
208
221
|
specification_version: 4
|
209
222
|
summary: Toggl v8 API wrapper (See https://github.com/toggl/toggl_api_docs), originally
|
data/.coveralls.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
repo_token: D1ZrNoAoVUgrr8B1KvO8ky8jUpFftVJfH
|