molflow 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 49551effe4ee2fcf660b67905e4d972ea0ea1211
4
+ data.tar.gz: 96dced22da1fcdb491d21d55f0a98bdf31e5678c
5
+ SHA512:
6
+ metadata.gz: fd7dbebf5ce73d4f456366e13d43b9bf246d6efdea5aa4bc5ac8eebf97132b0a82a8358e4fddc5c12505ca1e0cb5396fc869af54f66fa7f7975a0e511ccec626
7
+ data.tar.gz: 24b16ea752586ff0a6e7d8c1a49d646f3f87b273eca25cf9489ff3a47a31425c891de2661e2454fcafe7ccbf82324d9f7736f0315e81262de71cd517e9e10c0c
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -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'
@@ -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.
@@ -0,0 +1,21 @@
1
+ # Molflow
2
+
3
+
4
+ ## Установка
5
+
6
+ Установите гем из репозитория
7
+
8
+ $ gem install specific_install
9
+ $ rvmsudo gem specific_install -l git@github.com:Molinos/molflow.git
10
+
11
+ Затем нужно сконфигурировать
12
+
13
+ $ molflow install
14
+
15
+ Адрес для atlassian molinos: https://molinos.atlassian.net
16
+
17
+
18
+ ## Использование
19
+
20
+ $ molflow jira:ps
21
+ $ molflow jira:is
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -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
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'molflow/application'
3
+
4
+ Molflow::Application.new.run
@@ -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
@@ -0,0 +1,2 @@
1
+ require 'molflow/install'
2
+ require 'molflow/jira'
@@ -0,0 +1,14 @@
1
+
2
+ require 'rake'
3
+ # require 'sshkit'
4
+
5
+ # require 'io/console'
6
+
7
+ Rake.application.options.trace = true
8
+
9
+ require 'molflow/application'
10
+ require 'molflow/version'
11
+
12
+ module Molflow
13
+ # Your code goes here...
14
+ 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.0"
3
+ end
@@ -0,0 +1,20 @@
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
+
18
+ s.executables = %w(molflow)
19
+ s.require_paths = ["lib"]
20
+ 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 ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: molflow
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dmitry Silaev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Workflow in Molinos
14
+ email:
15
+ - dmsilaev@yandex.ru
16
+ executables:
17
+ - molflow
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".gitignore"
22
+ - ".rspec"
23
+ - ".travis.yml"
24
+ - CODE_OF_CONDUCT.md
25
+ - Gemfile
26
+ - LICENSE.txt
27
+ - README.md
28
+ - Rakefile
29
+ - bin/console
30
+ - bin/molflow
31
+ - bin/setup
32
+ - lib/Rakefile
33
+ - lib/molflow.rb
34
+ - lib/molflow/application.rb
35
+ - lib/molflow/install.rb
36
+ - lib/molflow/jira.rb
37
+ - lib/molflow/tasks/install.rake
38
+ - lib/molflow/tasks/jira.rake
39
+ - lib/molflow/templates/molflow.erb
40
+ - lib/molflow/version.rb
41
+ - molflow.gemspec
42
+ - spec/molflow_spec.rb
43
+ - spec/spec_helper.rb
44
+ homepage:
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.9.3
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.4.6
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Workflow in Molinos
68
+ test_files: []