roger 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +3 -2
- data/CHANGELOG.md +3 -0
- data/azure-pipelines.yml +31 -0
- data/lib/roger/release/finalizers/git_branch.rb +4 -4
- data/lib/roger/release/scm/git.rb +6 -6
- data/lib/roger/renderer.rb +1 -1
- data/lib/roger/resolver.rb +1 -1
- data/lib/roger/server.rb +1 -1
- data/lib/roger/version.rb +1 -1
- data/test/unit/generators/new_test.rb +2 -1
- data/test/unit/release/finalizers/rsync_test.rb +3 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6071a3c717f18dc4886723a0614e5ef650efb9e1147c3b14f2cbdb88e2b8f66a
|
4
|
+
data.tar.gz: 39d6a8f3f1bf2dbb762ae3dbc09c5ece10d134557142aa48734565f18d915eb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d5bb54c66be7aad6bf1a7446108fd6c546ee6f08161f36256b7eb00ed7183799bb82a25c182aacf7d66560690b59e41761580464f16a7bddb25ba9008ab9b0
|
7
|
+
data.tar.gz: 4f226bb86eb4ba2514889cd67337f02eefbdb997c3a5edfc1226d801f37e8ae88c7a06a0d6d3e32a8a6f9568d35c6eb0bcd78c13b9fc6e50ec496b2668069328
|
data/.rubocop.yml
CHANGED
@@ -32,6 +32,9 @@ Style/ClassAndModuleChildren:
|
|
32
32
|
Style/SymbolArray:
|
33
33
|
Enabled: false
|
34
34
|
|
35
|
+
Style/FrozenStringLiteralComment:
|
36
|
+
Enabled: false
|
37
|
+
|
35
38
|
# By default, the rails cops are not run. Override in project or home
|
36
39
|
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
37
40
|
Rails:
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/azure-pipelines.yml
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Ruby
|
2
|
+
# Package your Ruby application.
|
3
|
+
# Add steps that install rails, analyze code, save build artifacts, deploy, and more:
|
4
|
+
# https://docs.microsoft.com/vsts/pipelines/languages/ruby
|
5
|
+
|
6
|
+
pool:
|
7
|
+
vmImage: 'vs2017-win2016'
|
8
|
+
|
9
|
+
steps:
|
10
|
+
- task: UseRubyVersion@0
|
11
|
+
inputs:
|
12
|
+
versionSpec: '>= 2.5'
|
13
|
+
|
14
|
+
- script: choco install zip -y
|
15
|
+
displayName: 'Install zip command using chocolatey'
|
16
|
+
|
17
|
+
- script: |
|
18
|
+
git config --global user.email "foo@example.com"
|
19
|
+
git config --global user.name "Foo Bar"
|
20
|
+
displayName: 'Configure Git for tests that call out to Git'
|
21
|
+
|
22
|
+
- script: gem install bundler
|
23
|
+
displayName: 'gem install bundler'
|
24
|
+
|
25
|
+
- script: |
|
26
|
+
bundle install --retry=3 --jobs=4
|
27
|
+
displayName: 'bundle install'
|
28
|
+
|
29
|
+
- script: bundle exec rake
|
30
|
+
displayName: 'bundle exec rake'
|
31
|
+
|
@@ -58,15 +58,15 @@ module Roger::Release::Finalizers
|
|
58
58
|
FileUtils.cp_r @release.build_path.to_s + "/.", clone_dir.to_s
|
59
59
|
|
60
60
|
commands = [
|
61
|
-
|
62
|
-
%
|
61
|
+
"git add .", # 4. Add all files
|
62
|
+
%(git commit -q -m "Release #{Shellwords.escape(release.scm.version)}") # 5. Commit
|
63
63
|
]
|
64
64
|
|
65
65
|
# 6. Git push if in options
|
66
|
-
commands << (
|
66
|
+
commands << ("git push origin" << Shellwords.escape(branch)) if @options[:push]
|
67
67
|
|
68
68
|
commands.each do |command|
|
69
|
-
`#{
|
69
|
+
`#{command}`
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -50,12 +50,12 @@ module Roger
|
|
50
50
|
|
51
51
|
def get_previous_tag_name
|
52
52
|
# Get list of SHA1 that have a ref
|
53
|
-
sha1s = `git --git-dir=#{safe_git_dir} log --pretty=
|
53
|
+
sha1s = `git --git-dir=#{safe_git_dir} log --pretty="%H" --simplify-by-decoration`
|
54
54
|
sha1s = sha1s.split("\n")
|
55
55
|
tags = []
|
56
56
|
while tags.size < 2 && sha1s.any?
|
57
57
|
sha1 = sha1s.shift
|
58
|
-
tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1}
|
58
|
+
tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1}`
|
59
59
|
tag = tag.strip
|
60
60
|
tags << tag unless tag.empty?
|
61
61
|
end
|
@@ -84,11 +84,11 @@ module Roger
|
|
84
84
|
def scm_version(ref)
|
85
85
|
return nil unless File.exist?(git_dir)
|
86
86
|
|
87
|
-
version = `git --git-dir=#{safe_git_dir} describe --tags #{ref}
|
87
|
+
version = `git --git-dir=#{safe_git_dir} describe --tags #{ref}`
|
88
88
|
|
89
|
-
if $CHILD_STATUS.to_i
|
89
|
+
if $CHILD_STATUS.to_i.positive?
|
90
90
|
# HEAD is not a tagged version, get the short SHA1 instead
|
91
|
-
version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s
|
91
|
+
version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s`
|
92
92
|
else
|
93
93
|
# HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
|
94
94
|
version.gsub!(/^v/, "")
|
@@ -105,7 +105,7 @@ module Roger
|
|
105
105
|
return nil unless File.exist?(git_dir)
|
106
106
|
|
107
107
|
# Get the date in epoch time
|
108
|
-
date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s
|
108
|
+
date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s`
|
109
109
|
Time.at(date.to_i) if date =~ /\d+/
|
110
110
|
rescue RuntimeError
|
111
111
|
nil
|
data/lib/roger/renderer.rb
CHANGED
@@ -79,7 +79,7 @@ module Roger
|
|
79
79
|
# .html.erb will look at .html
|
80
80
|
def mime_type_from_sub_extension(path)
|
81
81
|
parts = File.basename(path.to_s).split(".")
|
82
|
-
MIME::Types.type_for(parts[0..-2].join(".")).first if parts.size > 2
|
82
|
+
MIME::Types.type_for(parts[0..-2].join(".")).sort.first if parts.size > 2
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
data/lib/roger/resolver.rb
CHANGED
@@ -217,7 +217,7 @@ module Roger
|
|
217
217
|
relative_to = Pathname.new(File.dirname(relative_to.to_s))
|
218
218
|
|
219
219
|
# If relative_to is an absolute path
|
220
|
-
if relative_to.
|
220
|
+
if relative_to.absolute?
|
221
221
|
relative_to = relative_to.relative_path_from(base).cleanpath
|
222
222
|
end
|
223
223
|
|
data/lib/roger/server.rb
CHANGED
data/lib/roger/version.rb
CHANGED
@@ -48,7 +48,8 @@ module Roger
|
|
48
48
|
c.directory "template" do |t|
|
49
49
|
system("git init -q")
|
50
50
|
t.file "gitone"
|
51
|
-
system("git add gitone
|
51
|
+
system("git add gitone")
|
52
|
+
system("git commit -q -am 'test'")
|
52
53
|
end
|
53
54
|
|
54
55
|
git_path = "file://#{c + 'template/.git'}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-02-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
@@ -185,6 +185,7 @@ files:
|
|
185
185
|
- MIT_LICENSE
|
186
186
|
- README.md
|
187
187
|
- Rakefile
|
188
|
+
- azure-pipelines.yml
|
188
189
|
- bin/roger
|
189
190
|
- doc/cli.md
|
190
191
|
- doc/images/logo_black-yellow.png
|
@@ -356,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
356
357
|
version: '0'
|
357
358
|
requirements: []
|
358
359
|
rubyforge_project:
|
359
|
-
rubygems_version: 2.7.
|
360
|
+
rubygems_version: 2.7.8
|
360
361
|
signing_key:
|
361
362
|
specification_version: 4
|
362
363
|
summary: Roger is a set of tools to create self-containing HTML mockups.
|