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 +4 -4
- data/bin/bowie +5 -0
- data/lib/bowie.rb +11 -0
- data/lib/bowie/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3637f82bf12955b91f1647012a7a7e589e181402
|
4
|
+
data.tar.gz: 358cd302089acded7dd2c9a4105492639dba0a68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
11
|
+
date: 2013-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|