dropcaster 0.0.5.rc3 → 0.0.5
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.markdown +2 -2
- data/VISION.markdown +2 -2
- data/dropcaster.gemspec +1 -1
- data/lib/dropcaster/version.rb +1 -1
- data/lib/dropcaster.rb +2 -0
- data/test/Vagrantfile +22 -6
- data/test/bin/dropcaster-tmux +23 -0
- data/test/bin/vagrant-status +70 -0
- data/test/fixtures/status.csv +16 -0
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a2befcc7ab20aed1392ca61a37df2d6a41f29a5
|
4
|
+
data.tar.gz: 8542ae4364be81fbd9cfe1fd9ac00ef2f39454bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc193457ac97980bf6326a6db05f79e15bce19f274500caaf4f8bb1bfdaef23c8f896c9c55afd5ebdd44b8bbfb075a4a79729e514808002f7e3793876d32e436
|
7
|
+
data.tar.gz: 676ad4b1263dbfa0734fa4f944fde8bddf2344ee021e0a299b4a02e06e37a747464b7808927374ea7bc2ece4bd65c8eb3bee042fcc81fdba2fd4332ce0800896
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dropcaster (0.0.5.
|
4
|
+
dropcaster (0.0.5.rc4)
|
5
5
|
activesupport
|
6
|
+
bundler
|
6
7
|
ruby-mp3info
|
7
8
|
|
8
9
|
GEM
|
@@ -93,7 +94,6 @@ PLATFORMS
|
|
93
94
|
x86-mingw32
|
94
95
|
|
95
96
|
DEPENDENCIES
|
96
|
-
bundler
|
97
97
|
dropcaster!
|
98
98
|
guard-bundler
|
99
99
|
guard-minitest
|
data/README.markdown
CHANGED
@@ -22,7 +22,7 @@ To get started, use RubyGems to install Dropcaster:
|
|
22
22
|
|
23
23
|
$ gem install dropcaster
|
24
24
|
|
25
|
-
|
25
|
+
Once installed, you can use the `dropcaster` command to generate a new podcast feed document.
|
26
26
|
|
27
27
|
# Basic Usage
|
28
28
|
|
@@ -156,7 +156,7 @@ Modifying the sidecar file does not change the UUID, because it only affects the
|
|
156
156
|
|
157
157
|
Dropcaster uses an ERB template to generate the XML feed. The template was written so that it is easy to understand, but not necessarily in a way that would make the output rather nice-looking. That should not be an issue, as long as the XML is correct.
|
158
158
|
|
159
|
-
It you prefer a more aesthetically pleasing output, just pipe the output of Dropcaster through `xmllint`, which is part of [libxml](http://xmlsoft.org/)
|
159
|
+
It you prefer a more aesthetically pleasing output, just pipe the output of Dropcaster through `xmllint`, which is part of [libxml](http://xmlsoft.org/):
|
160
160
|
|
161
161
|
dropcaster | xmllint --format -
|
162
162
|
|
data/VISION.markdown
CHANGED
@@ -22,7 +22,7 @@ To get started, use RubyGems to install Dropcaster:
|
|
22
22
|
|
23
23
|
$ gem install dropcaster
|
24
24
|
|
25
|
-
|
25
|
+
Once installed, you can use the `dropcaster` command to generate a new podcast feed document.
|
26
26
|
|
27
27
|
# Basic Usage
|
28
28
|
|
@@ -164,7 +164,7 @@ Modifying the sidecar file does not change the UUID, because it only affects the
|
|
164
164
|
|
165
165
|
Dropcaster uses an ERB template to generate the XML feed. The template was written so that it is easy to understand, but not necessarily in a way that would make the output rather nice-looking. That should not be an issue, as long as the XML is correct.
|
166
166
|
|
167
|
-
It you prefer a more aesthetically pleasing output, just pipe the output of Dropcaster through `xmllint`, which is part of [libxml](http://xmlsoft.org/)
|
167
|
+
It you prefer a more aesthetically pleasing output, just pipe the output of Dropcaster through `xmllint`, which is part of [libxml](http://xmlsoft.org/):
|
168
168
|
|
169
169
|
dropcaster | xmllint --format -
|
170
170
|
|
data/dropcaster.gemspec
CHANGED
@@ -20,8 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'ruby-mp3info'
|
22
22
|
spec.add_dependency 'activesupport'
|
23
|
+
spec.add_dependency 'bundler'
|
23
24
|
|
24
|
-
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'minitest'
|
26
26
|
spec.add_development_dependency 'rake'
|
27
27
|
spec.add_development_dependency 'libxml-ruby'
|
data/lib/dropcaster/version.rb
CHANGED
data/lib/dropcaster.rb
CHANGED
data/test/Vagrantfile
CHANGED
@@ -9,10 +9,26 @@ Vagrant.configure(2) do |config|
|
|
9
9
|
vb.memory = '256'
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
%w(1.9.1 2.0 2.1 2.2).each do |version|
|
13
|
+
ruby = "ruby#{version}"
|
14
|
+
name = "ruby-#{version.tr('.', '-')}"
|
15
|
+
|
16
|
+
config.vm.define(name) do |cfg|
|
17
|
+
cfg.vm.hostname = name
|
18
|
+
cfg.vm.provision 'shell', inline: <<-SHELL
|
19
|
+
sudo apt-get install software-properties-common
|
20
|
+
sudo add-apt-repository ppa:brightbox/ruby-ng
|
21
|
+
sudo apt-get update
|
22
|
+
sudo apt-get install -y git libxml2-dev zlib1g-dev #{ruby} #{ruby}-dev
|
23
|
+
|
24
|
+
sudo su -c 'echo "LC_ALL=en_US.UTF-8" >> /etc/environment'
|
25
|
+
touch .hushlogin
|
26
|
+
|
27
|
+
sudo gem install bundler
|
28
|
+
cd /dropcaster
|
29
|
+
bundle
|
30
|
+
bundle exec rake
|
31
|
+
SHELL
|
32
|
+
end
|
33
|
+
end
|
18
34
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "Fetching vagrant status ..."
|
4
|
+
cmd=${1-'vagrant status'}
|
5
|
+
|
6
|
+
for vm in $(vagrant status --machine-readable | ruby bin/vagrant-status); do
|
7
|
+
echo "Creating pane for $vm running $cmd"
|
8
|
+
|
9
|
+
if tmux list-windows | grep dropcaster > /dev/null; then
|
10
|
+
tmux split-window -h -d -t dropcaster "$cmd $vm"
|
11
|
+
else
|
12
|
+
tmux new-window -n dropcaster -d "$cmd $vm"
|
13
|
+
fi
|
14
|
+
done
|
15
|
+
|
16
|
+
# don't close exited panes
|
17
|
+
tmux set-window-option remain-on-exit on -t dropcaster tiled
|
18
|
+
|
19
|
+
# Arrange windows
|
20
|
+
tmux select-layout -t dropcaster tiled
|
21
|
+
|
22
|
+
echo "Activating target window"
|
23
|
+
tmux select-window -t dropcaster
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
require 'csv'
|
4
|
+
|
5
|
+
headers = [
|
6
|
+
'timestamp', # is a Unix timestamp in UTC of when the message was printed.
|
7
|
+
'target', # is the target of the following output. This is empty if the message is related to Vagrant globally. Otherwise, this is generally a machine name so you can relate output to a specific machine when multi-VM is in use.
|
8
|
+
'type', # is the type of machine-readable message being outputted. There are a set of standard types which are covered later.
|
9
|
+
'data', # is zero or more comma-separated values associated with the prior type. The exact amount and meaning of this data is type-dependent, so you must read the documentation associated with the type to understand fully.
|
10
|
+
]
|
11
|
+
|
12
|
+
types = [
|
13
|
+
'box-name', # Name of a box installed into Vagrant.
|
14
|
+
'box-provider', # Provider for an installed box.
|
15
|
+
'cli-command', # A subcommand of vagrant that is available.
|
16
|
+
'error-exit', # An error occurred that caused Vagrant to exit. This contains that error. Contains two data elements: type of error, error message.
|
17
|
+
'provider-name', # The provider name of the target machine. targeted
|
18
|
+
'state', # The state ID of the target machine. targeted
|
19
|
+
'state-human-long', # Human-readable description of the state of the machine. This is the long version, and may be a paragraph or longer. targeted
|
20
|
+
'state-human-short', # Human-readable description of the state of the machine. This is the short version, limited to at most a sentence. targeted
|
21
|
+
]
|
22
|
+
|
23
|
+
module Vagrant
|
24
|
+
Box = Struct.new(:name, :provider)
|
25
|
+
State = Struct.new(:id, :short, :long)
|
26
|
+
Error = Struct.new(:type, :message)
|
27
|
+
|
28
|
+
class VM
|
29
|
+
attr_accessor :box, :state, :command, :provider, :error
|
30
|
+
|
31
|
+
def initialize(target)
|
32
|
+
@target = target
|
33
|
+
@box = Box.new
|
34
|
+
@state = State.new
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
virtual_machines = Hash.new do |vms, target|
|
40
|
+
vms[target] = Vagrant::VM.new(target)
|
41
|
+
end
|
42
|
+
|
43
|
+
CSV.new(ARGF, headers: headers).each do |message|
|
44
|
+
vm = virtual_machines[message['target']]
|
45
|
+
data = message['data'].split('%!(VAGRANT_COMMA)')
|
46
|
+
|
47
|
+
case message['type']
|
48
|
+
when 'box-name'
|
49
|
+
vm.box.name = data
|
50
|
+
when 'box-provider'
|
51
|
+
vm.box.provider = data
|
52
|
+
when 'state'
|
53
|
+
vm.state.id = data
|
54
|
+
when 'state-human-long'
|
55
|
+
vm.state.long = data
|
56
|
+
when 'state-human-short'
|
57
|
+
vm.state.short = data
|
58
|
+
when 'cli-command'
|
59
|
+
vm.command = data
|
60
|
+
when 'error-exit'
|
61
|
+
vm.error = Vagrant::Error.new(data[0], data[1])
|
62
|
+
when 'provider-name'
|
63
|
+
vm.provider = data
|
64
|
+
else
|
65
|
+
raise "Unknown type: #{message['type']}"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
puts virtual_machines.map{|name, vm| name}
|
70
|
+
#puts virtual_machines.map{|name, vm| "#{name}: #{vm.state.short}"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
1423250819,ruby1.9.1,provider-name,virtualbox
|
2
|
+
1423250819,ruby1.9.1,state,not_created
|
3
|
+
1423250819,ruby1.9.1,state-human-short,not created
|
4
|
+
1423250819,ruby1.9.1,state-human-long,The environment has not yet been created. Run `vagrant up` to\ncreate the environment. If a machine is not created%!(VAGRANT_COMMA) only the\ndefault provider will be shown. So if a provider is not listed%!(VAGRANT_COMMA)\nthen the machine is not created for that environment.
|
5
|
+
1423250819,ruby2.0,provider-name,virtualbox
|
6
|
+
1423250819,ruby2.0,state,running
|
7
|
+
1423250819,ruby2.0,state-human-short,running
|
8
|
+
1423250819,ruby2.0,state-human-long,The VM is running. To stop this VM%!(VAGRANT_COMMA) you can run `vagrant halt` to\nshut it down forcefully%!(VAGRANT_COMMA) or you can run `vagrant suspend` to simply\nsuspend the virtual machine. In either case%!(VAGRANT_COMMA) to restart it again%!(VAGRANT_COMMA)\nsimply run `vagrant up`.
|
9
|
+
1423250819,ruby2.1,provider-name,virtualbox
|
10
|
+
1423250819,ruby2.1,state,not_created
|
11
|
+
1423250819,ruby2.1,state-human-short,not created
|
12
|
+
1423250819,ruby2.1,state-human-long,The environment has not yet been created. Run `vagrant up` to\ncreate the environment. If a machine is not created%!(VAGRANT_COMMA) only the\ndefault provider will be shown. So if a provider is not listed%!(VAGRANT_COMMA)\nthen the machine is not created for that environment.
|
13
|
+
1423250819,ruby2.2,provider-name,virtualbox
|
14
|
+
1423250819,ruby2.2,state,not_created
|
15
|
+
1423250819,ruby2.2,state-human-short,not created
|
16
|
+
1423250819,ruby2.2,state-human-long,The environment has not yet been created. Run `vagrant up` to\ncreate the environment. If a machine is not created%!(VAGRANT_COMMA) only the\ndefault provider will be shown. So if a provider is not listed%!(VAGRANT_COMMA)\nthen the machine is not created for that environment.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropcaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.5
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas E. Rabenau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-mp3info
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -259,9 +259,12 @@ files:
|
|
259
259
|
- templates/channel.html.erb
|
260
260
|
- templates/channel.rss.erb
|
261
261
|
- test/Vagrantfile
|
262
|
+
- test/bin/dropcaster-tmux
|
263
|
+
- test/bin/vagrant-status
|
262
264
|
- test/extensions/windows.rb
|
263
265
|
- test/fixtures/channel.yml
|
264
266
|
- test/fixtures/iTunes.mp3
|
267
|
+
- test/fixtures/status.csv
|
265
268
|
- test/fixtures/test_template.json.erb
|
266
269
|
- test/helper.rb
|
267
270
|
- test/unit/test_app.rb
|
@@ -284,20 +287,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
284
287
|
version: '0'
|
285
288
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
289
|
requirements:
|
287
|
-
- - "
|
290
|
+
- - ">="
|
288
291
|
- !ruby/object:Gem::Version
|
289
|
-
version:
|
292
|
+
version: '0'
|
290
293
|
requirements: []
|
291
294
|
rubyforge_project:
|
292
|
-
rubygems_version: 2.4.
|
295
|
+
rubygems_version: 2.4.5
|
293
296
|
signing_key:
|
294
297
|
specification_version: 4
|
295
298
|
summary: Simple Podcast Publishing with Dropbox
|
296
299
|
test_files:
|
297
300
|
- test/Vagrantfile
|
301
|
+
- test/bin/dropcaster-tmux
|
302
|
+
- test/bin/vagrant-status
|
298
303
|
- test/extensions/windows.rb
|
299
304
|
- test/fixtures/channel.yml
|
300
305
|
- test/fixtures/iTunes.mp3
|
306
|
+
- test/fixtures/status.csv
|
301
307
|
- test/fixtures/test_template.json.erb
|
302
308
|
- test/helper.rb
|
303
309
|
- test/unit/test_app.rb
|