update 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
16
- requirement: &70154038140060 !ruby/object:Gem::Requirement
16
+ requirement: &70176284947000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70154038140060
24
+ version_requirements: *70176284947000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: slop
27
- requirement: &70154038139480 !ruby/object:Gem::Requirement
27
+ requirement: &70176284946500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,24 +32,14 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70154038139480
35
+ version_requirements: *70176284946500
36
36
  description: A Ruby Gem for running a list of update commands from command line.
37
37
  email:
38
38
  - shannonskipper@gmail.com
39
- executables:
40
- - update
39
+ executables: []
41
40
  extensions: []
42
41
  extra_rdoc_files: []
43
- files:
44
- - .gitignore
45
- - Gemfile
46
- - README.md
47
- - bin/update
48
- - lib/update.rb
49
- - lib/update/commands.rb
50
- - lib/update/red-green.rb
51
- - lib/update/version.rb
52
- - update.gemspec
42
+ files: []
53
43
  homepage: https://github.com/havenwood/update
54
44
  licenses: []
55
45
  post_install_message:
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in update.gemspec
4
- gemspec
data/README.md DELETED
@@ -1,13 +0,0 @@
1
- # Update: a gem to run a list of updates
2
- Update is a simple Ruby script for running sets of updates from your command line.
3
- ##Installation and usage
4
- ```ruby
5
- gem install update
6
- update
7
- ```
8
- Running `update` processes the list of updates found in the commands.rb file and then reports back whether the updates were run sucessfully.
9
- ##Edit list of updates
10
- Modify the Hash of update commands in commands.rb to customize update scripts. TODO: Sane and usable way to do this. >.>
11
- ##License
12
- Copyright (c) Shannon Skipper.
13
- MIT License.
data/bin/update DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "update"
3
- require "slop"
4
-
5
- opts = Slop.parse(:help => true, :banner => "Usage: update [options]") do
6
- on :v, :version, 'Print version information' do
7
- puts "Update version #{Update::VERSION} on Ruby #{RUBY_VERSION}"
8
- exit
9
- end
10
- end
11
-
12
- Update.run
@@ -1,10 +0,0 @@
1
- COMMANDS = { "brew update" => "Checking for updated Brew packages...",
2
- "brew upgrade" => "Installing updated Brew packages...",
3
- "brew cleanup --force" => "Cleaning up outdated packages...",
4
- "rvm get head --auto" => "Get the latest RVM...",
5
- "rvm 1.9.3-head do gem update --system" => "Update 1.9.3's RubyGems version...",
6
- "rvm 1.9.3-head do gem update" => "Update 1.9.3 gems...",
7
- "rvm 1.9.3-head do gem cleanup -d" => "Show 1.9.3 gem cleanup dry-run...",
8
- "rvm rbx-head do gem update --system" => "Update Rubinius' RubyGems version...",
9
- "rvm rbx-head do gem update" => "Update Rubinius gems...",
10
- "rvm rbx-head do gem cleanup -d" => "Show Rubinius gem cleanup dry-run..." }
@@ -1,13 +0,0 @@
1
- module RedGreen
2
- def green message
3
- system "tput setaf 2" #color green
4
- puts message
5
- system "tput sgr0" #color reset
6
- end
7
-
8
- def red message
9
- system "tput setaf 1" #color red
10
- puts message
11
- system "tput sgr0" #color reset
12
- end
13
- end
@@ -1,3 +0,0 @@
1
- module Update
2
- VERSION = "0.1.0"
3
- end
data/lib/update.rb DELETED
@@ -1,39 +0,0 @@
1
- require "update/version"
2
- require "update/red-green"
3
- require "update/commands"
4
-
5
- module Update
6
- extend RedGreen
7
-
8
- class << self
9
- def run
10
- run_each_command
11
- report_final_status
12
- end
13
-
14
- private
15
-
16
- def run_each_command
17
- COMMANDS.each do |command, description|
18
- green description
19
- puts `#{command}`
20
- check_for_failures
21
- end
22
- end
23
-
24
- def check_for_failures
25
- unless $?.success?
26
- @failed = true
27
- red "Command failed."
28
- end
29
- end
30
-
31
- def report_final_status
32
- unless @failed
33
- green "Update process completed successfully."
34
- else
35
- red "Update process completed with failures.\a" #chirp
36
- end
37
- end
38
- end
39
- end
data/update.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "update/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "update"
7
- s.version = Update::VERSION
8
- s.authors = ["shan"]
9
- s.email = ["shannonskipper@gmail.com"]
10
- s.homepage = "https://github.com/havenwood/update"
11
- s.summary = %q{a gem to run a list of updates}
12
- s.description = %q{A Ruby Gem for running a list of update commands from command line.}
13
-
14
- s.rubyforge_project = "update"
15
-
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
- s.require_paths = ["lib"]
20
-
21
- s.add_development_dependency "slop"
22
- s.add_runtime_dependency "slop"
23
- end