bowie 0.0.3 → 0.0.4

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: 2cb0541a34c3bb9c10090f519a281c61304b67c9
4
- data.tar.gz: 47246059c3b1645e5f19ab33583e8832257bf2d5
3
+ metadata.gz: 3637f82bf12955b91f1647012a7a7e589e181402
4
+ data.tar.gz: 358cd302089acded7dd2c9a4105492639dba0a68
5
5
  SHA512:
6
- metadata.gz: 6299f189fab3d469c198b05e9afbb717cce31dd7fab00eb0905674bbfb49ff497d3d47cef3c06bee5523c4d4673f333b320a8e507fe64aeb1bcf55481dd7ad8e
7
- data.tar.gz: 13f64c56a0767abb19fa72d20a62e6a9a27aa773ad3f5339f110a838fe1a4e10f7355a09cdef572b608ed9b4a6b388f372a8332023222ab8c870eed16ef65325
6
+ metadata.gz: 5bf0f02f9dabe7277bb82ac87175999326998fbdeaaef3832b91fa0221711d164addce7cdb9e33fbc0b1c86ea645580350bf483bdab0a2e10f782e0ef817ec0e
7
+ data.tar.gz: be9ecd874ca3cbb442965e2d015d293fb6bc52a2955beec1165d694cc151072a72f085aab41fa97442a097852658468c90adb174f27abb096bf0c9d2a7f65d5b
data/bin/bowie CHANGED
@@ -10,6 +10,11 @@ class BowieCLI < Thor
10
10
  Bowie.install(song)
11
11
  end
12
12
 
13
+ desc "update song", "update the selected package"
14
+ def update(song)
15
+ Bowie.update(song)
16
+ end
17
+
13
18
  desc "uninstall song", "remove the selected package"
14
19
  def uninstall(song)
15
20
  Bowie.uninstall(song)
data/lib/bowie.rb CHANGED
@@ -3,6 +3,7 @@ require "yaml"
3
3
  require "open-uri"
4
4
  require "fileutils"
5
5
  require "git"
6
+ require "logger"
6
7
 
7
8
  module Bowie
8
9
 
@@ -37,4 +38,14 @@ module Bowie
37
38
  FileUtils.rm_rf(path) # use remove_entry_secure for security reasons?
38
39
  end
39
40
 
41
+ # Update the selected package
42
+ def self.update(song)
43
+ name = @songs[song]['name']
44
+ path = "bowie_songs/#{name}"
45
+
46
+ g = Git.open(path, :log => Logger.new(STDOUT))
47
+ g.reset_hard('HEAD')
48
+ g.pull
49
+ end
50
+
40
51
  end
data/lib/bowie/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bowie
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bowie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Moretti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler