hgrc_generator 0.0.2 → 0.0.3

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: 27688075f166604e1c871d7246517a296f10b6d3
4
- data.tar.gz: 5cf5cd8e6b21eafdb6aff07aeef0116cf692695e
3
+ metadata.gz: ce78b0cc7176ea176ca5b47b47698d63a6ac592b
4
+ data.tar.gz: 6ac856a27d6aeead59fc29f959b7f787bd2589d8
5
5
  SHA512:
6
- metadata.gz: 3d6857188faacb093584ad289b7f8970024f2a8fc7dc504c79f643017fcaff6bdaeeb32f2a1dff2480733b0fc5b9bab6005ced9f43bf868ff1caa25de638ba48
7
- data.tar.gz: 8b3a8f5b61b04f364d0a21a510f98fa45f66c3ea72ca50b2f247a305a3bae7206c6b374179888b549d5bf4adf8010781a4897a319a8d60527e5eaec79801f2de
6
+ metadata.gz: 9e8915301c1f413e3da3694eba27de0511357976a5ef6f33d6cd0696d4f3ac5d523674cdc41df386f7e94ce33f9a4504f08d815d29980c752bbb54593d378d43
7
+ data.tar.gz: fc78e9b14eea3b08535435ef5a959b447d134f9ce9ff2e33e4590b72a1dec771fd18e57103649e41944e863d44e3878f0650882d4988c909b30912ae216b9444
checksums.yaml.gz.sig CHANGED
Binary file
@@ -8,20 +8,23 @@ module HgrcGenerator
8
8
  module Core
9
9
  extend self
10
10
 
11
+ HGRC_PATH = '.hg/hgrc'
12
+
11
13
  def run(args)
12
14
  params = Params.new(args)
15
+
13
16
  if !File.directory?('.hg')
14
17
  puts 'The current path does not appear to be the root ' +
15
18
  'of a Mercurial repo - .hg folder does not exist.'
16
19
  else
17
- if File.file?('.hg/hgrc') && !params.dry_run
18
- puts 'hgrc already exists.'
20
+ if File.file?(HGRC_PATH) && !params.dry_run
21
+ puts "#{HGRC_PATH} already exists."
19
22
  else
20
23
  contents = Content.create(params)
21
24
  if params.dry_run
22
25
  puts contents
23
26
  else
24
- File.write '.hg/hgrc', contents
27
+ File.write HGRC_PATH, contents
25
28
  end
26
29
  end
27
30
  end
@@ -3,7 +3,9 @@ module HgrcGenerator
3
3
  attr_reader :include_prefix, :branches, :dry_run, :help
4
4
 
5
5
  HELP = <<-DOC
6
- Usage: hgrc [--include-prefix] [--dry_run] BRANCH_LIST
6
+ hgrc_generator version #{HgrcGenerator::VERSION}
7
+
8
+ Usage: hgrc_generator [--include-prefix] [--dry_run] BRANCH_LIST
7
9
 
8
10
  Create an hgrc file for the currrent project.
9
11
 
@@ -1,3 +1,3 @@
1
1
  module HgrcGenerator
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -3,6 +3,7 @@ end
3
3
 
4
4
  root = File.dirname(__FILE__)
5
5
 
6
+ require File.join(root, 'hgrc_generator', 'version')
6
7
  require File.join(root, 'hgrc_generator', 'section')
7
8
 
8
9
  Dir[File.join(root, 'hgrc_generator', '**', '*.rb')].each do |file|
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hgrc_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Herrick
metadata.gz.sig CHANGED
Binary file