tumugi-plugin-google_drive 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47062dacaeadccdc1a602bc81aa2cc4ca7291c59
4
- data.tar.gz: 25690c27283aadbd29843ddd2bb6dcc59e3edbe4
3
+ metadata.gz: 813453c81708108b539ff741428030f1d4c431b0
4
+ data.tar.gz: eab95dcf2f132a73ce6af6318a74df13f4d3afc1
5
5
  SHA512:
6
- metadata.gz: f5b8763001af3a4c6cc5a60872aed270cac5108695627be3d45057961910b4bb12800d9ba95d8dcc20c11fe98db67ff7201bbbabf550255f0991f906bf7fec16
7
- data.tar.gz: 27706dd1077923a595ca29c28ae1030adc519a300c24862fa354204c828c45af2cc388ac0c9313061868b7eda7fcf2487674553542fb389e73d5993dc4909fd7
6
+ metadata.gz: d1e9252df8992ed4ec76150d8a3e1a6c3bf4ba59ca0bca17579daa2bab84e61b9e5bd81fa01e22455318f07b8b830710f1434f95c1c70be578ad5f60a7273fe6
7
+ data.tar.gz: ce205a1b015a4852280cde6feb9600f9e11383c8340e7d70da12740afcc54e4a832efee61942fa0936e0f54bd40bbf638d4ea5680240fa8894adc7e147d960c3
data/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Change Log
2
+
3
+ ## [v0.2.0](https://github.com/tumugi/tumugi-plugin-google_drive/tree/v0.2.0) (2016-07-19)
4
+ [Full Changelog](https://github.com/tumugi/tumugi-plugin-google_drive/compare/v0.1.0...v0.2.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Update README [\#10](https://github.com/tumugi/tumugi-plugin-google_drive/pull/10) ([hakobera](https://github.com/hakobera))
9
+ - Update tumugi to 0.6 [\#9](https://github.com/tumugi/tumugi-plugin-google_drive/pull/9) ([hakobera](https://github.com/hakobera))
10
+
11
+ ## [v0.1.0](https://github.com/tumugi/tumugi-plugin-google_drive/tree/v0.1.0) (2016-06-06)
12
+ **Implemented enhancements:**
13
+
14
+ - Add task and target for Google Drive folder [\#5](https://github.com/tumugi/tumugi-plugin-google_drive/pull/5) ([hakobera](https://github.com/hakobera))
15
+ - Inherit FileSystemTarget [\#3](https://github.com/tumugi/tumugi-plugin-google_drive/pull/3) ([hakobera](https://github.com/hakobera))
16
+
17
+ **Fixed bugs:**
18
+
19
+ - Fix google drive folder task [\#6](https://github.com/tumugi/tumugi-plugin-google_drive/pull/6) ([hakobera](https://github.com/hakobera))
20
+ - Fix parents param of GoogleDriveFileTarget does not work [\#4](https://github.com/tumugi/tumugi-plugin-google_drive/pull/4) ([hakobera](https://github.com/hakobera))
21
+
22
+ **Closed issues:**
23
+
24
+ - Release 0.1.0 [\#2](https://github.com/tumugi/tumugi-plugin-google_drive/issues/2)
25
+
26
+ **Merged pull requests:**
27
+
28
+ - First implementation [\#1](https://github.com/tumugi/tumugi-plugin-google_drive/pull/1) ([hakobera](https://github.com/hakobera))
29
+
30
+
31
+
32
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  [![Build Status](https://travis-ci.org/tumugi/tumugi-plugin-google_drive.svg?branch=master)](https://travis-ci.org/tumugi/tumugi-plugin-google_drive) [![Code Climate](https://codeclimate.com/github/tumugi/tumugi-plugin-google_drive/badges/gpa.svg)](https://codeclimate.com/github/tumugi/tumugi-plugin-google_drive) [![Coverage Status](https://coveralls.io/repos/github/tumugi/tumugi-plugin-google_drive/badge.svg?branch=master)](https://coveralls.io/github/tumugi/tumugi-plugin-google_drive?branch=master) [![Gem Version](https://badge.fury.io/rb/tumugi-plugin-google_drive.svg)](https://badge.fury.io/rb/tumugi-plugin-google_drive)
2
2
 
3
- # tumugi-plugin-google_drive
3
+ # Google Drive plugin for [tumugi](https://github.com/tumugi/tumugi)
4
4
 
5
- [tumugi](https://github.com/tumugi/tumugi) plugin for Google Drive.
5
+ tumugi-plugin-google_drive is a plugin for integrate [Google Drive](https://www.google.com/intl/en/drive/) and [tumugi](https://github.com/tumugi/tumugi).
6
6
 
7
7
  ## Installation
8
8
 
@@ -12,77 +12,86 @@ Add this line to your application's Gemfile:
12
12
  gem 'tumugi-plugin-google_drive'
13
13
  ```
14
14
 
15
- And then execute:
15
+ And then execute `bundle install`
16
16
 
17
- ```sh
18
- $ bundle
19
- ```
17
+ ## Target
20
18
 
21
- Or install it yourself as:
19
+ ### Tumugi::Plugin::GoogleDriveFileTarget
22
20
 
23
- ```sh
24
- $ gem install tumugi-plugin-google_drive
25
- ```
21
+ `GoogleDriveFileTarget` represents file on Googl Drive.
26
22
 
27
- ## Component
23
+ #### Parameters
28
24
 
29
- ### Tumugi::Plugin::GoogleDriveFileTarget
25
+ | name | type | required? | default | description |
26
+ |---------|------------------------|-----------|---------|---------------------|
27
+ | name | string | required | | Filename |
28
+ | file_id | string | optional | | File ID |
29
+ | parents | string or string array | optional | | Parent folder ID(s) |
30
30
 
31
- This target represent file on Googl Drive.
32
- This target has following parameters.
31
+ #### Examples
33
32
 
34
- - name (required)
35
- - Filename **string**
36
- - file_id
37
- - File ID **string**
38
- - parents
39
- - Parent folder ID **string** or **array of string**
40
-
41
- Tumugi workflow file using this target is like this:
33
+ Create Google Drive file in folder named `xyz`, which content is "done"
42
34
 
43
35
  ```rb
44
36
  task :task1 do
45
37
  param :day, type: :time, auto_bind: true, required: true
38
+
46
39
  output do
47
40
  target(:google_drive_file,
48
41
  name: "test_#{day.strftime('%Y%m%d')}.txt",
49
42
  parents: "xyz")
50
43
  end
44
+
51
45
  run do
52
- log 'task1#run'
53
- output.open('w') {|f| f.puts('done') }
46
+ log "task1#run"
47
+ output.open("w") {|f| f.puts("done") }
54
48
  end
55
49
  end
56
50
  ```
57
51
 
58
52
  ### Tumugi::Plugin::GoogleDriveFolderTarget
59
53
 
60
- This target represent folder on Googl Drive.
61
- This target has following parameters.
54
+ `GoogleDriveFolderTarget` represents folder on Googl Drive.
55
+
56
+ #### Parameters
57
+
58
+ | name | type | required? | default | description |
59
+ |-----------|------------------------|-----------|---------|---------------------|
60
+ | name | string | required | | Filename |
61
+ | folder_id | string | optional | | Folder ID |
62
+ | parents | string or string array | optional | | Parent folder ID(s) |
62
63
 
63
- - name (required)
64
- - Folder name **string**
65
- - folder_id
66
- - Folder ID **string**
67
- - parents
68
- - Parent folder ID **string** or **array of string**
64
+ ## Task
69
65
 
70
66
  ### Tumugi::Plugin::GoogleDriveFolderTask
71
67
 
72
- This task create a folder on Googl Drive.
73
- Tumugi workflow file using this task is like this:
68
+ `GoogleDriveFolderTask` create a folder on Googl Drive.
69
+ Return value of `output` must be instance of `Tumugi::Plugin::GoogleDriveFolderTarget`
70
+
71
+ #### Parameters
72
+
73
+ | name | type | required? | default | description |
74
+ |-----------|------------------------|-----------|---------|---------------------|
75
+ | name | string | required | | Filename |
76
+ | folder_id | string | optional | | Folder ID |
77
+ | parents | string or string array | optional | | Parent folder ID(s) |
78
+
79
+ #### Examples
74
80
 
75
81
  ```rb
76
82
  task :task1, type: :google_drive_folder do
77
83
  param :day, type: :time, auto_bind: true, required: true
78
- output do
79
- target(:google_drive_folder,
80
- name: "test_#{day.strftime('%Y%m%d')}.txt",
81
- parents: "xyz")
82
- end
84
+ name { "test_#{day.strftime('%Y%m%d')}.txt" }
85
+ parents "xyz"
83
86
  end
84
87
  ```
85
88
 
89
+ Run this workflow via:
90
+
91
+ ```sh
92
+ $ bundle exec tumugi run -f workflow.rb -p day:2016-07-01 task1
93
+ ```
94
+
86
95
  ### Config Section
87
96
 
88
97
  tumugi-plugin-google_drive provide config section named "google_drive" which can specified Google Drive autenticaion info.
@@ -111,11 +120,11 @@ end
111
120
 
112
121
  ## Development
113
122
 
114
- 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.
123
+ After checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake test` to run the tests.
115
124
 
116
125
  ## Contributing
117
126
 
118
- Bug reports and pull requests are welcome on GitHub at https://github.com/tumugi/ttumugi-plugin-google_drive
127
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tumugi/tumugi-plugin-google_drive
119
128
 
120
129
  ## License
121
130
 
data/examples/example.rb CHANGED
@@ -1,11 +1,13 @@
1
1
  task :task1 do
2
- requires :folder
3
2
  param :day, type: :time, auto_bind: true, required: true
3
+ requires :folder
4
+
4
5
  output do
5
6
  target(:google_drive_file,
6
7
  name: "test_#{day.strftime('%Y%m%d')}.txt",
7
8
  parents: input.folder_id)
8
9
  end
10
+
9
11
  run do
10
12
  log 'task1#run'
11
13
  output.open('w') {|f| f.puts('done') }
@@ -13,5 +15,5 @@ task :task1 do
13
15
  end
14
16
 
15
17
  task :folder, type: :google_drive_folder do
16
- param_set :name, 'xyz'
18
+ name 'xyz'
17
19
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "tumugi-plugin-google_drive"
7
- spec.version = "0.1.0"
7
+ spec.version = "0.2.0"
8
8
  spec.authors = ["Kazuyuki Honda"]
9
9
  spec.email = ["hakobera@gmail.com"]
10
10
 
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.required_ruby_version = '>= 2.1'
21
21
 
22
- spec.add_runtime_dependency "tumugi", ">= 0.5.1"
22
+ spec.add_runtime_dependency "tumugi", ">= 0.6.1"
23
23
  spec.add_runtime_dependency "google-api-client", "~> 0.9.3"
24
+ spec.add_runtime_dependency "json", "~> 1.8.3" # json 2.0 does not work with JRuby + MultiJson
24
25
 
25
26
  spec.add_development_dependency "bundler", "~> 1.11"
26
27
  spec.add_development_dependency "rake", "~> 10.0"
27
28
  spec.add_development_dependency "test-unit", "~> 3.1"
28
29
  spec.add_development_dependency "test-unit-rr"
29
30
  spec.add_development_dependency "coveralls"
30
- spec.add_development_dependency "github_changelog_generator"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumugi-plugin-google_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuyuki Honda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tumugi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.1
19
+ version: 0.6.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.1
26
+ version: 0.6.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-api-client
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.9.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.8.3
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.8.3
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -108,20 +122,6 @@ dependencies:
108
122
  - - ">="
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: github_changelog_generator
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
125
  description:
126
126
  email:
127
127
  - hakobera@gmail.com
@@ -131,11 +131,10 @@ extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
133
  - ".travis.yml"
134
+ - CHANGELOG.md
134
135
  - Gemfile
135
136
  - README.md
136
137
  - Rakefile
137
- - bin/console
138
- - bin/setup
139
138
  - examples/example.rb
140
139
  - examples/tumgui_config_example.rb
141
140
  - lib/tumugi/plugin/google_drive/atomic_file.rb
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "tumugi/plugin/google_drive"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here