gitius 0.2.0 → 0.2.1

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
- SHA1:
3
- metadata.gz: 3fbe70f1aa061bcc1681e5e87744885115053401
4
- data.tar.gz: bdac894de6ffb04e7732e133f74d304bbca8aebc
2
+ SHA256:
3
+ metadata.gz: 33b747350a8a5ddefd3efaafc964f2afbff8fba9e9b196d9a68996212f61c4bf
4
+ data.tar.gz: cbaab9b17137b2534ee9ad6ddb18ad5f3bbe85913b950c598535f4fd9ecf866e
5
5
  SHA512:
6
- metadata.gz: 9593c61098a03216f9581335ede5eaa3d3dd76cd82100ba92026e76b35a9e001970056a337b7fec101be2150bf3e349a3b3213f88d174724d412e08999fae7fc
7
- data.tar.gz: ce60b9f6d74b464ccfd636ef46cc217698f862d72cd1017fe5d7e8e583949df538530ed4202d2421b57d1c60bbcfc8d43373d70e7d2740489d31bf2b0bf8bf3b
6
+ metadata.gz: 0fb95cefdec6d1ac3d490b0fce6517ec8df5d6fceec71c29205b788648af631acf555680a5a5f6b91681da4374659bfabf266f0bb455e80f8d95bf087e07eb1c
7
+ data.tar.gz: ed770ea9380525dd82e6a33ce2e7a7484d430613a3507635e52e903b1406ff4bc34e249f82cb1eec33683c52f8cd2f8719477d878ae21399e42f66b165d504b0
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ # Default
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
@@ -6,4 +7,9 @@
6
7
  /pkg/
7
8
  /spec/reports/
8
9
  /tmp/
10
+
11
+ # Gem build gitius.gemspec
9
12
  *.gem
13
+
14
+ # IDEA
15
+ .idea/
data/Dockerfile ADDED
@@ -0,0 +1,5 @@
1
+ FROM ruby:2.4.2
2
+ MAINTAINER Ali Shanaakh <ashanaakh@gmail.com>
3
+
4
+ # Install gitius
5
+ RUN gem install gitius
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitius (0.0.1pre)
5
- octokit (~> 4.7.0)
6
- thor (~> 0.20.0)
4
+ gitius (0.2.0)
5
+ octokit (= 4.7.0)
6
+ thor (= 0.20.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -16,21 +16,21 @@ GEM
16
16
  multipart-post (2.0.0)
17
17
  octokit (4.7.0)
18
18
  sawyer (~> 0.8.0, >= 0.5.3)
19
- public_suffix (3.0.0)
19
+ public_suffix (3.0.1)
20
20
  rake (10.5.0)
21
- rspec (3.6.0)
22
- rspec-core (~> 3.6.0)
23
- rspec-expectations (~> 3.6.0)
24
- rspec-mocks (~> 3.6.0)
25
- rspec-core (3.6.0)
26
- rspec-support (~> 3.6.0)
27
- rspec-expectations (3.6.0)
21
+ rspec (3.7.0)
22
+ rspec-core (~> 3.7.0)
23
+ rspec-expectations (~> 3.7.0)
24
+ rspec-mocks (~> 3.7.0)
25
+ rspec-core (3.7.0)
26
+ rspec-support (~> 3.7.0)
27
+ rspec-expectations (3.7.0)
28
28
  diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.6.0)
30
- rspec-mocks (3.6.0)
29
+ rspec-support (~> 3.7.0)
30
+ rspec-mocks (3.7.0)
31
31
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.6.0)
33
- rspec-support (3.6.0)
32
+ rspec-support (~> 3.7.0)
33
+ rspec-support (3.7.0)
34
34
  sawyer (0.8.1)
35
35
  addressable (>= 2.3.5, < 2.6)
36
36
  faraday (~> 0.8, < 1.0)
@@ -40,10 +40,10 @@ PLATFORMS
40
40
  ruby
41
41
 
42
42
  DEPENDENCIES
43
- bundler (~> 1.15.4)
43
+ bundler (~> 1.16.0)
44
44
  gitius!
45
45
  rake (~> 10.0)
46
46
  rspec (~> 3.0)
47
47
 
48
48
  BUNDLED WITH
49
- 1.16.0.pre.2
49
+ 1.16.0
data/Makefile ADDED
@@ -0,0 +1,20 @@
1
+ SERVICE := gitius
2
+ VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v')
3
+ IMAGE := ashanaakh/$(SERVICE):$(VERSION)
4
+
5
+ .PHONY: default build push run
6
+
7
+ default: build run
8
+
9
+ build:
10
+ @echo '> Building "$(SERVICE)" docker image...'
11
+ @docker build -t $(IMAGE) .
12
+
13
+ push: build
14
+ @docker push $(IMAGE)
15
+
16
+ run:
17
+ @echo '> Starting "$(SERVICE)" container...'
18
+ @docker run -it $(IMAGE)
19
+
20
+
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Gitius
2
2
 
3
3
  Command line interface based on GitHub official [Octokit](https://github.com/octokit/octokit.rb)
4
- gem and [Thor](https://github.com/erikhuda/thor) library for creating CLI on ruby
4
+ gem and [Thor](https://github.com/erikhuda/thor) library for creating CLI on ruby.
5
5
 
6
6
  ## Installation
7
7
 
@@ -13,17 +13,21 @@ gem 'gitius'
13
13
 
14
14
  And then execute:
15
15
 
16
- $ bundle
16
+ ```shell
17
+ bundle
18
+ ```
17
19
 
18
20
  Or install it yourself as:
19
21
 
20
- $ gem install gitius
22
+ ```shell
23
+ gem install gitius
24
+ ```
21
25
 
22
- ## Usage
26
+ ## Getting started
23
27
 
24
28
  ```shell
25
29
  gitius config token <token>
26
- gitius config tocken # shows your token
30
+ gitius config token # shows your token
27
31
  gitius whoami # prints user's nickname
28
32
  ```
29
33
 
data/gitius.gemspec CHANGED
@@ -2,26 +2,28 @@ lib = File.expand_path('../lib', __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'gitius/version'
4
4
 
5
- Gem::Specification.new do |spec|
6
- spec.name = 'gitius'
7
- spec.version = Gitius::VERSION
8
- spec.authors = ['Ali Shanaakh']
9
- spec.email = ['ashanaakh@gmail.com']
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'gitius'
7
+ gem.version = Gitius::VERSION
8
+ gem.authors = ['Ali Shanaakh']
9
+ gem.email = ['ashanaakh@gmail.com']
10
10
 
11
- spec.summary = %q{ Command line interface for githib }
12
- spec.homepage = 'https://github.com/ashanaakh/gitius'
11
+ gem.summary = %q{ Command line interface for githib }
12
+ gem.description = ''
13
13
 
14
- spec.license = 'MIT'
14
+ gem.homepage = 'https://github.com/ashanaakh/gitius'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = 'bin'
18
- spec.executables = ['gitius']
19
- spec.require_paths = ['lib']
16
+ gem.license = 'MIT'
20
17
 
21
- spec.add_dependency 'thor'
22
- spec.add_dependency 'octokit'
18
+ gem.files = `git ls-files -z`.split("\0")
19
+ gem.bindir = 'bin'
20
+ gem.executables = ['gitius']
21
+ gem.require_paths = ['lib']
23
22
 
24
- spec.add_development_dependency 'bundler', '~> 1.15.4'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rspec', '~> 3.0'
23
+ gem.add_dependency 'thor', '0.20.0'
24
+ gem.add_dependency 'octokit', '4.7.0'
25
+
26
+ gem.add_development_dependency 'bundler', '~> 1.16.0'
27
+ gem.add_development_dependency 'rake', '~> 10.0'
28
+ gem.add_development_dependency 'rspec', '~> 3.0'
27
29
  end
data/lib/gitius/base.rb CHANGED
@@ -2,4 +2,4 @@ module Gitius
2
2
  class Base < Thor
3
3
  include Thor::Actions
4
4
  end
5
- end
5
+ end
data/lib/gitius/config.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gitius
2
2
  PATH = "#{Dir.home}/.gitius".freeze
3
- end
3
+ end
data/lib/gitius/core.rb CHANGED
@@ -11,8 +11,8 @@ module Gitius
11
11
  desc 'whoami', "Return user's github nickname"
12
12
  def whoami
13
13
  puts user.name
14
- rescue StandardError => e
15
- puts e.message
14
+ rescue StandardError
15
+ puts 'Incorrect settings'
16
16
  end
17
17
 
18
18
  desc 'config', 'Set configurations for using cli'
@@ -25,4 +25,4 @@ module Gitius
25
25
  puts "v#{VERSION}"
26
26
  end
27
27
  end
28
- end
28
+ end
data/lib/gitius/gist.rb CHANGED
@@ -1,14 +1,12 @@
1
1
  class Gist < Thor
2
2
  include Gitius::Helpers
3
3
 
4
- desc 'create', 'Create gist'
4
+ desc 'create PATHS', 'Create gist'
5
5
  option :description, aliases: :d, banner: '<text>'
6
6
  option :public
7
7
  def create(*paths)
8
8
  paths.each do |f|
9
- options['files'] = {
10
- File.basename(f) => { 'content' => File.read(f).to_s }
11
- }
9
+ options['files'] = { File.basename(f) => { 'content' => File.read(f).to_s } }
12
10
  end
13
11
  response = client.create_gist(options)
14
12
  puts response.html_url
@@ -16,11 +14,11 @@ class Gist < Thor
16
14
  puts e.message
17
15
  end
18
16
 
19
- desc 'delete', 'Delete gist'
17
+ desc 'delete ID','Delete gist'
20
18
  def delete(id)
21
19
  response = client.delete_repo(id)
22
20
  puts response ? 'gist deleted' : 'error'
23
21
  rescue StandardError => e
24
22
  puts e.message
25
23
  end
26
- end
24
+ end
@@ -39,4 +39,4 @@ module Gitius
39
39
  raise e
40
40
  end
41
41
  end
42
- end
42
+ end
@@ -1,7 +1,7 @@
1
1
  class Repository < Thor
2
2
  include Gitius::Helpers
3
3
 
4
- desc 'create', 'Create repository'
4
+ desc 'create NAME', 'Create repository'
5
5
  option :description, aliases: :d, banner: '<text>'
6
6
  option :homepage, aliases: :url, banner: '<url>'
7
7
  option :private, aliases: :p
@@ -13,7 +13,7 @@ class Repository < Thor
13
13
  puts e.message
14
14
  end
15
15
 
16
- desc 'delete', 'Delete repository'
16
+ desc 'delete NAME', 'Delete repository'
17
17
  def delete(name)
18
18
  succeed = client.delete_repo(name)
19
19
  puts succeed ? 'Repository was succfully deleted' : 'Error'
@@ -21,7 +21,7 @@ class Repository < Thor
21
21
  puts e.message
22
22
  end
23
23
 
24
- desc 'info', 'Get information'
24
+ desc 'info NAME', 'Get information'
25
25
  option :forks, aliases: :f
26
26
  def info(name)
27
27
  puts client.forks(name) if options[:forks]
@@ -30,7 +30,7 @@ class Repository < Thor
30
30
  puts e.message
31
31
  end
32
32
 
33
- desc 'fork', 'Fork repository'
33
+ desc 'fork NAME', 'Fork repository'
34
34
  def fork(name)
35
35
  response = client.fork(name)
36
36
  puts "#{name} forked", "url: #{response.html_url}",
@@ -38,4 +38,4 @@ class Repository < Thor
38
38
  rescue StandardError => e
39
39
  puts e.message
40
40
  end
41
- end
41
+ end
@@ -1,3 +1,3 @@
1
1
  module Gitius
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'.freeze
3
3
  end
data/lib/gitius.rb CHANGED
@@ -10,4 +10,4 @@ require 'gitius/helpers'
10
10
  require 'gitius/base'
11
11
  require 'gitius/repository'
12
12
  require 'gitius/gist'
13
- require 'gitius/core'
13
+ require 'gitius/core'
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Shanaakh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-08 00:00:00.000000000 Z
11
+ date: 2017-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.20.0
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'
26
+ version: 0.20.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: octokit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 4.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 4.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.15.4
47
+ version: 1.16.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.15.4
54
+ version: 1.16.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
- description:
83
+ description: ''
84
84
  email:
85
85
  - ashanaakh@gmail.com
86
86
  executables:
@@ -89,12 +89,12 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - ".gitignore"
92
- - CHANGELOG.md
92
+ - Dockerfile
93
93
  - Gemfile
94
94
  - Gemfile.lock
95
95
  - LICENSE.txt
96
+ - Makefile
96
97
  - README.md
97
- - Rakefile
98
98
  - bin/console
99
99
  - bin/gitius
100
100
  - bin/setup
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.6.13
130
+ rubygems_version: 2.7.3
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Command line interface for githib
data/CHANGELOG.md DELETED
@@ -1,11 +0,0 @@
1
- # Change Log
2
-
3
- ## [v0.0.1](https://github.com/ashanaakh/gitius/tree/v0.0.1) (2017-10-03)
4
- **Merged pull requests:**
5
-
6
- - cleanup gitius.gemspec [\#2](https://github.com/ashanaakh/gitius/pull/2) ([ashanaakh](https://github.com/ashanaakh))
7
- - Created github base commands [\#1](https://github.com/ashanaakh/gitius/pull/1) ([ashanaakh](https://github.com/ashanaakh))
8
-
9
-
10
-
11
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec