Skip to content

Commit 0c57c8b

Browse files
Merge pull request #28 from gustavothecoder/prepare-first-release
Prepare first release
2 parents 78641c2 + fef318e commit 0c57c8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+230
-227
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 0.1.0 / 2023-11-16
2+
3+
* Initial public release

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
# Specify your gem's dependencies in pod.gemspec
5+
# Specify your gem's dependencies in podrb.gemspec
66
gemspec
77

88
gem "rake", "~> 13.0"

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
pod (0.1.0)
4+
podrb (0.1.0)
55
feedjira (~> 3.2)
66
sqlite3 (~> 1.5)
77
tabulo (~> 2.8)
@@ -101,7 +101,7 @@ PLATFORMS
101101
DEPENDENCIES
102102
debug (~> 1.8)
103103
lefthook (~> 1.4)
104-
pod!
104+
podrb!
105105
rake (~> 13.0)
106106
rspec (~> 3.0)
107107
standard (~> 1.31)

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
# Pod
1+
# Podrb
22

33
Simple CLI to manage podcasts.
44

55
## Installation
66

7-
Pod is a Ruby gem published on RubyGems, so you can install running:
7+
Podrb is a Ruby gem published on RubyGems, so you can install running:
88

99
```bash
10-
$ gem install pod
10+
$ gem install podrb
1111
```
1212

1313
## Usage
1414

1515
### Initialization
1616

1717
```bash
18-
$ pod init
18+
$ podrb init
1919
```
2020

2121
### Adding a podcast
2222

2323
```bash
24-
$ pod add ./path/to/rss.xml
25-
$ pod add https://podcast.com/feed.xml
24+
$ podrb add ./path/to/rss.xml
25+
$ podrb add https://podcast.com/feed.xml
2626
```
2727

2828
### Listing podcasts
2929

3030
```bash
31-
$ pod podcasts
32-
$ pod podcasts --fields=id name
31+
$ podrb podcasts
32+
$ podrb podcasts --fields=id name
3333
```
3434

3535
### Listing episodes
3636

3737
```bash
38-
$ pod episodes PODCAST_ID
39-
$ pod podcasts PODCAST_ID --fields=id title duration
40-
$ pod podcasts PODCAST_ID --order-by=duration
38+
$ podrb episodes PODCAST_ID
39+
$ podrb podcasts PODCAST_ID --fields=id title duration
40+
$ podrb podcasts PODCAST_ID --order-by=duration
4141
```
4242

4343
### Opening an episode
4444

4545
```bash
46-
$ pod open EPISODE_ID
47-
$ pod open EPISODE_ID --browser=firefox
48-
$ pod open EPISODE_ID --archive
46+
$ podrb open EPISODE_ID
47+
$ podrb open EPISODE_ID --browser=firefox
48+
$ podrb open EPISODE_ID --archive
4949
```
5050

5151
### Archiving an episode
5252

5353
```bash
54-
$ pod archive EPISODE_ID
54+
$ podrb archive EPISODE_ID
5555
```
5656

5757
### Dearchiving an episode
5858

5959
```bash
60-
$ pod dearchive EPISODE_ID
60+
$ podrb dearchive EPISODE_ID
6161
```
6262

6363
### Synchronizing a podcast
6464

6565
```bash
66-
$ pod sync PODCAST_ID
66+
$ podrb sync PODCAST_ID
6767
```
6868

6969
### Updating the podcast
7070

7171
```bash
72-
$ pod update PODCAST_ID --feed=https://newfeed.com/feed.xml
72+
$ podrb update PODCAST_ID --feed=https://newfeed.com/feed.xml
7373
```
7474

7575
## Development
@@ -78,7 +78,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
7878

7979
## Contributing
8080

81-
Bug reports and pull requests are welcome on GitHub at https://github.com/gustavothecoder/pod.
81+
Bug reports and pull requests are welcome on GitHub at https://github.com/gustavothecoder/podrb.
8282

8383
## License
8484

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# frozen_string_literal: true
33

44
require "bundler/setup"
5-
require "pod"
5+
require "podrb"
66

77
# You can add fixtures and/or initialization code here to make experimenting
88
# with your gem easier. You can also use a different console, if you like.

exe/pod

Lines changed: 0 additions & 5 deletions
This file was deleted.

exe/podrb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env ruby
2+
3+
require "podrb"
4+
5+
Podrb::CLI.start

lib/pod.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/podrb.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
require_relative "podrb/version"
4+
require_relative "podrb/cli"
5+
6+
module Podrb
7+
class Error < StandardError; end
8+
end

lib/pod/cli.rb renamed to lib/podrb/cli.rb

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
require_relative "infrastructure/storage/sql"
77
require_relative "infrastructure/shell_interface"
88

9-
module Pod
9+
module Podrb
1010
class CLI < Thor
1111
# https://github.com/rails/thor/issues/728#issuecomment-642798887
1212
def self.exit_on_failure?
@@ -16,102 +16,102 @@ def self.exit_on_failure?
1616
def self.start(given_args = ARGV, config = {})
1717
command = given_args.first
1818
does_not_require_config = %w[version -V --version init].include?(command)
19-
pod_initialized = Dir.exist?(ENV["HOME"] + "/.config/pod")
20-
if does_not_require_config || pod_initialized
19+
podrb_initialized = Dir.exist?(ENV["HOME"] + "/.config/podrb")
20+
if does_not_require_config || podrb_initialized
2121
super
2222
else
23-
puts "Missing config files. Run `pod init` first."
23+
puts "Missing config files. Run `podrb init` first."
2424
end
2525
end
2626

27-
desc "version", "Displays the pod version"
27+
desc "version", "Displays the podrb version"
2828
map %w[-V --version] => :version
2929
def version
3030
puts VERSION
3131
end
3232

33-
desc "init", "Creates the pod config files"
33+
desc "init", "Creates the podrb config files"
3434
def init
3535
puts "Creating config files..."
3636

37-
result = Pod::Commands::Init::Runner.call
37+
result = Podrb::Commands::Init::Runner.call
3838

39-
puts Pod::Commands::Init::Output.call(result)
39+
puts Podrb::Commands::Init::Output.call(result)
4040
end
4141

42-
desc "add FEED", "Adds a podcast to the Pod database"
43-
method_option :sync_url, type: :string, default: "", desc: "Pod will use this URL to sync the podcast."
42+
desc "add FEED", "Adds a podcast to the Podrb database"
43+
method_option :sync_url, type: :string, default: "", desc: "Podrb will use this URL to sync the podcast."
4444
def add(feed)
4545
puts "Adding the podcast..."
4646

47-
result = Pod::Commands::Add::Runner.call(feed, options)
47+
result = Podrb::Commands::Add::Runner.call(feed, options)
4848

49-
puts Pod::Commands::Add::Output.call(result)
49+
puts Podrb::Commands::Add::Output.call(result)
5050
end
5151

5252
desc "podcasts", "List the podcast records"
5353
method_option :fields, type: :array, default: [], desc: "Select the fields that will be displayed."
5454
def podcasts
55-
result = Pod::Commands::Podcasts::Runner.call(options)
55+
result = Podrb::Commands::Podcasts::Runner.call(options)
5656

57-
puts Pod::Commands::Podcasts::Output.call(result)
57+
puts Podrb::Commands::Podcasts::Output.call(result)
5858
end
5959

6060
desc "episodes PODCAST_ID", "List the podcast episodes"
6161
method_option :fields, type: :array, default: [], desc: "Select the fields that will be displayed."
62-
method_option :order_by, type: :string, default: "id", desc: "Choose how pod will order the episodes."
62+
method_option :order_by, type: :string, default: "id", desc: "Choose how podrb will order the episodes."
6363
method_option :all, type: :boolean, default: false, desc: "List archived episodes too."
6464
def episodes(podcast_id)
65-
result = Pod::Commands::Episodes::Runner.call(podcast_id, options)
65+
result = Podrb::Commands::Episodes::Runner.call(podcast_id, options)
6666

67-
puts Pod::Commands::Episodes::Output.call(result)
67+
puts Podrb::Commands::Episodes::Output.call(result)
6868
end
6969

7070
desc "open EPISODE_ID", "Open a episode in the browser"
7171
method_option :browser, type: :string, default: "firefox", desc: "Choose the browser."
7272
method_option :archive, type: :boolean, default: false, desc: "Archive the episode."
7373
def open(episode_id)
74-
result = Pod::Commands::Open::Runner.call(episode_id, options)
74+
result = Podrb::Commands::Open::Runner.call(episode_id, options)
7575

7676
Infrastructure::ShellInterface.call(result[:metadata])
7777

78-
puts Pod::Commands::Open::Output.call(result)
78+
puts Podrb::Commands::Open::Output.call(result)
7979
end
8080

8181
desc "archive EPISODE_ID", "Archive the episode"
8282
def archive(episode_id)
83-
result = Pod::Commands::Archive::Runner.call(episode_id)
83+
result = Podrb::Commands::Archive::Runner.call(episode_id)
8484

85-
puts Pod::Commands::Archive::Output.call(result)
85+
puts Podrb::Commands::Archive::Output.call(result)
8686
end
8787

8888
desc "dearchive EPISODE_ID", "Dearchive the episode."
8989
def dearchive(episode_id)
90-
result = Pod::Commands::Dearchive::Runner.call(episode_id)
90+
result = Podrb::Commands::Dearchive::Runner.call(episode_id)
9191

92-
puts Pod::Commands::Dearchive::Output.call(result)
92+
puts Podrb::Commands::Dearchive::Output.call(result)
9393
end
9494

95-
desc "delete PODCAST_ID", "Delete the podcast from pod's database."
95+
desc "delete PODCAST_ID", "Delete the podcast from podrb's database."
9696
def delete(podcast_id)
97-
result = Pod::Commands::Delete::Runner.call(podcast_id)
97+
result = Podrb::Commands::Delete::Runner.call(podcast_id)
9898

99-
puts Pod::Commands::Delete::Output.call(result)
99+
puts Podrb::Commands::Delete::Output.call(result)
100100
end
101101

102102
desc "sync PODCAST_ID", "Sync the podcast."
103103
def sync(podcast_id)
104-
result = Pod::Commands::Sync::Runner.call(podcast_id)
104+
result = Podrb::Commands::Sync::Runner.call(podcast_id)
105105

106-
puts Pod::Commands::Sync::Output.call(result)
106+
puts Podrb::Commands::Sync::Output.call(result)
107107
end
108108

109109
desc "update PODCAST_ID", "Update the podcast attributes."
110110
method_option :feed, type: :string, default: "", desc: "Define the podcast feed."
111111
def update(podcast_id)
112-
result = Pod::Commands::Update::Runner.call(podcast_id, options)
112+
result = Podrb::Commands::Update::Runner.call(podcast_id, options)
113113

114-
puts Pod::Commands::Update::Output.call(result)
114+
puts Podrb::Commands::Update::Output.call(result)
115115
end
116116
end
117117
end

0 commit comments

Comments
 (0)