orly 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/gempush.yml +28 -0
- data/lib/orly.rb +13 -0
- data/lib/orly/tester.rb +18 -0
- data/lib/orly/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7e0ce63fc0363f0f053a5e57b268120583b4f62140c1086e3d716ffbc7545021
|
4
|
+
data.tar.gz: d43b7cc6bf03ba8201b0bb68b71be42f5a8c87d8352458be97320249e3ae880f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9616336e4959e230969e289b948e4db8892fae2803ad78d9c70ee536640f12faba2078396ba50629954d2b8716895cedcef29ba6c927f0d701f7131d557a0c9
|
7
|
+
data.tar.gz: f9a5d3510278523f01d35abe836d08a9c2a0f0cab5cd17f6700a8cf15b5ececcf759c1b30fef7a25bf8b604b430008251f685d166fba7e543cf252d838df906f
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
name: Build + Publish
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby 2.6
|
15
|
+
uses: actions/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
version: 2.6.x
|
18
|
+
|
19
|
+
- name: Publish to RubyGems
|
20
|
+
run: |
|
21
|
+
mkdir -p $HOME/.gem
|
22
|
+
touch $HOME/.gem/credentials
|
23
|
+
chmod 0600 $HOME/.gem/credentials
|
24
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
+
gem build *.gemspec
|
26
|
+
gem push *.gem
|
27
|
+
env:
|
28
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
data/lib/orly.rb
CHANGED
@@ -10,6 +10,8 @@ module Orly
|
|
10
10
|
def self.run
|
11
11
|
tester = Orly::Tester.new()
|
12
12
|
notify = []
|
13
|
+
mix_commands = []
|
14
|
+
|
13
15
|
notify << "run 'bundle install'".red if tester.need_bundle_install?
|
14
16
|
notify << "run 'rake db:migrate'".red if tester.need_migrate?
|
15
17
|
notify << "run 'dotenv-sync merge'".red if tester.need_dotenv?
|
@@ -17,6 +19,17 @@ module Orly
|
|
17
19
|
notify << "run 'bower install'".green if tester.need_bower?
|
18
20
|
notify << "run 'npm install'".green if tester.need_npm?
|
19
21
|
notify << "run 'yarn install'".green if tester.need_yarn?
|
22
|
+
|
23
|
+
mix_commands << 'deps.get' if tester.need_mix?
|
24
|
+
mix_commands << 'ecto.migrate' if tester.need_ecto_migrate?
|
25
|
+
mix_commands << 'ecto.seed' if tester.need_ecto_seed?
|
26
|
+
|
27
|
+
if mix_commands.length == 1
|
28
|
+
notify << "run 'mix #{mix_commands.join}'".magenta
|
29
|
+
elsif mix_commands.length > 1
|
30
|
+
notify << "run 'mix do #{mix_commands.join(',')}'".magenta
|
31
|
+
end
|
32
|
+
|
20
33
|
Orly::OwlPrinter.print(notify) unless notify.empty?
|
21
34
|
rescue Orly::NoRepo
|
22
35
|
puts "O RLY: this is not a git repo".red
|
data/lib/orly/tester.rb
CHANGED
@@ -12,6 +12,9 @@ module Orly
|
|
12
12
|
@need_npm = false
|
13
13
|
@uses_yarn = false
|
14
14
|
@need_dotenv = false
|
15
|
+
@need_mix = false
|
16
|
+
@need_ecto_migrate = false
|
17
|
+
@need_ecto_seed = false
|
15
18
|
run_tests
|
16
19
|
rescue ArgumentError
|
17
20
|
raise NoRepo.new
|
@@ -27,6 +30,9 @@ module Orly
|
|
27
30
|
when /package\.json/ then @need_npm = true
|
28
31
|
when /^yarn\.lock/ then @uses_yarn = true
|
29
32
|
when /^.dotenv-encrypted/ then @need_dotenv = true
|
33
|
+
when /^mix\.lock/ then @need_mix = true
|
34
|
+
when /priv\/[-_.A-Za-z0-9]*\/migrations/ then @need_ecto_migrate = true
|
35
|
+
when /priv\/[-_.A-Za-z0-9]*\/(?:seeds\.exs|fixtures\/[-_.A-Za-z0-9]*\.exs)/ then @need_ecto_seed = true
|
30
36
|
end
|
31
37
|
end
|
32
38
|
rescue Git::GitExecuteError
|
@@ -71,5 +77,17 @@ module Orly
|
|
71
77
|
def uses_yarn?
|
72
78
|
@uses_yarn
|
73
79
|
end
|
80
|
+
|
81
|
+
def need_mix?
|
82
|
+
@need_mix
|
83
|
+
end
|
84
|
+
|
85
|
+
def need_ecto_migrate?
|
86
|
+
@need_ecto_migrate
|
87
|
+
end
|
88
|
+
|
89
|
+
def need_ecto_seed?
|
90
|
+
@need_ecto_seed
|
91
|
+
end
|
74
92
|
end
|
75
93
|
end
|
data/lib/orly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -61,6 +61,7 @@ executables:
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
+
- ".github/workflows/gempush.yml"
|
64
65
|
- ".gitignore"
|
65
66
|
- CHANGELOG.md
|
66
67
|
- Gemfile
|
@@ -93,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
|
-
|
97
|
-
rubygems_version: 2.5.1
|
97
|
+
rubygems_version: 3.0.3
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Tells you when you need to run `bundle install`, `rake db:migrate`, `pod
|