rideliner 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 20191fb501aefd4fa75d1f4a54838f8f9f12f65d
4
+ data.tar.gz: 26d75f38e877c17cf14b96b5b6ee5206985e3e1b
5
+ SHA512:
6
+ metadata.gz: e0dc45230464bf3cef0f838008b31ea443d13ca9f4f497a77badc94d5a615f8ca5384442cca95ff0740b52b02e5f4fc720922949187ef704e11f4bafc0f30538
7
+ data.tar.gz: b5faf1f5c09eaef8a9ad3e9326f2c2a80d556ebc2783ffdddf4981e5adad7debad5bc388f13121d259a93a75b78d0e32f266643d8caaab19da78611656700eb1
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ Gemfile.lock
2
+ /.bundle/
3
+ /vendor/bundle/
4
+
5
+ *.gem
6
+ /pkg/
data/.rubocop.yml ADDED
@@ -0,0 +1,73 @@
1
+ ---
2
+
3
+ AllCops:
4
+ Include:
5
+ - 'Gemfile'
6
+ - 'Rakefile'
7
+ Exclude:
8
+ - '**/*.lock'
9
+ - 'vendor/**/*'
10
+
11
+ Style/AutoResourceCleanup:
12
+ Enabled: true
13
+
14
+ Style/CollectionMethods:
15
+ Enabled: true
16
+
17
+ Style/Copyright:
18
+ Enabled: true
19
+ Notice: '^# Copyright \(c\) 2\d{3} .+$'
20
+
21
+ Style/Documentation:
22
+ Enabled: false
23
+
24
+ Style/Encoding:
25
+ Enabled: true
26
+
27
+ Style/FirstArrayElementLineBreak:
28
+ Enabled: true
29
+
30
+ Style/FirstHashElementLineBreak:
31
+ Enabled: true
32
+
33
+ Style/FirstMethodArgumentLineBreak:
34
+ Enabled: true
35
+
36
+ Style/FirstMethodParameterLineBreak:
37
+ Enabled: true
38
+
39
+ Style/FrozenStringLiteralComment:
40
+ Enabled: false
41
+
42
+ Style/MethodCalledOnDoEndBlock:
43
+ Enabled: true
44
+
45
+ Style/MultilineArrayBraceLayout:
46
+ Enabled: true
47
+
48
+ Style/MultilineAssignmentLayout:
49
+ Enabled: true
50
+
51
+ Style/MultilineHashBraceLayout:
52
+ Enabled: true
53
+
54
+ Style/MultilineMethodCallBraceLayout:
55
+ Enabled: true
56
+
57
+ Style/MultilineMethodDefinitionBraceLayout:
58
+ Enabled: true
59
+
60
+ Style/OptionHash:
61
+ Enabled: true
62
+
63
+ Style/Send:
64
+ Enabled: true
65
+
66
+ Style/SpecialGlobalVars:
67
+ Enabled: false
68
+
69
+ Style/StringMethods:
70
+ Enabled: true
71
+
72
+ Style/SymbolArray:
73
+ Enabled: true
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ source 'https://rubygems.org'
9
+
10
+ gemspec
11
+
12
+ group :development do
13
+ gem 'yard', require: false,
14
+ git: 'https://github.com/lsegal/yard.git'
15
+ end
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require 'rideliner/tasks'
@@ -0,0 +1,61 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ def get_current_gemspec
9
+ root = `git rev-parse --show-toplevel`.strip
10
+ $? || abort('Only git repositories are supported')
11
+
12
+ gemspecs = Dir["#{root}/*.gemspec"]
13
+ abort "No gemspec found in #{root}" if gemspecs.empty?
14
+ if gemspecs.length > 1
15
+ $stderr.puts "Warning: only using the first gemspec found (#{gemspecs.first})."
16
+ end
17
+
18
+ Gem::Specification.load(gemspecs.first)
19
+ end
20
+
21
+ if ENV['TRAVIS'] && ENV['DOCS']
22
+ namespace :yard do
23
+ if ENV['TRAVIS_PULL_REQUEST'] == 'false'
24
+ require 'ghpages_deploy/rake_task'
25
+
26
+ desc 'Deploy documentation to Github Pages'
27
+ GithubPages::DeployTask.new(deploy: [:yard]) do |t|
28
+ t.remote = 'website'
29
+ t.repo = 'https://github.com/rideliner/rideliner.github.io.git'
30
+ t.source = '_yardoc'
31
+
32
+ tag = ENV['TRAVIS_TAG']
33
+ branch = ENV['TRAVIS_BRANCH']
34
+
35
+ project = PROJECT_NAME || get_current_gemspec.name
36
+ project_root = "project/#{project}"
37
+ doc_root = "#{project_root}/doc"
38
+
39
+ if !tag.empty?
40
+ t.destination = "#{doc_root}/tag/#{tag}"
41
+ t.message = "Deploying documentation for #{project}, tag #{tag}."
42
+ elsif !branch.empty?
43
+ t.destination = "#{doc_root}/branch/#{branch}"
44
+ t.message = "Deploying documentation for #{project}, branch #{branch}."
45
+ else
46
+ abort 'No tag or branch specified'
47
+ end
48
+
49
+ t.json_sitemap(
50
+ directory: doc_root,
51
+ whitelist: ['**/_index.html', '**/index_html'],
52
+ output: "#{project_root}/documentation.json"
53
+ )
54
+ end
55
+ else
56
+ task :deploy do
57
+ puts 'Documentation not generated for pull requests.'
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new(:rubocop) do |t|
11
+ t.fail_on_error = false
12
+ end
13
+
14
+ task('rubocop:auto_correct').clear
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require 'rake/testtask'
9
+ require 'rake/clean'
10
+
11
+ Rake::TestTask.new(:test) do |t|
12
+ t.libs << 'test'
13
+ t.test_files = ['test/test_helper.rb']
14
+ t.pattern = 'test/**/*_test.rb'
15
+ t.verbose = true
16
+ end
17
+
18
+ namespace :test do
19
+ desc 'Generate a test coverage report'
20
+ task :coverage do
21
+ ENV['COVERAGE'] = 'true'
22
+ task(:test).invoke
23
+ end
24
+ end
25
+
26
+ CLOBBER.include 'coverage'
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require 'yard'
9
+ require 'yard/rake/yardoc_task'
10
+
11
+ require 'rake/clean'
12
+
13
+ YARD::Rake::YardocTask.new(:yard) do |t|
14
+ t.files = ['lib/**/*.rb', '-', 'doc/*.md', 'LICENSE.md']
15
+ t.options = [
16
+ '--charset utf-8', '--readme README.md',
17
+ '--markup markdown', '--markup-provider kramdown',
18
+ '--output-dir _yardoc',
19
+ '--protected', '--private',
20
+ "--default-return ''",
21
+ '--plugin yard_rideliner'
22
+ ]
23
+ end
24
+
25
+ CLEAN.include '.yardoc'
26
+ CLOBBER.include '_yardoc'
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require 'rubygems'
9
+
10
+ require 'bundler'
11
+ require 'bundler/gem_tasks'
12
+
13
+ Bundler.setup(:default, :development)
14
+
15
+ require 'rideliner/task/test'
16
+ require 'rideliner/task/yard'
17
+ require 'rideliner/task/rubocop'
18
+ require 'rideliner/task/ghpages_deploy_yard'
19
+
20
+ task default: %i(rubocop test)
21
+ task ci: 'test:coverage'
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code File is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ module Rideliner
9
+ VERSION = '0.1.0'.freeze
10
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ require 'yard'
5
+
6
+ YARD::Templates::Engine.register_template_path(
7
+ File.expand_path('../yard_template', File.dirname(__FILE__))
8
+ )
data/rideliner.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ # This Source Code Form is subject to the terms of the Mozilla Public
5
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
6
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
+
8
+ require './lib/rideliner/version'
9
+
10
+ Gem::Specification.new do |spec|
11
+ spec.name = 'rideliner'
12
+ spec.version = Rideliner::VERSION
13
+ spec.authors = ['Nathan Currier']
14
+ spec.email = ['nathan.currier@gmail.com']
15
+ spec.license = 'MPL-2.0'
16
+
17
+ spec.description = "Rideliner's Ruby development"
18
+ spec.summary = "Development setup and configuration for Rideliner's ruby projects"
19
+ spec.homepage = 'https://github.com/rideliner/rideliner_dev_gem'
20
+ spec.has_rdoc = 'yard'
21
+
22
+ spec.files = `git ls-files -z`.split("\x0")
23
+ spec.bindir = 'bin'
24
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
25
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.add_dependency 'rake'
29
+ spec.add_dependency 'rubocop'
30
+ spec.add_dependency 'minitest'
31
+ spec.add_dependency 'simplecov'
32
+ spec.add_dependency 'codecov'
33
+ spec.add_dependency 'kramdown'
34
+ spec.add_dependency 'yard'
35
+ spec.add_dependency 'ghpages_deploy'
36
+ end
@@ -0,0 +1,49 @@
1
+ <script type="text/javascript">
2
+ if (match = parent.window.location.pathname.match(/^(.+?)(?:branch|tag)\/[^\/]+\/(.+)/)) {
3
+ var project_root_url = match[1];
4
+ var relative_url = match[2];
5
+
6
+ var jsonData = $.getJSON(project_root_url + 'sitemap.json', function(json) {
7
+ var branches = json.branch ? Object.keys(json.branch) : [];
8
+ var tags = json.tag ? Object.keys(json.tag) : [];
9
+ var list = $('ul.version#full_list');
10
+
11
+ var createItem = function(version, index, type) {
12
+ var base_url = project_root_url + type + '/' + version + '/';
13
+ var url = base_url;
14
+ url += (window.location === parent.window.location ? index : relative_url);
15
+
16
+ list.append(
17
+ '<li><div class="item"><span class="object_link">' +
18
+ '<a href="' + url + '" title="' + version + ' (' + type + ')">' +
19
+ version + '</a> <small>' + type + '</small></span></div></li>');
20
+
21
+ $.ajax({
22
+ url: url,
23
+ statusCode: { 404: function() {
24
+ item = $('ul.version#full_list li').filter(function() {
25
+ return $(this).find('a').attr('href') === url;
26
+ });
27
+ // mark the version as deprecated (missing the current page)
28
+ // redirect to the index page found in sitemap.json
29
+ item.addClass('deprecated');
30
+ item.find('a').attr('href', base_url + index);
31
+ }}
32
+ });
33
+ }
34
+
35
+ for (var i = 0; i < branches.length; i++) {
36
+ createItem(branches[i], json.branch[branches[i]], 'branch');
37
+ }
38
+
39
+ for (var i = 0; i < tags.length; i++) {
40
+ createItem(tags[i], json.tag[tags[i]], 'tag');
41
+ }
42
+
43
+ highlight();
44
+ $(fullListSearch);
45
+ $(linkList);
46
+ $(collapse);
47
+ });
48
+ }
49
+ </script>
@@ -0,0 +1,25 @@
1
+ // encoding: utf-8
2
+ // Copyright (c) 2016 Nathan Currier
3
+
4
+ // Modified from https://github.com/docmeta/rubydoc.info
5
+
6
+ function createGithubLinks() {
7
+ if (match = window.location.pathname.match(/([^\/]+)(?:\/doc)?\/(?:branch|tag)\/([^\/]+)\//)) {
8
+ var github_project = match[1];
9
+ var github_marker = match[2];
10
+
11
+ $(".source_code").each(function() {
12
+ if (match = $(this).find(".info.file").text().match(/^# File '([^']+)', line (\d+)/)) {
13
+ var file = match[1];
14
+ var line = match[2];
15
+
16
+ var url = "https://github.com/rideliner/" + github_project + "/blob/" + github_marker + "/" + file + "#L" + line;
17
+ var href = '<a target="_blank" href="' + url + '">View on Github</a>';
18
+
19
+ $(this).before(' <span class="showSource">[' + href + ']</span>');
20
+ }
21
+ });
22
+ }
23
+ }
24
+
25
+ $(createGithubLinks)
@@ -0,0 +1,7 @@
1
+
2
+ def generate_version_list
3
+ @list_title = 'Version List'
4
+ @list_type = 'version'
5
+
6
+ asset('version_list.html', erb(:full_list))
7
+ end
@@ -0,0 +1,3 @@
1
+ <div id="footer">
2
+ Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
3
+ </div>
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) 2016 Nathan Currier
3
+
4
+ def javascripts
5
+ super + %w(js/view_on_github.js)
6
+ end
7
+
8
+ def menu_lists
9
+ super + [{ type: 'version', title: 'Versions', search_title: 'Version List' }]
10
+ end
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rideliner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Nathan Currier
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ prerelease: false
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ name: rake
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ prerelease: false
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ name: rubocop
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ name: minitest
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ name: simplecov
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ name: codecov
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ name: kramdown
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ name: yard
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ name: ghpages_deploy
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Rideliner's Ruby development
126
+ email:
127
+ - nathan.currier@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rubocop.yml"
134
+ - Gemfile
135
+ - Rakefile
136
+ - lib/rideliner/task/ghpages_deploy_yard.rb
137
+ - lib/rideliner/task/rubocop.rb
138
+ - lib/rideliner/task/test.rb
139
+ - lib/rideliner/task/yard.rb
140
+ - lib/rideliner/tasks.rb
141
+ - lib/rideliner/version.rb
142
+ - lib/yard_rideliner.rb
143
+ - rideliner.gemspec
144
+ - template/default/fulldoc/html/full_list_version.erb
145
+ - template/default/fulldoc/html/js/view_on_github.js
146
+ - template/default/fulldoc/html/setup.rb
147
+ - template/default/layout/html/footer.erb
148
+ - template/default/layout/html/setup.rb
149
+ homepage: https://github.com/rideliner/rideliner_dev_gem
150
+ licenses:
151
+ - MPL-2.0
152
+ metadata: {}
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 2.6.2
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: Development setup and configuration for Rideliner's ruby projects
173
+ test_files: []
174
+ has_rdoc: yard