gem_hadar 1.7.1 → 1.8.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: 8a83fc204351665961aa70c977c10de748ef2865
4
- data.tar.gz: 04a0bc3ba3fcaf0cadf83bab527ec7b76752b828
3
+ metadata.gz: e923401b899de21996c45f8d5c313a9800482699
4
+ data.tar.gz: 55f7ad8c0a7fecbb52dba55d0273ad3a51455c09
5
5
  SHA512:
6
- metadata.gz: ae27b14c8de95b790f376302d489bf0ac42a72e14e2075d1c45aa0399f772ce58e883c64f090f3e84c79824b3b14d5f31b00b376b3a81184f54f134782a27eb8
7
- data.tar.gz: caecd3ad3267fa12756468d379d710190867bf814a06922da527f4facd768ee353fdea25eda2449c88c3c34b5dc0a93c7e264f12d55ebe5e6c3043f0c787a193
6
+ metadata.gz: dd28dfaf25e156bff9d6b5a5aa616d6fa01f9d86c818ec7cb827aa3ec38a4a73876f2c94d453214e51ca881f1b07d065583753aa190aa8d20c3b132051a77f4b
7
+ data.tar.gz: ec3bfa9486977bc1f281126e333f0b38dfaf056377e69f7ddab939be944b93d31dbfdb8720c6b02d6dae07f17fca15c0640710ae23b9ca87a77fdef80203bce6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.1
1
+ 1.8.0
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: gem_hadar 1.7.1 ruby lib
2
+ # stub: gem_hadar 1.8.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gem_hadar"
6
- s.version = "1.7.1"
6
+ s.version = "1.8.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"]
10
10
  s.authors = ["Florian Frank"]
11
- s.date = "2016-04-12"
11
+ s.date = "2016-09-27"
12
12
  s.description = "This library contains some useful functionality to support the development of Ruby Gems"
13
13
  s.email = "flori@ping.de"
14
14
  s.extra_rdoc_files = ["README.md", "lib/gem_hadar.rb", "lib/gem_hadar/version.rb"]
@@ -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.7.1"])
26
+ s.add_development_dependency(%q<gem_hadar>, ["~> 1.8.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.7.1"])
31
+ s.add_dependency(%q<gem_hadar>, ["~> 1.8.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.7.1"])
37
+ s.add_dependency(%q<gem_hadar>, ["~> 1.8.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"])
@@ -299,6 +299,51 @@ EOT
299
299
  end
300
300
  end
301
301
 
302
+ def version_show_task
303
+ namespace :version do
304
+ desc m = "Displaying the current version"
305
+ task :show do
306
+ dir = File.join('lib', path_name)
307
+ version_file = File.join(dir, 'version.rb')
308
+ m = Module.new
309
+ m.instance_eval File.read(version_file)
310
+ version_rb = m.const_get(
311
+ [ path_module, path_module, 'VERSION' ] * '::'
312
+ )
313
+ equal = version == version_rb ? '==' : '!='
314
+ puts "version.rb=#{version_rb} #{equal} VERSION=#{version}"
315
+ end
316
+ end
317
+ end
318
+
319
+ def gem_hadar_update_task
320
+ namespace :gem_hadar do
321
+ desc 'Update gem_hadar a different version'
322
+ task :update do
323
+ answer = ask?("Which gem_hadar version? ", /^((?:\d+.){2}(?:\d+))$/)
324
+ unless answer
325
+ warn "Invalid version specification!"
326
+ exit 1
327
+ end
328
+ gem_hadar_version = answer[0]
329
+ filename = "#{name}.gemspec"
330
+ old_data = File.read(filename)
331
+ new_data = old_data.gsub(
332
+ /(add_(?:development_)?dependency\(%q<gem_hadar>, \["~> )([\d.]+)("\])/
333
+ ) { "#$1#{gem_hadar_version}#$3" }
334
+ if old_data == new_data
335
+ warn "#{filename.inspect} already depends on gem_hadar "\
336
+ "#{gem_hadar_version} => Do nothing."
337
+ else
338
+ warn "Upgrading #{filename.inspect} to #{gem_hadar_version}."
339
+ secure_write(filename) do |spec|
340
+ spec.write new_data
341
+ end
342
+ end
343
+ end
344
+ end
345
+ end
346
+
302
347
  def gemspec_task
303
348
  desc 'Create a gemspec file'
304
349
  task :gemspec => :version do
@@ -544,11 +589,21 @@ EOT
544
589
  end
545
590
  end
546
591
 
592
+ def git_remotes_task
593
+ task :git_remotes do
594
+ puts git_remotes.map { |r|
595
+ url = `git remote get-url #{r.inspect}`.chomp
596
+ "#{r} #{url}"
597
+ }
598
+ end
599
+ end
600
+
547
601
  def push_task
548
602
  master_prepare_task
549
603
  version_push_task
550
604
  master_push_task
551
605
  gem_push_task
606
+ git_remotes_task
552
607
  task :modified do
553
608
  unless (files = `git status --porcelain`.gsub(/^\s*\S\s+/, '').lines).empty?
554
609
  warn "There are still modified files:\n#{files * ''}"
@@ -602,6 +657,8 @@ EOT
602
657
  build_task
603
658
  rvm_task
604
659
  version_task
660
+ version_show_task
661
+ gem_hadar_update_task
605
662
  gemspec_task
606
663
  gems_install_task
607
664
  doc_task
@@ -1,6 +1,6 @@
1
1
  class GemHadar
2
2
  # GemHadar version
3
- VERSION = '1.7.1'
3
+ VERSION = '1.8.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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_hadar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.7.1
19
+ version: 1.8.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.7.1
26
+ version: 1.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tins
29
29
  requirement: !ruby/object:Gem::Requirement