bulb 0.1.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +20 -0
- data/README.md +31 -13
- data/Rakefile +28 -6
- data/app/assets/config/bulb_manifest.js +1 -0
- data/app/assets/stylesheets/bulb/application.css +15 -0
- data/app/controllers/bulb/blob_controller.rb +15 -0
- data/app/controllers/bulb/bulb_controller.rb +5 -0
- data/app/controllers/bulb/concerns/bulb_controller.rb +38 -0
- data/app/controllers/bulb/repositories_controller.rb +9 -0
- data/app/controllers/bulb/tree_controller.rb +15 -0
- data/app/helpers/bulb/application_helper.rb +40 -0
- data/app/helpers/bulb/text_helper.rb +35 -0
- data/app/jobs/bulb/application_job.rb +4 -0
- data/app/models/bulb/application_record.rb +5 -0
- data/app/models/bulb/group.rb +7 -0
- data/app/models/bulb/repository.rb +36 -0
- data/app/validators/bulb/unexisting_validator.rb +9 -0
- data/app/views/bulb/blob/show.html.erb +16 -0
- data/app/views/bulb/repositories/show.html.erb +18 -0
- data/app/views/bulb/tree/_blob.html.erb +7 -0
- data/app/views/bulb/tree/_subtree.html.erb +7 -0
- data/app/views/bulb/tree/_tree.html.erb +9 -0
- data/app/views/bulb/tree/show.html.erb +3 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20210809182658_create_bulb_groups.rb +12 -0
- data/db/migrate/20210809182912_create_bulb_repositories.rb +14 -0
- data/db/migrate/20220116171708_add_unique_index_on_slugs.rb +6 -0
- data/lib/bulb/engine.rb +7 -0
- data/lib/bulb/version.rb +1 -1
- data/lib/bulb.rb +3 -3
- data/lib/tasks/bulb_tasks.rake +4 -0
- metadata +94 -19
- data/.gitignore +0 -8
- data/.travis.yml +0 -6
- data/Gemfile +0 -7
- data/LICENSE.txt +0 -21
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/bulb.gemspec +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d8fbeacdbc0bd0d8bdb90769e4bb4e25e3a9327847f5b690605a72ad7c29d29
|
4
|
+
data.tar.gz: 5f3cc7e8cd6778b4afbee05e73de2371929b3fac18b82263c10e643927d36124
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9c474bbb7aabc5cf420731d94ce969ac2327f3b3e6bf37f9b8a3ac1edd1214747d34aaba27319a8460c1dc8cf1b0fac46eac1446955e838ec52ef43e6771b42
|
7
|
+
data.tar.gz: d1e1ccedb16cfbbe54ae1ef1253feba5d77d9fef8c1bb2bcd36b191915e6c419d6f543890a3a515c864483f7fffbea9177e5c8232d999e347eff48a24d87217c
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2020 Robin Dupret
|
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.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Bulb
|
2
2
|
|
3
|
-
|
3
|
+
Bulb is a Rails engine that allows easy displaying and management
|
4
|
+
of Git repositories.
|
4
5
|
|
5
|
-
|
6
|
+
The aim is to provide a very simple engine that you can integrate
|
7
|
+
into your personal or organization's website to easily browse your
|
8
|
+
Git repositories, stylize things as you wish and provide any feature
|
9
|
+
you would like to attach to your repos.
|
6
10
|
|
7
11
|
## Installation
|
8
12
|
|
@@ -14,26 +18,40 @@ gem 'bulb'
|
|
14
18
|
|
15
19
|
And then execute:
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
$ gem install bulb
|
21
|
+
```bash
|
22
|
+
$ bundle
|
23
|
+
```
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
Once installed, you need to generate the needed migrations to
|
28
|
+
create the tables and migrate your database:
|
26
29
|
|
27
|
-
|
30
|
+
```bash
|
31
|
+
$ rake bulb:install:migrations
|
32
|
+
$ rake db:migrate
|
33
|
+
```
|
28
34
|
|
29
|
-
|
35
|
+
Then, you can mount the engine to whichever path you like:
|
30
36
|
|
31
|
-
|
37
|
+
```ruby
|
38
|
+
mount Bulb::Engine => "/git"
|
39
|
+
```
|
40
|
+
|
41
|
+
Then your repositories will be available through `/git/:group-slug/:slug`
|
42
|
+
like `/git/sites/personal`.
|
32
43
|
|
33
|
-
|
44
|
+
To configure where your repositories are stored and who own them, you can
|
45
|
+
open your `config/application.rb` or any environment-specific file and add
|
46
|
+
the following:
|
34
47
|
|
35
|
-
|
48
|
+
```ruby
|
49
|
+
config.bulb.repositories_path = '/srv/git/'
|
50
|
+
config.bulb.repositories_owner = 'git'
|
51
|
+
```
|
36
52
|
|
53
|
+
Where `git` is a Unix user on your system that must be the owner of the
|
54
|
+
repository folders.
|
37
55
|
|
38
56
|
## License
|
39
57
|
|
data/Rakefile
CHANGED
@@ -1,10 +1,32 @@
|
|
1
|
-
|
2
|
-
require
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Bulb'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
load 'rails/tasks/statistics.rake'
|
21
|
+
|
22
|
+
require 'bundler/gem_tasks'
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
3
25
|
|
4
26
|
Rake::TestTask.new(:test) do |t|
|
5
|
-
t.libs <<
|
6
|
-
t.
|
7
|
-
t.
|
27
|
+
t.libs << 'test'
|
28
|
+
t.pattern = 'test/**/*_test.rb'
|
29
|
+
t.verbose = false
|
8
30
|
end
|
9
31
|
|
10
|
-
task :
|
32
|
+
task default: :test
|
@@ -0,0 +1 @@
|
|
1
|
+
//= link_directory ../stylesheets/bulb .css
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Bulb
|
2
|
+
class BlobController < BulbController
|
3
|
+
before_action :set_repository
|
4
|
+
before_action :handle_special_formats
|
5
|
+
|
6
|
+
def show
|
7
|
+
@git_repository = @repository.git_repository
|
8
|
+
@blob_hash = @git_repository.head.target.tree.path(params[:path])
|
9
|
+
|
10
|
+
redirect_to repository_tree_path if @blob_hash[:type] == :tree
|
11
|
+
|
12
|
+
@blob = @git_repository.lookup(@blob_hash[:oid])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Bulb::Concerns::BulbController
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
helper Rails.application.routes.url_helpers
|
6
|
+
helper Bulb::ApplicationHelper
|
7
|
+
helper Bulb::TextHelper
|
8
|
+
|
9
|
+
protect_from_forgery with: :exception
|
10
|
+
|
11
|
+
protected
|
12
|
+
def set_repository
|
13
|
+
@group = Bulb::Group.find_by(slug: params[:group_slug])
|
14
|
+
@repository = Bulb::Repository.find_by(group: @group, slug: params[:slug])
|
15
|
+
end
|
16
|
+
|
17
|
+
def group_slug
|
18
|
+
params[:group_slug]
|
19
|
+
end
|
20
|
+
|
21
|
+
def slug
|
22
|
+
params[:slug]
|
23
|
+
end
|
24
|
+
|
25
|
+
def handle_special_formats
|
26
|
+
redirect_formats = [
|
27
|
+
"text/css",
|
28
|
+
"text/javascript",
|
29
|
+
"text/plain",
|
30
|
+
"image/svg+xml", "image/png", "image/gif", "image/jpeg", "image/jpg",
|
31
|
+
"application/x-yaml",
|
32
|
+
"application/xml"
|
33
|
+
]
|
34
|
+
|
35
|
+
request.formats = [:html] if redirect_formats.include?(request.formats.first.to_s)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Bulb
|
2
|
+
class TreeController < BulbController
|
3
|
+
before_action :set_repository
|
4
|
+
before_action :handle_special_formats
|
5
|
+
|
6
|
+
def show
|
7
|
+
@git_repository = @repository.git_repository
|
8
|
+
tree_hash = @git_repository.head.target.tree.path(params[:path])
|
9
|
+
|
10
|
+
redirect_to repository_blob_path if tree_hash[:type] == :blob
|
11
|
+
|
12
|
+
@tree = @git_repository.lookup(tree_hash[:oid])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Bulb
|
2
|
+
module ApplicationHelper
|
3
|
+
def tree_path(root, name)
|
4
|
+
root = root ? (root + "/") : ""
|
5
|
+
bulb.repository_tree_path(reference: 'master', path: root + name)
|
6
|
+
end
|
7
|
+
|
8
|
+
def blob_path(root, name)
|
9
|
+
root = root ? (root + "/") : ""
|
10
|
+
bulb.repository_blob_path(reference: 'master', path: root + name)
|
11
|
+
end
|
12
|
+
|
13
|
+
def breadcrumb
|
14
|
+
parts = params[:path].split("/")
|
15
|
+
last = parts.pop
|
16
|
+
|
17
|
+
reference = params[:reference]
|
18
|
+
group_slug = params[:group_slug]
|
19
|
+
slug = params[:slug]
|
20
|
+
|
21
|
+
elements = []
|
22
|
+
|
23
|
+
elements << content_tag(:li) do
|
24
|
+
link_to @repository.slug, bulb.repository_path(group_slug, slug)
|
25
|
+
end
|
26
|
+
|
27
|
+
parts.each_with_index do |part, index|
|
28
|
+
path = parts[0..index].join("/")
|
29
|
+
|
30
|
+
elements << content_tag(:li) do
|
31
|
+
link_to part, bulb.repository_tree_path(reference: reference, path: path)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
elements << content_tag(:li, last)
|
36
|
+
|
37
|
+
content_tag(:ul, elements.join.html_safe, class: 'breadcrumb')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Bulb
|
2
|
+
module TextHelper
|
3
|
+
def highlight_blob(filename, content)
|
4
|
+
tokens, lexer = lex(content, filename: filename)
|
5
|
+
|
6
|
+
formatter = Rouge::Formatters::HTMLLineTable.new(html_formatter)
|
7
|
+
formatter.format(tokens)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
def lex(code, lang: nil, filename: nil)
|
12
|
+
lexer = if lang
|
13
|
+
Rouge::Lexer.find_fancy(lang, code) || Rouge::Lexers::PlainText
|
14
|
+
elsif filename
|
15
|
+
# Rouge highlights `.h` files as `C` by default but we can safely
|
16
|
+
# highlight it as `C++` because the latter is almost a superset of
|
17
|
+
# the former and there are certainly far more C++ keywords that
|
18
|
+
# don't exist in C, than the other way around.
|
19
|
+
if filename.end_with?(".h")
|
20
|
+
Rouge::Lexers::Cpp
|
21
|
+
else
|
22
|
+
Rouge::Lexer.guess(filename: filename, source: code)
|
23
|
+
end
|
24
|
+
else
|
25
|
+
Rouge::Lexers::PlainText
|
26
|
+
end
|
27
|
+
|
28
|
+
[lexer.lex(code), lexer]
|
29
|
+
end
|
30
|
+
|
31
|
+
def html_formatter
|
32
|
+
Rouge::Formatters::HTML.new
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'rugged'
|
2
|
+
|
3
|
+
module Bulb
|
4
|
+
class Repository < ApplicationRecord
|
5
|
+
belongs_to :group, class_name: 'Group', foreign_key: 'bulb_group_id'
|
6
|
+
|
7
|
+
before_create :create_git_repository
|
8
|
+
|
9
|
+
validates_uniqueness_of :slug, scope: :bulb_group_id
|
10
|
+
validates :fs_repository_path, 'bulb/unexisting': true, on: :create
|
11
|
+
|
12
|
+
def git_repository
|
13
|
+
@git_repository ||= Rugged::Repository.new(fs_repository_path)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
def create_git_repository
|
18
|
+
full_path = fs_repository_path
|
19
|
+
|
20
|
+
FileUtils.mkdir_p(full_path)
|
21
|
+
Rugged::Repository.init_at(full_path, :bare)
|
22
|
+
|
23
|
+
if (owner = Bulb.repositories_owner).present?
|
24
|
+
FileUtils.chown_R(owner, owner, full_path)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def fs_repository_path
|
29
|
+
if group.nil?
|
30
|
+
File.join(Bulb.repositories_path, "#{slug}.git")
|
31
|
+
else
|
32
|
+
File.join(Bulb.repositories_path, group.slug, "#{slug}.git")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= breadcrumb %>
|
2
|
+
|
3
|
+
<% unless @blob.binary? %>
|
4
|
+
<div class="blob highlight">
|
5
|
+
<%= raw highlight_blob @blob_hash[:name], @blob.content.force_encoding(Encoding::UTF_8) %>
|
6
|
+
</div>
|
7
|
+
<% else %>
|
8
|
+
<div class="blob">
|
9
|
+
<% match = @blob_hash[:name].match(/\.(jpg|jpeg|png|gif)$/) %>
|
10
|
+
<% if match %>
|
11
|
+
<img src="data:image/<%= match[1] %>;base64,<%= Base64.strict_encode64(@blob.content) %>">
|
12
|
+
<% else %>
|
13
|
+
Nothing to display.
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= content_for(:banner) do %>
|
2
|
+
<h2>
|
3
|
+
<%= link_to @group.name, group_path(@group.slug) %> /
|
4
|
+
<%= @repository.name %>
|
5
|
+
</h2>
|
6
|
+
|
7
|
+
<p class="repo-description"><%= @repository.description %></p>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if @git_repository.empty? %>
|
11
|
+
Nothing here for the moment.
|
12
|
+
<% else %>
|
13
|
+
<%= render partial: 'bulb/tree/tree', locals: { tree: @git_repository.head.target.tree } %>
|
14
|
+
|
15
|
+
<div class="readme">
|
16
|
+
<%= raw markdown @git_repository.lookup(@git_repository.head.target.tree.each.find { |b| b[:name].start_with?("README") }[:oid]).content %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Bulb::Engine.routes.draw do
|
2
|
+
scope '/:group_slug', format: false do
|
3
|
+
get '/' => 'groups#show', as: :group
|
4
|
+
|
5
|
+
scope '/:slug', as: :repository, format: false do
|
6
|
+
get '/' => 'repositories#show'
|
7
|
+
|
8
|
+
get '/tree/:reference/*path' => 'tree#show', as: :tree
|
9
|
+
get '/blob/:reference/*path' => 'blob#show', as: :blob
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateBulbRepositories < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :bulb_repositories do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :slug
|
6
|
+
t.integer :visibility
|
7
|
+
t.text :description
|
8
|
+
t.json :language_stats
|
9
|
+
t.references :bulb_group, null: false, foreign_key: true
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/bulb/engine.rb
ADDED
data/lib/bulb/version.rb
CHANGED
data/lib/bulb.rb
CHANGED
metadata
CHANGED
@@ -1,38 +1,113 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Dupret
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2022-02-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.1.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.1.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rugged
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rouge
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.26'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.26'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
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
|
+
description: Boilerplate code to display and manage Git repositories.
|
14
70
|
email:
|
15
|
-
- robin.dupret@
|
71
|
+
- robin.dupret@gmail.com
|
16
72
|
executables: []
|
17
73
|
extensions: []
|
18
74
|
extra_rdoc_files: []
|
19
75
|
files:
|
20
|
-
-
|
21
|
-
- ".travis.yml"
|
22
|
-
- Gemfile
|
23
|
-
- LICENSE.txt
|
76
|
+
- LICENSE
|
24
77
|
- README.md
|
25
78
|
- Rakefile
|
26
|
-
-
|
27
|
-
-
|
28
|
-
- bulb.
|
79
|
+
- app/assets/config/bulb_manifest.js
|
80
|
+
- app/assets/stylesheets/bulb/application.css
|
81
|
+
- app/controllers/bulb/blob_controller.rb
|
82
|
+
- app/controllers/bulb/bulb_controller.rb
|
83
|
+
- app/controllers/bulb/concerns/bulb_controller.rb
|
84
|
+
- app/controllers/bulb/repositories_controller.rb
|
85
|
+
- app/controllers/bulb/tree_controller.rb
|
86
|
+
- app/helpers/bulb/application_helper.rb
|
87
|
+
- app/helpers/bulb/text_helper.rb
|
88
|
+
- app/jobs/bulb/application_job.rb
|
89
|
+
- app/models/bulb/application_record.rb
|
90
|
+
- app/models/bulb/group.rb
|
91
|
+
- app/models/bulb/repository.rb
|
92
|
+
- app/validators/bulb/unexisting_validator.rb
|
93
|
+
- app/views/bulb/blob/show.html.erb
|
94
|
+
- app/views/bulb/repositories/show.html.erb
|
95
|
+
- app/views/bulb/tree/_blob.html.erb
|
96
|
+
- app/views/bulb/tree/_subtree.html.erb
|
97
|
+
- app/views/bulb/tree/_tree.html.erb
|
98
|
+
- app/views/bulb/tree/show.html.erb
|
99
|
+
- config/routes.rb
|
100
|
+
- db/migrate/20210809182658_create_bulb_groups.rb
|
101
|
+
- db/migrate/20210809182912_create_bulb_repositories.rb
|
102
|
+
- db/migrate/20220116171708_add_unique_index_on_slugs.rb
|
29
103
|
- lib/bulb.rb
|
104
|
+
- lib/bulb/engine.rb
|
30
105
|
- lib/bulb/version.rb
|
31
|
-
|
106
|
+
- lib/tasks/bulb_tasks.rake
|
107
|
+
homepage: ''
|
32
108
|
licenses:
|
33
109
|
- MIT
|
34
|
-
metadata:
|
35
|
-
homepage_uri: https://github.com
|
110
|
+
metadata: {}
|
36
111
|
post_install_message:
|
37
112
|
rdoc_options: []
|
38
113
|
require_paths:
|
@@ -41,15 +116,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
116
|
requirements:
|
42
117
|
- - ">="
|
43
118
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
119
|
+
version: '0'
|
45
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
121
|
requirements:
|
47
122
|
- - ">="
|
48
123
|
- !ruby/object:Gem::Version
|
49
124
|
version: '0'
|
50
125
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
126
|
+
rubygems_version: 3.2.22
|
52
127
|
signing_key:
|
53
128
|
specification_version: 4
|
54
|
-
summary:
|
129
|
+
summary: A Rails engine to deal with Git repositories
|
55
130
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2020 Robin Dupret
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "bulb"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/bulb.gemspec
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative 'lib/bulb/version'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = "bulb"
|
5
|
-
spec.version = Bulb::VERSION
|
6
|
-
spec.authors = ["Robin Dupret"]
|
7
|
-
spec.email = ["robin.dupret@hey.com"]
|
8
|
-
|
9
|
-
spec.summary = %q{Write a short summary, because RubyGems requires one.}
|
10
|
-
spec.description = %q{Write a longer description or delete this line.}
|
11
|
-
spec.homepage = "https://github.com"
|
12
|
-
spec.license = "MIT"
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
-
|
15
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
16
|
-
|
17
|
-
# Specify which files should be added to the gem when it is released.
|
18
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
-
end
|
22
|
-
spec.bindir = "exe"
|
23
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = ["lib"]
|
25
|
-
end
|