tinypress 0.1 → 0.1.1
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/lib/tinypress.rb +1 -1
- data/lib/tinypress/site.rb +5 -2
- data/lib/tinypress/version.rb +1 -1
- metadata +1 -3
- data/lib/tinypress/cli.rb +0 -21
- data/lib/tinypress/config.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 813e274395377b5e123fbdd17e4087aca95ac16e
|
4
|
+
data.tar.gz: 8f60d41f1e2ffb88f1e3759041abaf8a9e22e070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f4efdb7e2af3b45ca0bbbd5526c899c4afc724041e6288f14265a03f2fe4aff20c32bca8ab03c0e62d9f9b8bfcc34d8871b90a53678044d84b2296648a324b6
|
7
|
+
data.tar.gz: e24e83034bb160ad968679ecb7cbce8a93b93bc1279a31ff073dba0f0d7690e3a71f22f09401a44d4c02ea6fa23d2e043c0d87d7102d9d512a93d682105a81dd
|
data/lib/tinypress.rb
CHANGED
data/lib/tinypress/site.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
module TinyPress
|
2
2
|
class Site
|
3
|
+
# Contains TinyPress configuration
|
4
|
+
RC_FILE = ".tinypressrc"
|
5
|
+
|
3
6
|
def self.generate
|
4
7
|
if self.site_exists?
|
5
8
|
raise "Whoops! Looks like there's TinyPress site at this location already.".red
|
6
9
|
else
|
7
|
-
|
10
|
+
FileUtils.touch RC_FILE
|
8
11
|
end
|
9
12
|
puts "Established a new TinyPress site.".green
|
10
13
|
end
|
@@ -16,7 +19,7 @@ module TinyPress
|
|
16
19
|
end
|
17
20
|
|
18
21
|
def self.site_exists?
|
19
|
-
File.exists?(
|
22
|
+
File.exists?(RC_FILE)
|
20
23
|
end
|
21
24
|
|
22
25
|
def self.abort_unless_site_exists
|
data/lib/tinypress/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinypress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vidur Murali
|
@@ -60,8 +60,6 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- lib/tinypress/cli.rb
|
64
|
-
- lib/tinypress/config.rb
|
65
63
|
- lib/tinypress/post.rb
|
66
64
|
- lib/tinypress/site.rb
|
67
65
|
- lib/tinypress/version.rb
|
data/lib/tinypress/cli.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module TinyPress
|
2
|
-
class CLI < Thor
|
3
|
-
|
4
|
-
no_commands do
|
5
|
-
def self.setup(command_handlers)
|
6
|
-
@@command_handlers = command_handlers
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
desc "establish", "Generates a TinyPress blog in the current directory"
|
11
|
-
def establish
|
12
|
-
@@command_handlers[:establish].call()
|
13
|
-
end
|
14
|
-
|
15
|
-
desc "publish", "Publishes content/ using provided templates/ to generate published/"
|
16
|
-
def publish
|
17
|
-
@@command_handlers[:publish].call()
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|