one_pager 0.0.4 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 393f334f6573387af0e766ce27375c24ea094b1a905a4b2db5e988a578bd92ed
4
- data.tar.gz: 6d1e56a5fa13a3afbc47da4e00c7afd7e55ceb52d9c82f74a613abf4b5531405
3
+ metadata.gz: 8db36ce25c952e2fec9be88a3ba3dff907fbf78e57246a389c15a04a0cff957c
4
+ data.tar.gz: 1f1a1d139b7b48f0242db3b51664df6cf4fcbdf0228bb265fbe574deb20257bc
5
5
  SHA512:
6
- metadata.gz: 7c8593ca847e084066be3144955cd920752c3a17c57619a8abe380c23346de0ecd32644bf8227bbc181b6522e4f839178e9411acac04062eb63e8e7b0a32e3d1
7
- data.tar.gz: 74a2da941885480f08b1682679d204d24fa4ec5a9d7a6cfe88f90d7fa1f4127593bf480a09ae0dafad8f11904577054f59c63437fc272f299d1abfcae6ecedb6
6
+ metadata.gz: 3954991149ba21e94d0a46247c2a87dab9c7eb8d59ed1341274a088364e673ec16cdd22bee419f0635938852cc90bff4b7152e341ccc2c839bd19c825572c3b7
7
+ data.tar.gz: 8b59716c9a3bf35d673aa35888bbbebeb6788ab1c4e505f7b7c2c4f5b74794c8a4eb30c9efe4be893a579e451129fafd5b2be30c2dbcbfaa47802b1b01da38e9
@@ -1,3 +1,4 @@
1
1
  {
2
- "template": "standard"
2
+ "template": "standard",
3
+ "timestamp_prefix": true
3
4
  }
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- one_pager (0.0.4)
4
+ one_pager (0.0.5)
5
5
  gli (= 2.18.0)
6
6
  tilt (= 2.0.9)
7
7
 
data/bin/one_pager CHANGED
@@ -4,7 +4,8 @@ require 'one_pager'
4
4
 
5
5
  DEFAULT_CONFIGURATION_TEMPLATE =<<-TEMPLATE
6
6
  {
7
- "template": "standard"
7
+ "template": "standard",
8
+ "timestamp_prefix": true
8
9
  }
9
10
  TEMPLATE
10
11
 
@@ -54,9 +55,11 @@ class App
54
55
  c.flag [:op, :output_path]
55
56
 
56
57
  c.action do |global_options,options,args|
57
- filename = "#{args[0].downcase.gsub(" ", "_")}.md"
58
+ configuration = JSON.parse(File.read(".one-pager/config.json"))
59
+ prefix = configuration["timestamp_prefix"] ? "#{Time.now.to_i}_" : ""
60
+ filename = "#{prefix}#{args[0].downcase.gsub(" ", "_")}.md"
58
61
  template = if File.exists?(".one-pager/config.json")
59
- JSON.parse(File.read(".one-pager/config.json"))["template"]
62
+ configuration["template"]
60
63
  elsif options[:template]
61
64
  options[:template]
62
65
  else
@@ -1,3 +1,3 @@
1
1
  module OnePager
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: one_pager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Poage