orgmode-code-extractor 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.semver +5 -0
- data/Gemfile +25 -0
- data/Gemfile.lock +145 -0
- data/LICENSE.txt +20 -0
- data/README.org +78 -0
- data/Rakefile +52 -0
- data/bin/orgmode-code-extractor +10 -0
- data/lib/orgmode-code-extractor.rb +56 -0
- data/orgmode-code-extractor.gemspec +94 -0
- data/spec/orgmode-code-extractor_spec.rb +7 -0
- data/spec/spec_helper.rb +29 -0
- metadata +257 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 613db20f1411475d1e4f40baeb0a7ffdfcbce553
|
4
|
+
data.tar.gz: 6cb2acb87eed741a540432d6cac40fcd55fd58cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: af1e68e34030e67c284e346d944927e027b75fc6618adee46c5ecc15b16f5b7d4b4d8dbcd0d54ab71a5682862da19c611303a046b21f54c43ac76fb2afd0feaa
|
7
|
+
data.tar.gz: 44ed777d580f45b79f1440796fdc5e35ca4c6d53b193c2331b6e017666da26b6f39a26f3884eb4646c4b51a0b8374a93df4dee0ccd605a08fe4171461ebfd75d
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.semver
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
gem 'thor', '~> 0'
|
7
|
+
|
8
|
+
|
9
|
+
# Add dependencies to develop your gem here.
|
10
|
+
# Include everything needed to run rake, tests, features, etc.
|
11
|
+
group :development do
|
12
|
+
gem "rspec", "~> 3"
|
13
|
+
gem "yard", "~> 0.7"
|
14
|
+
gem "rdoc", "~> 4"
|
15
|
+
gem 'guard-rspec', '~> 4'
|
16
|
+
gem "bundler", "~> 1"
|
17
|
+
gem "jeweler", "~> 2"
|
18
|
+
gem "simplecov", ">= 0"
|
19
|
+
gem 'pry'
|
20
|
+
gem 'pry-doc'
|
21
|
+
gem 'pry-byebug'
|
22
|
+
gem 'pry-remote'
|
23
|
+
gem 'pry-rescue'
|
24
|
+
gem 'pry-stack_explorer'
|
25
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.8)
|
5
|
+
binding_of_caller (0.7.2)
|
6
|
+
debug_inspector (>= 0.0.1)
|
7
|
+
builder (3.2.2)
|
8
|
+
byebug (5.0.0)
|
9
|
+
columnize (= 0.9.0)
|
10
|
+
coderay (1.1.0)
|
11
|
+
columnize (0.9.0)
|
12
|
+
debug_inspector (0.0.2)
|
13
|
+
descendants_tracker (0.0.4)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
15
|
+
diff-lcs (1.2.5)
|
16
|
+
docile (1.1.5)
|
17
|
+
faraday (0.9.1)
|
18
|
+
multipart-post (>= 1.2, < 3)
|
19
|
+
ffi (1.9.10)
|
20
|
+
formatador (0.2.5)
|
21
|
+
git (1.2.9.1)
|
22
|
+
github_api (0.12.4)
|
23
|
+
addressable (~> 2.3)
|
24
|
+
descendants_tracker (~> 0.0.4)
|
25
|
+
faraday (~> 0.8, < 0.10)
|
26
|
+
hashie (>= 3.4)
|
27
|
+
multi_json (>= 1.7.5, < 2.0)
|
28
|
+
nokogiri (~> 1.6.6)
|
29
|
+
oauth2
|
30
|
+
guard (2.13.0)
|
31
|
+
formatador (>= 0.2.4)
|
32
|
+
listen (>= 2.7, <= 4.0)
|
33
|
+
lumberjack (~> 1.0)
|
34
|
+
nenv (~> 0.1)
|
35
|
+
notiffany (~> 0.0)
|
36
|
+
pry (>= 0.9.12)
|
37
|
+
shellany (~> 0.0)
|
38
|
+
thor (>= 0.18.1)
|
39
|
+
guard-compat (1.2.1)
|
40
|
+
guard-rspec (4.6.4)
|
41
|
+
guard (~> 2.1)
|
42
|
+
guard-compat (~> 1.1)
|
43
|
+
rspec (>= 2.99.0, < 4.0)
|
44
|
+
hashie (3.4.2)
|
45
|
+
highline (1.7.3)
|
46
|
+
interception (0.5)
|
47
|
+
jeweler (2.0.1)
|
48
|
+
builder
|
49
|
+
bundler (>= 1.0)
|
50
|
+
git (>= 1.2.5)
|
51
|
+
github_api
|
52
|
+
highline (>= 1.6.15)
|
53
|
+
nokogiri (>= 1.5.10)
|
54
|
+
rake
|
55
|
+
rdoc
|
56
|
+
json (1.8.3)
|
57
|
+
jwt (1.5.1)
|
58
|
+
listen (3.0.3)
|
59
|
+
rb-fsevent (>= 0.9.3)
|
60
|
+
rb-inotify (>= 0.9)
|
61
|
+
lumberjack (1.0.9)
|
62
|
+
method_source (0.8.2)
|
63
|
+
mini_portile (0.6.2)
|
64
|
+
multi_json (1.11.2)
|
65
|
+
multi_xml (0.5.5)
|
66
|
+
multipart-post (2.0.0)
|
67
|
+
nenv (0.2.0)
|
68
|
+
nokogiri (1.6.6.2)
|
69
|
+
mini_portile (~> 0.6.0)
|
70
|
+
notiffany (0.0.7)
|
71
|
+
nenv (~> 0.1)
|
72
|
+
shellany (~> 0.0)
|
73
|
+
oauth2 (1.0.0)
|
74
|
+
faraday (>= 0.8, < 0.10)
|
75
|
+
jwt (~> 1.0)
|
76
|
+
multi_json (~> 1.3)
|
77
|
+
multi_xml (~> 0.5)
|
78
|
+
rack (~> 1.2)
|
79
|
+
pry (0.10.1)
|
80
|
+
coderay (~> 1.1.0)
|
81
|
+
method_source (~> 0.8.1)
|
82
|
+
slop (~> 3.4)
|
83
|
+
pry-byebug (3.2.0)
|
84
|
+
byebug (~> 5.0)
|
85
|
+
pry (~> 0.10)
|
86
|
+
pry-doc (0.8.0)
|
87
|
+
pry (~> 0.9)
|
88
|
+
yard (~> 0.8)
|
89
|
+
pry-remote (0.1.8)
|
90
|
+
pry (~> 0.9)
|
91
|
+
slop (~> 3.0)
|
92
|
+
pry-rescue (1.4.2)
|
93
|
+
interception (>= 0.5)
|
94
|
+
pry
|
95
|
+
pry-stack_explorer (0.4.9.2)
|
96
|
+
binding_of_caller (>= 0.7)
|
97
|
+
pry (>= 0.9.11)
|
98
|
+
rack (1.6.4)
|
99
|
+
rake (10.4.2)
|
100
|
+
rb-fsevent (0.9.6)
|
101
|
+
rb-inotify (0.9.5)
|
102
|
+
ffi (>= 0.5.0)
|
103
|
+
rdoc (4.2.0)
|
104
|
+
rspec (3.3.0)
|
105
|
+
rspec-core (~> 3.3.0)
|
106
|
+
rspec-expectations (~> 3.3.0)
|
107
|
+
rspec-mocks (~> 3.3.0)
|
108
|
+
rspec-core (3.3.2)
|
109
|
+
rspec-support (~> 3.3.0)
|
110
|
+
rspec-expectations (3.3.1)
|
111
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
+
rspec-support (~> 3.3.0)
|
113
|
+
rspec-mocks (3.3.2)
|
114
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
+
rspec-support (~> 3.3.0)
|
116
|
+
rspec-support (3.3.0)
|
117
|
+
shellany (0.0.1)
|
118
|
+
simplecov (0.10.0)
|
119
|
+
docile (~> 1.1.0)
|
120
|
+
json (~> 1.8)
|
121
|
+
simplecov-html (~> 0.10.0)
|
122
|
+
simplecov-html (0.10.0)
|
123
|
+
slop (3.6.0)
|
124
|
+
thor (0.19.1)
|
125
|
+
thread_safe (0.3.5)
|
126
|
+
yard (0.8.7.6)
|
127
|
+
|
128
|
+
PLATFORMS
|
129
|
+
ruby
|
130
|
+
|
131
|
+
DEPENDENCIES
|
132
|
+
bundler (~> 1)
|
133
|
+
guard-rspec (~> 4)
|
134
|
+
jeweler (~> 2)
|
135
|
+
pry
|
136
|
+
pry-byebug
|
137
|
+
pry-doc
|
138
|
+
pry-remote
|
139
|
+
pry-rescue
|
140
|
+
pry-stack_explorer
|
141
|
+
rdoc (~> 4)
|
142
|
+
rspec (~> 3)
|
143
|
+
simplecov
|
144
|
+
thor (~> 0)
|
145
|
+
yard (~> 0.7)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2015 Fred Mitchell
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.org
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
* orgmode-code-extractor
|
2
|
+
** Introduction
|
3
|
+
Orgmode-code-extractor takes as a parameter your orgmode file, and optionally a target directory, and will
|
4
|
+
spit out the extracted code in your code blocks using the name of
|
5
|
+
#+BEGIN_SRC
|
6
|
+
#+name:
|
7
|
+
#+END_SRC
|
8
|
+
|
9
|
+
with the extension of the first word following the #+BEGIN_SRC.
|
10
|
+
For example, if you have in your org file:
|
11
|
+
#+BEGIN_SRC example
|
12
|
+
# +name: Creepy.people
|
13
|
+
# +BEGIN_SRC javascript
|
14
|
+
{
|
15
|
+
"name": "Herman Munster",
|
16
|
+
"address": "2121 Mockingbird Lane"
|
17
|
+
}
|
18
|
+
# +END_SRC
|
19
|
+
#+END_SRC
|
20
|
+
Then a file with the name of "Creepy.people.javascript" with the contents of:
|
21
|
+
#+name: sample.stuff
|
22
|
+
#+BEGIN_SRC javascript
|
23
|
+
{
|
24
|
+
"name": "Herman Munster",
|
25
|
+
"address": "2121 Mockingbird Lane"
|
26
|
+
}
|
27
|
+
#+END_SRC
|
28
|
+
will be created.
|
29
|
+
** Installation
|
30
|
+
Installation is accomplished by doing:
|
31
|
+
#+BEGIN_SRC commandline
|
32
|
+
gem install orgmode-code-extractor
|
33
|
+
#+END_SRC
|
34
|
+
|
35
|
+
** Usage
|
36
|
+
By default, orgmode-code-extractor will attempt to write the
|
37
|
+
output to a "./oce" directory, which must be present or it
|
38
|
+
will fail. You can specify your own target directory or
|
39
|
+
just create the "./oce" one in your current directory. To get
|
40
|
+
more information on how you can specify your own, type:
|
41
|
+
#+BEGIN_SRC commandline
|
42
|
+
orgmode-code-extractor help extract
|
43
|
+
#+END_SRC
|
44
|
+
at the commandline.
|
45
|
+
|
46
|
+
To run this on your orgmode files,
|
47
|
+
#+BEGIN_SRC commandline
|
48
|
+
orgmode-code-extractor extract yourfile1.org yourfile2.org ...
|
49
|
+
#+END_SRC
|
50
|
+
and it will create the extractions nicely.
|
51
|
+
|
52
|
+
** Motivation behind this project
|
53
|
+
There are many ways to actually excute orgmode code blocks, but in my
|
54
|
+
case, I am using orgmode to document a JSON api. There was no clean way
|
55
|
+
availabe at the time to extract these nicely, so I wrote this tool. Just
|
56
|
+
a few lines of code that saved my sanity.
|
57
|
+
|
58
|
+
You will also note that this document is itself an orgmode file, which
|
59
|
+
was used to test the orgmode-code-extractor. Yes, I eat my own dog food. lol
|
60
|
+
|
61
|
+
** Contributing to orgmode-code-extractor
|
62
|
+
Your contributions are more than welcome, as this was something I threw together
|
63
|
+
quicky in just a couple of hours. It could use better error handling and many other
|
64
|
+
options I did not have the time to throw in. So just the usual branching and pull
|
65
|
+
request bit as outlined below!
|
66
|
+
|
67
|
+
+ Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
68
|
+
+ Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
69
|
+
+ Fork the project.
|
70
|
+
+ Start a feature/bugfix branch.
|
71
|
+
+ Commit and push until you are happy with your contribution.
|
72
|
+
+ Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
73
|
+
+ Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
74
|
+
|
75
|
+
** Copyright
|
76
|
+
Copyright (c) 2015 Fred Mitchell. See LICENSE.txt for
|
77
|
+
further details.
|
78
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
require 'semver'
|
6
|
+
|
7
|
+
def s_version
|
8
|
+
SemVer.find.format "%M.%m.%p%s"
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
begin
|
13
|
+
Bundler.setup(:default, :development)
|
14
|
+
rescue Bundler::BundlerError => e
|
15
|
+
$stderr.puts e.message
|
16
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
17
|
+
exit e.status_code
|
18
|
+
end
|
19
|
+
require 'rake'
|
20
|
+
|
21
|
+
require 'jeweler'
|
22
|
+
Jeweler::Tasks.new do |gem|
|
23
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
24
|
+
gem.name = "orgmode-code-extractor"
|
25
|
+
gem.homepage = "http://github.com/flajann2/orgmode-code-extractor"
|
26
|
+
gem.license = "MIT"
|
27
|
+
gem.summary = %Q{Tool to extract the code blocks from org-mode files and write them out as sperate files}
|
28
|
+
gem.description = %Q{Please see the README.org at http://github.com/flajann2/orgmode-code-extractor for the gory details}
|
29
|
+
gem.email = "fred.mitchell@gmx.de"
|
30
|
+
gem.authors = ["Fred Mitchell"]
|
31
|
+
gem.version = s_version
|
32
|
+
gem.required_ruby_version = '>= 2.0'
|
33
|
+
# dependencies defined in Gemfile
|
34
|
+
end
|
35
|
+
Jeweler::RubygemsDotOrgTasks.new
|
36
|
+
|
37
|
+
require 'rspec/core'
|
38
|
+
require 'rspec/core/rake_task'
|
39
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
40
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
41
|
+
end
|
42
|
+
|
43
|
+
desc "Code coverage detail"
|
44
|
+
task :simplecov do
|
45
|
+
ENV['COVERAGE'] = "true"
|
46
|
+
Rake::Task['spec'].execute
|
47
|
+
end
|
48
|
+
|
49
|
+
task :default => :spec
|
50
|
+
|
51
|
+
require 'yard'
|
52
|
+
YARD::Rake::YardocTask.new
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
OCE_PATH = File.expand_path '..', File.dirname(__FILE__)
|
3
|
+
OCE_EXECUTABLE = File.expand_path 'bin/orgmode-code-extractor', Dir.pwd
|
4
|
+
|
5
|
+
%w{ lib neater neater/rnlib }.each do |dir|
|
6
|
+
$:.unshift File.join([OCE_PATH, dir])
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'orgmode-code-extractor'
|
10
|
+
OrgmodeCodeExractor::Main.start
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin rdoc
|
3
|
+
= Orgmode Code Exractor -- extract code blocks from your orgmode document.
|
4
|
+
=end
|
5
|
+
|
6
|
+
require 'thor'
|
7
|
+
require 'semver'
|
8
|
+
require 'pp'
|
9
|
+
|
10
|
+
module OrgmodeCodeExractor
|
11
|
+
class Main < Thor
|
12
|
+
desc 'version', 'Display RubyNEAT version'
|
13
|
+
def version
|
14
|
+
puts SemVer.find.format "%M.%m.%p%s"
|
15
|
+
end
|
16
|
+
|
17
|
+
desc 'extract <orgmode> [<orgmode> <orgmode> ...] [OPTS]', 'extract code blocks from orgmode documents'
|
18
|
+
option :todir, type: :string, banner: 'directory to extract to', default: './oce'
|
19
|
+
option :missing, type: :string, banner: 'file to place unnamed code blocks', default: 'unnamed'
|
20
|
+
def extract(*orgfiles)
|
21
|
+
todir = options[:todir]
|
22
|
+
missingfile = options[:missing]
|
23
|
+
name = ext = output = nil
|
24
|
+
orgfiles.each do |ofile|
|
25
|
+
rawlines(ofile) do |lines|
|
26
|
+
lines.each do |line|
|
27
|
+
case line
|
28
|
+
when /^[[:space:]]*\#\+(name|NAME):[[:space:]]+([[:graph:]]+)[[:space:]]*/
|
29
|
+
name = $~[2] if output.nil?
|
30
|
+
when /^[[:space:]]*\#\+(begin_src|BEGIN_SRC)[[:space:]]+([[:graph:]]+)?[[:space:]]*/
|
31
|
+
# open the file for the code block
|
32
|
+
ext = $~[2] || "src"
|
33
|
+
unless name.nil?
|
34
|
+
output = open(File::expand_path("#{name}.#{ext}", todir), 'w')
|
35
|
+
else
|
36
|
+
output = open(File::expand_path("#{missingfile}.#{ext}", todir), 'a')
|
37
|
+
end
|
38
|
+
when /^[[:space:]]*\#\+(end_src|END_SRC|end|END)[[:space:]]*/
|
39
|
+
output.close
|
40
|
+
name = ext = output = nil
|
41
|
+
else
|
42
|
+
output.write(line) unless output.nil?
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
def rawlines(orgfile)
|
51
|
+
open(orgfile) do |fd|
|
52
|
+
yield fd.readlines
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: orgmode-code-extractor 0.0.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "orgmode-code-extractor"
|
9
|
+
s.version = "0.0.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Fred Mitchell"]
|
14
|
+
s.date = "2015-09-07"
|
15
|
+
s.description = "Please see the README.org at http://github.com/flajann2/orgmode-code-extractor for the gory details"
|
16
|
+
s.email = "fred.mitchell@gmx.de"
|
17
|
+
s.executables = ["orgmode-code-extractor"]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"LICENSE.txt",
|
20
|
+
"README.org"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".document",
|
24
|
+
".rspec",
|
25
|
+
".semver",
|
26
|
+
"Gemfile",
|
27
|
+
"Gemfile.lock",
|
28
|
+
"LICENSE.txt",
|
29
|
+
"README.org",
|
30
|
+
"Rakefile",
|
31
|
+
"bin/orgmode-code-extractor",
|
32
|
+
"lib/orgmode-code-extractor.rb",
|
33
|
+
"orgmode-code-extractor.gemspec",
|
34
|
+
"spec/orgmode-code-extractor_spec.rb",
|
35
|
+
"spec/spec_helper.rb"
|
36
|
+
]
|
37
|
+
s.homepage = "http://github.com/flajann2/orgmode-code-extractor"
|
38
|
+
s.licenses = ["MIT"]
|
39
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.0")
|
40
|
+
s.rubygems_version = "2.4.5"
|
41
|
+
s.summary = "Tool to extract the code blocks from org-mode files and write them out as sperate files"
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
s.specification_version = 4
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_runtime_dependency(%q<thor>, ["~> 0"])
|
48
|
+
s.add_development_dependency(%q<rspec>, ["~> 3"])
|
49
|
+
s.add_development_dependency(%q<yard>, ["~> 0.7"])
|
50
|
+
s.add_development_dependency(%q<rdoc>, ["~> 4"])
|
51
|
+
s.add_development_dependency(%q<guard-rspec>, ["~> 4"])
|
52
|
+
s.add_development_dependency(%q<bundler>, ["~> 1"])
|
53
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2"])
|
54
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<pry>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<pry-doc>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<pry-byebug>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<pry-remote>, [">= 0"])
|
59
|
+
s.add_development_dependency(%q<pry-rescue>, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<pry-stack_explorer>, [">= 0"])
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<thor>, ["~> 0"])
|
63
|
+
s.add_dependency(%q<rspec>, ["~> 3"])
|
64
|
+
s.add_dependency(%q<yard>, ["~> 0.7"])
|
65
|
+
s.add_dependency(%q<rdoc>, ["~> 4"])
|
66
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4"])
|
67
|
+
s.add_dependency(%q<bundler>, ["~> 1"])
|
68
|
+
s.add_dependency(%q<jeweler>, ["~> 2"])
|
69
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
70
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
71
|
+
s.add_dependency(%q<pry-doc>, [">= 0"])
|
72
|
+
s.add_dependency(%q<pry-byebug>, [">= 0"])
|
73
|
+
s.add_dependency(%q<pry-remote>, [">= 0"])
|
74
|
+
s.add_dependency(%q<pry-rescue>, [">= 0"])
|
75
|
+
s.add_dependency(%q<pry-stack_explorer>, [">= 0"])
|
76
|
+
end
|
77
|
+
else
|
78
|
+
s.add_dependency(%q<thor>, ["~> 0"])
|
79
|
+
s.add_dependency(%q<rspec>, ["~> 3"])
|
80
|
+
s.add_dependency(%q<yard>, ["~> 0.7"])
|
81
|
+
s.add_dependency(%q<rdoc>, ["~> 4"])
|
82
|
+
s.add_dependency(%q<guard-rspec>, ["~> 4"])
|
83
|
+
s.add_dependency(%q<bundler>, ["~> 1"])
|
84
|
+
s.add_dependency(%q<jeweler>, ["~> 2"])
|
85
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
86
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
87
|
+
s.add_dependency(%q<pry-doc>, [">= 0"])
|
88
|
+
s.add_dependency(%q<pry-byebug>, [">= 0"])
|
89
|
+
s.add_dependency(%q<pry-remote>, [">= 0"])
|
90
|
+
s.add_dependency(%q<pry-rescue>, [">= 0"])
|
91
|
+
s.add_dependency(%q<pry-stack_explorer>, [">= 0"])
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
module SimpleCov::Configuration
|
4
|
+
def clean_filters
|
5
|
+
@filters = []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.configure do
|
10
|
+
clean_filters
|
11
|
+
load_adapter 'test_frameworks'
|
12
|
+
end
|
13
|
+
|
14
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
+
add_filter "/.rvm/"
|
16
|
+
end
|
17
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
18
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
19
|
+
|
20
|
+
require 'rspec'
|
21
|
+
require 'orgmode-code-extractor'
|
22
|
+
|
23
|
+
# Requires supporting files with custom matchers and macros, etc,
|
24
|
+
# in ./support/ and its subdirectories.
|
25
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
26
|
+
|
27
|
+
RSpec.configure do |config|
|
28
|
+
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,257 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: orgmode-code-extractor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fred Mitchell
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
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: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: yard
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rdoc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry-doc
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: pry-byebug
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: pry-remote
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: pry-rescue
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: pry-stack_explorer
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
description: Please see the README.org at http://github.com/flajann2/orgmode-code-extractor
|
210
|
+
for the gory details
|
211
|
+
email: fred.mitchell@gmx.de
|
212
|
+
executables:
|
213
|
+
- orgmode-code-extractor
|
214
|
+
extensions: []
|
215
|
+
extra_rdoc_files:
|
216
|
+
- LICENSE.txt
|
217
|
+
- README.org
|
218
|
+
files:
|
219
|
+
- ".document"
|
220
|
+
- ".rspec"
|
221
|
+
- ".semver"
|
222
|
+
- Gemfile
|
223
|
+
- Gemfile.lock
|
224
|
+
- LICENSE.txt
|
225
|
+
- README.org
|
226
|
+
- Rakefile
|
227
|
+
- bin/orgmode-code-extractor
|
228
|
+
- lib/orgmode-code-extractor.rb
|
229
|
+
- orgmode-code-extractor.gemspec
|
230
|
+
- spec/orgmode-code-extractor_spec.rb
|
231
|
+
- spec/spec_helper.rb
|
232
|
+
homepage: http://github.com/flajann2/orgmode-code-extractor
|
233
|
+
licenses:
|
234
|
+
- MIT
|
235
|
+
metadata: {}
|
236
|
+
post_install_message:
|
237
|
+
rdoc_options: []
|
238
|
+
require_paths:
|
239
|
+
- lib
|
240
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
requirements:
|
242
|
+
- - ">="
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
version: '2.0'
|
245
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
requirements: []
|
251
|
+
rubyforge_project:
|
252
|
+
rubygems_version: 2.4.5
|
253
|
+
signing_key:
|
254
|
+
specification_version: 4
|
255
|
+
summary: Tool to extract the code blocks from org-mode files and write them out as
|
256
|
+
sperate files
|
257
|
+
test_files: []
|