gem_template 0.0.4 → 0.0.6

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: 8187e92dd3fc04d2e3631cda7bd426321c21a996
4
- data.tar.gz: f5e9bc7b90a9d217aa3ca50d344e1ab3a84bd8be
3
+ metadata.gz: cb7f5fef50d3eb0b142270bf352861bff0b2e0de
4
+ data.tar.gz: b2a6cc5ad3d1076289b08042830e51531037c58d
5
5
  SHA512:
6
- metadata.gz: 5ff6df2b121e53abe518b5ed486f18c8b4b7d4118833fe29efd5b468d7fb702933e770dcf6ca5240dbad81a06982c377c3d166b28d8505b7416c44d2d5f32d98
7
- data.tar.gz: ab2b48a56b033cb4846ce0c46f9459d65882c2c0d46ffeef89fbc684342c871aaf9dc6b1825666142ecf8e558e1de60625e29cec10a4cb57e5f4e2d01c4396bf
6
+ metadata.gz: 0b223589d09c5b5517b8f7e362fd12b37e9ff9ebd0366557000294ec3b3a9ace7c66d1f82fedb13b9b764e8e73401e1d1ff5f9d5ce37480953b24bc56edec59b
7
+ data.tar.gz: 4b1664ef00a2ce6a62feb897f0429dade16dcbe2beb34c6770b38cfa2ccc730ed3bb80a0f90a1d6e64747642a6824b3481292bb49cd45dc7ad0488c322ba2049
@@ -9,24 +9,32 @@ exit unless system(
9
9
  )
10
10
 
11
11
  Dir.chdir(dirname) do
12
- puts "\nFetching..."
13
- system("git fetch")
14
12
 
15
13
  puts "\nWriting .ruby-gemset..."
16
14
  system("echo #{dirname} > .ruby-gemset")
17
15
 
18
- puts "\nWriting .ruby-version..."
19
- system("echo #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} > .ruby-version")
16
+ if RUBY_PATCHLEVEL.to_i < 0
17
+ puts "\e[31m\nCouldn't write .ruby-version :( Removing it for now.\e[0m"
18
+ system("rm .ruby-version")
19
+ else
20
+ puts "\nWriting .ruby-version..."
21
+ system("echo #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} > .ruby-version")
22
+ end
20
23
 
21
24
  puts "\nInstalling namer..."
22
25
  system("gem install namer")
23
26
 
24
- puts "\nGemTemplate -> #{classname}..."
27
+ puts "\nRenaming GemTemplate to #{classname}..."
25
28
  system("namer gem_template:#{dirname} GemTemplate:#{classname}")
26
29
 
27
- puts "\nMerging branches..."
28
- ARGV[1..-1].each do |branch|
29
- system("git merge origin/#{branch}")
30
+ unless ARGV[1..-1].empty?
31
+ puts "\nFetching..."
32
+ system("git fetch")
33
+
34
+ puts "\nMerging branches..."
35
+ ARGV[1..-1].each do |branch|
36
+ system("git merge origin/#{branch}")
37
+ end
30
38
  end
31
39
  end
32
40
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "gem_template"
7
- spec.version = "0.0.4"
7
+ spec.version = "0.0.6"
8
8
  spec.authors = ["Winton Welsh"]
9
9
  spec.email = ["mail@wintoni.us"]
10
10
  spec.description = %q{Gem template for new Ruby projects}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-20 00:00:00.000000000 Z
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namer