bulb 0.1.0 → 0.2.0

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: 47c6026788df026b5ea24ea094d24f6730264d918bdfca283230fe07562248d6
4
- data.tar.gz: fa0259afd63979f16e36cf2ce17e0843dd4e00c9404a82f70a386ea653c59e22
3
+ metadata.gz: 00c1343bdb8a84d4e9f36d45a86258cfa403438d682c66c275a7714420a219c6
4
+ data.tar.gz: 845c1e07687d2ab11bed080d4d786d39c7de1c8eea88f3c89744e1ed18ffe7f3
5
5
  SHA512:
6
- metadata.gz: 2d56200cf08c19be3b6581ecda79dc21ded7097b21ffe6e08c415c41363a4a8ee06c7fd12c369dc0f8e14e954029cec65e1dad61c3a6de2d69c6e3b0a57f4323
7
- data.tar.gz: 997e24b4a90f6ea7a940a874bcbd408e2374a1bb35fed8b5e18da03e09dc9ac5728fec6923021618bfdbfa083c28a9dfd2676ffcb25b8ad9f7548ebece47e066
6
+ metadata.gz: 8f43bcb98e5ef5ab0fe123118ec49cf79a0ab3f08f79a061241737a37e277777b74c63d57c9789d4e725f5bee39c7f11afcd8de06b0baa6e80b6972856f52a88
7
+ data.tar.gz: 5c7a527aaf9017547cdc0fbec1393f2588f7ad96fde217a28b1bf528cfc850fc2ffb09f8479caa2b91e763c0e244d59b779279e3527127af681cded35a32a6f7
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,11 +1,10 @@
1
1
  # Bulb
2
+ Short description and motivation.
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bulb`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
4
+ ## Usage
5
+ How to use my plugin.
6
6
 
7
7
  ## Installation
8
-
9
8
  Add this line to your application's Gemfile:
10
9
 
11
10
  ```ruby
@@ -13,28 +12,17 @@ gem 'bulb'
13
12
  ```
14
13
 
15
14
  And then execute:
16
-
17
- $ bundle install
15
+ ```bash
16
+ $ bundle
17
+ ```
18
18
 
19
19
  Or install it yourself as:
20
-
21
- $ gem install bulb
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
+ ```bash
21
+ $ gem install bulb
22
+ ```
32
23
 
33
24
  ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bulb.
36
-
25
+ Contribution directions go here.
37
26
 
38
27
  ## License
39
-
40
28
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,10 +1,32 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
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 << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
8
30
  end
9
31
 
10
- task :default => :test
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,13 @@
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
+
9
+ @blob_hash = @git_repository.head.target.tree.path(params[:path])
10
+ @blob = @git_repository.lookup(@blob_hash[:oid])
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ module Bulb
2
+ class BulbController < ::ApplicationController
3
+ include Bulb::Concerns::Controllers::BulbController
4
+ end
5
+ 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,9 @@
1
+ module Bulb
2
+ class RepositoriesController < BulbController
3
+ before_action :set_repository
4
+
5
+ def show
6
+ @git_repository = @repository.git_repository
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
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
+
9
+ tree_hash = @git_repository.head.target.tree.path(params[:path])
10
+ @tree = @git_repository.lookup(tree_hash[:oid])
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
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
+ end
13
+ 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,4 @@
1
+ module Bulb
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module Bulb
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Bulb
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Bulb
2
+ class Group < ApplicationRecord
3
+ has_many :repositories
4
+ end
5
+ end
@@ -0,0 +1,29 @@
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
+ def git_repository
10
+ @git_repository ||= Rugged::Repository.new(fs_repository_path)
11
+ end
12
+
13
+ private
14
+ def create_git_repository
15
+ full_path = fs_repository_path
16
+
17
+ FileUtils.mkdir_p(full_path)
18
+ Rugged::Repository.init_at(full_path, :bare)
19
+ end
20
+
21
+ def fs_repository_path
22
+ if group.nil?
23
+ File.join(Bulb.repositories_path, slug)
24
+ else
25
+ File.join(Bulb.repositories_path, group.slug, slug)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,3 @@
1
+ <div class="blob highlight">
2
+ <%= raw highlight_blob @blob_hash[:name], @blob.content %>
3
+ </div>
@@ -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 %>
@@ -0,0 +1,21 @@
1
+ <div class="tree">
2
+ <% tree.each_tree do |folder| %>
3
+ <div class="entry">
4
+ <div class="name">
5
+ <%= link_to folder[:name], tree_path(params[:path], folder[:name]) %>
6
+ </div>
7
+
8
+ <div class="date"></div>
9
+ </div>
10
+ <% end %>
11
+
12
+ <% tree.each_blob do |entry| %>
13
+ <div class="entry">
14
+ <div class="name">
15
+ <%= link_to entry[:name], blob_path(params[:path], entry[:name]) %>
16
+ </div>
17
+
18
+ <div class="date"></div>
19
+ </div>
20
+ <% end %>
21
+ </div>
@@ -0,0 +1 @@
1
+ <%= render partial: 'tree', locals: { tree: @tree } %>
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,12 @@
1
+ class CreateBulbGroups < ActiveRecord::Migration[6.1]
2
+ def change
3
+ create_table :bulb_groups do |t|
4
+ t.string :name
5
+ t.string :slug
6
+ t.integer :visibility
7
+ t.text :description
8
+
9
+ t.timestamps
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
@@ -0,0 +1,5 @@
1
+ module Bulb
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Bulb
4
+ end
5
+ end
data/lib/bulb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bulb
2
- VERSION = "0.1.0"
2
+ VERSION = '0.2.0'
3
3
  end
data/lib/bulb.rb CHANGED
@@ -1,6 +1,5 @@
1
- require "bulb/version"
1
+ require "bulb/engine"
2
2
 
3
3
  module Bulb
4
- class Error < StandardError; end
5
- # Your code goes here...
4
+ mattr_accessor :repositories_path
6
5
  end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :bulb do
3
+ # # Task goes here
4
+ # end
metadata CHANGED
@@ -1,38 +1,110 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Dupret
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-08 00:00:00.000000000 Z
12
- dependencies: []
13
- description: Write a longer description or delete this line.
11
+ date: 2022-01-15 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@hey.com
71
+ - robin.dupret@gmail.com
16
72
  executables: []
17
73
  extensions: []
18
74
  extra_rdoc_files: []
19
75
  files:
20
- - ".gitignore"
21
- - ".travis.yml"
22
- - Gemfile
23
- - LICENSE.txt
76
+ - LICENSE
24
77
  - README.md
25
78
  - Rakefile
26
- - bin/console
27
- - bin/setup
28
- - bulb.gemspec
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/mailers/bulb/application_mailer.rb
90
+ - app/models/bulb/application_record.rb
91
+ - app/models/bulb/group.rb
92
+ - app/models/bulb/repository.rb
93
+ - app/views/bulb/blob/show.html.erb
94
+ - app/views/bulb/repositories/show.html.erb
95
+ - app/views/bulb/tree/_tree.html.erb
96
+ - app/views/bulb/tree/show.html.erb
97
+ - config/routes.rb
98
+ - db/migrate/20210809182658_create_bulb_groups.rb
99
+ - db/migrate/20210809182912_create_bulb_repositories.rb
29
100
  - lib/bulb.rb
101
+ - lib/bulb/engine.rb
30
102
  - lib/bulb/version.rb
31
- homepage: https://github.com
103
+ - lib/tasks/bulb_tasks.rake
104
+ homepage: ''
32
105
  licenses:
33
106
  - MIT
34
- metadata:
35
- homepage_uri: https://github.com
107
+ metadata: {}
36
108
  post_install_message:
37
109
  rdoc_options: []
38
110
  require_paths:
@@ -41,15 +113,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
41
113
  requirements:
42
114
  - - ">="
43
115
  - !ruby/object:Gem::Version
44
- version: 2.3.0
116
+ version: '0'
45
117
  required_rubygems_version: !ruby/object:Gem::Requirement
46
118
  requirements:
47
119
  - - ">="
48
120
  - !ruby/object:Gem::Version
49
121
  version: '0'
50
122
  requirements: []
51
- rubygems_version: 3.1.4
123
+ rubygems_version: 3.2.22
52
124
  signing_key:
53
125
  specification_version: 4
54
- summary: Write a short summary, because RubyGems requires one.
126
+ summary: A Rails engine to deal with Git repositories
55
127
  test_files: []
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.2
6
- before_install: gem install bundler -v 2.1.4
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in bulb.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 12.0"
7
- gem "minitest", "~> 5.0"
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
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
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