semmy 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +27 -0
- data/CHANGELOG.md +3 -3
- data/bin/rubocop +17 -0
- data/lib/semmy.rb +1 -0
- data/lib/semmy/gemspec.rb +5 -5
- data/lib/semmy/project.rb +4 -0
- data/lib/semmy/ruby_gems.rb +23 -0
- data/lib/semmy/shell.rb +8 -0
- data/lib/semmy/tasks.rb +3 -1
- data/lib/semmy/tasks/lint.rb +31 -0
- data/lib/semmy/version.rb +1 -1
- data/semmy.gemspec +1 -0
- metadata +21 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bc7f29004979528fcaddf47d8f0538d6b3e7176
|
4
|
+
data.tar.gz: c176ee31e95d87d6e6c097db4861fcc5d9ce9dfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae0601113bb307b34a638267abc40487a37d1abd53704c3c7cd3649689d758fb0d17d658f1a51109bd571ccb271fb5d2e71e1b62b4ecb64f056264eb0893b3b5
|
7
|
+
data.tar.gz: 64fc0cae3c667e031da0198b82982b542152e5f33873453e345a9e1fd8dbdbd832a33f3ba031e0d30e1df8438ba7b4619b757313ba49403ad7d56cc7e18c7af8
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Use double quotes only for interpolation.
|
2
|
+
Style/StringLiterals:
|
3
|
+
EnforcedStyle: single_quotes
|
4
|
+
|
5
|
+
# Place dots at the beginning of multiline method calls.
|
6
|
+
Style/DotPosition:
|
7
|
+
EnforcedStyle: leading
|
8
|
+
|
9
|
+
# Allow using {} when chaining methods
|
10
|
+
Style/BlockDelimiters:
|
11
|
+
EnforcedStyle: braces_for_chaining
|
12
|
+
|
13
|
+
# The default of 80 characters is a little to narrow.
|
14
|
+
Metrics/LineLength:
|
15
|
+
Max: 100
|
16
|
+
|
17
|
+
# Only place spaces inside blocks written with braces.
|
18
|
+
Style/SpaceInsideHashLiteralBraces:
|
19
|
+
EnforcedStyle: no_space
|
20
|
+
|
21
|
+
# Allow extend self
|
22
|
+
Style/ModuleFunction:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
# Do not require class and module doc strings
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 0.
|
3
|
+
### Version 0.3.0
|
4
4
|
|
5
|
-
2016-
|
5
|
+
2016-09-09
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/tf/semmy/compare/v0.2.0...v0.
|
7
|
+
[Compare changes](https://github.com/tf/semmy/compare/v0.2.0...v0.3.0)
|
8
8
|
|
9
9
|
- Fix default GitHub compare url.
|
10
10
|
- Add link comparing to last patch level for stable release.
|
data/bin/rubocop
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
#
|
4
|
+
# This file was generated by Bundler.
|
5
|
+
#
|
6
|
+
# The application 'rubocop' is installed as part of a gem, and
|
7
|
+
# this file is here to facilitate running it.
|
8
|
+
#
|
9
|
+
|
10
|
+
require "pathname"
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
12
|
+
Pathname.new(__FILE__).realpath)
|
13
|
+
|
14
|
+
require "rubygems"
|
15
|
+
require "bundler/setup"
|
16
|
+
|
17
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/lib/semmy.rb
CHANGED
data/lib/semmy/gemspec.rb
CHANGED
@@ -12,15 +12,15 @@ module Semmy
|
|
12
12
|
specification.homepage
|
13
13
|
end
|
14
14
|
|
15
|
+
def path
|
16
|
+
Dir.glob('*.gemspec').first ||
|
17
|
+
fail(NotFound, 'Gemspec not found.')
|
18
|
+
end
|
19
|
+
|
15
20
|
private
|
16
21
|
|
17
22
|
def specification
|
18
23
|
Gem::Specification.load(path)
|
19
24
|
end
|
20
|
-
|
21
|
-
def path
|
22
|
-
Dir.glob('*.gemspec').first ||
|
23
|
-
fail(NotFound, 'Gemspec not found.')
|
24
|
-
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/semmy/project.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Semmy
|
2
|
+
module RubyGems
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def build_and_test_install
|
6
|
+
Shell.sub_process_output(`#{command}`)
|
7
|
+
$?.success?
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def command
|
13
|
+
"gem build -V #{Gemspec.path} 2>&1 && " \
|
14
|
+
"gem install --local #{built_gem_path} 2>&1 && " \
|
15
|
+
"gem uninstall #{Gemspec.gem_name} -v #{Project.version} 2>&1 && " \
|
16
|
+
"rm #{built_gem_path}" \
|
17
|
+
end
|
18
|
+
|
19
|
+
def built_gem_path
|
20
|
+
[Gemspec.gem_name, '-', Project.version, '.gem'].join
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/semmy/shell.rb
CHANGED
data/lib/semmy/tasks.rb
CHANGED
@@ -5,6 +5,7 @@ require 'semmy/tasks/branches'
|
|
5
5
|
require 'semmy/tasks/changelog_sections'
|
6
6
|
require 'semmy/tasks/commit'
|
7
7
|
require 'semmy/tasks/docs'
|
8
|
+
require 'semmy/tasks/lint'
|
8
9
|
require 'semmy/tasks/versioning'
|
9
10
|
|
10
11
|
module Semmy
|
@@ -17,6 +18,7 @@ module Semmy
|
|
17
18
|
yield config if block_given?
|
18
19
|
|
19
20
|
namespace 'semmy' do
|
21
|
+
Lint.new(config)
|
20
22
|
Versioning.new(config)
|
21
23
|
Docs.new(config)
|
22
24
|
ChangelogSections.new(config)
|
@@ -39,7 +41,7 @@ module Semmy
|
|
39
41
|
]
|
40
42
|
|
41
43
|
desc 'Prepare release'
|
42
|
-
task 'release:prepare' do
|
44
|
+
task 'release:prepare' => 'semmy:lint' do
|
43
45
|
if Scm.on_master?
|
44
46
|
Rake.application['release:prepare:master'].invoke
|
45
47
|
elsif Scm.on_stable?(config.stable_branch_name)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'git'
|
2
|
+
|
3
|
+
module Semmy
|
4
|
+
module Tasks
|
5
|
+
class Lint < Base
|
6
|
+
def define
|
7
|
+
task 'lint' => ['lint:install', 'lint:locales']
|
8
|
+
|
9
|
+
namespace 'lint' do
|
10
|
+
task 'install' do
|
11
|
+
Shell.info('Ensuring gem can be installed.')
|
12
|
+
|
13
|
+
unless RubyGems.build_and_test_install
|
14
|
+
Shell.error('Test install failed.')
|
15
|
+
exit(1)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
task 'locales' do
|
20
|
+
Shell.info('Checking for not yet imported locales.')
|
21
|
+
|
22
|
+
if Project.has_not_yet_imported_locales?
|
23
|
+
Shell.error('There are still files in config/locales/new.')
|
24
|
+
exit(1)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/semmy/version.rb
CHANGED
data/semmy.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semmy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Fischbach
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.42.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.42.0
|
97
111
|
description:
|
98
112
|
email:
|
99
113
|
- mail@timfischbach.de
|
@@ -103,6 +117,7 @@ extra_rdoc_files: []
|
|
103
117
|
files:
|
104
118
|
- ".gitignore"
|
105
119
|
- ".rspec"
|
120
|
+
- ".rubocop.yml"
|
106
121
|
- ".travis.yml"
|
107
122
|
- CHANGELOG.md
|
108
123
|
- CODE_OF_CONDUCT.md
|
@@ -113,6 +128,7 @@ files:
|
|
113
128
|
- bin/console
|
114
129
|
- bin/rake
|
115
130
|
- bin/rspec
|
131
|
+
- bin/rubocop
|
116
132
|
- bin/setup
|
117
133
|
- lib/semmy.rb
|
118
134
|
- lib/semmy/changelog.rb
|
@@ -122,6 +138,7 @@ files:
|
|
122
138
|
- lib/semmy/files.rb
|
123
139
|
- lib/semmy/gemspec.rb
|
124
140
|
- lib/semmy/project.rb
|
141
|
+
- lib/semmy/ruby_gems.rb
|
125
142
|
- lib/semmy/scm.rb
|
126
143
|
- lib/semmy/shell.rb
|
127
144
|
- lib/semmy/tasks.rb
|
@@ -130,6 +147,7 @@ files:
|
|
130
147
|
- lib/semmy/tasks/changelog_sections.rb
|
131
148
|
- lib/semmy/tasks/commit.rb
|
132
149
|
- lib/semmy/tasks/docs.rb
|
150
|
+
- lib/semmy/tasks/lint.rb
|
133
151
|
- lib/semmy/tasks/versioning.rb
|
134
152
|
- lib/semmy/version.rb
|
135
153
|
- lib/semmy/version_file.rb
|
@@ -155,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
173
|
version: '0'
|
156
174
|
requirements: []
|
157
175
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.5.1
|
159
177
|
signing_key:
|
160
178
|
specification_version: 4
|
161
179
|
summary: Rake tasks for a semantic versioning of gems
|