trello_freestyler 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8902c6973538966245fa46056c6fdd589f689ce8c299c808dfe723e3d9d5fc3a
4
- data.tar.gz: f5f4bf76f03de14db290a7137d11a468bde66fdecbc090d62141afcecb590413
3
+ metadata.gz: aa39c91fbd96b7440ece2c909c958b796db196f72c825c0d43d5abd851306d67
4
+ data.tar.gz: 872c3dd1f2096e9da023fd677c6dfd4aa6f8b6d175090cb195a22e01ec3f1e55
5
5
  SHA512:
6
- metadata.gz: b495caba834f3f2b8cd638e1c8c91184b8355673848dddf224be9777c380ee9a3cafbd283c1dfcc3939c1456ce13420eb07258fe42ce47c93a71040880f24481
7
- data.tar.gz: 48f689e7b8707c98818e67d8881de55485734c70aebf2d5cda9aa5b72f83c985ae3a82fe73454a85da9028d08dad074b7aa8496580009ce0b684bbf873bd59ee
6
+ metadata.gz: 391aac9234565350cccdc0ab422dd1d83fad271809fe3b8c37171e4e9d1a33ff7d9599b1f83f28d2c580cfb89c012be818d002235c08cb0b3846fe36a6b0c48c
7
+ data.tar.gz: 26f39e427510cd629074f52145591efe5ff2ad965bf3e9ca3142b586d94e5555ce58142447371a84a99df7315015746af4277c112e9e5ad5aa13b870de0a601d
@@ -20,6 +20,7 @@ jobs:
20
20
  build:
21
21
  needs: house-keeping
22
22
  name: Build + Publish Gem
23
+ if: "!contains(github.event.head_commit.message, 'skip ci')"
23
24
  runs-on: ubuntu-latest
24
25
  steps:
25
26
  - name: Check out repository code
data/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
 
13
13
  .output
14
14
  trello_freestyle*.gem
15
+ test_run.sh
16
+ test_run.rb
@@ -0,0 +1,5 @@
1
+
2
+ ## Version 0.3.0
3
+
4
+ - moved `TrelloFreestyler::Cli::Options` to `TrelloFreestyler::Options`
5
+ - added instructions on how to use without the cli
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trello_freestyler (0.2.1)
4
+ trello_freestyler (0.3.0)
5
5
  rest-client (~> 2.1)
6
6
  tty-spinner (~> 0.9)
7
7
  tzinfo (~> 2.0)
data/README.md CHANGED
@@ -30,7 +30,27 @@ Or install it yourself as:
30
30
  ## Usage
31
31
 
32
32
  ```bash
33
- trello_freestyler --key <TRELLO_KEY> --token <TRELLO_TOKEN> --board_id <TRELLO_BOARD_ID>
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TrelloFreestyler
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -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://rubygems.org/gems/trello_freestyler'
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.2.1
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-22 00:00:00.000000000 Z
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://rubygems.org/gems/trello_freestyler
161
+ homepage: https://github.com/juzham/trello_freestyler
160
162
  licenses:
161
163
  - MIT
162
164
  metadata:
163
- homepage_uri: https://rubygems.org/gems/trello_freestyler
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: