trello_freestyler 0.2.1 → 0.3.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 +4 -4
- data/.github/workflows/gem-push.yml +1 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +21 -1
- data/lib/trello_freestyler/cli.rb +2 -8
- data/lib/trello_freestyler/options.rb +31 -0
- data/lib/trello_freestyler/version.rb +1 -1
- data/trello_freestyler.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa39c91fbd96b7440ece2c909c958b796db196f72c825c0d43d5abd851306d67
|
4
|
+
data.tar.gz: 872c3dd1f2096e9da023fd677c6dfd4aa6f8b6d175090cb195a22e01ec3f1e55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391aac9234565350cccdc0ab422dd1d83fad271809fe3b8c37171e4e9d1a33ff7d9599b1f83f28d2c580cfb89c012be818d002235c08cb0b3846fe36a6b0c48c
|
7
|
+
data.tar.gz: 26f39e427510cd629074f52145591efe5ff2ad965bf3e9ca3142b586d94e5555ce58142447371a84a99df7315015746af4277c112e9e5ad5aa13b870de0a601d
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,27 @@ Or install it yourself as:
|
|
30
30
|
## Usage
|
31
31
|
|
32
32
|
```bash
|
33
|
-
|
33
|
+
trello_freestyler --key <TRELLO_KEY> --token <TRELLO_TOKEN> --board_id <TRELLO_BOARD_ID>
|
34
|
+
```
|
35
|
+
|
36
|
+
or
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
require 'trello_freestyler'
|
40
|
+
|
41
|
+
options = TrelloFreestyler::Options.new(
|
42
|
+
key = <YOUR TRELLO DEVELOPER TOKEN>,
|
43
|
+
token = <YOUR TRELLO TOKEN>,
|
44
|
+
url = nil, # use default trello api url
|
45
|
+
board_id = <YOUR TRELLO BOARD ID>,
|
46
|
+
action_types = nil, # get default trello actions
|
47
|
+
output = nil, # use default output folder .output
|
48
|
+
timezone = nil # use default timezone for data stamping folder
|
49
|
+
)
|
50
|
+
|
51
|
+
# Will get card and action trello data and export it to options.output
|
52
|
+
TrelloFreestyler::Main.dump(options)
|
53
|
+
|
34
54
|
```
|
35
55
|
|
36
56
|
## Output
|
@@ -2,20 +2,14 @@
|
|
2
2
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'tzinfo'
|
5
|
+
require_relative 'options'
|
5
6
|
|
6
7
|
module TrelloFreestyler
|
7
8
|
class Cli
|
8
|
-
Options = Struct.new(:key, :token, :url, :board_id, :action_types, :output, :timezone)
|
9
9
|
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Layout/LineLength
|
10
10
|
def self.parse(options)
|
11
11
|
# DEFAULTS
|
12
|
-
args = Options.new(nil,
|
13
|
-
nil,
|
14
|
-
'https://api.trello.com/1',
|
15
|
-
nil,
|
16
|
-
'addMemberToCard,removeMemberFromCard,createCard,moveCardFromBoard,moveCardToBoard,updateCard',
|
17
|
-
'.output',
|
18
|
-
TZInfo::Timezone.get('Australia/Melbourne'))
|
12
|
+
args = Options.new(nil, nil, nil, nil, nil, nil, nil)
|
19
13
|
|
20
14
|
opt_parser = OptionParser.new do |opts|
|
21
15
|
opts.banner = 'Usage: trello_freestyler -k <KEY> -t <TOKEN> -b <BOARD_ID>'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tzinfo'
|
4
|
+
module TrelloFreestyler
|
5
|
+
class Options
|
6
|
+
attr_accessor :key, :token, :url, :board_id, :action_types, :output, :timezone
|
7
|
+
|
8
|
+
# rubocop:disable Metrics/ParameterLists
|
9
|
+
def initialize(key, token, url, board_id, action_types, output, timezone)
|
10
|
+
@key = key
|
11
|
+
@token = token
|
12
|
+
@url = url || 'https://api.trello.com/1'
|
13
|
+
@board_id = board_id
|
14
|
+
@action_types = action_types ||
|
15
|
+
'addMemberToCard,removeMemberFromCard,createCard,moveCardFromBoard,moveCardToBoard,updateCard'
|
16
|
+
@output = output || '.output'
|
17
|
+
@timezone = TZInfo::Timezone.get((timezone || 'Australia/Melbourne'))
|
18
|
+
end
|
19
|
+
# rubocop:enable Metrics/ParameterLists
|
20
|
+
|
21
|
+
def ==(other)
|
22
|
+
key == other.key &&
|
23
|
+
token == other.token &&
|
24
|
+
url == other.url &&
|
25
|
+
board_id == other.board_id &&
|
26
|
+
action_types == other.action_types &&
|
27
|
+
output == other.output &&
|
28
|
+
timezone == other.timezone
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/trello_freestyler.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = 'Uses the Trello API to dump json line files for a Trello board and its actions.'
|
12
12
|
spec.description = 'Built so trello data can be easily ingested into BigQuery.'
|
13
|
-
spec.homepage = 'https://
|
13
|
+
spec.homepage = 'https://github.com/juzham/trello_freestyler'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trello_freestyler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Hamman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- ".gitignore"
|
135
135
|
- ".rspec"
|
136
136
|
- ".rubocop.yml"
|
137
|
+
- CHANGELOG.md
|
137
138
|
- CODE_OF_CONDUCT.md
|
138
139
|
- Gemfile
|
139
140
|
- Gemfile.lock
|
@@ -153,14 +154,15 @@ files:
|
|
153
154
|
- lib/trello_freestyler/cli.rb
|
154
155
|
- lib/trello_freestyler/client.rb
|
155
156
|
- lib/trello_freestyler/main.rb
|
157
|
+
- lib/trello_freestyler/options.rb
|
156
158
|
- lib/trello_freestyler/utils/hash.rb
|
157
159
|
- lib/trello_freestyler/version.rb
|
158
160
|
- trello_freestyler.gemspec
|
159
|
-
homepage: https://
|
161
|
+
homepage: https://github.com/juzham/trello_freestyler
|
160
162
|
licenses:
|
161
163
|
- MIT
|
162
164
|
metadata:
|
163
|
-
homepage_uri: https://
|
165
|
+
homepage_uri: https://github.com/juzham/trello_freestyler
|
164
166
|
source_code_uri: https://github.com/juzham/trello_freestyler
|
165
167
|
changelog_uri: https://github.com/juzham/trello_freestyler/CHANGELOG.md
|
166
168
|
post_install_message:
|