git-gems 0.0.1a

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c4df60c33c2b8020f76c888d1ce5f233cdef4d6c
4
+ data.tar.gz: 5f34ff6f6d5e64d0186e03e9b9c3a274a5cab89e
5
+ SHA512:
6
+ metadata.gz: b9ae18558977367bc81ff61b5c6809dbbae55c937c2df6abbfce2a8788c260b00a1ba6fe5b63cd1fa4c052345f48be2dfaa76aad0630ce9d96188f07dcffc1b8
7
+ data.tar.gz: 4bfc419e6ce1ab198d6368976a94419f24526e09da66cd58405786cc29bcdeebdd6d6ff87880574086a6418c45abd393d12cf6cbb394a5803eaf2c23bf69f49e
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
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in git-gems.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Hiroshi IKEGAMI
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Git::Gems
2
+
3
+ my bundler and git wrapper. (thor based)
4
+
5
+
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'git-gems'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install git-gems
20
+
21
+ ## Usage
22
+
23
+ git gems [OPTION]
24
+
25
+ `install` command (default):
26
+ Set automatically `--path` option it is determined whether the rack app.
27
+
28
+ git gems
29
+ #or
30
+ git gems install
31
+
32
+ `init` command:
33
+ Customized just for a moment or `bundle gem` is` bundle init`.
34
+ make a template of the repository nor a rack app without also be of gem.
35
+
36
+ git gems init
37
+
38
+ `release_tag` command:
39
+ taged for release. Tag name is the default YYYYMMDDHHmm.
40
+
41
+ git gems release_tag [-v|--version][release_version]
42
+
43
+ `exec` command:
44
+ The runs are passed to the bundle exec option if it does not support came over. Argument is also in accordance with the rules of the `bundle exec`.
45
+
46
+ git gems [command]
47
+ # or
48
+ git gems exec [command]
49
+
50
+
51
+
52
+
53
+ ## Contributing
54
+
55
+ 1. Fork it ( https://github.com/[my-github-username]/git-gems/fork )
56
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
57
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
58
+ 4. Push to the branch (`git push origin my-new-feature`)
59
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/bin/git-gems ADDED
@@ -0,0 +1,9 @@
1
+ #! /usr/bin/env ruby
2
+ # conding: utf-8
3
+
4
+ require 'rubygems'
5
+ require File.expand_path('../lib/git/gems', File.dirname(__FILE__))
6
+
7
+ Git::Gems::CLI.start(ARGV)
8
+
9
+ __END__
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+ #source 'http://production.cf.rubygems.org'
3
+
4
+ gem 'rake'
5
+
6
+ group 'development' do
7
+ gem 'pry'
8
+ gem 'pry-doc'
9
+ end
10
+
11
+ group 'test' do
12
+ gem 'rspec'
13
+ end
@@ -0,0 +1,2 @@
1
+ TODO: Write a description
2
+
@@ -0,0 +1,15 @@
1
+ # coding: utf-8
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec) do |spec|
6
+ spec.pattern = 'spec/**/*_spec.rb'
7
+ spec.rspec_opts = ['-cfs']
8
+ end
9
+ rescue LoadError => e
10
+ end
11
+
12
+ task :default => [:spec]
13
+
14
+ __END__
15
+
data/git-gems.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'git/gems/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "git-gems"
8
+ spec.version = Git::Gems::VERSION
9
+ spec.authors = ["Hiroshi IKEGAMI"]
10
+ spec.email = ["hiroshi.ikegami@magicdrive.jp"]
11
+ spec.summary = %q{rubygem utililty: bundler and git wrapper}
12
+ spec.description = %q{}
13
+ spec.homepage = "https://github.com/magicdrive/ruby-git-gems"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency "thor", "~> 0.19.1"
22
+ spec.add_runtime_dependency "bundler", "~> 1.6"
23
+ end
@@ -0,0 +1,68 @@
1
+ # coding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'thor'
5
+
6
+ module Git
7
+ module Gems
8
+ class CLI < Thor
9
+ class << self
10
+ def is_rackapp?
11
+ return File.exist?(File.expand_path("./config.ru"))
12
+ end
13
+
14
+ def default_install_path()
15
+ install_path = options[:path]
16
+ install_path = is_rackapp? ?
17
+ "./vendor/bundle" : "./.bundle" if install_path.nil?
18
+ return install_path
19
+ end
20
+
21
+ def default_binstubs_path()
22
+ return "./.bundle/bin"
23
+ end
24
+ end
25
+
26
+ public
27
+ option :path, :alias => "-p", :default => default_install_path
28
+ option :binstubs, :alias => "-b", :default => default_binstubs_path
29
+ desc "git gems install [OPTIONS]",""
30
+ def install(*args)
31
+ exec_cmd "bundle install --path=#{options[:path]} --binstubs=#{options[:binstubs]}"
32
+ end
33
+ default_task :install
34
+
35
+ desc 'git gems exec [COMMAND] [OPTIONS]',''
36
+ def exec(cmd, *args)
37
+ exec_cmd "bundle exec #{cmd} #{args.join(%{ })}"
38
+ end
39
+
40
+ desc 'git gems init',''
41
+ def init()
42
+ %w(Rakefile Gemfile README.md).each do |f|
43
+ exec_cmd "cp -a #{File.expand_path("../../../../fixtures/#{f}.template", __FILE__)} ./#{f}"
44
+ end
45
+ exec_cmd "mkdir -p lib spec"
46
+ exec_cmd "touch lib/.keep spec/.keep"
47
+ exec_cmd "git init"
48
+ end
49
+
50
+ option :version, :alias => "-v", :default => Time.now.strftime("%Y%m%d%H%M")
51
+ desc 'git gems release_tag', ''
52
+ def release_tag
53
+ exec_cmd "git tag -a 'release-#{options[:version]}'"
54
+ end
55
+
56
+ private
57
+ def exec_cmd(command)
58
+ pid = spawn(command.to_s)
59
+ Process::wait(pid)
60
+ end
61
+
62
+ def method_missing(name, *args)
63
+ self.__send__(:exec, name, *args)
64
+ end
65
+
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,5 @@
1
+ module Git
2
+ module Gems
3
+ VERSION = "0.0.1a"
4
+ end
5
+ end
data/lib/git/gems.rb ADDED
@@ -0,0 +1,6 @@
1
+ # coding: utf-8
2
+
3
+ require 'rubygems'
4
+ require File.expand_path("../../lib/git/gems/version", File.dirname(__FILE__))
5
+ require File.expand_path("../../lib/git/gems/cli", File.dirname(__FILE__))
6
+
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: git-gems
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1a
5
+ platform: ruby
6
+ authors:
7
+ - Hiroshi IKEGAMI
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.19.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.19.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ description: ''
42
+ email:
43
+ - hiroshi.ikegami@magicdrive.jp
44
+ executables:
45
+ - git-gems
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - bin/git-gems
55
+ - fixtures/Gemfile.template
56
+ - fixtures/README.md.template
57
+ - fixtures/Rakefile.template
58
+ - git-gems.gemspec
59
+ - lib/git/gems.rb
60
+ - lib/git/gems/cli.rb
61
+ - lib/git/gems/version.rb
62
+ homepage: https://github.com/magicdrive/ruby-git-gems
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">"
78
+ - !ruby/object:Gem::Version
79
+ version: 1.3.1
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.2.2
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: 'rubygem utililty: bundler and git wrapper'
86
+ test_files: []
87
+ has_rdoc: