conventional 0.1.0.pre.alpha.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 607f364eb2453bebbd28d4c08b3dfd151bd35e79ac7d79a0d086162b43017b53
4
- data.tar.gz: f9e0ed7ef0786f4035f854f45211e98666917274ac8053b0b4a42947b10a47e0
3
+ metadata.gz: d34418c7a9280027d9ff1275b61441406682e10ce0e7aeb4eda51f6291b93eb2
4
+ data.tar.gz: 7770caa48f3416519933233841ba5a639afbafacd3a66f08f74ef910a71ae610
5
5
  SHA512:
6
- metadata.gz: 7cf841ea816111a896218e2a3c4b1852c01d7dbe484217095bbd1772e78c83a746b84ab978b63de1509131b612dd49c32c6e656c080766298a1e3e1f3092b92c
7
- data.tar.gz: 544578248d2bc641d46d604a1d7477309e6ff682e10ed9bc007311b52f152453816724c0d5d9e974d0fcc081b94c4ffb34bc8bc04119af0a669ea37486ba8f26
6
+ metadata.gz: 98a5a51ffb8bc27c2339591e67e8e1faf6f3f53264327eed9fde87095636687101f5bff0f4e3eac55badd412495b80a7c10d3b27af1c30b8e405fca0628f11cf
7
+ data.tar.gz: 2f8ba12ee9778222135914cc610d0d68f63d8ae5cdf50f039eab80998e4d4bec6a193a0bfb3721411b451669f25544bea545a8b67cbdbdda0ebf97cec7083724
@@ -9,11 +9,23 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
+ activesupport (6.0.3.3)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
12
18
  ast (2.4.1)
13
19
  bundler-audit (0.7.0.1)
14
20
  bundler (>= 1.2.0, < 3)
15
21
  thor (>= 0.18, < 2)
16
22
  concurrent-ruby (1.1.7)
23
+ coveralls (0.8.23)
24
+ json (>= 1.8, < 3)
25
+ simplecov (~> 0.16.1)
26
+ term-ansicolor (~> 1.3)
27
+ thor (>= 0.19.4, < 2.0)
28
+ tins (~> 1.6)
17
29
  diff-lcs (1.4.4)
18
30
  docile (1.3.2)
19
31
  dry-cli (0.6.0)
@@ -45,8 +57,14 @@ GEM
45
57
  dry-equalizer (~> 0.3)
46
58
  dry-inflector (~> 0.1, >= 0.1.2)
47
59
  dry-logic (~> 1.0, >= 1.0.2)
60
+ factory_bot (6.1.0)
61
+ activesupport (>= 5.0.0)
48
62
  gem-release (2.1.1)
63
+ i18n (1.8.5)
64
+ concurrent-ruby (~> 1.0)
49
65
  ice_nine (0.11.2)
66
+ json (2.3.1)
67
+ minitest (5.14.2)
50
68
  parallel (1.19.2)
51
69
  parser (2.7.1.4)
52
70
  ast (~> 2.4.1)
@@ -67,29 +85,40 @@ GEM
67
85
  diff-lcs (>= 1.2.0, < 2.0)
68
86
  rspec-support (~> 3.9.0)
69
87
  rspec-support (3.9.3)
70
- rubocop (0.90.0)
88
+ rubocop (0.91.0)
71
89
  parallel (~> 1.10)
72
90
  parser (>= 2.7.1.1)
73
91
  rainbow (>= 2.2.2, < 4.0)
74
92
  regexp_parser (>= 1.7)
75
93
  rexml
76
- rubocop-ast (>= 0.3.0, < 1.0)
94
+ rubocop-ast (>= 0.4.0, < 1.0)
77
95
  ruby-progressbar (~> 1.7)
78
96
  unicode-display_width (>= 1.4.0, < 2.0)
79
- rubocop-ast (0.3.0)
97
+ rubocop-ast (0.4.2)
80
98
  parser (>= 2.7.1.4)
81
- rubocop-performance (1.8.0)
99
+ rubocop-performance (1.8.1)
82
100
  rubocop (>= 0.87.0)
101
+ rubocop-ast (>= 0.4.0)
83
102
  ruby-progressbar (1.10.1)
84
- simplecov (0.19.0)
103
+ simplecov (0.16.1)
85
104
  docile (~> 1.1)
86
- simplecov-html (~> 0.11)
87
- simplecov-html (0.12.2)
88
- standard (0.6.0)
105
+ json (>= 1.8, < 3)
106
+ simplecov-html (~> 0.10.0)
107
+ simplecov-html (0.10.2)
108
+ standard (0.6.1)
89
109
  rubocop (~> 0.90)
90
110
  rubocop-performance (~> 1.8.0)
111
+ sync (0.5.0)
112
+ term-ansicolor (1.7.1)
113
+ tins (~> 1.0)
91
114
  thor (1.0.1)
115
+ thread_safe (0.3.6)
116
+ tins (1.25.0)
117
+ sync
118
+ tzinfo (1.2.7)
119
+ thread_safe (~> 0.1)
92
120
  unicode-display_width (1.7.0)
121
+ zeitwerk (2.4.0)
93
122
 
94
123
  PLATFORMS
95
124
  ruby
@@ -98,9 +127,11 @@ DEPENDENCIES
98
127
  bundler (~> 2.0)
99
128
  bundler-audit (~> 0.6)
100
129
  conventional!
130
+ coveralls (~> 0.8.23)
131
+ factory_bot (~> 6.1)
101
132
  rake (~> 13.0)
102
133
  rspec (~> 3.9)
103
- simplecov (~> 0.17)
134
+ simplecov (~> 0.16.1)
104
135
  standard (~> 0.6.0)
105
136
 
106
137
  BUNDLED WITH
data/README.md CHANGED
@@ -1,20 +1,45 @@
1
- # Conventional
1
+ # conventional
2
2
 
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/conventional`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Gem Version](https://badge.fury.io/rb/conventional.svg)](https://badge.fury.io/rb/conventional)
4
+ [![Gem Version](https://github.com/dabarrell/conventional/workflows/Verify/badge.svg)](https://github.com/dabarrell/conventional/actions?query=workflow%3AVerify)
5
+ [![Coverage Status](https://coveralls.io/repos/github/dabarrell/conventional/badge.svg?branch=master)](https://coveralls.io/github/dabarrell/conventional?branch=master)
4
6
 
5
- ## Installation
7
+ `conventional` bridges the gap in automating version management for Ruby gems from start to finish. Using
8
+ [Conventional Commits](https://conventionalcommits.org), it allows you to automate the process from commit to release.
6
9
 
7
- Add this line to your application's Gemfile:
10
+ ## Install
11
+
12
+ Add this line to your Gemfile:
8
13
 
9
14
  ```ruby
10
15
  gem 'conventional'
11
16
  ```
12
17
 
13
- And then execute:
18
+ and run `bundle install` from your shell.
19
+
20
+ To install the gem manually, run:
21
+
22
+ ```
23
+ gem install conventional
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ <!-- TODO -->
29
+
30
+ ## See also
31
+
32
+ Check out these similar projects, which served as inspiration for `conventional`.
33
+
34
+ - [`conventional-changelog`](https://github.com/conventional-changelog) (JS)
35
+ - [`lerna`](https://github.com/lerna/lerna) (JS)
36
+ - [`github-changelog-generator`](https://github.com/github-changelog-generator/github-changelog-generator) (Ruby)
37
+ - [`gem-release`](https://github.com/svenfuchs/gem-release) (Ruby)
14
38
 
15
- $ bundle install
39
+ ## License
16
40
 
17
- Or install it yourself as:
41
+ `conventional` is distributed under the [MIT License](LICENSE.txt).
18
42
 
19
- $ gem install conventional
43
+ ## Author
20
44
 
45
+ - David Barrell ([@dabarrell](https://github.com/dabarrell), [davidbarrell.me](https://davidbarrell.me))
@@ -36,8 +36,10 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "rake", "~> 13.0"
37
37
  spec.add_development_dependency "rspec", "~> 3.9"
38
38
  spec.add_development_dependency "standard", "~> 0.6.0"
39
- spec.add_development_dependency "simplecov", "~> 0.17"
39
+ spec.add_development_dependency "simplecov", "~> 0.16.1"
40
+ spec.add_development_dependency "coveralls", "~> 0.8.23"
40
41
  spec.add_development_dependency "bundler-audit", "~> 0.6"
42
+ spec.add_development_dependency "factory_bot", "~> 6.1"
41
43
 
42
44
  spec.add_runtime_dependency "gem-release", "~> 2.1"
43
45
  spec.add_runtime_dependency "dry-cli", "~> 0.6.0"
Binary file
@@ -3,7 +3,6 @@
3
3
  require "conventional/version"
4
4
  require "conventional/cli"
5
5
  require "conventional/utils"
6
- require "conventional/bump"
7
6
 
8
7
  module Conventional
9
8
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "factory_bot"
4
+ require "rubygems/version"
5
+
6
+ require "conventional/entities/commit"
7
+ require "conventional/entities/tag"
8
+
9
+ FactoryBot.define do
10
+ factory :commit, class: Conventional::Entities::Commit do
11
+ initialize_with { new(attributes) }
12
+
13
+ header { "#{type}(#{scope}): Commit message" }
14
+ body { nil }
15
+ footer { nil }
16
+ breaking_change { nil }
17
+ type { nil }
18
+ scope { nil }
19
+ subject { nil }
20
+ id { "commit-id" }
21
+ mentions { [] }
22
+ revert { nil }
23
+
24
+ trait :breaking_change do
25
+ breaking_change { "Details about a breaking change" }
26
+ type { "feat" }
27
+ end
28
+
29
+ trait :feat do
30
+ type { "feat" }
31
+ end
32
+
33
+ trait :chore do
34
+ type { "chore" }
35
+ end
36
+
37
+ trait :fix do
38
+ type { "fix" }
39
+ end
40
+ end
41
+ end
42
+
43
+ FactoryBot.define do
44
+ factory :tag, class: Conventional::Entities::Tag do
45
+ initialize_with { new(attributes) }
46
+
47
+ value { "v1.0.0" }
48
+ version { Gem::Version.new(value.delete_prefix(prefix)) }
49
+ prefix { "v" }
50
+ end
51
+ end
@@ -9,3 +9,6 @@ require_relative "support/simplecov"
9
9
 
10
10
  suite = Test::Suite.instance
11
11
  suite.start_coverage
12
+
13
+ # Eager load all lib/**/*.rb files to ensure simplecov detects them
14
+ Dir[File.join(suite.project_root, "lib", "**", "*.rb")].sort.each(&method(:require))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conventional
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Barrell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-18 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.17'
75
+ version: 0.16.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.17'
82
+ version: 0.16.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.8.23
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.8.23
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler-audit
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +108,20 @@ dependencies:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0.6'
111
+ - !ruby/object:Gem::Dependency
112
+ name: factory_bot
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '6.1'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '6.1'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: gem-release
99
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,14 +178,15 @@ files:
150
178
  - README.md
151
179
  - Rakefile
152
180
  - bin/audit
153
- - bin/ci_release
154
181
  - bin/console
155
182
  - bin/lint
156
183
  - bin/setup
157
184
  - bin/test
158
185
  - conventional.gemspec
186
+ - coverage.tgz
159
187
  - exe/conventional
160
188
  - lib/conventional.rb
189
+ - spec/factories.rb
161
190
  - spec/spec_helper.rb
162
191
  homepage: https://github.com/dabarrell/conventional
163
192
  licenses:
@@ -176,9 +205,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
205
  version: 2.3.0
177
206
  required_rubygems_version: !ruby/object:Gem::Requirement
178
207
  requirements:
179
- - - ">"
208
+ - - ">="
180
209
  - !ruby/object:Gem::Version
181
- version: 1.3.1
210
+ version: '0'
182
211
  requirements: []
183
212
  rubygems_version: 3.1.2
184
213
  signing_key:
@@ -1,29 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- # TODO: set up secret
5
-
6
- get_secret() {
7
- aws secretsmanager get-secret-value \
8
- --secret-id "/ca-logger-ruby/$1" \
9
- --query SecretString |
10
- tr -d '"' |
11
- sed 's/\\n/\n/g'
12
- }
13
-
14
- echo "--- Retrieving token"
15
- GITHUB_REGISTRY_TOKEN=$(get_secret "github-api-token") || exit $?
16
-
17
- echo "--- Creating credentials"
18
- echo ":github: Bearer ${GITHUB_REGISTRY_TOKEN}" >> ~/.gem/credentials
19
- chmod 0600 ~/.gem/credentials
20
-
21
- echo "--- Building gem"
22
- gem build ca-logger
23
-
24
- echo "--- Pushing gem"
25
- gem push --key github --host https://rubygems.pkg.github.com/cultureamp ./ca-logger-*.gem
26
-
27
- echo "--- Cleaning up"
28
- rm ~/.gem/credentials
29
- unset GITHUB_REGISTRY_TOKEN