coaster 1.3.29 → 1.3.30

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
  SHA256:
3
- metadata.gz: cee8914e3be8e12b37a81c3217b8d9725737dd505908db7055727cd6d88ef7e8
4
- data.tar.gz: 67c6aaec914f4a2ff93b932c575f86d77753b76032ea8e3f369e47500b1c9de1
3
+ metadata.gz: aac619d5b87a41007fed3589618ba253e33307659e17aa689d06898e9a11042b
4
+ data.tar.gz: 362d24aedcb8cd9c462a50b059bb51ec7ba65dfee97d8a26dab85a3a2ab46035
5
5
  SHA512:
6
- metadata.gz: 38d61efdc28e80bb944cc546da9c139a4aa454c65fe6c61166258e911135125d9c9c92ee6493c71f54cd9055e828590d07344deaa672b7d072054823d4232aa5
7
- data.tar.gz: 2b2cf7c5738c15875820905b080e35c240b209b0e4a1cc4f454f2f69e46b1e088d55fd96afdb1583d642a1cb5e2ae6dea94cf6bcbc84f2c9a5e69f98cb7c8be2
6
+ metadata.gz: c19b75ef110edf238f8423add0213c37f3f88a9d3f3442a6fc9b368acfa48603d6c7beed391ac5802983b9e0d92e930d69014847dd6c8e7e082e73d34f9c73e2
7
+ data.tar.gz: 6a756b8db4c72bb2aa6b91a59fe94e98acc895c8263bf751a08661da0abf1d92bf1b68602ead812fcacfd751a13654c7672d681a6a360cb29d871de8ff22b43b
data/bin/coaster ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'coaster'
4
+ require 'coaster/git'
5
+
6
+ command = ARGV.shift
7
+ if command == 'git'
8
+ repo = Git::Repository.new(Dir.pwd)
9
+ subcommand = ARGV.shift
10
+ repo.send(subcommand, *ARGV)
11
+ else
12
+ puts "Unknown command: #{command}"
13
+ end
@@ -3,6 +3,14 @@ module Coaster
3
3
  class Repository
4
4
  class << self
5
5
  def option_parser(options)
6
+ case options
7
+ when Hash then hash_option_parser(options)
8
+ when Array, Set then options.map{|o| option_parser(o)}.join(' ')
9
+ else options
10
+ end
11
+ end
12
+
13
+ def hash_option_parser(options)
6
14
  opts = []
7
15
 
8
16
  # multiple options can be passed by set
@@ -18,7 +26,7 @@ module Coaster
18
26
  v = case v
19
27
  when Hash then v.map{|vk,vv| "#{vk}=#{vv}"}.join(',')
20
28
  when Array then v.join(',')
21
- else v
29
+ else v || ''
22
30
  end
23
31
  v = v.strip
24
32
  if k.start_with?('--')
@@ -60,7 +68,7 @@ module Coaster
60
68
  self.class.run_cmd(path, command)
61
69
  end
62
70
 
63
- def run_git_cmd(command, **options)
71
+ def run_git_cmd(command, *options)
64
72
  cmd = "git #{self.class.option_parser(options)} #{command}"
65
73
  run_cmd(cmd)
66
74
  end
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.3.29'
2
+ VERSION = '1.3.30'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.29
4
+ version: 1.3.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
@@ -180,13 +180,15 @@ dependencies:
180
180
  version: '0'
181
181
  description: Ruby Core Extensions
182
182
  email: buzz@frograms.com
183
- executables: []
183
+ executables:
184
+ - coaster
184
185
  extensions: []
185
186
  extra_rdoc_files: []
186
187
  files:
187
188
  - LICENSE
188
189
  - README.md
189
190
  - Rakefile
191
+ - bin/coaster
190
192
  - lib/coaster.rb
191
193
  - lib/coaster/core_ext.rb
192
194
  - lib/coaster/core_ext/array.rb
@@ -219,7 +221,9 @@ files:
219
221
  homepage: http://github.com/frograms/coaster
220
222
  licenses:
221
223
  - MIT
222
- metadata: {}
224
+ metadata:
225
+ source_code_uri: https://github.com/frograms/coaster
226
+ bug_tracker_uri: https://github.com/frograms/coaster/issues
223
227
  post_install_message:
224
228
  rdoc_options: []
225
229
  require_paths: