molflow 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: b0c6cc390ca7f442934a410946b8092ba26e68d7
4
- data.tar.gz: 0d7ac3a61e91ac49644f739a11a0646538f9ed29
3
+ metadata.gz: 5c771913fee3a455fa7c7b40f436b99c4a2a6876
4
+ data.tar.gz: 27b26f4761e5a26b6a961bd6d81ab505e6423087
5
5
  SHA512:
6
- metadata.gz: a751b8504f6ff37c568eb1c8bed5f0e40c0f7d0ad251df5345c541211fda85fa32399d2e0b78a27a399c0aede520ee8a13d3a813b0271e7c3f14b13ebfa6de1a
7
- data.tar.gz: 9146bba946c7f563bf3e66d04f43f4be1a8b36030045401278b8d8847e4d6dde16e78accb50c922e5eaffd17a6b905b179626bd31f859dc7d3cf91bfa9470213
6
+ metadata.gz: e8dcfa10c967bada0b05a57fb1e7b53f699ceb6a26a6dc54cb6f7e986e5bdee44bd6c20df15e1e2a1d09c7aa7720d22578f6938af9ebbf248e6acf44d8578427
7
+ data.tar.gz: 197dfc9d34265b77985c3b22d475b24c72a823e7ddd0d1fc95d12bc33d3ab25f042347a1033afebe481b368d1d101805f36b83cd96fbf21f028b7b811c455969
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .rspec-local
19
+ .ruby-version
20
+ _site
21
+ .rspec
22
+ *.swp
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in molflow.gemspec
4
+ gemspec
5
+
6
+ gem 'jira-ruby', require: :jira
7
+ gem 'pry'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Dmitry Silaev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # Molflow
2
+
3
+
4
+ ## Установка
5
+
6
+ Установите гем из репозитория
7
+
8
+ $ rvmsudo gem install molflow
9
+
10
+ Затем нужно сконфигурировать
11
+
12
+ $ molflow install
13
+
14
+ Адрес для atlassian molinos: https://molinos.atlassian.net
15
+
16
+
17
+ ## Использование
18
+
19
+ $ molflow jira:ps
20
+ $ molflow jira:is
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "molflow"
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/molflow CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'molflow'
2
+
3
+ require "bundler/setup"
4
+ require "molflow"
3
5
 
4
6
  Molflow::Application.new.run
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/lib/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'molflow/install'
2
+ require 'molflow/jira'
data/lib/molflow.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+
3
+ Rake.application.options.trace = true
4
+
5
+ require 'molflow/application'
6
+ require 'molflow/version'
7
+
8
+ module Molflow
9
+ # Your code goes here...
10
+ end
@@ -0,0 +1,18 @@
1
+ module Molflow
2
+ class Application < Rake::Application
3
+ def initialize
4
+ super
5
+ @rakefiles = %w{Capfile} << rakefile
6
+ end
7
+
8
+ def run
9
+ Rake.application = self
10
+ super
11
+ end
12
+
13
+ # allows the `cap install` task to load without a capfile
14
+ def rakefile
15
+ File.expand_path(File.join(File.dirname(__FILE__),'..','Rakefile'))
16
+ end
17
+ end
18
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path(File.join(File.dirname(__FILE__),'tasks/install.rake'))
@@ -0,0 +1 @@
1
+ load File.expand_path(File.join(File.dirname(__FILE__),'tasks/jira.rake'))
@@ -0,0 +1,43 @@
1
+ require 'erb'
2
+ require 'pathname'
3
+
4
+ task :install do
5
+ home_dir = Pathname.new(ENV['HOME'])
6
+ molflow = File.expand_path("../../templates/molflow.erb", __FILE__)
7
+
8
+ entries = [{ template: molflow, file: home_dir.join('.molflow') }]
9
+
10
+ entries.each do |entry|
11
+ if File.exists?(entry[:file])
12
+ warn "[skip] #{entry[:file]} already exists"
13
+ else
14
+ File.open(entry[:file], 'w+') do |f|
15
+ f.write(ERB.new(File.read(entry[:template])).result(binding))
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ def site
22
+ STDOUT.puts "atlassian site:"
23
+ input = STDIN.gets.chomp
24
+ raise "enter address" if input == ''
25
+
26
+ input
27
+ end
28
+
29
+ def username
30
+ STDOUT.puts "atlassian username:"
31
+ input = STDIN.gets.chomp
32
+ raise "enter username" if input == ''
33
+
34
+ input
35
+ end
36
+
37
+ def password
38
+ STDOUT.puts "atlassian password:"
39
+ input = STDIN.gets.chomp
40
+ raise "enter password" if input == ''
41
+
42
+ input
43
+ end
@@ -0,0 +1,38 @@
1
+ require 'jira'
2
+ require 'yaml'
3
+ require 'pry'
4
+
5
+ namespace :jira do
6
+ molflow_config = YAML.load_file(Pathname.new(ENV['HOME']).join('.molflow'))
7
+
8
+ options = {
9
+ :username => molflow_config['username'],
10
+ :password => molflow_config['password'],
11
+ :site => molflow_config['site'],
12
+ :auth_type => :basic,
13
+ :context_path => '',
14
+ :use_ssl => true
15
+ }
16
+
17
+ @client = JIRA::Client.new(options)
18
+
19
+
20
+ task :ps do
21
+ # Show all projects
22
+ @projects = @client.Project.all
23
+ @projects.each do |project|
24
+ puts "#{project.key} : #{project.name}"
25
+ end
26
+ end
27
+
28
+ task :is do
29
+ jql = 'assignee = currentUser() AND (status = "To Do" OR status = "In Progress") AND (labels not in (Приостановлен) OR labels is EMPTY) ORDER BY updatedDate DESC'
30
+
31
+ @issues = @client.Issue.jql(jql)
32
+
33
+ @issues.each do |issue|
34
+ puts "#{issue.key} : #{issue.summary}"
35
+ end
36
+ end
37
+ end
38
+
@@ -0,0 +1,3 @@
1
+ site: '<%= site %>'
2
+ username: '<%= username %>'
3
+ password: '<%= password %>'
@@ -0,0 +1,3 @@
1
+ module Molflow
2
+ VERSION = "0.1.2"
3
+ end
data/molflow.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib/', __FILE__)
3
+ $:.unshift lib unless $:.include?(lib)
4
+ require 'molflow/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'molflow'
8
+ s.version = Molflow::VERSION
9
+ s.licenses = ['MIT']
10
+ s.authors = ["Dmitry Silaev"]
11
+ s.email = ["dmsilaev@yandex.ru"]
12
+ s.summary = %q{Workflow in Molinos}
13
+ s.description = %q{Workflow in Molinos}
14
+ s.files = `git ls-files`.split($/)
15
+
16
+ s.required_ruby_version = '>= 1.9.3'
17
+ s.add_runtime_dependency 'rake', '~> 10.0', '>= 10.0.0'
18
+
19
+ s.executables = %w(molflow)
20
+ s.require_paths = ["lib"]
21
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Molflow do
4
+ it 'has a version number' do
5
+ expect(Molflow::VERSION).not_to be nil
6
+ end
7
+
8
+ it 'does something useful' do
9
+ expect(false).to eq(true)
10
+ end
11
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'molflow'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: molflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silaev
@@ -14,6 +14,9 @@ dependencies:
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10.0'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 10.0.0
@@ -21,6 +24,9 @@ dependencies:
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '10.0'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 10.0.0
@@ -32,7 +38,28 @@ executables:
32
38
  extensions: []
33
39
  extra_rdoc_files: []
34
40
  files:
41
+ - ".gitignore"
42
+ - ".travis.yml"
43
+ - CODE_OF_CONDUCT.md
44
+ - Gemfile
45
+ - LICENSE.txt
46
+ - README.md
47
+ - Rakefile
48
+ - bin/console
35
49
  - bin/molflow
50
+ - bin/setup
51
+ - lib/Rakefile
52
+ - lib/molflow.rb
53
+ - lib/molflow/application.rb
54
+ - lib/molflow/install.rb
55
+ - lib/molflow/jira.rb
56
+ - lib/molflow/tasks/install.rake
57
+ - lib/molflow/tasks/jira.rake
58
+ - lib/molflow/templates/molflow.erb
59
+ - lib/molflow/version.rb
60
+ - molflow.gemspec
61
+ - spec/molflow_spec.rb
62
+ - spec/spec_helper.rb
36
63
  homepage:
37
64
  licenses:
38
65
  - MIT