taskworld 0.1.2 → 0.1.3

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: 0cc25b98e9ab1cf1d560dc164f417d1799df82ca
4
- data.tar.gz: fccd1c64fc575f8139b47d84240f2808545cd417
3
+ metadata.gz: ac05d025ab65ef8dd9fb2278790f0dab205be681
4
+ data.tar.gz: 67c8559871fa796d7487d3a79277d2757d950dc3
5
5
  SHA512:
6
- metadata.gz: b373ce8e7bd7ab60ba85c4913e46060e038fb069ef5eeea240386ae58d1362f33e3df13cac894c0b9e32e136a4ef18639b986e62ab4a7792cc1ada2ac4e9e87e
7
- data.tar.gz: 7ab7199b8e2ef7bc25b202dd5d7a37a250a4cd6b38d5948769c5f292e2ba27865ae11aabb72f4bcb570789a3aacf4906e191312e275a1b593c3e6b0b2b20c63c
6
+ metadata.gz: 56796b87c006557ec287bada3822c8e61ca3164253e24c0c64112b9bb8bbd0ac02279dc6a001b51efd53be9fe44db7afcf77d66d669a3c2721bfd5e9d40bf1e2
7
+ data.tar.gz: ccd72a1a78758f3412a62e1f19a3f314be896731aa73fd3f6ca14ee94fc94e6c1a0090934c27ad85b15388aecd67ff7c74c5b06a30db24bf13d0cecff6064a7f
@@ -0,0 +1,33 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-05-12 00:32:42 +0900 using RuboCop version 0.51.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Configuration parameters: CountComments, ExcludedMethods.
10
+ Metrics/BlockLength:
11
+ Exclude:
12
+ - 'spec/taskworld/**/*'
13
+
14
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
15
+ # URISchemes: http, https
16
+ Metrics/LineLength:
17
+ Max: 117
18
+
19
+ # Configuration parameters: CountComments.
20
+ Metrics/MethodLength:
21
+ Max: 12
22
+
23
+ Metrics/ParameterLists:
24
+ Enabled: false
25
+
26
+ Style/Documentation:
27
+ Enabled: false
28
+
29
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
30
+ # SupportedStyles: module_function, extend_self
31
+ Style/ModuleFunction:
32
+ Exclude:
33
+ - 'lib/taskworld/config.rb'
@@ -3,4 +3,6 @@ language: ruby
3
3
  rvm:
4
4
  - 2.4.3
5
5
  before_install: gem install bundler -v 1.16.1
6
- script: bundle exec rspec spec/taskworld
6
+ script:
7
+ - bundle exec rubocop
8
+ - bundle exec rspec spec/taskworld
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in taskworld.gemspec
6
6
  gemspec
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "taskworld"
3
+ require 'bundler/setup'
4
+ require 'taskworld'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "taskworld"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start(__FILE__)
@@ -11,6 +11,8 @@ module Taskworld
11
11
 
12
12
  attr_accessor :server, :email, :password
13
13
 
14
+ module_function
15
+
14
16
  def reset
15
17
  self.server = nil
16
18
  self.email = nil
@@ -1,9 +1,30 @@
1
1
  module Taskworld
2
2
  module Endpoints
3
3
  module Tasklist
4
- def tasklist_get_all(space_id:, project_id: , **options)
4
+ def tasklist_create(space_id:, project_id:, title:, **options)
5
+ post('tasklist.create', options.merge(space_id: space_id, project_id: project_id, title: title))
6
+ end
7
+
8
+ def tasklist_get_all(space_id:, project_id:, **options)
5
9
  post('tasklist.get-all', options.merge(space_id: space_id, project_id: project_id))
6
10
  end
11
+
12
+ def tasklist_move_task(space_id:, project_id:, from_list_id:, to_list_id:, task_id:, **options)
13
+ post('tasklist.move-task',
14
+ options.merge(space_id: space_id,
15
+ project_id: project_id,
16
+ from_list_id: from_list_id,
17
+ to_list_id: to_list_id,
18
+ task_id: task_id))
19
+ end
20
+
21
+ def tasklist_update(space_id:, list_id:, title:, **options)
22
+ post('tasklist.update', options.merge(space_id: space_id, list_id: list_id, title: title))
23
+ end
24
+
25
+ def tasklist_delete(space_id:, list_id:, **options)
26
+ post('tasklist.delete', options.merge(space_id: space_id, list_id: list_id))
27
+ end
7
28
  end
8
29
  end
9
30
  end
@@ -1,3 +1,3 @@
1
1
  module Taskworld
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'.freeze
3
3
  end
@@ -1,30 +1,31 @@
1
1
 
2
- lib = File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "taskworld/version"
4
+ require 'taskworld/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "taskworld"
7
+ spec.name = 'taskworld'
8
8
  spec.version = Taskworld::VERSION
9
- spec.authors = ["shimada"]
10
- spec.email = ["yoshihiro.shimada@studyplus.jp"]
9
+ spec.authors = ['shimada']
10
+ spec.email = ['yoshihiro.shimada@studyplus.jp']
11
11
 
12
- spec.summary = %q{Taskworld Web API client.}
13
- spec.description = %q{Taskworld Web API client.}
14
- spec.homepage = "https://github.com/yshimada0330/taskworld"
15
- spec.license = "MIT"
12
+ spec.summary = 'Taskworld Web API client.'
13
+ spec.description = 'Taskworld Web API client.'
14
+ spec.homepage = 'https://github.com/yshimada0330/taskworld'
15
+ spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
18
  f.match(%r{^(test|spec|features)/})
19
19
  end
20
- spec.bindir = "exe"
20
+ spec.bindir = 'exe'
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
22
+ spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_dependency 'faraday', '>= 0.15'
25
25
  spec.add_dependency 'faraday_middleware'
26
- spec.add_development_dependency "bundler", "~> 1.16"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rspec", "~> 3.0"
26
+ spec.add_development_dependency 'bundler', '~> 1.16'
27
+ spec.add_development_dependency 'rake', '~> 10.0'
28
+ spec.add_development_dependency 'rspec', '~> 3.0'
29
+ spec.add_development_dependency 'rubocop', '0.51.0'
29
30
  spec.add_development_dependency 'webmock'
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taskworld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - shimada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-10 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.51.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.51.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: webmock
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +117,7 @@ extra_rdoc_files: []
103
117
  files:
104
118
  - ".gitignore"
105
119
  - ".rspec"
120
+ - ".rubocop.yml"
106
121
  - ".travis.yml"
107
122
  - CODE_OF_CONDUCT.md
108
123
  - Gemfile