gpig 0.0.24 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +15 -0
  2. data/bin/gpig +24 -5
  3. data/lib/gpig/version.rb +1 -1
  4. metadata +5 -11
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZmY5ZDBjZWQ4ZDI1ZWM2OTdiNDU0OWFkNDUzODVmYjJjZWQwOTg4NQ==
5
+ data.tar.gz: !binary |-
6
+ MzFiYWY0MDdhMWMyYmEwYjg5ZWIwZDdlM2YxZDU3YTFhNDBjMDM4Mg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NjNkMGQ0MDIyZjU0NjliYjg0NTViNmRmMjdjNTBlYTZjNGY1MTUxMWRlMjBh
10
+ YjRkYTI2YmUwODE2YTFjZDBjMThlYWFjOGRmZDg4MmJiMTQ0ZTZlNzc4NDZl
11
+ YjA1Njc0NjE3MTA0ODYxNTc2Zjc0YTE4MTFiMGU3MjM1MWU2Yjc=
12
+ data.tar.gz: !binary |-
13
+ NWZkYWYzMmZlMjIxOTllNTg3MWExOTI0MzM0ZGFkZWJkZTdjMWYyZmY4MmU5
14
+ ZTAwOGEzM2QyYzFhZDEwOWNiZDQxNzVmMTExZjllNjBkYTg0ZjI3MmM2NjVk
15
+ NDhjZjI3MDhiNmIwMjU4NjdhMTA5MGI3ZmVjMmQ3MGIxZmFlMDg=
data/bin/gpig CHANGED
@@ -3,6 +3,7 @@
3
3
  # Author: William Barry (william@nine.is)
4
4
  # http://github.com/williambarry007/gpig
5
5
  # Description: Gpig is a tool that makes gem development quick and easy.
6
+ # Have fun :)
6
7
 
7
8
  require 'gpig/version'
8
9
  require 'trollop'
@@ -44,6 +45,12 @@ def set_gem_version(gemfile, gemname, version)
44
45
  File.open(gemfile, 'w') {|file| file.write(str2) }
45
46
  end
46
47
 
48
+ def get_gemname
49
+ str = `ls -a *.gemspec`
50
+ str = str.gsub('.gemspec', '').gsub("\n", '')
51
+ return str
52
+ end
53
+
47
54
  opts = Trollop::options do
48
55
  # version "gpig version #{Gpig::VERSION}\n"
49
56
  banner <<-EOS
@@ -65,6 +72,7 @@ EOS
65
72
  opt :message , "The message when committing files to the repo.", :type => :string, :default => "More changes"
66
73
  opt :gemname , "The name of the gem that is being updated.", :type => :string, :default => ""
67
74
  opt :gemfile , "A gemfile that should be updated with the new version of the gem.", :type => :string, :default => ""
75
+ opt :live , "Whether or not to push the new gem to rubygems.", :type => :boolean, :default => false
68
76
  end
69
77
 
70
78
  conf = YAML::load_file(opts.conf_file)
@@ -113,12 +121,23 @@ puts "\nPushing changes to the remote..."
113
121
  puts "\nInstalling version #{new_version} of gem locally..."
114
122
  `gem specific_install -l #{opts.repo_url}`
115
123
 
116
- if (opts.gemfile.length > 0)
117
- if (opts.gemname.strip.length == 0)
118
- str = `ls -a *.gemspec`
119
- str = str.gsub('.gemspec', '').gsub("\n", '')
120
- opts[:gemname] = str
124
+ if opts.live
125
+ opts[:gemname] = get_gemname if opts.gemname.strip.length == 0
126
+ if (opts.gemname.strip.length > 0)
127
+ puts "\nBuilding live version of gem..."
128
+ `gem build #{opts.gemname}.gemspec`
129
+ puts "\nPushing gem to rubygems..."
130
+ `gem push #{opts.gemname}-#{new_version}.gem`
131
+ puts "\nCleaning up..."
132
+ `rm -f *.gem`
133
+ else
134
+ puts "\nError: could not determine gem name for updating gem file."
135
+ puts "To fix this, add the gem name to your gpig config file."
121
136
  end
137
+ end
138
+
139
+ if (opts.gemfile.length > 0)
140
+ opts[:gemname] = get_gemname if opts.gemname.strip.length == 0
122
141
  if (opts.gemname.strip.length > 0)
123
142
  puts "\nUpdating version of #{opts.gemname} in #{opts.gemfile}..."
124
143
  set_gem_version(opts.gemfile, opts.gemname, new_version)
@@ -1,3 +1,3 @@
1
1
  module Gpig
2
- VERSION = '0.0.24'
2
+ VERSION = '0.0.31'
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
5
- prerelease:
4
+ version: 0.0.31
6
5
  platform: ruby
7
6
  authors:
8
7
  - William Barry
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-14 00:00:00.000000000 Z
11
+ date: 2013-09-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: specific_install
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: trollop
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -60,26 +55,25 @@ files:
60
55
  - README.md
61
56
  homepage: http://github.com/williambarry007/gpig
62
57
  licenses: []
58
+ metadata: {}
63
59
  post_install_message:
64
60
  rdoc_options: []
65
61
  require_paths:
66
62
  - lib
67
63
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
64
  requirements:
70
65
  - - ! '>='
71
66
  - !ruby/object:Gem::Version
72
67
  version: '0'
73
68
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
69
  requirements:
76
70
  - - ! '>='
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0'
79
73
  requirements: []
80
74
  rubyforge_project:
81
- rubygems_version: 1.8.25
75
+ rubygems_version: 2.0.6
82
76
  signing_key:
83
- specification_version: 3
77
+ specification_version: 4
84
78
  summary: A gem development tool.
85
79
  test_files: []