one_pager 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e2697b75174b2fbf8afe31b60ccff236e721acf1b7cb23763e1b0ec0256075b9
4
+ data.tar.gz: ead23530734c57f232850b8769ca0d1382ab6aef3d5a7a60b09b945a3f2b3fb1
5
+ SHA512:
6
+ metadata.gz: 854f309491e44a1fe52a3569561d84b207fdcd79b61e7c4d579ef2856e1b46420f4423e348a14e0a695e39a7656aababb99566b73a56938b06ad6d571378073e
7
+ data.tar.gz: 1c5a8f9ee4ffb235ed762e24943c818d8bfd82bdd566b26594c4157a085532dcc2a899dc0255245013b7bd4987f06ab811fcd8cc4eea05866712b6937fe3eb4d
data/.gitignore ADDED
File without changes
@@ -0,0 +1,3 @@
1
+ {
2
+ "template": "standard"
3
+ }
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ one_pager (0.0.1)
5
+ gli (= 2.18.0)
6
+ tilt (= 2.0.9)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ aruba (0.14.8)
12
+ childprocess (>= 0.6.3, < 1.1.0)
13
+ contracts (~> 0.9)
14
+ cucumber (>= 1.3.19)
15
+ ffi (~> 1.9)
16
+ rspec-expectations (>= 2.99)
17
+ thor (~> 0.19)
18
+ backports (3.11.4)
19
+ builder (3.2.3)
20
+ childprocess (1.0.1)
21
+ rake (< 13.0)
22
+ coderay (1.1.2)
23
+ contracts (0.16.0)
24
+ cucumber (3.1.2)
25
+ builder (>= 2.1.2)
26
+ cucumber-core (~> 3.2.0)
27
+ cucumber-expressions (~> 6.0.1)
28
+ cucumber-wire (~> 0.0.1)
29
+ diff-lcs (~> 1.3)
30
+ gherkin (~> 5.1.0)
31
+ multi_json (>= 1.7.5, < 2.0)
32
+ multi_test (>= 0.1.2)
33
+ cucumber-core (3.2.1)
34
+ backports (>= 3.8.0)
35
+ cucumber-tag_expressions (~> 1.1.0)
36
+ gherkin (~> 5.0)
37
+ cucumber-expressions (6.0.1)
38
+ cucumber-tag_expressions (1.1.1)
39
+ cucumber-wire (0.0.1)
40
+ diff-lcs (1.3)
41
+ ffi (1.10.0)
42
+ gherkin (5.1.0)
43
+ gli (2.18.0)
44
+ method_source (0.9.2)
45
+ multi_json (1.13.1)
46
+ multi_test (0.1.2)
47
+ pry (0.12.2)
48
+ coderay (~> 1.1.0)
49
+ method_source (~> 0.9.0)
50
+ rake (12.3.2)
51
+ rdoc (6.1.1)
52
+ rspec-expectations (3.8.2)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.8.0)
55
+ rspec-support (3.8.0)
56
+ thor (0.20.3)
57
+ tilt (2.0.9)
58
+
59
+ PLATFORMS
60
+ ruby
61
+
62
+ DEPENDENCIES
63
+ aruba
64
+ one_pager!
65
+ pry
66
+ rake
67
+ rdoc
68
+
69
+ BUNDLED WITH
70
+ 2.0.1
data/README.md ADDED
File without changes
data/README.rdoc ADDED
@@ -0,0 +1,13 @@
1
+ = one_pager
2
+
3
+ Everyone loves version control yeah? People also love to keep our business proposals organized.
4
+ Why not have both? Using `one-pager` you can easily generate new one-pagers anywhere in your system.
5
+ Simply run `$ one-pager init` in any directory and it will create a `docs/one-pagers` folder if it does
6
+ not exist, as well as a `.one-pager` file if it already doesn't exist (this file is used for setting configurations).
7
+
8
+ From here you can run commands such as `one-pager create "Allow users to purchase in DogeCoin"` and it will
9
+ generate a markdown file (`doc/one-pagers/allow_users_to_purchase_in_dogecoin.md`), which will be pre-populated with
10
+ with your one-pager template. This can be configured via the `.one-pager` file.
11
+
12
+ :include:one_pager.rdoc
13
+
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ require 'rake/clean'
2
+ require 'rubygems'
3
+ require 'rubygems/package_task'
4
+ require 'rdoc/task'
5
+ require 'cucumber'
6
+ require 'cucumber/rake/task'
7
+ Rake::RDocTask.new do |rd|
8
+ rd.main = "README.rdoc"
9
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
+ rd.title = 'Your application title'
11
+ end
12
+
13
+ spec = eval(File.read('one_pager.gemspec'))
14
+
15
+ Gem::PackageTask.new(spec) do |pkg|
16
+ end
17
+ CUKE_RESULTS = 'results.html'
18
+ CLEAN << CUKE_RESULTS
19
+ desc 'Run features'
20
+ Cucumber::Rake::Task.new(:features) do |t|
21
+ opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
22
+ opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
23
+ t.cucumber_opts = opts
24
+ t.fork = false
25
+ end
26
+
27
+ desc 'Run features tagged as work-in-progress (@wip)'
28
+ Cucumber::Rake::Task.new('features:wip') do |t|
29
+ tag_opts = ' --tags ~@pending'
30
+ tag_opts = ' --tags @wip'
31
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
32
+ t.fork = false
33
+ end
34
+
35
+ task :cucumber => :features
36
+ task 'cucumber:wip' => 'features:wip'
37
+ task :wip => 'features:wip'
38
+ require 'rake/testtask'
39
+ Rake::TestTask.new do |t|
40
+ t.libs << "test"
41
+ t.test_files = FileList['test/*_test.rb']
42
+ end
43
+
44
+ task :default => [:test,:features]
data/bin/one_pager ADDED
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env ruby
2
+ require 'gli'
3
+ require 'one_pager'
4
+
5
+ DEFAULT_CONFIGURATION_TEMPLATE =<<-TEMPLATE
6
+ {
7
+ "template": "standard"
8
+ }
9
+ TEMPLATE
10
+
11
+ class App
12
+ extend GLI::App
13
+
14
+ program_desc 'Describe your application here'
15
+
16
+ version OnePager::VERSION
17
+
18
+ subcommand_option_handling :normal
19
+ arguments :strict
20
+
21
+ desc 'Describe some switch here'
22
+ switch [:s,:switch]
23
+
24
+ desc 'Describe some flag here'
25
+ default_value 'the default'
26
+ arg_name 'The name of the argument'
27
+ flag [:f,:flagname]
28
+
29
+ desc 'Describe init here'
30
+ arg_name 'Describe arguments to init here'
31
+ command :init do |c|
32
+ c.desc 'Describe a switch to init'
33
+ c.switch :s
34
+
35
+ c.desc 'Describe a flag to init'
36
+ c.default_value 'default'
37
+ c.flag :f
38
+ c.action do |global_options,options,args|
39
+
40
+ system 'mkdir', '-p', 'docs/one-pagers'
41
+
42
+ File.open('.one-pager/config.json', 'w') { |file| file.write(DEFAULT_CONFIGURATION_TEMPLATE) }
43
+
44
+ puts "One Pagers Directory and Configuration created!"
45
+ end
46
+ end
47
+
48
+ desc 'Describe add here'
49
+ arg_name 'Describe arguments to add here'
50
+ command :add do |c|
51
+
52
+ c.flag [:od, :output_dir]
53
+ c.flag [:op, :output_path]
54
+
55
+ c.action do |global_options,options,args|
56
+ filename = "#{args[0].downcase.gsub(" ", "_")}.md"
57
+ template = if File.exists?(".one-pager.json")
58
+ JSON.read(".one-pager.json")["template"]
59
+ elsif options[:template]
60
+ options[:template]
61
+ else
62
+ "standard"
63
+ end
64
+ markdown_contents = OnePager::Generator.genrate_one_pager(template, args[0])
65
+ output_path = if options[:output_path]
66
+ options[:output_path]
67
+ elsif options[:output_dir]
68
+ system 'mkdir', '-p', "docs/one-pagers/#{options[:output_dir]}"
69
+ "docs/one-pagers/#{options[:output_dir]}/#{filename}"
70
+ else
71
+ "docs/one-pagers/#{filename}"
72
+ end
73
+ File.open(output_path, "w") { |file| file.write(markdown_contents)}
74
+ end
75
+ end
76
+
77
+ desc 'Describe display here'
78
+ arg_name 'Describe arguments to display here'
79
+ command :display do |c|
80
+ c.action do |global_options,options,args|
81
+ puts "display command ran"
82
+ end
83
+ end
84
+
85
+ desc 'Describe remove here'
86
+ arg_name 'Describe arguments to remove here'
87
+ command :remove do |c|
88
+ c.action do |global_options,options,args|
89
+ puts "remove command ran"
90
+ end
91
+ end
92
+
93
+ pre do |global,command,options,args|
94
+ # Pre logic here
95
+ # Return true to proceed; false to abort and not call the
96
+ # chosen command
97
+ # Use skips_pre before a command to skip this block
98
+ # on that command only
99
+ true
100
+ end
101
+
102
+ post do |global,command,options,args|
103
+ # Post logic here
104
+ # Use skips_post before a command to skip this
105
+ # block on that command only
106
+ end
107
+
108
+ on_error do |exception|
109
+ # Error logic here
110
+ # return false to skip default error handling
111
+ true
112
+ end
113
+ end
114
+
115
+ exit App.run(ARGV)
@@ -0,0 +1,13 @@
1
+ # Proposal: Allow for displaying markdown files via CLI
2
+
3
+ ## Purpose
4
+ Help make one pagers in a given directory more visible to any user
5
+
6
+ ## Execution Plan
7
+ Write out business logic for printing contents
8
+
9
+ ## Expected Outcomes
10
+ People can easily print the contents of a given one-pager proposal
11
+
12
+ ## Anticipated Setbacks/Deficiencies
13
+ I go down a rabbit hole trying to color code things
@@ -0,0 +1,8 @@
1
+ Feature: My bootstrapped app kinda works
2
+ In order to get going on coding my awesome app
3
+ I want to have aruba and cucumber setup
4
+ So I don't have to do it myself
5
+
6
+ Scenario: App just runs
7
+ When I get help for "one_pager"
8
+ Then the exit status should be 0
@@ -0,0 +1,6 @@
1
+ When /^I get help for "([^"]*)"$/ do |app_name|
2
+ @app_name = app_name
3
+ step %(I run `#{app_name} help`)
4
+ end
5
+
6
+ # Add more step definitions here
@@ -0,0 +1,15 @@
1
+ require 'aruba/cucumber'
2
+
3
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
4
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
5
+
6
+ Before do
7
+ # Using "announce" causes massive warnings on 1.9.2
8
+ @puts = true
9
+ @original_rubylib = ENV['RUBYLIB']
10
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
11
+ end
12
+
13
+ After do
14
+ ENV['RUBYLIB'] = @original_rubylib
15
+ end
@@ -0,0 +1,9 @@
1
+ module OnePager::Generator
2
+
3
+ def self.genrate_one_pager(template, title)
4
+ file_path = File.join(File.dirname(__FILE__), "templates/#{template}.md.erb")
5
+ template = Tilt::ERBTemplate.new(file_path)
6
+ output = template.render(nil, title: title)
7
+ end
8
+
9
+ end
@@ -0,0 +1,9 @@
1
+ # Proposal: <%= title %>
2
+
3
+ ## Purpose
4
+
5
+ ## Execution Plan
6
+
7
+ ## Expected Outcomes
8
+
9
+ ## Anticipated Setbacks/Deficiencies
@@ -0,0 +1,3 @@
1
+ module OnePager
2
+ VERSION = '0.0.1'
3
+ end
data/lib/one_pager.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'one_pager/version.rb'
2
+ require 'one_pager/generator.rb'
3
+ require 'tilt/erb'
4
+ require 'json'
5
+ # Add requires for other files you add to your project here, so
6
+ # you just need to require this one file in your bin file
data/one_pager.gemspec ADDED
@@ -0,0 +1,34 @@
1
+ # Ensure we require the local version and not one we might have installed already
2
+ require File.join([File.dirname(__FILE__),'lib','one_pager','version.rb'])
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = 'one_pager'
5
+ s.version = OnePager::VERSION
6
+ s.author = 'Michael Poage'
7
+ s.email = 'poage.michael.cu@gmail.com'
8
+ s.homepage = 'https://github.com/RubyBrewsday'
9
+ s.platform = Gem::Platform::RUBY
10
+ s.summary = 'Easily manage one-pager documentation via the command line. #spicy'
11
+ s.description = %q{
12
+ Everyone loves version control yeah? People also love to keep our business proposals organized.
13
+ Why not have both? Using `one-pager` you can easily generate new one-pagers anywhere in your system.
14
+ Simply run `$ one-pager init` in any directory and it will create a `docs/one-pagers` folder if it does
15
+ not exist, as well as a `.one-pager` file if it already doesn't exist (this file is used for setting configurations).
16
+
17
+ From here you can run commands such as `one-pager create "Allow users to purchase in DogeCoin"` and it will
18
+ generate a markdown file (`doc/one-pagers/allow_users_to_purchase_in_dogecoin.md`), which will be pre-populated with
19
+ with your one-pager template. This can be configured via the `.one-pager` file.
20
+ }
21
+ s.files = `git ls-files`.split("
22
+ ")
23
+ s.require_paths << 'lib'
24
+ s.extra_rdoc_files = ['README.rdoc','one_pager.rdoc']
25
+ s.rdoc_options << '--title' << 'one_pager' << '--main' << 'README.rdoc' << '-ri'
26
+ s.bindir = 'bin'
27
+ s.executables << 'one_pager'
28
+ s.add_development_dependency('rake')
29
+ s.add_development_dependency('rdoc')
30
+ s.add_development_dependency('pry')
31
+ s.add_development_dependency('aruba')
32
+ s.add_runtime_dependency('gli','2.18.0')
33
+ s.add_runtime_dependency('tilt', '2.0.9')
34
+ end
data/one_pager.rdoc ADDED
@@ -0,0 +1,5 @@
1
+ = one_pager
2
+
3
+ Generate this with
4
+ one_pager _doc
5
+ After you have described your command line interface
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class DefaultTest < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def teardown
9
+ end
10
+
11
+ def test_the_truth
12
+ assert true
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ require 'test/unit'
2
+
3
+ # Add test libraries you want to use here, e.g. mocha
4
+
5
+ class Test::Unit::TestCase
6
+
7
+ # Add global extensions to the test case class here
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,164 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: one_pager
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Poage
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-02-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aruba
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: gli
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 2.18.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 2.18.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: tilt
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 2.0.9
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 2.0.9
97
+ description: "\n Everyone loves version control yeah? People also love to keep
98
+ our business proposals organized.\n Why not have both? Using `one-pager` you
99
+ can easily generate new one-pagers anywhere in your system.\n Simply run `$ one-pager
100
+ init` in any directory and it will create a `docs/one-pagers` folder if it does\n
101
+ \ not exist, as well as a `.one-pager` file if it already doesn't exist (this
102
+ file is used for setting configurations).\n\n From here you can run commands
103
+ such as `one-pager create \"Allow users to purchase in DogeCoin\"` and it will\n
104
+ \ generate a markdown file (`doc/one-pagers/allow_users_to_purchase_in_dogecoin.md`),
105
+ which will be pre-populated with\n with your one-pager template. This can be
106
+ configured via the `.one-pager` file.\n "
107
+ email: poage.michael.cu@gmail.com
108
+ executables:
109
+ - one_pager
110
+ extensions: []
111
+ extra_rdoc_files:
112
+ - README.rdoc
113
+ - one_pager.rdoc
114
+ files:
115
+ - ".gitignore"
116
+ - ".one-pager/config.yml"
117
+ - Gemfile
118
+ - Gemfile.lock
119
+ - README.md
120
+ - README.rdoc
121
+ - Rakefile
122
+ - bin/one_pager
123
+ - docs/one-pagers/allow_for_displaying_markdown_files_via_cli.md
124
+ - features/one_pager.feature
125
+ - features/step_definitions/one_pager_steps.rb
126
+ - features/support/env.rb
127
+ - lib/one_pager.rb
128
+ - lib/one_pager/generator.rb
129
+ - lib/one_pager/templates/standard.md.erb
130
+ - lib/one_pager/version.rb
131
+ - one_pager.gemspec
132
+ - one_pager.rdoc
133
+ - test/default_test.rb
134
+ - test/test_helper.rb
135
+ homepage: https://github.com/RubyBrewsday
136
+ licenses: []
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options:
140
+ - "--title"
141
+ - one_pager
142
+ - "--main"
143
+ - README.rdoc
144
+ - "-ri"
145
+ require_paths:
146
+ - lib
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.7.3
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: 'Easily manage one-pager documentation via the command line. #spicy'
164
+ test_files: []