gem_hadar 1.6.2 → 1.7.0

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: b19266002e7a830881a1471ad42aeca032cb72a6
4
- data.tar.gz: 73eb9eaed91f110d985746617171566d96f6d750
3
+ metadata.gz: 3f50db52f189580f7f93a738b676722c7c552f3d
4
+ data.tar.gz: bcbee2f09563174ca773351757785fb834780439
5
5
  SHA512:
6
- metadata.gz: 13dbf2ae9a100462ef82e9362f3b528324fcb912adb51096b6054adac4e55696ecce5d08c31cf389f70e331ee432a09242039e43f408e9ee21a8c4b6323b8e1c
7
- data.tar.gz: 8dbf7c6320633ad40474d18e5dda2d403b05d2b6685f5d7642692b2a91b56419efcc73dbd8c85b74009df72bd832e9e6ce90e969fec218241e2e2831c1c950b9
6
+ metadata.gz: 47de50653e71bda9919f728b04fe77a9c001a57a4fbde2941e99b45724f298e0941d2d9defc634a3d1d282ac16d1d8d1ed51d33e46516b727b96013e70b38e9e
7
+ data.tar.gz: 1d4fd8ee1a84a0b89099def5eb49f3fea694228d7976641d512747320b3258e0d7e6b09c64e4e0926289ef83e33b8bce143651bb18927aebd9e38dbcd85552c4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.2
1
+ 1.7.0
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: gem_hadar 1.6.2 ruby lib
2
+ # stub: gem_hadar 1.7.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gem_hadar"
6
- s.version = "1.6.2"
6
+ s.version = "1.7.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
@@ -23,18 +23,18 @@ Gem::Specification.new do |s|
23
23
  s.specification_version = 4
24
24
 
25
25
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
- s.add_development_dependency(%q<gem_hadar>, ["~> 1.6.2"])
26
+ s.add_development_dependency(%q<gem_hadar>, ["~> 1.7.0"])
27
27
  s.add_runtime_dependency(%q<tins>, ["~> 1.0"])
28
28
  s.add_runtime_dependency(%q<rake>, [">= 0"])
29
29
  s.add_runtime_dependency(%q<yard>, [">= 0"])
30
30
  else
31
- s.add_dependency(%q<gem_hadar>, ["~> 1.6.2"])
31
+ s.add_dependency(%q<gem_hadar>, ["~> 1.7.0"])
32
32
  s.add_dependency(%q<tins>, ["~> 1.0"])
33
33
  s.add_dependency(%q<rake>, [">= 0"])
34
34
  s.add_dependency(%q<yard>, [">= 0"])
35
35
  end
36
36
  else
37
- s.add_dependency(%q<gem_hadar>, ["~> 1.6.2"])
37
+ s.add_dependency(%q<gem_hadar>, ["~> 1.7.0"])
38
38
  s.add_dependency(%q<tins>, ["~> 1.0"])
39
39
  s.add_dependency(%q<rake>, [">= 0"])
40
40
  s.add_dependency(%q<yard>, [">= 0"])
@@ -471,10 +471,26 @@ EOT
471
471
  def git_remotes
472
472
  remotes = ENV['GIT_REMOTE']&.split(/\s+/)
473
473
  remotes or remotes = `git remote`.lines.map(&:chomp)
474
- remotes.empty? and fail 'git remotes are required'
475
474
  remotes
476
475
  end
477
476
 
477
+ def master_prepare_task
478
+ namespace :master do
479
+ desc "Prepare a remote git repository for this project"
480
+ task :prepare do
481
+ puts "Create a new remote git repository for #{name.inspect}"
482
+ remote_name = ask?('Name (default: origin) ? ', /^.+$/).
483
+ full?(:[], 0) || 'origin'
484
+ dir = ask?("Directory (default: /git/#{name}.git)? ", /^.+$/).
485
+ full?(:[], 0) || "/git/#{name}.git"
486
+ ssh_account = ask?('SSH account (format: login@host)? ', /^[^@]+@[^@]+/).
487
+ full?(:[], 0) || exit(1)
488
+ sh "ssh #{ssh_account} 'git init --bare #{dir}'"
489
+ sh "git remote add -m master #{remote_name} #{ssh_account}:#{dir}"
490
+ end
491
+ end
492
+ end
493
+
478
494
  def version_push_task
479
495
  namespace :version do
480
496
  git_remotes.each do |gr|
@@ -529,6 +545,7 @@ EOT
529
545
  end
530
546
 
531
547
  def push_task
548
+ master_prepare_task
532
549
  version_push_task
533
550
  master_push_task
534
551
  gem_push_task
@@ -1,6 +1,6 @@
1
1
  class GemHadar
2
2
  # GemHadar version
3
- VERSION = '1.6.2'
3
+ VERSION = '1.7.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_hadar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.2
19
+ version: 1.7.0
20
20
  type: :development
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: 1.6.2
26
+ version: 1.7.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tins
29
29
  requirement: !ruby/object:Gem::Requirement