bard 0.49.0 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/install_files/.github/workflows/ci.yml +31 -0
- data/install_files/apt_dependencies.rb +10 -0
- data/install_files/ci +0 -2
- data/install_files/setup +2 -4
- data/install_files/specified_ruby.rb +16 -3
- data/lib/bard/version.rb +1 -1
- data/lib/bard.rb +1 -1
- metadata +3 -4
- data/install_files/specified_node.rb +0 -31
- data/install_files/specified_yarn.rb +0 -31
- data/install_files/yarn +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0143951321b002520b2680aa29b95c809dd2e53b6bbffffee26f2846ec77da6
|
4
|
+
data.tar.gz: 27d3e89add08daf40c0ecdfc2e689d476015faa527e7cccaa9d2ff11159d89fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 909fd33f890a8429bf6013ad0cc133ee36ee7fdea69d8c17a7fff10c5df88126d0edce954a36c434baa653c8ca47deefeeb31042099ea15cbd3b14c52eeebf38
|
7
|
+
data.tar.gz: 9d65e8741eb39854403e7929ec93a829091ad2bd6bd041790537162be0b8c62b90941bf426547b3fec999a03150caaf3079ec224d2b7304ab01a8bec98fa2e22
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: ci
|
2
|
+
on:
|
3
|
+
workflow_dispatch:
|
4
|
+
inputs:
|
5
|
+
git-ref:
|
6
|
+
description: Git Ref
|
7
|
+
default: master
|
8
|
+
required: true
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-20.04
|
12
|
+
env:
|
13
|
+
RAILS_ENV: test
|
14
|
+
steps:
|
15
|
+
- name: Set up MySQL
|
16
|
+
run: |
|
17
|
+
sudo /etc/init.d/mysql start
|
18
|
+
sudo mysql -uroot -proot -e"ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '';"
|
19
|
+
- name: Checkout code
|
20
|
+
uses: actions/checkout@v3
|
21
|
+
with:
|
22
|
+
ref: ${{ github.event.inputs.git-ref }}
|
23
|
+
- name: Install Ruby and gems
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
bundler-cache: true
|
27
|
+
- name: Setup
|
28
|
+
run: bin/setup
|
29
|
+
- name: Run tests
|
30
|
+
run: bin/ci
|
31
|
+
|
data/install_files/ci
CHANGED
data/install_files/setup
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
require_relative './apt_dependencies'
|
2
3
|
require_relative './specified_ruby'
|
3
4
|
require_relative './specified_bundler'
|
4
|
-
require_relative './specified_node'
|
5
|
-
require_relative './specified_yarn'
|
6
5
|
|
7
6
|
Dir.chdir File.expand_path("..", __dir__) do
|
8
7
|
exec [
|
8
|
+
AptDependencies.ensure!,
|
9
9
|
SpecifiedRuby.ensure!,
|
10
10
|
SpecifiedBundler.ensure!,
|
11
|
-
SpecifiedNode.ensure!,
|
12
|
-
SpecifiedYarn.ensure!,
|
13
11
|
"bin/rake bootstrap",
|
14
12
|
].join(" && ")
|
15
13
|
end
|
@@ -1,9 +1,8 @@
|
|
1
|
-
require 'rvm'
|
2
|
-
|
3
1
|
module SpecifiedRuby
|
4
2
|
extend self
|
5
3
|
|
6
4
|
def ensure!
|
5
|
+
return "true" if native?
|
7
6
|
install unless installed?
|
8
7
|
restart unless current?
|
9
8
|
"true"
|
@@ -11,6 +10,19 @@ module SpecifiedRuby
|
|
11
10
|
|
12
11
|
private
|
13
12
|
|
13
|
+
def native?
|
14
|
+
begin
|
15
|
+
require "rvm"
|
16
|
+
false
|
17
|
+
rescue LoadError
|
18
|
+
native_version == version
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def native_version
|
23
|
+
"ruby-#{`ruby -e 'puts RUBY_VERSION'`.chomp}"
|
24
|
+
end
|
25
|
+
|
14
26
|
def version
|
15
27
|
File.read(".ruby-version").chomp
|
16
28
|
end
|
@@ -29,6 +41,7 @@ module SpecifiedRuby
|
|
29
41
|
end
|
30
42
|
|
31
43
|
def current?
|
44
|
+
require "rvm"
|
32
45
|
RVM.use_from_path!(".")
|
33
46
|
RVM.current.environment_name == [version, gemset].join("@")
|
34
47
|
rescue RVM::IncompatibleRubyError
|
@@ -36,7 +49,7 @@ module SpecifiedRuby
|
|
36
49
|
end
|
37
50
|
|
38
51
|
def restart
|
39
|
-
exec "rvm-exec #{$0} && rvm-exec $SHELL"
|
52
|
+
exec "rvm-exec #{$0} #{"&& rvm-exec $SHELL" if ENV["RAILS_ENV"] == "development"}"
|
40
53
|
end
|
41
54
|
end
|
42
55
|
|
data/lib/bard/version.rb
CHANGED
data/lib/bard.rb
CHANGED
@@ -161,7 +161,7 @@ class Bard::CLI < Thor
|
|
161
161
|
desc "install", "copies bin/setup and bin/ci scripts into current project."
|
162
162
|
def install
|
163
163
|
install_files_path = File.expand_path(File.join(__dir__, "../install_files/*"))
|
164
|
-
system "cp #{install_files_path} bin/"
|
164
|
+
system "cp -R #{install_files_path} bin/"
|
165
165
|
end
|
166
166
|
|
167
167
|
desc "ping [SERVER=production]", "hits the server over http to verify that its up."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
@@ -138,13 +138,12 @@ files:
|
|
138
138
|
- features/support/env.rb
|
139
139
|
- features/support/grit_ext.rb
|
140
140
|
- features/support/io.rb
|
141
|
+
- install_files/.github/workflows/ci.yml
|
142
|
+
- install_files/apt_dependencies.rb
|
141
143
|
- install_files/ci
|
142
144
|
- install_files/setup
|
143
145
|
- install_files/specified_bundler.rb
|
144
|
-
- install_files/specified_node.rb
|
145
146
|
- install_files/specified_ruby.rb
|
146
|
-
- install_files/specified_yarn.rb
|
147
|
-
- install_files/yarn
|
148
147
|
- lib/bard.rb
|
149
148
|
- lib/bard/base.rb
|
150
149
|
- lib/bard/ci.rb
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module SpecifiedNode
|
2
|
-
extend self
|
3
|
-
|
4
|
-
NODE_VERSION = "v12.16.1"
|
5
|
-
NODE_PATH = "tmp/node-#{NODE_VERSION}-linux-x64/bin/node"
|
6
|
-
|
7
|
-
def ensure!
|
8
|
-
install_node unless node_installed?
|
9
|
-
install_binstub
|
10
|
-
"bin/node --version"
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def install_node
|
16
|
-
system("wget -cO- https://nodejs.org/dist/#{NODE_VERSION}/node-#{NODE_VERSION}-linux-x64.tar.xz | tar xJ -C tmp/")
|
17
|
-
end
|
18
|
-
|
19
|
-
def install_binstub
|
20
|
-
system("cd bin && ln -fs ../#{NODE_PATH}")
|
21
|
-
end
|
22
|
-
|
23
|
-
def node_installed?
|
24
|
-
File.exist?(NODE_PATH) && `#{NODE_PATH} --version`.chomp == NODE_VERSION
|
25
|
-
end
|
26
|
-
|
27
|
-
def binstub_installed?
|
28
|
-
File.exist?("bin/node")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module SpecifiedYarn
|
2
|
-
extend self
|
3
|
-
|
4
|
-
YARN_VERSION = "v1.22.0"
|
5
|
-
YARN_PATH = "tmp/yarn-#{YARN_VERSION}/bin/yarn.js"
|
6
|
-
|
7
|
-
def ensure!
|
8
|
-
install_yarn unless yarn_installed?
|
9
|
-
install_binstub
|
10
|
-
"bin/yarn install"
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def install_yarn
|
16
|
-
system("wget -cO- https://github.com/yarnpkg/yarn/releases/download/#{YARN_VERSION}/yarn-#{YARN_VERSION}.tar.gz | tar -xz -C tmp/")
|
17
|
-
end
|
18
|
-
|
19
|
-
def install_binstub
|
20
|
-
system("cd bin && ln -fs ../#{YARN_PATH}")
|
21
|
-
end
|
22
|
-
|
23
|
-
def yarn_installed?
|
24
|
-
File.exist?(YARN_PATH) && `bin/node #{YARN_PATH} --version`.chomp == YARN_VERSION[1..-1]
|
25
|
-
end
|
26
|
-
|
27
|
-
def binstub_installed?
|
28
|
-
File.exist?("bin/yarn")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|